Class BluetoothGattService

Definition

Namespace:
Tizen.Network.Bluetooth
Assembly:
Tizen.Network.Bluetooth.dll
API Level:
3

The Bluetooth GATT service.

C#
Copy
public class BluetoothGattService
Inheritance
System.Object
BluetoothGattService

Constructors

View Source

BluetoothGattService(String, BluetoothGattServiceType)

The constructor.

Declaration
C#
Copy
public 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

View Source

Uuid

Specification name from the UUID.

Declaration
C#
Copy
public string Uuid { get; }
Property Value
Type Description
System.String
API Level: 3

Methods

View Source

AddCharacteristic(BluetoothGattCharacteristic)

Adds a characteristic to this service.

Declaration
C#
Copy
public 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
View Source

AddService(BluetoothGattService)

Includes a service to this service.

Declaration
C#
Copy
public 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
View Source

GetCharacteristic(String)

Gets the characteristic with the given UUID that belongs to this service.

Declaration
C#
Copy
public 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
View Source

GetCharacteristics()

Gets list of the characteristic that belongs to this service.

Declaration
C#
Copy
public IEnumerable<BluetoothGattCharacteristic> GetCharacteristics()
Returns
Type Description
System.Collections.Generic.IEnumerable<BluetoothGattCharacteristic>

The list of the characteristic that belongs to this service.

API Level: 3
View Source

GetGattClient()

Gets the client instance which the specified service belongs to.

Declaration
C#
Copy
public BluetoothGattClient GetGattClient()
Returns
Type Description
BluetoothGattClient

The client instance which the specified service belongs to.

API Level: 3
View Source

GetGattServer()

Gets the server instance which the specified service belongs to.

Declaration
C#
Copy
public BluetoothGattServer GetGattServer()
Returns
Type Description
BluetoothGattServer

The server instance which the specified service belongs to.

API Level: 3
View Source

GetIncludeService(String)

Gets the included service.

Declaration
C#
Copy
public 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
View Source

GetIncludeServices()

Gets the included service list of this service.

Declaration
C#
Copy
public IEnumerable<BluetoothGattService> GetIncludeServices()
Returns
Type Description
System.Collections.Generic.IEnumerable<BluetoothGattService>

The included service list of this service.

API Level: 3