亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? localdevice.java

?? java se平臺藍牙開發的插件 ,包括源碼 根據readme 生成包很多東西可以自己DIY很實用
?? JAVA
字號:
/* Copyright 2004 Intel Corporation This file is part of Blue Cove. Blue Cove is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. Blue Cove is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with Blue Cove; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */package javax.bluetooth;import java.io.IOException;import javax.microedition.io.Connection;import com.intel.bluetooth.BluetoothPeer;import com.intel.bluetooth.BluetoothStreamConnectionNotifier;public class LocalDevice {		private static LocalDevice localDevice;	private BluetoothPeer bluetoothPeer;	private DiscoveryAgent discoveryAgent;	private String address;	private long bluetoothAddress;	private LocalDevice() {		bluetoothPeer = new BluetoothPeer();		discoveryAgent = new DiscoveryAgent();		try {			int socket = bluetoothPeer.socket(false, false);			bluetoothAddress = bluetoothPeer.getsockaddress(socket);			address = Long.toHexString(bluetoothAddress);			bluetoothPeer.close(socket);		} catch (IOException e) {			address = "";		}		address = "000000000000".substring(address.length()) + address;	}	public BluetoothPeer getBluetoothPeer() {		return bluetoothPeer;	}	/*	 * Retrieves the LocalDevice object for the local Bluetooth device. Multiple	 * calls to this method will return the same object. This method will never	 * return null. Returns: an object that represents the local Bluetooth	 * device Throws: BluetoothStateException - if the Bluetooth system could	 * not be initialized	 */	public static LocalDevice getLocalDevice() throws BluetoothStateException {		if (localDevice == null)			localDevice = new LocalDevice();		return localDevice;	}	/*	 * Returns the discovery agent for this device. Multiple calls to this	 * method will return the same object. This method will never return null.	 * Returns: the discovery agent for the local device	 */	public DiscoveryAgent getDiscoveryAgent() {		return discoveryAgent;	}	/*	 * Retrieves the name of the local device. The Bluetooth specification calls	 * this name the "Bluetooth device name" or the "user-friendly name".	 * Returns: the name of the local device; null if the name could not be	 * retrieved	 */	public String getFriendlyName() {		return bluetoothPeer.getradioname(bluetoothAddress);	}	/*	 * Retrieves the DeviceClass object that represents the service classes,	 * major device class, and minor device class of the local device. This	 * method will return null if the service classes, major device class, or	 * minor device class could not be determined. Returns: the service classes,	 * major device class, and minor device class of the local device, or null	 * if the service classes, major device class or minor device class could	 * not be determined	 */	public DeviceClass getDeviceClass() {		return null;	}	/*	 * Sets the discoverable mode of the device. The mode may be any number in	 * the range 0x9E8B00 to 0x9E8B3F as defined by the Bluetooth Assigned	 * Numbers Document. When this specification was defined, only GIAC	 * (DiscoveryAgent.GIAC) and LIAC (DiscoveryAgent.LIAC) were defined, but	 * Bluetooth profiles may add additional access codes in the future. To	 * determine what values may be used, check the Bluetooth Assigned Numbers	 * document at http://www.bluetooth.org/assigned-numbers/baseband.htm. If	 * DiscoveryAgent.GIAC or DiscoveryAgent.LIAC are provided, then this method	 * will attempt to put the device into general or limited discoverable mode,	 * respectively. To take a device out of discoverable mode, provide the	 * DiscoveryAgent.NOT_DISCOVERABLE flag. The BCC decides if the request will	 * be granted. In addition to the BCC, the Bluetooth system could effect the	 * discoverability of a device. According to the Bluetooth Specification, a	 * device should only be limited discoverable (DiscoveryAgent.LIAC) for 1	 * minute. This is handled by the implementation of the API. After the	 * minute is up, the device will revert back to the previous discoverable	 * mode.	 * 	 * Parameters: mode - the mode the device should be in; valid modes are	 * DiscoveryAgent.GIAC, DiscoveryAgent.LIAC, DiscoveryAgent.NOT_DISCOVERABLE	 * and any value in the range 0x9E8B00 to 0x9E8B3F Returns: true if the	 * request succeeded, otherwise false if the request failed because the BCC	 * denied the request; false if the Bluetooth system does not support the	 * access mode specified in mode Throws: IllegalArgumentException - if the	 * mode is not DiscoveryAgent.GIAC, DiscoveryAgent.LIAC,	 * DiscoveryAgent.NOT_DISCOVERABLE, or in the range 0x9E8B00 to 0x9E8B3F	 * BluetoothStateException - if the Bluetooth system is in a state that does	 * not allow the discoverable mode to be changed See Also:	 * DiscoveryAgent.GIAC, DiscoveryAgent.LIAC, DiscoveryAgent.NOT_DISCOVERABLE	 */	public boolean setDiscoverable(int mode) throws BluetoothStateException {		return false;	}	/*	 * Retrieves Bluetooth system properties. The following properties must be	 * supported, but additional values are allowed: Property Name Description	 * bluetooth.api.version The version of the Java API for Bluetooth wireless	 * technology that is supported. For this version it will be set to "1.0".	 * bluetooth.master.switch Is master/slave switch allowed? Valid values are	 * either "true" or "false". bluetooth.sd.attr.retrievable.max Maximum	 * number of service attributes to be retrieved per service record. The	 * string will be in Base 10 digits. bluetooth.connected.devices.max The	 * maximum number of connected devices supported. This number may be greater	 * than 7 if the implementation handles parked connections. The string will	 * be in Base 10 digits. bluetooth.l2cap.receiveMTU.max The maximum	 * ReceiveMTU size in bytes supported in L2CAP. The string will be in Base	 * 10 digits, e.g. "32". bluetooth.sd.trans.max Maximum number of concurrent	 * service discovery transactions. The string will be in Base 10 digits.	 * bluetooth.connected.inquiry.scan Is Inquiry scanning allowed during	 * connection? Valid values are either "true" or "false".	 * bluetooth.connected.page.scan Is Page scanning allowed during connection?	 * Valid values are either "true" or "false". bluetooth.connected.inquiry Is	 * Inquiry allowed during a connection? Valid values are either "true" or	 * "false". bluetooth.connected.page Is paging allowed during a connection?	 * In other words, can a connection be established to one device if it is	 * already connected to another device. Valid values are either "true" or	 * "false".	 * 	 * Parameters: property - the property to retrieve as defined in this class.	 * Returns: the value of the property specified; null if the property is not	 * defined	 */	public static String getProperty(String property) {		return null;	}	/*	 * Retrieves the local device's discoverable mode. The return value will be	 * DiscoveryAgent.GIAC, DiscoveryAgent.LIAC,	 * DiscoveryAgent.NOT_DISCOVERABLE, or a value in the range 0x9E8B00 to	 * 0x9E8B3F. Returns: the discoverable mode the device is presently in See	 * Also: DiscoveryAgent.GIAC, DiscoveryAgent.LIAC,	 * DiscoveryAgent.NOT_DISCOVERABLE	 */	public int getDiscoverable() {		return DiscoveryAgent.NOT_DISCOVERABLE;	}	/*	 * Retrieves the Bluetooth address of the local device. The Bluetooth	 * address will never be null. The Bluetooth address will be 12 characters	 * long. Valid characters are 0-9 and A-F. Returns: the Bluetooth address of	 * the local device	 */	public String getBluetoothAddress() {		return address;	}	/*	 * Gets the service record corresponding to a btspp, btl2cap, or btgoep	 * notifier. In the case of a run-before-connect service, the service record	 * returned by getRecord() was created by the same call to Connector.open()	 * that created the notifier. If a connect-anytime server application does	 * not already have a service record in the SDDB, either because a service	 * record for this service was never added to the SDDB or because the	 * service record was added and then removed, then the ServiceRecord	 * returned by getRecord() was created by the same call to Connector.open()	 * that created the notifier.	 * 	 * In the case of a connect-anytime service, there may be a service record	 * in the SDDB corresponding to this service prior to application startup.	 * In this case, the getRecord() method must return a ServiceRecord whose	 * contents match those of the corresponding service record in the SDDB. If	 * a connect-anytime server application made changes previously to its	 * service record in the SDDB (for example, during a previous execution of	 * the server), and that service record is still in the SDDB, then those	 * changes must be reflected in the ServiceRecord returned by getRecord().	 * 	 * Two invocations of this method with the same notifier argument return	 * objects that describe the same service attributes, but the return values	 * may be different object references.	 * 	 * Parameters: notifier - a connection that waits for clients to connect to	 * a Bluetooth service Returns: the ServiceRecord associated with notifier	 * Throws: IllegalArgumentException - if notifier is closed, or if notifier	 * does not implement one of the following interfaces:	 * javax.microedition.io.StreamConnectionNotifier,	 * javax.bluetooth.L2CapConnectionNotifier, or javax.obex.SessionNotifier.	 * This exception is also thrown if notifier is not a Bluetooth notifier,	 * e.g., a StreamConnectionNotifier created with a scheme other than btspp.	 * NullPointerException - if notifier is null	 */	public ServiceRecord getRecord(Connection notifier) {		if (notifier == null)			throw new NullPointerException();		if (!(notifier instanceof BluetoothStreamConnectionNotifier))			throw new IllegalArgumentException();		return ((BluetoothStreamConnectionNotifier) notifier)				.getServiceRecord();	}	/*	 * Updates the service record in the local SDDB that corresponds to the	 * ServiceRecord parameter. Updating is possible only if srvRecord was	 * obtained using the getRecord() method. The service record in the SDDB is	 * modified to have the same service attributes with the same contents as	 * srvRecord. If srvRecord was obtained from the SDDB of a remote device	 * using the service search methods, updating is not possible and this	 * method will throw an IllegalArgumentException.	 * 	 * If the srvRecord parameter is a btspp service record, then before the	 * SDDB is changed the following checks are performed. If any of these	 * checks fail, then an IllegalArgumentException is thrown.	 * 	 * ServiceClassIDList and ProtocolDescriptorList, the mandatory service	 * attributes for a btspp service record, must be present in srvRecord.	 * L2CAP and RFCOMM must be in the ProtocolDescriptorList. srvRecord must	 * not have changed the RFCOMM server channel number from the channel number	 * that is currently in the SDDB version of this service record. If the	 * srvRecord parameter is a btl2cap service record, then before the SDDB is	 * changed the following checks are performed. If any of these checks fail,	 * then an IllegalArgumentException is thrown.	 * 	 * ServiceClassIDList and ProtocolDescriptorList, the mandatory service	 * attributes for a btl2cap service record, must be present in srvRecord.	 * L2CAP must be in the ProtocolDescriptorList. srvRecord must not have	 * changed the PSM value from the PSM value that is currently in the SDDB	 * version of this service record. If the srvRecord parameter is a btgoep	 * service record, then before the SDDB is changed the following checks are	 * performed. If any of these checks fail, then an IllegalArgumentException	 * is thrown.	 * 	 * ServiceClassIDList and ProtocolDescriptorList, the mandatory service	 * attributes for a btgoep service record, must be present in srvRecord.	 * L2CAP, RFCOMM and OBEX must all be in the ProtocolDescriptorList.	 * srvRecord must not have changed the RFCOMM server channel number from the	 * channel number that is currently in the SDDB version of this service	 * record. updateRecord() is not required to ensure that srvRecord is a	 * completely valid service record. It is the responsibility of the	 * application to ensure that srvRecord follows all of the applicable	 * syntactic and semantic rules for service record correctness.	 * 	 * If there is currently no SDDB version of the srvRecord service record,	 * then this method will do nothing.	 * 	 * Parameters: srvRecord - the new contents to use for the service record in	 * the SDDB Throws: NullPointerException - if srvRecord is null	 * IllegalArgumentException - if the structure of the srvRecord is missing	 * any mandatory service attributes, or if an attempt has been made to	 * change any of the values described as fixed. ServiceRegistrationException -	 * if the local SDDB could not be updated successfully due to insufficient	 * disk space, database locks, etc.	 */	/*	 * public void updateRecord(ServiceRecord srvRecord) throws	 * ServiceRegistrationException { }	 */}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
全部av―极品视觉盛宴亚洲| 久久婷婷国产综合精品青草| 亚洲男人天堂av网| 色综合激情久久| 亚洲一区在线观看免费 | 欧洲视频一区二区| 亚洲国产成人精品视频| 日韩一区二区麻豆国产| 国产丶欧美丶日本不卡视频| 国产精品视频一二三| 在线看不卡av| 久久99九九99精品| 亚洲欧洲成人自拍| 欧美日韩午夜在线| 国产中文一区二区三区| 国产精品第四页| 精品久久久久久久人人人人传媒| 欧美日韩不卡一区| 91精品欧美久久久久久动漫| 欧美一区二区私人影院日本| 欧美一区二区三区在线观看| 91蝌蚪porny九色| 亚洲第一福利视频在线| 欧美哺乳videos| 99热精品一区二区| 水蜜桃久久夜色精品一区的特点| 26uuu亚洲| 在线观看成人免费视频| 国产综合色精品一区二区三区| 自拍视频在线观看一区二区| 7777精品伊人久久久大香线蕉超级流畅 | 久久久久久免费| 色婷婷久久久综合中文字幕 | 国产一区二区三区免费观看| 亚洲欧美另类图片小说| 精品美女被调教视频大全网站| 99视频在线精品| 韩国av一区二区| 韩国成人精品a∨在线观看| 欧美网站一区二区| 亚洲六月丁香色婷婷综合久久 | 国产欧美一区二区精品久导航 | 国产午夜精品久久久久久久| 91黄色免费版| 国产91丝袜在线观看| 日韩成人免费电影| 亚洲精品午夜久久久| 中文字幕精品一区二区精品绿巨人| 欧美喷潮久久久xxxxx| 成人av电影在线播放| 国产一区二区三区免费观看| 美女国产一区二区三区| 亚洲国产精品久久久男人的天堂| 国产精品国产三级国产aⅴ原创| 精品剧情在线观看| 欧美一级专区免费大片| 欧美日韩中文国产| 欧美在线视频日韩| 在线免费观看一区| 99精品久久只有精品| 国产精品 欧美精品| 国产又黄又大久久| 久久精品99国产精品日本| 日韩精彩视频在线观看| 一区二区三区免费网站| 亚洲视频一区在线| 中文字幕一区二区三| 国产精品电影院| 国产精品久久国产精麻豆99网站| 久久网这里都是精品| 精品黑人一区二区三区久久| 91精品国产手机| 日韩欧美区一区二| 日韩精品一区二区三区中文精品| 欧美一区二区三区在线看| 欧美一区二区三区的| 欧美一区二区三区影视| 日韩一区二区三区视频在线观看| 51精品国自产在线| 日韩欧美在线123| 日韩欧美一卡二卡| 久久久久久电影| 中文字幕乱码亚洲精品一区| 国产精品久久综合| 一区二区视频免费在线观看| 夜夜精品浪潮av一区二区三区| 一卡二卡三卡日韩欧美| 亚洲成人777| 激情成人综合网| 成人理论电影网| 91蜜桃婷婷狠狠久久综合9色| 色天天综合色天天久久| 欧美色手机在线观看| 欧美一区二区三区色| 国产午夜精品久久久久久免费视 | 精品久久久久久无| 亚洲黄一区二区三区| 一区二区在线观看免费视频播放| 亚洲国产综合在线| 美女免费视频一区| 不卡视频一二三| 欧美日韩一区二区在线观看| 日韩欧美精品在线| 国产精品国产三级国产普通话三级 | 成人a区在线观看| 欧美午夜电影在线播放| 欧美一区二区视频免费观看| 国产欧美精品区一区二区三区 | 国产成人av电影在线| 91蝌蚪porny九色| 日韩视频一区二区三区在线播放| 久久久99久久精品欧美| 亚洲在线一区二区三区| 狠狠网亚洲精品| 色久优优欧美色久优优| 欧美成人激情免费网| 国产精品传媒在线| 免播放器亚洲一区| 色婷婷久久久亚洲一区二区三区| 欧美日韩精品欧美日韩精品| 国产午夜精品久久| 日本特黄久久久高潮| 91影院在线观看| www国产精品av| 亚洲成人av中文| 成人97人人超碰人人99| 日韩三级.com| 亚洲一区二区三区四区的| 国产超碰在线一区| 日韩亚洲欧美综合| 夜色激情一区二区| 成人av资源在线| 2014亚洲片线观看视频免费| 亚洲成人精品一区二区| www.日韩av| 国产欧美一区二区精品忘忧草| 视频一区中文字幕国产| 一本久久a久久精品亚洲| 久久久久久免费毛片精品| 秋霞国产午夜精品免费视频| 色婷婷综合激情| 国产精品日韩精品欧美在线| 久久精品理论片| 5月丁香婷婷综合| 亚洲国产成人tv| 欧美大片日本大片免费观看| 亚洲色大成网站www久久九九| 精品在线播放免费| 日韩一区二区三区视频| 亚洲午夜久久久| 色婷婷综合五月| 亚洲精品国产第一综合99久久| 成人午夜短视频| 国产精品三级电影| 成人激情视频网站| 欧美经典一区二区| 国产凹凸在线观看一区二区| 久久这里只有精品首页| 蜜桃视频一区二区| 欧美一区欧美二区| 美女脱光内衣内裤视频久久影院| 欧美日韩国产大片| 三级久久三级久久| 88在线观看91蜜桃国自产| 亚洲高清不卡在线| 678五月天丁香亚洲综合网| 婷婷国产v国产偷v亚洲高清| 欧美视频在线观看一区| 午夜伦欧美伦电影理论片| 欧美日韩一区二区在线观看| 爽好多水快深点欧美视频| 欧美一区二区三区日韩| 久久国产尿小便嘘嘘尿| 亚洲精品一区二区三区香蕉| 久久国产麻豆精品| 久久久久久99精品| av中文字幕一区| 一区二区三区免费| 这里是久久伊人| 紧缚捆绑精品一区二区| 久久久精品国产免费观看同学| 国产一区二区精品久久99| 国产欧美精品一区二区色综合| av网站一区二区三区| 一区二区三区在线免费观看| 欧美久久一二区| 久久99国产精品麻豆| 国产精品久久久久一区二区三区 | 欧美群妇大交群中文字幕| 免费观看成人鲁鲁鲁鲁鲁视频| 精品久久久久久久久久久久久久久 | 在线观看www91| 蜜乳av一区二区| 国产精品午夜久久| 色狠狠一区二区| 久久99精品久久久| 亚洲日本青草视频在线怡红院| 欧美日韩一区视频| 国产一区在线观看视频| 亚洲精品美腿丝袜|