001: /*
002: *
003: *
004: * Portions Copyright 2000-2007 Sun Microsystems, Inc. All Rights
005: * Reserved. Use is subject to license terms.
006: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
007: *
008: * This program is free software; you can redistribute it and/or
009: * modify it under the terms of the GNU General Public License version
010: * 2 only, as published by the Free Software Foundation.
011: *
012: * This program is distributed in the hope that it will be useful, but
013: * WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * General Public License version 2 for more details (a copy is
016: * included at /legal/license.txt).
017: *
018: * You should have received a copy of the GNU General Public License
019: * version 2 along with this work; if not, write to the Free Software
020: * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
021: * 02110-1301 USA
022: *
023: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
024: * Clara, CA 95054 or visit www.sun.com if you need additional
025: * information or have any questions.
026: */
027:
028: /*
029: * (c) Copyright 2001, 2002 Motorola, Inc. ALL RIGHTS RESERVED.
030: */
031: package javax.bluetooth;
032:
033: import com.sun.kvem.jsr082.bluetooth.DiscoveryAgentImpl;
034:
035: /**
036: * This class is defined by the JSR-82 specification
037: * <em>Java™ APIs for Bluetooth™ Wireless Technology,
038: * Version 1.1.</em>
039: */
040: // JAVADOC COMMENT ELIDED
041: public class DiscoveryAgent {
042:
043: // JAVADOC COMMENT ELIDED
044: public static final int NOT_DISCOVERABLE = 0;
045:
046: // JAVADOC COMMENT ELIDED
047: public static final int GIAC = 0x9E8B33;
048:
049: // JAVADOC COMMENT ELIDED
050: public static final int LIAC = 0x9E8B00;
051:
052: // JAVADOC COMMENT ELIDED
053: public static final int CACHED = 0x00;
054:
055: // JAVADOC COMMENT ELIDED
056: public static final int PREKNOWN = 0x01;
057:
058: // JAVADOC COMMENT ELIDED
059: private DiscoveryAgentImpl discoveryAgentImpl;
060:
061: // JAVADOC COMMENT ELIDED
062: DiscoveryAgent() {
063: discoveryAgentImpl = DiscoveryAgentImpl.getInstance();
064: }
065:
066: // JAVADOC COMMENT ELIDED
067: public RemoteDevice[] retrieveDevices(int option) {
068: return discoveryAgentImpl.retrieveDevices(option);
069: }
070:
071: // JAVADOC COMMENT ELIDED
072: public boolean startInquiry(int accessCode,
073: DiscoveryListener listener) throws BluetoothStateException {
074: return discoveryAgentImpl.startInquiry(accessCode, listener);
075: }
076:
077: // JAVADOC COMMENT ELIDED
078: public boolean cancelInquiry(DiscoveryListener listener) {
079: return discoveryAgentImpl.cancelInquiry(listener);
080: }
081:
082: // JAVADOC COMMENT ELIDED
083: public int searchServices(int[] attrSet, UUID[] uuidSet,
084: RemoteDevice btDev, DiscoveryListener discListener)
085: throws BluetoothStateException {
086: return discoveryAgentImpl.searchServices(attrSet, uuidSet,
087: btDev, discListener);
088: }
089:
090: // JAVADOC COMMENT ELIDED
091: public boolean cancelServiceSearch(int transID) {
092: return discoveryAgentImpl.cancelServiceSearch(transID);
093: }
094:
095: // JAVADOC COMMENT ELIDED
096: public String selectService(UUID uuid, int security, boolean master)
097: throws BluetoothStateException {
098: return discoveryAgentImpl.selectService(uuid, security, master);
099: }
100: } // end of class 'DiscoveryAgent' definition
|