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 the Bluetooth states.
25 public enum BluetoothState
28 /// The disabled state.
32 /// The enabled state.
38 /// Enumeration for the Bluetooth errors.
40 public enum BluetoothError
45 None = ErrorCode.None,
47 /// Operation canceled.
49 Cancelled = ErrorCode.Canceled,
51 /// Invalid parameter.
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,
75 /// Permission denied.
77 PermissionDenied = ErrorCode.PermissionDenied,
81 QuotaExceeded = ErrorCode.QuotaExceeded,
83 /// No data available.
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 the Bluetooth visibility modes.
143 public enum VisibilityMode
146 /// The non-discoverable mode.
150 /// The discoverable mode.
154 /// The discoverable mode with limited time.
156 TimeLimitedDiscoverable = 2
160 /// Enumeration for the Bluetooth major device class types.
162 public enum BluetoothMajorDeviceClassType
165 /// The miscellaneous major class type.
169 /// The computer major class type.
173 /// The phone major class type.
177 /// The LAN/Network access point major class type.
179 LanNetworkAccessPoint = 0x03,
181 /// The audio/video major class type.
185 /// The peripheral major class type.
189 /// The imaging major class type.
193 /// The wearable major class type.
197 /// The toy major class type.
201 /// The health major class type.
205 /// The uncategorized major class type.
211 /// Enumeration for the Bluetooth minor device class types.
213 public enum BluetoothMinorDeviceClassType
216 /// The uncategorized computer minor class type.
218 ComputerUncategorized = 0x00,
220 /// The desktop workstation computer minor class type.
222 ComputerDesktopWorkstation = 0x04,
224 /// The server computer minor class type.
226 ComputerServer = 0x08,
228 /// The laptop computer minor class type.
230 ComputerLaptop = 0x0C,
232 /// The handheld PC/PDA computer minor class type.
234 ComputerHandheldPcOrPda = 0x10,
236 /// The palm sized PC/PDA computer minor class type.
238 ComputerPalmSizedPcOrPda = 0x14,
240 /// The wearable computer minor class type.
242 ComputerWearableComputer = 0x18,
245 /// The unclassified phone minor class type.
247 PhoneUncategorized = 0x00,
249 /// The cellular phone minor class type.
251 PhoneCellular = 0x04,
253 /// The cordless phone minor class type.
255 PhoneCordless = 0x08,
257 /// The smartphone phone minor class type.
259 PhoneSmartPhone = 0x0C,
261 /// The wired modem or voice gateway phone minor class type.
263 PhoneWiredModemOrVoiceGateway = 0x10,
265 /// The 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 /// The uncategorized audio/video minor class type.
305 AudioVideoUncategorized = 0x00,
307 /// The wearable headset audio/video minor class type.
309 AudioVideoWearableHeadset = 0x04,
311 /// The hands free audio/video minor class type.
313 AudioVideoHandsFree = 0x08,
315 /// The microphone audio/video minor class type.
317 AudioVideoMicrophone = 0x10,
319 /// The loudspeaker audio/video minor class type.
321 AudioVideoLoudspeaker = 0x14,
323 /// The headphones audio/video minor class type.
325 AudioVideoHeadphones = 0x18,
327 /// The portable audio audio/video minor class type.
329 AudioVideoPortableAudio = 0x1C,
331 /// The car audio audio/video minor class type.
333 AudioVideoCarAudio = 0x20,
335 /// The SetTopbox audio/video minor class type.
337 AudioVideoSetTopBox = 0x24,
339 /// The Hi-Fi audio/video minor class type.
341 AudioVideoHifiAudioDevice = 0x28,
343 /// The VCR audio/video minor class type.
345 AudioVideoVcr = 0x2C,
347 /// The video camera audio/video minor class type.
349 AudioVideoVideoCamera = 0x30,
351 /// Camcorder audio/video minor class type.
353 AudioVideoCamcorder = 0x34,
355 /// The video monitor audio/video minor class type.
357 AudioVideoVideoMonitor = 0x38,
359 /// The video display and loudspeaker audio/video minor class type.
361 AudioVideoVideoDisplayLoudspeaker = 0x3C,
363 /// The video conferencing audio/video minor class type.
365 AudioVideoVideoConferencing = 0x40,
367 /// The gaming/toy audio/video minor class type.
369 AudioVideoGamingToy = 0x48,
372 /// The uncategorized peripheral minor class type.
374 PeripheralUncategorized = 0x00,
376 /// The keyboard peripheral minor class type.
378 PeripheralKeyBoard = 0x40,
380 /// The pointing device peripheral minor class type.
382 PeripheralPointingDevice = 0x80,
384 /// The combo keyboard peripheral minor class type.
386 PeripheralComboKeyboardPointingDevice = 0xC0,
388 /// The joystick peripheral minor class type.
390 PeripheralJoystick = 0x04,
392 /// The game pad peripheral minor class type.
394 PeripheralGamePad = 0x08,
396 /// The remote control peripheral minor class type.
398 PeripheralRemoteControl = 0x0C,
400 /// The sensing device peripheral minor class type.
402 PeripheralSensingDevice = 0x10,
404 /// The digitizer peripheral minor class type.
406 PeripheralDigitizerTablet = 0x14,
408 /// The card reader peripheral minor class type.
410 PeripheralCardReader = 0x18,
412 /// The digital pen peripheral minor class type.
414 PeripheralDigitalPen = 0x1C,
416 /// The handheld scanner peripheral minor class type.
418 PeripheralHandheldScanner = 0x20,
420 /// The handheld gestural input computer minor class type.
422 PeripheralHandheldGesturalInputDevice = 0x24,
425 /// The display imaging minor class type.
427 ImagingDisplay = 0x10,
429 /// The camera imaging minor class type.
431 ImagingCamera = 0x20,
433 /// The scanner imaging minor class type.
435 ImagingScanner = 0x40,
437 /// The printer imaging minor class type.
439 ImagingPrinter = 0x80,
442 /// The wrist watch wearable minor class type.
444 WearableWristWatch = 0x04,
446 /// The pager wearable minor class type.
448 WearablePager = 0x08,
450 /// The jacket wearable minor class type.
452 WearableJacket = 0x0C,
454 /// The helmet wearable minor class type.
456 WearableHelmet = 0x10,
458 /// The glasses wearable minor class type.
460 WearableGlasses = 0x14,
463 /// The robot toy minor class type.
467 /// The vehicle toy minor class type.
471 /// The doll toy minor class type.
473 ToyDollAction = 0x0C,
475 /// The controller toy minor class type.
477 ToyController = 0x10,
479 /// The game toy minor class type.
484 /// The uncategorized health minor class type.
486 HealthUncategorized = 0x00,
488 /// The BP monitor health minor class type.
490 HealthBloodPressureMonitor = 0x04,
492 /// The thermometer health minor class type.
494 HealthThermometer = 0x08,
496 /// The scale health minor class type.
498 HealthWeighingScale = 0x0C,
500 /// The glucose meter health minor class type.
502 HealthGlucoseMeter= 0x10,
504 /// The pulse oximeter health minor class type.
506 HealthPulseOximeter = 0x14,
508 /// The heart/pulse rate monitor health minor class type.
510 HealthHeartPulseRateMonitor = 0x18,
512 /// The display health minor class type.
514 HealthDataDisplay = 0x1C,
516 /// The step counter health minor class type.
518 HealthStepCounter = 0x20,
520 /// The body composition analyzer health minor class type.
522 HealthBodyCompositionAnalyzer = 0x24,
524 /// The peak flow monitor health minor class type.
526 HealthPeakFlowMonitor = 0x28,
528 /// The medication monitor health minor class type.
530 HealthMedicationMonitor = 0x2C,
532 /// The knee prosthesis health minor class type.
534 HealthKneeProsthesis = 0x30,
536 /// The ankle prosthesis health minor class type.
538 HealthAnkleProsthesis = 0x34
542 /// Enumeration for the Bluetooth device discovery states.
544 public enum BluetoothDeviceDiscoveryState
547 /// The device discovery is started.
551 /// The device discovery is finished.
555 /// The remote device is found.
561 /// Enumeration for the Bluetooth appearance types.
563 public enum BluetoothAppearanceType
574 /// Generic computer.
584 /// Enumeration for the Bluetooth audio profile types.
586 public enum BluetoothAudioProfileType
589 /// All supported profiles of audio.
593 /// The Headset and Hands-Free profile.
597 /// The Advanced Audio Distribution profile.
599 AdvancedAudioDistribution,
601 /// The Audio Gateway profile.
605 /// The Advanced Audio Distribution profile sink role.
607 AdvancedAudioDistributionSink
611 /// Enumeration for the Bluetooth service class types.
613 public enum BluetoothServiceClassType
616 /// No service class.
620 /// The RES service class.
624 /// The SPP service class.
628 /// The DUN service class.
632 /// The FAX service class.
636 /// The LAP service class.
640 /// The HSP service class.
644 /// The HFPservice class.
648 /// The OPP service class.
652 /// The FTP service class.
656 /// The CTP service class.
660 /// The ICP service class.
664 /// The Sync service class.
668 /// The BPP service class.
672 /// The BIP service class.
676 /// The PANU service class.
680 /// The NAP service class.
684 /// The GN service class.
688 /// The SAP service class.
692 /// The A2DP service class.
696 /// The AVRCP service class.
700 /// The PBAP service class.
704 /// The HID service class.
708 /// The A2DP Source service class.
710 A2dpSource = 0x00400000,
712 /// All service class.
716 /// The Max service class.
722 /// Enumeration for the Bluetooth profile types.
724 public enum BluetoothProfileType
727 /// The RFCOMM profile.
731 /// The Advanced Audio Distribution Profile Source role.
733 AdvancedAudioDistribution,
735 /// The Headset profile.
739 /// The Human Interface Device profile.
741 HumanInterfaceDevice,
743 /// The Network Access Point profile.
747 /// The Audio Gateway profile.
751 /// The Generic Attribute profile.
755 /// The NAP Server profile.
759 /// The advanced Audio Distribution profile sink role.
761 AdvancedAudioDistributionSink
765 /// Enumeration for the Bluetooth authorization types.
767 public enum BluetoothAuthorizationType
770 /// The authorized type.
774 /// The unauthorized type.
780 /// Enumeration for the Bluetooth connection link types.
782 public enum BluetoothConnectionLinkType
793 /// The default connection type.
799 /// Enumeration for the Bluetooth disconnect reason.
801 public enum BluetoothDisconnectReason
804 /// The disconnected by unknown reason.
808 /// The disconnected by timeout.
812 /// The disconnected by local host.
816 /// The disconnected by remote.
822 /// Enumeration for the connected Bluetooth device event roles.
824 public enum BluetoothSocketRole
841 /// Enumeration for the Bluetooth socket connection states.
843 public enum BluetoothSocketState
846 /// The RFCOMM is connected.
850 /// The RFCOMM is disconnected.
856 /// Enumeration for the equalizer states.
858 public enum EqualizerState
871 /// Enumeration for the repeat modes.
873 public enum RepeatMode
880 /// Single track repeat.
884 /// All track repeat.
894 /// Enumeration for the shuffle modes.
896 public enum ShuffleMode
903 /// All tracks shuffle.
913 /// Enumeration for the scan modes.
932 /// Enumeration for the player states.
934 public enum PlayerState
937 /// The stopped state.
941 /// The playing state.
945 /// The paused state.
949 /// The seek forward state.
953 /// The seek rewind state.
959 /// Enumeration for the Bluetooth LE device address types.
961 public enum BluetoothLeDeviceAddressType
964 /// The Buetooth LE public address.
966 BluetoothLePublicAddress,
968 /// The Bluetooth LE private address.
970 BluetoothLePrivateAddress
974 /// Enumeration for the Bluetooth LePacket types.
976 public enum BluetoothLePacketType
979 /// The Bluetooth LE advertising packet.
981 BluetoothLeAdvertisingPacket,
983 /// The Bluetooth LE scan response packet.
985 BluetoothLeScanResponsePacket
989 /// Enumeration for the Bluetooth LE data types.
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 the Bluetooth LE advertising mode types.
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 the 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 /// Enumeration for the integer type for GATT handle's values.
1040 public enum IntDataType
1043 /// The 8-bit signed integer type.
1047 /// The 16-bit signed integer type.
1051 /// The 32-bit signed integer type.
1055 /// The 8-bit unsigned integer type.
1059 /// The 16-bit unsigned integer type.
1063 /// The 32-bit unsigned integer type.
1069 /// Enumerations of the float type for GATT handle's values.
1071 public enum FloatDataType
1074 /// The 32-bit float type.
1078 /// The 16-bit float type.
1084 /// Enumeration for the GATT handle's types.
1086 public enum GattHandleType
1089 /// The GATT service type.
1093 /// The GATT characteristic type.
1097 /// The GATT descriptor type.
1103 /// Enumeration for the service types.
1105 public enum BluetoothGattServiceType
1108 /// The GATT primary service type.
1112 /// The GATT secondary service type.
1118 /// Enumeration for the characteristic's property.
1121 public enum BluetoothGattProperty
1124 /// The broadcast property.
1128 /// The read property.
1132 /// The write without response property.
1134 WriteWithoutResponse = 4,
1136 /// The write property.
1140 /// The notify property.
1144 /// The indicate property.
1148 /// The authenticated signed writes property.
1150 AuthenticatedSignedWrites = 64,
1152 /// The extended properties.
1154 ExtendedProperties = 128,
1158 /// Enumeration for the Bluetooth GATT permission types.
1161 public enum BluetoothGattPermission
1164 /// Read permission.
1168 /// Write permission.
1174 /// Enumeration for the write types.
1176 public enum BluetoothGattWriteType
1179 /// The write without response.
1183 /// The write with response.
1189 /// Enumeration for the remote device request types for attributes.
1191 public enum BluetoothGattRequestType
1198 /// Write requested.