|
RDK Documentation (Open Sourced RDK Components)
|
26 #ifndef __BTR_CORE_LE_H__
27 #define __BTR_CORE_LE_H__
29 #include "btrCoreTypes.h"
37 typedef void* tBTRCoreLeHdl;
40 typedef enum _enBTRCoreLEGattProp {
42 enBTRCoreLEGPropPrimary,
43 enBTRCoreLEGPropDevice,
44 enBTRCoreLEGPropService,
45 enBTRCoreLEGPropValue,
46 enBTRCoreLEGPropNotifying,
47 enBTRCoreLEGPropFlags,
50 enBTRCoreLEGPropDescValue,
51 enBTRCoreLEGPropUnknown
52 } enBTRCoreLEGattProp;
54 typedef enum _enBTRCoreLEGattOp {
56 enBTRCoreLEGOpReadValue,
57 enBTRCoreLEGOpWriteValue,
58 enBTRCoreLEGOpStartNotify,
59 enBTRCoreLEGOpStopNotify,
63 typedef enum _enBTRCoreLEAdvProp {
64 enBTRCoreLEAdvTypeProp,
65 enBTRCoreLEServUUIDProp,
66 enBTRCoreLENumServicesProp,
68 enBTRCoreLEServiceData,
69 enBTRCoreLESolictiUUIDProp,
70 enBTRCoreLETxPowerProp,
75 enBTRCoreLEGattOp enLeOper;
76 enBTRCoreLEGattProp enLeProp;
91 typedef enBTRCoreRet (*fPtr_BTRCore_LeStatusUpdateCb) (
stBTRCoreLeGattInfo* apstBtrLeInfo,
const char* apBtDevAddr,
void* apUserData);
105 enBTRCoreRet
BTRCore_LE_Init (tBTRCoreLeHdl* phBTRCoreLe,
void* apBtConn,
const char* apBtAdapter);
117 enBTRCoreRet
BTRCore_LE_DeInit (tBTRCoreLeHdl hBTRCoreLe,
void* apBtConn,
const char* apBtAdapter);
132 const char* apBtUuid, enBTRCoreLEGattProp aenBTRCoreLEGattProp,
void* apBtPropValue);
147 const char* apBtUuid, enBTRCoreLEGattOp aenBTRCoreLEGattOp,
char* apLeOpArg,
char* rpLeOpRes);
248 int*
BTRCore_LE_AddGattCharInfo(tBTRCoreLeHdl hBTRCoreLe,
const char* apBtAdapter,
char* aBtdevAddr,
char* aParentUUID,
char* aUUID,
unsigned short aCharFlags,
char* aValue);
263 int*
BTRCore_LE_AddGattDescInfo(tBTRCoreLeHdl hBTRCoreLe,
const char* apBtAdapter,
char* aBtdevAddr,
char* aParentUUID,
char* aUUID,
unsigned short aDescFlags,
char* aValue);
280 enBTRCoreRet BTRCore_LE_RegisterStatusUpdateCb (tBTRCoreLeHdl hBTRCoreLe, fPtr_BTRCore_LeStatusUpdateCb afPtr_BTRCore_LeStatusUpdateCb,
void* apUserData);
284 #endif // __BTR_CORE_LE_H__
unsigned char BOOLEAN
DTCP Manager return codes.
enBTRCoreRet BTRCore_LE_GetGattProperty(tBTRCoreLeHdl hBTRCoreLe, tBTRCoreDevId atBTRCoreDevId, const char *apBtUuid, enBTRCoreLEGattProp aenBTRCoreLEGattProp, void *apBtPropValue)
This API fetches the GATT property value that is supported.
enBTRCoreRet BtrCore_LE_PerformGattOp(tBTRCoreLeHdl hBTRCoreLe, tBTRCoreDevId atBTRCoreDevId, const char *apBtUuid, enBTRCoreLEGattOp aenBTRCoreLEGattOp, char *apLeOpArg, char *rpLeOpRes)
This API is used to perform read, write, notify operations on LE devices.
enBTRCoreRet BTRCore_LE_SetPropertyValue(tBTRCoreLeHdl hBTRCoreLe, char *aUUID, char *aValue, enBTRCoreLEGattProp aElement)
This API Returns the specified property value associated with the UUID.
enBTRCoreRet BTRCore_LE_StartAdvertisement(tBTRCoreLeHdl hBTRCoreLe, void *apBtConn, const char *apBtAdapter)
This API is used to invoke method calls to RegisterAdvertisement and RegisterApplication to begin LE ...
int * BTRCore_LE_AddGattDescInfo(tBTRCoreLeHdl hBTRCoreLe, const char *apBtAdapter, char *aBtdevAddr, char *aParentUUID, char *aUUID, unsigned short aDescFlags, char *aValue)
This API is used to add gatt descriptor info for the advertisement.
enBTRCoreRet BTRCore_LE_SetEnableTxPower(tBTRCoreLeHdl hBTRCoreLe, BOOLEAN aTxPower)
This API is used to enable/disable sending tranmission power with the advertisement data.
enBTRCoreRet BTRCore_LE_SetServiceUUIDs(tBTRCoreLeHdl hBTRCoreLe, char *aUUID)
This API is used to store the UUIDs that would be advertised by the device during the advertisement.
int * BTRCore_LE_AddGattCharInfo(tBTRCoreLeHdl hBTRCoreLe, const char *apBtAdapter, char *aBtdevAddr, char *aParentUUID, char *aUUID, unsigned short aCharFlags, char *aValue)
This API is used to add gatt characteristic info for the advertisement.
enBTRCoreRet BTRCore_LE_SetManufacturerData(tBTRCoreLeHdl hBTRCoreLe, unsigned short aManfId, unsigned char *aDeviceDetails, int aLenManfData)
This API is used to store the manufacturer data to be sent with the advertisement.
enBTRCoreRet BTRCore_LE_StopAdvertisement(tBTRCoreLeHdl hBTRCoreLe, void *apBtConn, const char *apBtAdapter)
This API is used to invoke method calls to UnRegisterAdvertisement and UnRegisterApplication to stop ...
enBTRCoreRet BTRCore_LE_Init(tBTRCoreLeHdl *phBTRCoreLe, void *apBtConn, const char *apBtAdapter)
This API registers the callback function that has to be called when the LE device are added or remove...
enBTRCoreRet BTRCore_LE_DeInit(tBTRCoreLeHdl hBTRCoreLe, void *apBtConn, const char *apBtAdapter)
This API deinitializes the LE device.
enBTRCoreRet BTRCore_LE_SetAdvertisementType(tBTRCoreLeHdl hBTRCoreLe, char *aAdvtType)
This API is used to store the advertisement type supported by device.
int * BTRCore_LE_AddGattServiceInfo(tBTRCoreLeHdl hBTRCoreLe, const char *apBtAdapter, char *aBtdevAddr, char *aUUID, BOOLEAN aServiceType, int *aNumGattServices)
This API is used to add service info for the advertisement.