RDK Documentation (Open Sourced RDK Components)
Persistant Interface

Description

This file defines bluetooth manager's Persistent storage interfaces.

Data Structures

struct  _stBTRMgrPersistDevice
 This API initializes bluetooth manager's persistent storage interface. More...
 
struct  _stBTRMgrPersistProfile
 
struct  _BTRMGR_Beacon_PersistentData_t
 
struct  _BTRMGR_PersistentData_t
 
struct  _BTRMGR_Profile_t
 

Macros

#define BTRMGR_NAME_LEN_MAX   64
 
#define BTRMGR_MAX_PERSISTENT_PROFILE_COUNT   5
 
#define BTRMGR_MAX_PERSISTENT_DEVICE_COUNT   5
 
#define BTRMGR_PERSISTENT_DATA_PATH   "/opt/lib/bluetooth/btmgrPersist.json"
 
#define BTRMGR_A2DP_SRC_PROFILE_ID   "0x110a"
 
#define BTRMGR_A2DP_SINK_PROFILE_ID   "0x110b"
 

Typedefs

typedef void * tBTRMgrPIHdl
 
typedef struct _stBTRMgrPersistDevice stBTRMgrPersistDevice
 This API initializes bluetooth manager's persistent storage interface.
 
typedef struct _stBTRMgrPersistProfile stBTRMgrPersistProfile
 
typedef struct _BTRMGR_Beacon_PersistentData_t BTRMGR_Beacon_PersistentData_t
 
typedef struct _BTRMGR_PersistentData_t BTRMGR_PersistentData_t
 
typedef struct _BTRMGR_Profile_t BTRMGR_Profile_t
 

Functions

eBTRMgrRet BTRMgr_PI_GetLEBeaconLimitingStatus (BTRMGR_Beacon_PersistentData_t *persistentData)
 
eBTRMgrRet BTRMgr_PI_SetLEBeaconLimitingStatus (BTRMGR_Beacon_PersistentData_t *persistentData)
 
eBTRMgrRet BTRMgr_PI_Init (tBTRMgrPIHdl *hBTRMgrPiHdl)
 This API initializes bluetooth manager's persistent storage interface. More...
 
eBTRMgrRet BTRMgr_PI_DeInit (tBTRMgrPIHdl hBTRMgrPiHdl)
 This API deinitializes bluetooth manager's persistent storage interface. More...
 
eBTRMgrRet BTRMgr_PI_GetAllProfiles (tBTRMgrPIHdl hBTRMgrPiHdl, BTRMGR_PersistentData_t *persistentData)
 This API reads all bluetooth profiles from json file and saves to BTRMGR_PersistentData_t structure. More...
 
eBTRMgrRet BTRMgr_PI_SetAllProfiles (tBTRMgrPIHdl hBTRMgrPiHdl, BTRMGR_PersistentData_t *persistentData)
 This API sets all bluetooth profiles. More...
 
eBTRMgrRet BTRMgr_PI_AddProfile (tBTRMgrPIHdl hBTRMgrPiHdl, BTRMGR_Profile_t *persistProfile)
 This API adds a single bluetooth profile to json file. More...
 
eBTRMgrRet BTRMgr_PI_RemoveProfile (tBTRMgrPIHdl hBTRMgrPiHdl, BTRMGR_Profile_t *persistProfile)
 This API removes a single bluetooth profile from json file. More...
 

Data Structure Documentation

◆ _stBTRMgrPersistDevice

struct _stBTRMgrPersistDevice

This API initializes bluetooth manager's persistent storage interface.

Definition at line 52 of file btrMgr_persistIface.h.

Collaboration diagram for _stBTRMgrPersistDevice:
Collaboration graph
Data Fields
unsigned long long deviceId
int isConnected

◆ _stBTRMgrPersistProfile

struct _stBTRMgrPersistProfile

Definition at line 57 of file btrMgr_persistIface.h.

Collaboration diagram for _stBTRMgrPersistProfile:
Collaboration graph
Data Fields
unsigned char numOfDevices
char profileId[64]
stBTRMgrPersistDevice deviceList[5]

◆ _BTRMGR_Beacon_PersistentData_t

struct _BTRMGR_Beacon_PersistentData_t

Definition at line 63 of file btrMgr_persistIface.h.

Collaboration diagram for _BTRMGR_Beacon_PersistentData_t:
Collaboration graph
Data Fields
char limitBeaconDetection[64]

◆ _BTRMGR_PersistentData_t

struct _BTRMGR_PersistentData_t

Definition at line 77 of file btrMgr_persistIface.h.

Collaboration diagram for _BTRMGR_PersistentData_t:
Collaboration graph
Data Fields
char adapterId[64]
unsigned short numOfProfiles
stBTRMgrPersistProfile profileList[64]
char limitBeaconDetection[64]

◆ _BTRMGR_Profile_t

struct _BTRMGR_Profile_t

Definition at line 85 of file btrMgr_persistIface.h.

Collaboration diagram for _BTRMGR_Profile_t:
Collaboration graph
Data Fields
char adapterId[64]
char profileId[64]
unsigned long long deviceId
int isConnect

Function Documentation

◆ BTRMgr_PI_Init()

eBTRMgrRet BTRMgr_PI_Init ( tBTRMgrPIHdl *  hBTRMgrPiHdl)

This API initializes bluetooth manager's persistent storage interface.

Parameters
[in]hBTRMgrPiHdlHandle to the audio capture interface.
Returns
Returns the status of the operation.
Return values
eBTRMgrSuccesson success, appropriate error code otherwise.

Definition at line 127 of file btrMgr_persistIface.c.

◆ BTRMgr_PI_DeInit()

eBTRMgrRet BTRMgr_PI_DeInit ( tBTRMgrPIHdl  hBTRMgrPiHdl)

This API deinitializes bluetooth manager's persistent storage interface.

Parameters
[in]hBTRMgrPiHdlHandle to the audio capture interface.
Returns
Returns the status of the operation.
Return values
eBTRMgrSuccesson success, appropriate error code otherwise.

Definition at line 145 of file btrMgr_persistIface.c.

◆ BTRMgr_PI_GetAllProfiles()

eBTRMgrRet BTRMgr_PI_GetAllProfiles ( tBTRMgrPIHdl  hBTRMgrPiHdl,
BTRMGR_PersistentData_t persistentData 
)

This API reads all bluetooth profiles from json file and saves to BTRMGR_PersistentData_t structure.

Parameters
[in]hBTRMgrPiHdlHandle to the audio capture interface.
[out]persistentDataStructure that fetches persistent profiles data.
Returns
Returns the status of the operation.
Return values
eBTRMgrSuccesson success, appropriate error code otherwise.

Definition at line 370 of file btrMgr_persistIface.c.

◆ BTRMgr_PI_SetAllProfiles()

eBTRMgrRet BTRMgr_PI_SetAllProfiles ( tBTRMgrPIHdl  hBTRMgrPiHdl,
BTRMGR_PersistentData_t persistentData 
)

This API sets all bluetooth profiles.

Parameters
[in]hBTRMgrPiHdlHandle to the audio capture interface.
[in]persistentDataStructure that is used to set the profiles data.
Returns
Returns the status of the operation.
Return values
eBTRMgrSuccesson success, appropriate error code otherwise.

Definition at line 552 of file btrMgr_persistIface.c.

◆ BTRMgr_PI_AddProfile()

eBTRMgrRet BTRMgr_PI_AddProfile ( tBTRMgrPIHdl  hBTRMgrPiHdl,
BTRMGR_Profile_t persistProfile 
)

This API adds a single bluetooth profile to json file.

Parameters
[in]hBTRMgrPiHdlHandle to the audio capture interface.
[in]persistProfileProfile to be added.
Returns
Returns the status of the operation.
Return values
eBTRMgrSuccesson success, appropriate error code otherwise.

Definition at line 476 of file btrMgr_persistIface.c.

◆ BTRMgr_PI_RemoveProfile()

eBTRMgrRet BTRMgr_PI_RemoveProfile ( tBTRMgrPIHdl  hBTRMgrPiHdl,
BTRMGR_Profile_t persistProfile 
)

This API removes a single bluetooth profile from json file.

Parameters
[in]hBTRMgrPiHdlHandle to the persistant storage interface.
[in]persistProfileProfile to be removed.
Returns
Returns the status of the operation.
Return values
eBTRMgrSuccesson success, appropriate error code otherwise.

Definition at line 622 of file btrMgr_persistIface.c.