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 System.Runtime.InteropServices;
19 using System.Collections.Generic;
20 using System.Collections.Concurrent;
21 using System.Collections.ObjectModel;
22 using System.Collections.Specialized;
24 namespace Tizen.Network.Bluetooth
27 /// This class is used to handle the device class types and the service.
29 public class BluetoothClass
31 internal BluetoothMajorDeviceClassType MajorType;
32 internal BluetoothMinorDeviceClassType MinorType;
35 internal BluetoothClass()
40 /// The type of the major device class.
42 public BluetoothMajorDeviceClassType MajorDeviceClassType
50 /// The type of the minor device class.
52 public BluetoothMinorDeviceClassType MinorDeviceClassType
60 /// The major service class mask.
62 public int MajorServiceClassMask
72 /// This class contains the information of the Bluetooth OOB data.
74 public class BluetoothOobData
77 /// The default constructor. Initializes an object of the BluetoothOobData.
79 public BluetoothOobData()
86 public byte[] HashValue
92 /// The randomizer value.
94 public byte[] RandomizerValue
102 /// This class contains the information of the Bluetooth device SDP data.
104 public class BluetoothDeviceSdpData
106 internal string Address;
107 internal Collection<string> Uuid;
109 internal BluetoothDeviceSdpData()
114 /// The device address.
116 public string DeviceAddress
124 /// The service UUID.
126 public IEnumerable<string> ServiceUuid
136 /// This class contains the information of the Bluetooth device connection data.
138 public class BluetoothDeviceConnectionData
140 internal string RemoteAddress;
141 internal BluetoothConnectionLinkType Link;
142 internal BluetoothDisconnectReason Reason;
144 internal BluetoothDeviceConnectionData()
149 /// The device address.
151 public string Address
155 return RemoteAddress;
159 /// The type of the connection link.
161 public BluetoothConnectionLinkType LinkType
169 /// The disconnect reason.
171 public BluetoothDisconnectReason DisconnectReason
181 /// This class contains the information of the track data.
186 /// The default constructor. Initializes an object of the track.
193 /// The title of the track.
201 /// The artist of the track.
209 /// The album of the track.
217 /// The genre of the track.
225 /// The track number.
233 /// The number of all tracks.
235 public uint TotalTracks
241 /// The duration of the track in milliseconds.
251 /// This class contains the information of the manufacturer data.
253 public class ManufacturerData
256 /// The default Constructor. Initializes an object of the ManufacturerData.
258 public ManufacturerData()
263 /// The manufacturer ID.
271 /// The length of the manufacturer data.
273 public int DataLength
279 /// The manufacturer data.
288 internal class BluetoothLeScanData
290 internal string RemoteAddress
295 internal BluetoothLeDeviceAddressType AddressType
305 internal int AdvDataLength
310 internal byte[] AdvData
315 internal int ScanDataLength
320 internal byte[] ScanData
328 /// This class contains the information of the Bluetooth service data.
330 public class BluetoothServiceData
333 /// The default constructor. Initializes an object of the BluetoothServiceData.
335 public BluetoothServiceData()
340 /// The UUID of the service.
348 /// The data length of the service data.
350 public int DataLength
356 /// The service data.
366 /// This class contains the service data information.
368 public class BluetoothLeServiceData
370 internal string Uuid;
371 internal byte[] Data;
374 internal BluetoothLeServiceData()
379 /// The Bluetooth LE service UUID.
381 public string ServiceUuid
389 /// The Bluetooth LE service data.
391 public byte[] ServiceData
399 /// The length of the service data.
401 public int ServiceDataLength
411 /// This class contains the information of the socket data.
413 public class SocketData
415 internal string RecvData;
419 internal SocketData()
434 /// The length of the received data.
444 /// The received data.
456 /// This class contains the information of the socket connection.
458 public class SocketConnection
460 internal string Uuid;
461 internal string RemoteAddress;
464 internal SocketConnection()
469 /// The connected socket FD.
479 /// The remote device address.
481 public string Address
485 return RemoteAddress;
489 /// The service UUID.
491 public string ServiceUuid