Class BluetoothGattService
Definition
- Namespace:
- Tizen.Network.Bluetooth
- Assembly:
- Tizen.Network.Bluetooth.dll
- API Level:
- 3
The Bluetooth GATT service.
C#Copypublic class BluetoothGattService
- Inheritance
-
System.ObjectBluetoothGattService
Constructors
Declaration
C#Copypublic BluetoothGattService(string uuid, BluetoothGattServiceType type)
Parameters
Type | Name | Description |
---|---|---|
System.String | uuid | The UUID of the service. |
BluetoothGattServiceType | type | The type of service. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when the create GATT service procedure fails. |
API Level: 3
Properties
Declaration
C#Copypublic string Uuid { get; }
Property Value
Type | Description |
---|---|
System.String |
API Level: 3
Methods
Declaration
C#Copypublic void AddCharacteristic(BluetoothGattCharacteristic characteristic)
Parameters
Type | Name | Description |
---|---|---|
BluetoothGattCharacteristic | characteristic | The characteristic to be added. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when the add GATT characteristic procedure fails. |
API Level: 3
Declaration
C#Copypublic void AddService(BluetoothGattService service)
Parameters
Type | Name | Description |
---|---|---|
BluetoothGattService | service | The service to be included. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when the add GATT service procedure fails. |
API Level: 3
GetCharacteristic(String)
Gets the characteristic with the given UUID that belongs to this service.
Declaration
C#Copypublic BluetoothGattCharacteristic GetCharacteristic(string uuid)
Parameters
Type | Name | Description |
---|---|---|
System.String | uuid | The UUID for the characteristic to get. |
Returns
Type | Description |
---|---|
BluetoothGattCharacteristic | The characteristic with a given UUID if it exists, null otherwise. |
API Level: 3
Declaration
C#Copypublic IEnumerable<BluetoothGattCharacteristic> GetCharacteristics()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<BluetoothGattCharacteristic> | The list of the characteristic that belongs to this service. |
API Level: 3
Declaration
C#Copypublic BluetoothGattClient GetGattClient()
Returns
Type | Description |
---|---|
BluetoothGattClient | The client instance which the specified service belongs to. |
API Level: 3
Declaration
C#Copypublic BluetoothGattServer GetGattServer()
Returns
Type | Description |
---|---|
BluetoothGattServer | The server instance which the specified service belongs to. |
API Level: 3
Declaration
C#Copypublic BluetoothGattService GetIncludeService(string uuid)
Parameters
Type | Name | Description |
---|---|---|
System.String | uuid | The UUID for the service to get. |
Returns
Type | Description |
---|---|
BluetoothGattService | The service with a given UUID if it exists, null otherwise. |
API Level: 3
Declaration
C#Copypublic IEnumerable<BluetoothGattService> GetIncludeServices()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<BluetoothGattService> | The included service list of this service. |