2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 using Tizen.Internals.Errors;
20 namespace Tizen.Network.Bluetooth
23 /// Enumeration for Bluetooth state.
25 public enum BluetoothState
38 /// Enumeration for Bluetooth errors.
40 public enum BluetoothError
45 None = ErrorCode.None,
47 /// Operation cancelled
49 Cancelled = ErrorCode.Canceled,
53 InvalidParameter = ErrorCode.InvalidParameter,
57 OutOfMemory = ErrorCode.OutOfMemory,
59 /// Device or resource busy
61 ResourceBusy = ErrorCode.ResourceBusy,
65 TimedOut = ErrorCode.TimedOut,
67 /// Operation now in progress
69 NowInProgress = ErrorCode.NowInProgress,
71 /// Bluetooth is Not Supported
73 NotSupported = ErrorCode.NotSupported,
77 PermissionDenied = ErrorCode.PermissionDenied,
81 QuotaExceeded = ErrorCode.QuotaExceeded,
85 NoData = ErrorCode.NoData,
87 /// Local adapter not initialized
89 NotInitialized = -0x01C00000 | 0x0101,
91 /// Local adapter not enabled
93 NotEnabled = -0x01C00000 | 0x0102,
95 /// Operation already done
97 AlreadyDone = -0x01C00000 | 0x0103,
101 OperationFailed = -0x01C00000 | 0x0104,
103 /// Operation not in progress
105 NotInProgress = -0x01C00000 | 0x0105,
107 /// Remote device not bonded
109 RemoteDeviceNotBonded = -0x01C00000 | 0x0106,
111 /// Authentication rejected
113 AuthRejected = -0x01C00000 | 0x0107,
115 /// Authentication failed
117 AuthFailed = -0x01C00000 | 0x0108,
119 /// Remote device not found
121 RemoteDeviceNotFound = -0x01C00000 | 0x0109,
123 /// Service search failed
125 ServiceSearchFailed = -0x01C00000 | 0x010A,
127 /// Remote device is not connected
129 RemoteDeviceNotConnected = -0x01C00000 | 0x010B,
131 /// Resource temporarily unavailable
133 ResourceUnavailable = -0x01C00000 | 0x010C,
135 /// Service Not Found
137 ServiceNotFound = -0x01C00000 | 0x010D
141 /// Enumeration for Bluetooth visibility mode.
143 public enum VisibilityMode
146 /// Non discoverable mode.
150 /// Discoverable mode.
154 /// Discoverable mode with limited time.
156 TimeLimitedDiscoverable = 2
160 /// Enumeration for Bluetooth major device class type.
162 public enum BluetoothMajorDeviceClassType
165 /// Miscellaneous major class type.
169 /// Computer major class type.
173 /// Phone major class type.
177 /// LAN/Network access point major class type.
179 LanNetworkAccessPoint = 0x03,
181 /// Audio/Video major class type.
185 /// Peripheral major class type.
189 /// Imaging major class type.
193 /// Wearable major class type.
197 /// Toy major class type.
201 /// Health major class type.
205 /// Uncategorized major class type.
211 /// Enumeration for Bluetooth minor device class type.
213 public enum BluetoothMinorDeviceClassType
216 /// Uncategorized computer minor class type.
218 ComputerUncategorized = 0x00,
220 /// Desktop workstation computer minor class type.
222 ComputerDesktopWorkstation = 0x04,
224 /// Server computer minor class type.
226 ComputerServer = 0x08,
228 /// Laptop computer minor class type.
230 ComputerLaptop = 0x0C,
232 /// Handheld PC/PDA computer minor class type.
234 ComputerHandheldPcOrPda = 0x10,
236 /// Palm sized PC/PDA computer minor class type.
238 ComputerPalmSizedPcOrPda = 0x14,
240 /// Wearable computer minor class type.
242 ComputerWearableComputer = 0x18,
245 /// Unclassified phone minor class type.
247 PhoneUncategorized = 0x00,
249 /// Cellular phone minor class type.
251 PhoneCellular = 0x04,
253 /// Cordless phone minor class type.
255 PhoneCordless = 0x08,
257 /// SmartPhone phone minor class type.
259 PhoneSmartPhone = 0x0C,
261 /// Wired modem or voice gateway phone minor class type.
263 PhoneWiredModemOrVoiceGateway = 0x10,
265 /// ISDN phone minor class type.
267 PhoneCommonIsdnAccess = 0x14,
270 /// Fully available LAN/Network access point minor class type.
272 LanNetworkAccessPointFullyAvailable = 0x04,
274 /// 1-17% utilized LAN/Network access point minor class type.
276 LanNetworkAccessPoint1To17PercentUtilized = 0x20,
278 /// 17-33% utilized LAN/Network access point minor class type.
280 LanNetworkAccessPoint17To33PercentUtilized = 0x40,
282 /// 33-50% utilized LAN/Network access point minor class type.
284 LanNetworkAccessPoint33To50PercentUtilized = 0x60,
286 /// 50-67% utilized LAN/Network access point minor class type.
288 LanNetworkAccessPoint50To67PercentUtilized = 0x80,
290 /// 67-83% utilized LAN/Network access point minor class type.
292 LanNetworkAccessPoint67To83PercentUtilized = 0xA0,
294 /// 83-99% utilized LAN/Network access point minor class type.
296 LanNetworkAccessPoint83To99PercentUtilized = 0xC0,
298 /// No service available LAN/Network access point minor class type.
300 LanNetworkAccessPointNoServiceAvailable = 0xE0,
303 /// Uncategorized audio/video minor class type.
305 AudioVideoUncategorized = 0x00,
307 /// Wearable headset audio/video minor class type.
309 AudioVideoWearableHeadset = 0x04,
311 /// Hands free audio/video minor class type.
313 AudioVideoHandsFree = 0x08,
315 /// Microphone audio/video minor class type.
317 AudioVideoMicrophone = 0x10,
319 /// Loudspeaker audio/video minor class type.
321 AudioVideoLoudspeaker = 0x14,
323 /// Headphones audio/video minor class type.
325 AudioVideoHeadphones = 0x18,
327 /// Portable audio audio/video minor class type.
329 AudioVideoPortableAudio = 0x1C,
331 /// Car audio audio/video minor class type.
333 AudioVideoCarAudio = 0x20,
335 /// SetTopbox audio/video minor class type.
337 AudioVideoSetTopBox = 0x24,
339 /// Hifi audio audio/video minor class type.
341 AudioVideoHifiAudioDevice = 0x28,
343 /// VCR audio/video minor class type.
345 AudioVideoVcr = 0x2C,
347 /// Video camera audio/video minor class type.
349 AudioVideoVideoCamera = 0x30,
351 /// Camcorder audio/video minor class type.
353 AudioVideoCamcorder = 0x34,
355 /// Video monitor audio/video minor class type.
357 AudioVideoVideoMonitor = 0x38,
359 /// Video display and loudspeaker audio/video minor class type.
361 AudioVideoVideoDisplayLoudspeaker = 0x3C,
363 /// Video conferencing audio/video minor class type.
365 AudioVideoVideoConferencing = 0x40,
367 /// Gaming/toy audio/video minor class type.
369 AudioVideoGamingToy = 0x48,
372 /// Uncategorized peripheral minor class type.
374 PeripheralUncategorized = 0x00,
376 /// Keyboard peripheral minor class type.
378 PeripheralKeyBoard = 0x40,
380 /// Pointing device peripheral minor class type.
382 PeripheralPointingDevice = 0x80,
384 /// Combo keyboard peripheral minor class type.
386 PeripheralComboKeyboardPointingDevice = 0xC0,
388 /// Joystick peripheral minor class type.
390 PeripheralJoystick = 0x04,
392 /// Game pad peripheral minor class type.
394 PeripheralGamePad = 0x08,
396 /// Remote control peripheral minor class type.
398 PeripheralRemoteControl = 0x0C,
400 /// Sensing device peripheral minor class type.
402 PeripheralSensingDevice = 0x10,
404 /// Digitizer peripheral minor class type.
406 PeripheralDigitizerTablet = 0x14,
408 /// Card reader peripheral minor class type.
410 PeripheralCardReader = 0x18,
412 /// Digital pen peripheral minor class type.
414 PeripheralDigitalPen = 0x1C,
416 /// Handheld scanner peripheral minor class type.
418 PeripheralHandheldScanner = 0x20,
420 /// Handheld gestural input computer minor class type.
422 PeripheralHandheldGesturalInputDevice = 0x24,
425 /// Display imaging minor class type.
427 ImagingDisplay = 0x10,
429 /// Camera imaging minor class type.
431 ImagingCamera = 0x20,
433 /// Scanner imaging minor class type.
435 ImagingScanner = 0x40,
437 /// Printer imaging minor class type.
439 ImagingPrinter = 0x80,
442 /// Wrist watch wearable minor class type.
444 WearableWristWatch = 0x04,
446 /// Pager wearable minor class type.
448 WearablePager = 0x08,
450 /// Jacket wearable minor class type.
452 WearableJacket = 0x0C,
454 /// Helmet wearable minor class type.
456 WearableHelmet = 0x10,
458 /// Glasses wearable minor class type.
460 WearableGlasses = 0x14,
463 /// Robot toy minor class type.
467 /// Vehicle toy minor class type.
471 /// Doll toy minor class type.
473 ToyDollAction = 0x0C,
475 /// Controller toy minor class type.
477 ToyController = 0x10,
479 /// Game toy minor class type.
484 /// Uncategorized health minor class type.
486 HealthUncategorized = 0x00,
488 /// BP monitor health minor class type.
490 HealthBloodPressureMonitor = 0x04,
492 /// Thermometer health minor class type.
494 HealthThermometer = 0x08,
496 /// Scale health minor class type.
498 HealthWeighingScale = 0x0C,
500 /// Glucose meter health minor class type.
502 HealthGlucoseMeter= 0x10,
504 /// Pulse oximeter health minor class type.
506 HealthPulseOximeter = 0x14,
508 /// Heart/Pulse rate monitor health minor class type.
510 HealthHeartPulseRateMonitor = 0x18,
512 /// Display health minor class type.
514 HealthDataDisplay = 0x1C,
516 /// Step counter health minor class type.
518 HealthStepCounter = 0x20,
520 /// Body composition analyzer health minor class type.
522 HealthBodyCompositionAnalyzer = 0x24,
524 /// Peak flow monitor health minor class type.
526 HealthPeakFlowMonitor = 0x28,
528 /// Medication monitor health minor class type.
530 HealthMedicationMonitor = 0x2C,
532 /// Knee prosthesis health minor class type.
534 HealthKneeProsthesis = 0x30,
536 /// Ankle prosthesis health minor class type.
538 HealthAnkleProsthesis = 0x34
542 /// Enumeration for Bluetooth device discovery state.
544 public enum BluetoothDeviceDiscoveryState
547 /// Device discovery is started.
551 /// Device discovery is finished.
555 /// The remote device is found.
561 /// Enumeration for Bluetooth appearance type.
563 public enum BluetoothAppearanceType
574 /// Generic computer.
584 /// Enumeration for Bluetooth audio profile type.
586 public enum BluetoothAudioProfileType
589 /// All supported profiles of audio.
593 /// Headset and Hands-Free profile.
597 /// Advanced audio distribution profile.
599 AdvancedAudioDistribution,
601 /// Audio Gateway profile.
605 /// Advanced Audio Distribution profile sink role.
607 AdvancedAudioDistributionSink
611 /// Enumeration for Bluetooth service class type.
613 public enum BluetoothServiceClassType
616 /// No service class.
620 /// Res service class.
624 /// Spp service class.
628 /// Dun service class.
632 /// Fax service class.
636 /// Lap service class.
640 /// Hsp service class.
644 /// Hfp service class.
648 /// Opp service class.
652 /// Ftp service class.
656 /// Ctp service class.
660 /// Icp service class.
664 /// Sync service class.
668 /// Bpp service class.
672 /// Bip service class.
676 /// Panu service class.
680 /// Nap service class.
684 /// Gn service class.
688 /// Sap service class.
692 /// A2dp service class.
696 /// Avrcp service class.
700 /// Pbap service class.
704 /// Hid service class.
708 /// A2dp Source service class.
710 A2dpSource = 0x00400000,
712 /// All service class.
716 /// Max service class.
722 /// Enumeration for Bluetooth profile type.
724 public enum BluetoothProfileType
731 /// Advanced Audio Distribution Profile Source role
733 AdvancedAudioDistribution,
739 /// Human Interface Device profile.
741 HumanInterfaceDevice,
743 /// Network Access Point profile.
747 /// Audio Gateway profile.
751 /// Generic Attribute profile.
755 /// Nap Server profile.
759 /// Advanced Audio Distribution profile sink role.
761 AdvancedAudioDistributionSink
765 /// Enumeration for Bluetooth authorization type.
767 public enum BluetoothAuthorizationType
774 /// Unauthorized type.
780 /// Enumeration for Bluetooth connection link type.
782 public enum BluetoothConnectionLinkType
793 /// The default connection type.
799 /// Enumeration for Bluetooth disconnect reason.
801 public enum BluetoothDisconnectReason
804 /// Disconnected by unknown reason.
808 /// Disconnected by timeout.
812 /// Disconnected by local host.
816 /// Disconnected by remote.
822 /// Enumerations of connected Bluetooth device event role.
824 public enum BluetoothSocketRole
841 /// Enumerations of Bluetooth socket connection state.
843 public enum BluetoothSocketState
846 /// RFCOMM is connected.
850 /// RFCOMM is disconnected.
856 /// Enumeration for equalizer state.
858 public enum EqualizerState
871 /// Enumeration for repeat mode.
873 public enum RepeatMode
880 /// Single track repeat.
884 /// All track repeat.
894 /// Enumeration for shuffle mode.
896 public enum ShuffleMode
903 /// All tracks shuffle.
913 /// Enumeration for scan mode.
932 /// Enumeration for player state.
934 public enum PlayerState
949 /// Seek forward state.
953 /// Seek rewind state.
959 /// Enumeration for Bluetooth Le device address type.
961 public enum BluetoothLeDeviceAddressType
964 /// The bluetooth le public address.
966 BluetoothLePublicAddress,
968 /// The bluetooth le private address.
970 BluetoothLePrivateAddress
974 /// Enumeration for Bluetooth LePacket type.
976 public enum BluetoothLePacketType
979 /// The bluetooth le advertising packet.
981 BluetoothLeAdvertisingPacket,
983 /// The bluetooth le scan response packet.
985 BluetoothLeScanResponsePacket
989 /// Enumeration for Bluetooth Le data type.
991 public enum BluetoothLeDataType
994 /// The bluetooth le packet data list 16 bit service uuid.
996 BluetoothLePacketDataList16BitServiceUuid,
998 /// The bluetooth le packet manufacturer data.
1000 BluetoothLePacketManufacturerData
1004 /// Enumeration for Bluetooth Le Advertising mode type.
1006 public enum BluetoothLeAdvertisingMode
1009 /// The bluetooth le advertising balanced mode.
1011 BluetoothLeAdvertisingBalancedMode,
1013 /// The bluetooth le advertising low latency mode.
1015 BluetoothLeAdvertisingLowLatencyMode,
1017 /// The bluetooth le advertising low energy mode.
1019 BluetoothLeAdvertisingLowEnergyMode
1023 /// Enumeration for Bluetooth Le Advertising mode type.
1025 public enum BluetoothLeAdvertisingState
1028 /// The bluetooth le advertising stopped.
1030 BluetoothLeAdvertisingStopped,
1032 /// The bluetooth le advertising started.
1034 BluetoothLeAdvertisingStarted
1038 /// Enumerations of the integer type for GATT handle's value.
1040 public enum IntDataType
1043 /// 8 bit signed int type.
1047 /// 16 bit signed int type.
1051 /// 32 bit signed int type.
1055 /// 8 bit unsigned int type.
1059 /// 16 bit unsigned int type.
1063 /// 32 bit unsigned int type.
1069 /// Enumerations of the float type for GATT handle's value.
1071 public enum FloatDataType
1074 /// 32 bit float type.
1078 /// 16 bit float type.
1084 /// Enumerations of the GATT handle's type.
1086 public enum GattHandleType
1089 /// GATT service type.
1093 /// GATT characteristic type.
1097 /// GATT descriptor type.
1103 /// Enumerations of the service type.
1105 public enum BluetoothGattServiceType
1108 /// GATT primary service type.
1112 /// GATT secondary service type.
1118 /// Enumerations of the characteristic's property.
1121 public enum BluetoothGattProperty
1124 /// Broadcast property.
1132 /// Write without response property.
1134 WriteWithoutResponse = 4,
1140 /// Notify property.
1144 /// Indicate property.
1148 /// Authenticated signed writes property.
1150 AuthenticatedSignedWrites = 64,
1152 /// Extended properties.
1154 ExtendedProperties = 128,
1158 /// Enumerations of bluetooth gatt permission type.
1161 public enum BluetoothGattPermission
1164 /// Read permission.
1168 /// Write permission.
1174 /// Enumerations of the write type.
1176 public enum BluetoothGattWriteType
1179 /// Write without response.
1183 /// Write with response.