RDK Documentation (Open Sourced RDK Components)
btrCore.h
1 /*
2  * If not stated otherwise in this file or this component's Licenses.txt file the
3  * following copyright and licenses apply:
4  *
5  * Copyright 2016 RDK Management
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18 */
19 /* Bluetooth Header file - June 04, 2015*/
20 /* Make header file for the various functions... include structures*/
21 /* commit 6aca47c658cf75cad0192a824915dabf82d3200f*/
22 
23 /*
24  * @file btrCore.h
25  * Core abstraction for BT functionality
26  */
27 
28 #ifndef __BTR_CORE_H__
29 #define __BTR_CORE_H__
30 
31 #include "btrCoreTypes.h"
32 
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36 
37 /**
38  @defgroup BLUETOOTH_CORE Bluetooth Core
39 * Bluetooth Manager implements the Bluetooth HAL i.e. Bluetooth Core[BTRCore] API.
40 * Bluetooth HAL interface provides a software abstraction layer that interfaces
41 * with the actual Bluetooth implementation and/or drivers. RDK Bluetooth HAL layer
42 * enables projects to pick any Bluetooth profiles as per their requirements.
43 * Bluetooth HAL uses BlueZ5.42 stack which is a quite popular Linux Bluetooth library.
44 * - Bluetooth HAL - Provides APIs to perform Bluetooth operations by abstracting and simplifying the complexities
45 * of Bt-Ifce (& BLuez)
46 * - Bt-Ifce - Abstracts Bluez versions and serves as a HAL for other Bluetooth stacks - Interacts with Bluez over DBus
47 * - Bluez - Interacts with kernel layer bluetooth modules
48 * @defgroup BLUETOOTH_TYPES Bluetooth Core Types
49 * @ingroup BLUETOOTH_CORE
50 *
51 * @defgroup BLUETOOTH_APIS Bluetooth Core APIs
52 * @ingroup BLUETOOTH_CORE
53 *
54 **/
55 
56 /**
57  * @addtogroup BLUETOOTH_TYPES
58  * @{
59  */
60 
61 #define BTRCORE_MAX_NUM_BT_ADAPTERS 4 // TODO:Better to make this configurable at runtime
62 #define BTRCORE_MAX_NUM_BT_DEVICES 64 // TODO:Better to make this configurable at runtime
63 #define BTRCORE_MAX_DEVICE_PROFILE 32
64 #define BTRCORE_MAX_MEDIA_ELEMENTS 64
65 
66 #define BTRCORE_UUID_LEN BTRCORE_STR_LEN
67 #define BTRCORE_MAX_DEV_OP_DATA_LEN BTRCORE_MAX_STR_LEN * 3
68 #define BTRCORE_MAX_SERVICE_DATA_LEN 32
69 
70 typedef unsigned long long int tBTRCoreMediaElementId;
71 
72 typedef enum _enBTRCoreOpType {
73  enBTRCoreOpTypeAdapter,
74  enBTRCoreOpTypeDevice
75 } enBTRCoreOpType;
76 
77 typedef enum _enBTRCoreDeviceType {
78  enBTRCoreSpeakers,
79  enBTRCoreHeadSet,
80  enBTRCoreMobileAudioIn,
81  enBTRCorePCAudioIn,
82  enBTRCoreLE,
83  enBTRCoreHID,
84  enBTRCoreUnknown
85 } enBTRCoreDeviceType;
86 
87 typedef enum _enBTRCoreDeviceClass {
88  /* AV DeviceClass */
89  enBTRCore_DC_Tablet = 0x11Cu,
90  enBTRCore_DC_SmartPhone = 0x20Cu,
91  enBTRCore_DC_WearableHeadset = 0x404u,
92  enBTRCore_DC_Handsfree = 0x408u,
93  enBTRCore_DC_Reserved = 0x40Cu,
94  enBTRCore_DC_Microphone = 0x410u,
95  enBTRCore_DC_Loudspeaker = 0x414u,
96  enBTRCore_DC_Headphones = 0x418u,
97  enBTRCore_DC_PortableAudio = 0x41Cu,
98  enBTRCore_DC_CarAudio = 0x420u,
99  enBTRCore_DC_STB = 0x424u,
100  enBTRCore_DC_HIFIAudioDevice = 0x428u,
101  enBTRCore_DC_VCR = 0x42Cu,
102  enBTRCore_DC_VideoCamera = 0x430u,
103  enBTRCore_DC_Camcoder = 0x434u,
104  enBTRCore_DC_VideoMonitor = 0x438u,
105  enBTRCore_DC_TV = 0x43Cu,
106  enBTRCore_DC_VideoConference = 0x440u,
107 
108  /* LE DeviceClass */
109  enBTRCore_DC_Tile = 0xfeedu, //0xfeecu
110  enBTRCore_DC_HID_AudioRemote = 0x50Cu,
111  enBTRCore_DC_HID_Keyboard = 0x540u,
112  enBTRCore_DC_HID_Mouse = 0x580u,
113  enBTRCore_DC_HID_MouseKeyBoard = 0x5C0u,
114  enBTRCore_DC_HID_Joystick = 0x504u,
115  enBTRCore_DC_HID_GamePad = 0x508u,
116 
117  enBTRCore_DC_Unknown = 0x000u
118 } enBTRCoreDeviceClass;
119 
120 typedef enum _enBTRCoreDeviceState {
121  enBTRCoreDevStInitialized,
122  enBTRCoreDevStFound,
123  enBTRCoreDevStPaired,
124  enBTRCoreDevStUnpaired,
125  enBTRCoreDevStConnecting,
126  enBTRCoreDevStConnected,
127  enBTRCoreDevStDisconnecting,
128  enBTRCoreDevStDisconnected,
129  enBTRCoreDevStPlaying,
130  enBTRCoreDevStLost,
131  enBTRCoreDevStOpReady,
132  enBTRCoreDevStOpInfo,
133  enBTRCoreDevStUnknown
134 } enBTRCoreDeviceState;
135 
136 typedef enum _eBTRCoreDevMediaType {
137  eBTRCoreDevMediaTypePCM,
138  eBTRCoreDevMediaTypeSBC,
139  eBTRCoreDevMediaTypeMPEG,
140  eBTRCoreDevMediaTypeAAC,
141  eBTRCoreDevMediaTypeUnknown
142 } eBTRCoreDevMediaType;
143 
144 typedef enum _eBTRCoreDevMediaAChan {
145  eBTRCoreDevMediaAChanMono,
146  eBTRCoreDevMediaAChanDualChannel,
147  eBTRCoreDevMediaAChanStereo,
148  eBTRCoreDevMediaAChanJointStereo,
149  eBTRCoreDevMediaAChan5_1,
150  eBTRCoreDevMediaAChan7_1,
151  eBTRCoreDevMediaAChanUnknown
152 } eBTRCoreDevMediaAChan;
153 
154 typedef enum _enBTRCoreMediaCtrl {
155  enBTRCoreMediaCtrlPlay,
156  enBTRCoreMediaCtrlPause,
157  enBTRCoreMediaCtrlStop,
158  enBTRCoreMediaCtrlNext,
159  enBTRCoreMediaCtrlPrevious,
160  enBTRCoreMediaCtrlFastForward,
161  enBTRCoreMediaCtrlRewind,
162  enBTRCoreMediaCtrlVolumeUp,
163  enBTRCoreMediaCtrlVolumeDown,
164  enBTRCoreMediaCtrlEqlzrOff,
165  enBTRCoreMediaCtrlEqlzrOn,
166  enBTRCoreMediaCtrlShflOff,
167  enBTRCoreMediaCtrlShflAllTracks,
168  enBTRCoreMediaCtrlShflGroup,
169  enBTRCoreMediaCtrlRptOff,
170  enBTRCoreMediaCtrlRptSingleTrack,
171  enBTRCoreMediaCtrlRptAllTracks,
172  enBTRCoreMediaCtrlRptGroup,
173  enBTRCoreMediaCtrlScanOff,
174  enBTRCoreMediaCtrlScanAllTracks,
175  enBTRCoreMediaCtrlScanGroup,
176  enBTRCoreMediaCtrlMute,
177  enBTRCoreMediaCtrlUnMute,
178  enBTRCoreMediaCtrlUnknown
179 } enBTRCoreMediaCtrl;
180 
181 typedef enum _eBTRCoreMediaStatusUpdate {
182  eBTRCoreMediaTrkStStarted,
183  eBTRCoreMediaTrkStPlaying,
184  eBTRCoreMediaTrkStPaused,
185  eBTRCoreMediaTrkStStopped,
186  eBTRCoreMediaTrkStChanged,
187  eBTRCoreMediaTrkPosition,
188  eBTRCoreMediaPlaybackEnded,
189  eBTRCoreMediaPlyrName,
190  eBTRCoreMediaPlyrVolume,
191  eBTRCoreMediaPlyrEqlzrStOff,
192  eBTRCoreMediaPlyrEqlzrStOn,
193  eBTRCoreMediaPlyrShflStOff,
194  eBTRCoreMediaPlyrShflStAllTracks,
195  eBTRCoreMediaPlyrShflStGroup,
196  eBTRCoreMediaPlyrRptStOff,
197  eBTRCoreMediaPlyrRptStSingleTrack,
198  eBTRCoreMediaPlyrRptStAllTracks,
199  eBTRCoreMediaPlyrRptStGroup,
200  eBTRCoreMediaPlyrScanStOff,
201  eBTRCoreMediaPlyrScanStAllTracks,
202  eBTRCoreMediaPlyrScanStGroup,
203  eBTRCoreMediaElementInScope,
204  eBTRCoreMediaElementOofScope,
205  eBTRCoreMediaStUnknown
206 } eBTRCoreMediaStatusUpdate;
207 
208 typedef enum _eBTRCoreMedElementType {
209  enBTRCoreMedETypeUnknown,
210  enBTRCoreMedETypeAlbum,
211  enBTRCoreMedETypeArtist,
212  enBTRCoreMedETypeGenre,
213  enBTRCoreMedETypeCompilation,
214  enBTRCoreMedETypePlayList,
215  enBTRCoreMedETypeTrackList,
216  enBTRCoreMedETypeTrack
217 } eBTRCoreMedElementType;
218 
219 typedef enum _enBTRCoreLeOp {
220  enBTRCoreLeOpGReady,
221  enBTRCoreLeOpGReadValue, // G Referring to Gatt
222  enBTRCoreLeOpGWriteValue,
223  enBTRCoreLeOpGStartNotify,
224  enBTRCoreLeOpGStopNotify,
225  enBTRCoreLeOpUnknown // Add enBTRCoreLeOpXXXXX Later if needed
226 } enBTRCoreLeOp;
227 
228 typedef enum _enBTRCoreLeProp {
229  enBTRCoreLePropGUUID,
230  enBTRCoreLePropGPrimary,
231  enBTRCoreLePropGDevice,
232  enBTRCoreLePropGService,
233  enBTRCoreLePropGValue,
234  enBTRCoreLePropGNotifying,
235  enBTRCoreLePropGFlags,
236  enBTRCoreLePropGChar,
237  enBTRCoreLEGPropGDesc,
238  enBTRCoreLePropUnknown
239 } enBTRCoreLeProp;
240 
241 
242 /* bd addr length and type */
243 #ifndef BD_ADDR_LEN
244 #define BD_ADDR_LEN 6
245 typedef unsigned char BD_ADDR[BD_ADDR_LEN];
246 #endif
247 
248 
249 #define BD_NAME_LEN BTRCORE_STR_LEN - 1
250 typedef char BD_NAME[BD_NAME_LEN + 1]; /* Device name */
251 typedef char *BD_NAME_PTR; /* Pointer to Device name */
252 
253 #define UUID_LEN BTRCORE_UUID_LEN - 1
254 typedef char UUID[UUID_LEN+1];
255 
256 /*BT getAdapters*/
257 typedef struct _stBTRCoreGetAdapters {
258  unsigned char number_of_adapters;
260 
261 typedef struct _stBTRCoreListAdapters {
262  unsigned char number_of_adapters;
263  BD_NAME adapter_path[BTRCORE_MAX_NUM_BT_ADAPTERS];
264  BD_NAME adapterAddr[BTRCORE_MAX_NUM_BT_ADAPTERS];
266 
267 typedef struct _stBTRCoreFilterMode {
268  BD_ADDR bd_address;
269  BD_NAME service_name;
270  UUID uuid;
272 
274  tBTRCoreDevId deviceId;
275  BD_NAME deviceName;
276  char deviceAddress[BTRCORE_MAX_STR_LEN];
277  enBTRCoreDeviceType eDeviceType;
278  enBTRCoreDeviceClass eDeviceClass;
279  enBTRCoreDeviceState eDevicePrevState;
280  enBTRCoreDeviceState eDeviceCurrState;
281  unsigned char isPaired;
282  unsigned int ui32DevClassBtSpec;
283  char uuid[BTRCORE_UUID_LEN];
284  char devOpResponse[BTRCORE_MAX_DEV_OP_DATA_LEN];
285  enBTRCoreLeProp eCoreLeProp;
286  enBTRCoreLeOp eCoreLeOper;
288 
290  unsigned int uuid_value;
291  BD_NAME profile_name;
293 
295  int numberOfService;
296  stBTRCoreSupportedService profile[BTRCORE_MAX_DEVICE_PROFILE];
298 
299 typedef struct _stBTRCoreAdServiceData {
300  char pcUUIDs[BTRCORE_UUID_LEN];;
301  unsigned char pcData[BTRCORE_MAX_SERVICE_DATA_LEN];
302  unsigned int len;
304 
305 /*BT Adapter*/
306 typedef struct _stBTRCoreAdapter {
307  unsigned char adapter_number;
308  char* pcAdapterPath;
309  char* pcAdapterDevName;
310  BOOLEAN enable;
311  BOOLEAN discoverable;
312  BOOLEAN bFirstAvailable; /*search for first available BT adapater*/
313  unsigned int DiscoverableTimeout;
314  BOOLEAN bDiscovering;
316 
317 
318 typedef struct _stBTRCoreBTDevice {
319  tBTRCoreDevId tDeviceId;
320  enBTRCoreDeviceClass enDeviceType;
321  BOOLEAN bFound;
322  BOOLEAN bDeviceConnected;
323  int i32RSSI;
324  unsigned int ui32VendorId;
325  unsigned int ui32DevClassBtSpec;
326  char pcDeviceName[BD_NAME_LEN+1];
327  char pcDeviceAddress[BD_NAME_LEN+1];
328  char pcDevicePath[BD_NAME_LEN+1];
329  stBTRCoreSupportedServiceList stDeviceProfile;
330  stBTRCoreAdServiceData stAdServiceData[BTRCORE_MAX_DEVICE_PROFILE];
332 
334  int numberOfDevices;
335  stBTRCoreBTDevice devices[BTRCORE_MAX_NUM_BT_DEVICES];
337 
339  int numberOfDevices;
340  stBTRCoreBTDevice devices[BTRCORE_MAX_NUM_BT_DEVICES];
342 
343 typedef struct _stBTRCoreConnCBInfo {
344  unsigned int ui32devPassKey;
345  unsigned char ucIsReqConfirmation;
346  char cConnAuthDeviceName[BTRCORE_STR_LEN];
347  union {
348  stBTRCoreBTDevice stFoundDevice;
349  stBTRCoreBTDevice stKnownDevice;
350  };
352 
354  eBTRCoreDevMediaAChan eDevMAChan; // channel_mode
355  unsigned int ui32DevMSFreq; // frequency
356  unsigned int ui32DevMSFmt;
358 
360  eBTRCoreDevMediaAChan eDevMAChan; // channel_mode
361  unsigned int ui32DevMSFreq; // frequency
362  unsigned char ui8DevMSbcAllocMethod; // allocation_method
363  unsigned char ui8DevMSbcSubbands; // subbands
364  unsigned char ui8DevMSbcBlockLength; // block_length
365  unsigned char ui8DevMSbcMinBitpool; // min_bitpool
366  unsigned char ui8DevMSbcMaxBitpool; // max_bitpool
367  unsigned short ui16DevMSbcFrameLen; // frameLength
368  unsigned short ui16DevMSbcBitrate; // bitrate
370 
372  eBTRCoreDevMediaAChan eDevMAChan; // channel_mode
373  unsigned int ui32DevMSFreq; // frequency
374  unsigned char ui8DevMMpegCrc; // crc
375  unsigned char ui8DevMMpegLayer; // layer
376  unsigned char ui8DevMMpegMpf; // mpf
377  unsigned char ui8DevMMpegRfa; // rfa
378  unsigned short ui16DevMMpegFrameLen; // frameLength
379  unsigned short ui16DevMMpegBitrate; // bitrate
381 
382 typedef struct _stBTRCoreDevMediaInfo {
383  eBTRCoreDevMediaType eBtrCoreDevMType;
384  void* pstBtrCoreDevMCodecInfo;
386 
387 typedef struct _stBTRCoreMediaTrackInfo {
388  char pcAlbum[BTRCORE_MAX_STR_LEN];
389  char pcGenre[BTRCORE_MAX_STR_LEN];
390  char pcTitle[BTRCORE_MAX_STR_LEN];
391  char pcArtist[BTRCORE_MAX_STR_LEN];
392  unsigned int ui32TrackNumber;
393  unsigned int ui32Duration;
394  unsigned int ui32NumberOfTracks;
396 
398  unsigned int ui32Duration;
399  unsigned int ui32Position;
401 
403  eBTRCoreMedElementType eAVMedElementType;
404  tBTRCoreMediaElementId ui32MediaElementId;
405  unsigned char bIsPlayable;
406  char m_mediaElementName[BTRCORE_MAX_STR_LEN];
407  stBTRCoreMediaTrackInfo m_mediaTrackInfo;
409 
411  unsigned short m_numOfElements;
412  stBTRCoreMediaElementInfo m_mediaElementInfo[BTRCORE_MAX_MEDIA_ELEMENTS];
414 
416  eBTRCoreMediaStatusUpdate eBTMediaStUpdate;
417  BOOLEAN bIsMediaCtrlAvailable;
418 
419  union {
420  stBTRCoreMediaTrackInfo m_mediaTrackInfo;
421  stBTRCoreMediaPositionInfo m_mediaPositionInfo;
422  stBTRCoreMediaElementInfo m_mediaElementInfo;
423  char m_mediaPlayerName[BTRCORE_MAX_STR_LEN];
424  unsigned char m_mediaPlayerVolume;
425  };
427 
429  tBTRCoreDevId deviceId;
430  BD_NAME deviceName;
431  enBTRCoreDeviceClass eDeviceClass;
432 
433  stBTRCoreMediaStatusUpdate m_mediaStatusUpdate;
435 
436 typedef struct _stBTRCoreMediaCtData {
437  unsigned char m_mediaAbsoluteVolume;
438  //TODO: When we implement a Player for Audio-Out check if you can use a common union
439  // similar to one use in stBTRCoreMediaStatusUpdate
440  // union {
441  // stBTRCoreMediaTrackInfo m_mediaTrackInfo;
442  // stBTRCoreMediaPositionInfo m_mediaPositionInfo;
443  // stBTRCoreMediaElementInfo m_mediaElementInfo;
444  // char m_mediaPlayerName[BTRCORE_MAX_STR_LEN];
445  // unsigned char m_mediaPlayerVolume;
446  // };
448 
449 typedef struct _stBTRCoreUUID {
450  unsigned short flags;
451  char uuid[BTRCORE_UUID_LEN];
452 } stBTRCoreUUID;
453 
454 typedef struct _stBTRCoreUUIDList {
455  unsigned char numberOfUUID;
456  stBTRCoreUUID uuidList[BTRCORE_MAX_DEVICE_PROFILE];
458 
460  enBTRCoreOpType type;
461  stBTRCoreAdapter adapter;
462  stBTRCoreBTDevice device;
464 
465 
466 
467 /* Fptr Callbacks types */
468 typedef enBTRCoreRet (*fPtr_BTRCore_DeviceDiscCb) (stBTRCoreDiscoveryCBInfo* astBTRCoreDiscoveryCbInfo, void* apvUserData);
469 typedef enBTRCoreRet (*fPtr_BTRCore_StatusCb) (stBTRCoreDevStatusCBInfo* apstDevStatusCbInfo, void* apvUserData);
470 typedef enBTRCoreRet (*fPtr_BTRCore_MediaStatusCb) (stBTRCoreMediaStatusCBInfo* apstMediaStatusCbInfo, void* apvUserData);
471 typedef enBTRCoreRet (*fPtr_BTRCore_ConnIntimCb) (stBTRCoreConnCBInfo* apstConnCbInfo, int* api32ConnInIntimResp, void* apvUserData);
472 typedef enBTRCoreRet (*fPtr_BTRCore_ConnAuthCb) (stBTRCoreConnCBInfo* apstConnCbInfo, int* api32ConnInAuthResp, void* apvUserData);
473 
474 /* @} */ // End of group BLUETOOTH_TYPES
475 
476 
477 /**
478  * @addtogroup BLUETOOTH_APIS
479  * @{
480  */
481 
482 
483 /*
484  * Interfaces
485  */
486 // TODO: Reduce the number of interfaces exposed to the outside world
487 // TODO: Combine interfaces which perform the same functionality
488 
489 /**
490  * @brief This API connects to a bus daemon and registers the client with it.
491  *
492  * @param[in] phBTRCore Bluetooth core handle.
493  *
494  * @return Returns the status of the operation.
495  * @retval enBTRCoreSuccess on success, appropriate error code otherwise.
496  */
497 enBTRCoreRet BTRCore_Init (tBTRCoreHandle* phBTRCore);
498 
499 /**
500  * @brief This APi deinitialzes and free BTRCore.
501  *
502  * @param[in] hBTRCore Bluetooth core handle.
503  *
504  * @return Returns the status of the operation.
505  * @retval enBTRCoreSuccess on success, appropriate error code otherwise.
506  */
507 enBTRCoreRet BTRCore_DeInit (tBTRCoreHandle hBTRCore);
508 
509 /**
510  * @brief This API registers an agent handler.
511  *
512  * Every application can register its own agent and for all actions triggered by that application its
513  * agent is used.
514  * If an application chooses to not register an agent, the default agent is used.
515  *
516  * @param[in] hBTRCore Bluetooth core handle.
517  * @param[in] iBTRCapMode Capabilities can be "DisplayOnly", "DisplayYesNo", "KeyboardOnly",
518  * "NoInputNoOutput" and "KeyboardDisplay" which
519  * reflects the input and output capabilities of the agent.
520  *
521  * @return Returns the status of the operation.
522  * @retval enBTRCoreSuccess on success, appropriate error code otherwise.
523  *
524  * @note An application can only register one agent. Multiple agents per application is not supported.
525  *
526  */
527 enBTRCoreRet BTRCore_RegisterAgent (tBTRCoreHandle hBTRCore, int iBTRCapMode);
528 
529 /**
530  * @brief This unregisters the agent that has been previously registered.
531  *
532  * The object path parameter must match the same value that has been used on registration.
533  *
534  * @param[in] hBTRCore Bluetooth core handle.
535  *
536  * @return Returns the status of the operation.
537  * @retval enBTRCoreSuccess on success, appropriate error code otherwise.
538  */
539 enBTRCoreRet BTRCore_UnregisterAgent (tBTRCoreHandle hBTRCore);
540 
541 
542 /**
543  * @brief Returns list of adapter object paths under /org/bluez
544  *
545  * @param[in] hBTRCore Bluetooth core handle.
546  * @param[out] pstListAdapters List of adapters.
547  *
548  * @return Returns the status of the operation.
549  * @retval enBTRCoreSuccess on success, appropriate error code otherwise.
550  */
551 enBTRCoreRet BTRCore_GetListOfAdapters (tBTRCoreHandle hBTRCore, stBTRCoreListAdapters* pstListAdapters);
552 
553 /**
554  * @brief This API sets the bluetooth adapter power as ON/OFF.
555  *
556  * @param[in] hBTRCore Bluetooth core handle.
557  * @param[in] pAdapterPath Bluetooth adapter address.
558  * @param[in] powerStatus Bluetooth adapter power status.
559  *
560  * @return Returns the status of the operation.
561  * @retval enBTRCoreSuccess on success, appropriate error code otherwise.
562  */
563 enBTRCoreRet BTRCore_SetAdapterPower (tBTRCoreHandle hBTRCore, const char* pAdapterPath, unsigned char powerStatus);
564 
565 /**
566  * @brief This API returns the value of org.bluez.Adapter.powered .
567  *
568  * @param[in] hBTRCore Bluetooth core handle.
569  * @param[in] pAdapterPath Bluetooth adapter address.
570  * @param[out] pAdapterPower Value of bluetooth adapter.
571  *
572  * @return Returns the status of the operation.
573  * @retval enBTRCoreSuccess on success, appropriate error code otherwise.
574  */
575 enBTRCoreRet BTRCore_GetAdapterPower (tBTRCoreHandle hBTRCore, const char* pAdapterPath, unsigned char* pAdapterPower);
576 
577 /**
578  * @brief This API returns the value of org.bluez.Manager.Getadapters .
579  *
580  * @param[in] hBTRCore Bluetooth core handle.
581  * @param[out] pstGetAdapters Adapter value.
582  *
583  * @return Returns the status of the operation.
584  * @retval enBTRCoreSuccess on success, appropriate error code otherwise.
585  */
586 enBTRCoreRet BTRCore_GetAdapters (tBTRCoreHandle hBTRCore, stBTRCoreGetAdapters* pstGetAdapters);
587 
588 /**
589  * @brief This API returns the bluetooth adapter path.
590  *
591  * @param[in] hBTRCore Bluetooth core handle.
592  * @param[out] apstBTRCoreAdapter Adapter path.
593  *
594  * @return Returns the status of the operation.
595  * @retval enBTRCoreSuccess on success, appropriate error code otherwise.
596  */
597 enBTRCoreRet BTRCore_GetAdapter (tBTRCoreHandle hBTRCore, stBTRCoreAdapter* apstBTRCoreAdapter);
598 
599 /**
600  * @brief This API sets Current Bluetooth Adapter to use.
601  *
602  * @param[in] hBTRCore Bluetooth core handle.
603  * @param[in] adapter_number Bluetooth adapter number.
604  *
605  * @return Returns the status of the operation.
606  * @retval enBTRCoreSuccess on success, appropriate error code otherwise.
607  */
608 enBTRCoreRet BTRCore_SetAdapter (tBTRCoreHandle hBTRCore, int adapter_number);
609 
610 /**
611  * @brief This API enables specific adapter.
612  *
613  * @param[in] hBTRCore Bluetooth core handle.
614  * @param[in] apstBTRCoreAdapter Structure which holds the adapter info.
615  *
616  * @return Returns the status of the operation.
617  * @retval enBTRCoreSuccess on success, appropriate error code otherwise.
618  */
619 enBTRCoreRet BTRCore_EnableAdapter (tBTRCoreHandle hBTRCore, stBTRCoreAdapter* apstBTRCoreAdapter);
620 
621 /**
622  * @brief This API disables specific adapter.
623  *
624  * @param[in] hBTRCore Bluetooth core handle.
625  * @param[in] apstBTRCoreAdapter Structure which holds the adapter info.
626  *
627  * @return Returns the status of the operation.
628  * @retval enBTRCoreSuccess on success, appropriate error code otherwise.
629  */
630 enBTRCoreRet BTRCore_DisableAdapter (tBTRCoreHandle hBTRCore, stBTRCoreAdapter* apstBTRCoreAdapter);
631 
632 /**
633  * @brief This API gets Address of BT Adapter.
634  *
635  * @param[in] hBTRCore Bluetooth core handle.
636  * @param[in] aui8adapterIdx Adapter index.
637  * @param[out] apui8adapterAddr Adapter address.
638  *
639  * @return Returns the status of the operation.
640  * @retval enBTRCoreSuccess on success, appropriate error code otherwise.
641  */
642 enBTRCoreRet BTRCore_GetAdapterAddr (tBTRCoreHandle hBTRCore, unsigned char aui8adapterIdx, char* apui8adapterAddr);
643 
644 /**
645  * @brief This API sets adapter as discoverable.
646  *
647  * @param[in] hBTRCore Bluetooth core handle.
648  * @param[in] pAdapterPath Adapter path.
649  * @param[in] discoverable Value that sets the device discoverable or not.
650  *
651  * @return Returns the status of the operation.
652  * @retval enBTRCoreSuccess on success, appropriate error code otherwise.
653  */
654 enBTRCoreRet BTRCore_SetAdapterDiscoverable (tBTRCoreHandle hBTRCore, const char* pAdapterPath, unsigned char discoverable);
655 
656 /**
657  * @brief This API sets how long the adapter is discoverable.
658  *
659  * @param[in] hBTRCore Bluetooth core handle.
660  * @param[in] pAdapterPath Adapter path.
661  * @param[in] timeout Time out value.
662  *
663  * @return Returns the status of the operation.
664  * @retval enBTRCoreSuccess on success, appropriate error code otherwise.
665  */
666 enBTRCoreRet BTRCore_SetAdapterDiscoverableTimeout (tBTRCoreHandle hBTRCore, const char* pAdapterPath, unsigned short timeout);
667 
668 /**
669  * @brief This API checks whether the discovery is in progress or not.
670  *
671  * @param[in] hBTRCore Bluetooth core handle.
672  * @param[in] pAdapterPath Adapter path.
673  * @param[in] pDiscoverable Indicates discoverable or not.
674  *
675  * @return Returns the status of the operation.
676  * @retval enBTRCoreSuccess on success, appropriate error code otherwise.
677  */
678 enBTRCoreRet BTRCore_GetAdapterDiscoverableStatus (tBTRCoreHandle hBTRCore, const char* pAdapterPath, unsigned char* pDiscoverable);
679 
680 /**
681  * @brief This API sets a friendly name to BT adapter device.
682  *
683  * @param[in] hBTRCore Bluetooth core handle.
684  * @param[in] apstBTRCoreAdapter Adapter path.
685  * @param[in] apcAdapterDeviceName Adapter device name.
686  *
687  * @return Returns the status of the operation.
688  * @retval enBTRCoreSuccess on success, appropriate error code otherwise.
689  */
690 enBTRCoreRet BTRCore_SetAdapterDeviceName (tBTRCoreHandle hBTRCore, stBTRCoreAdapter* apstBTRCoreAdapter, char* apcAdapterDeviceName);
691 
692 /**
693  * @brief This API sets a friendly name to BT adapter.
694  *
695  * @param[in] hBTRCore Bluetooth core handle.
696  * @param[in] pAdapterPath Adapter path.
697  * @param[in] pAdapterName Adapter name.
698  *
699  * @return Returns the status of the operation.
700  * @retval enBTRCoreSuccess on success, appropriate error code otherwise.
701  */
702 enBTRCoreRet BTRCore_SetAdapterName (tBTRCoreHandle hBTRCore, const char* pAdapterPath, const char* pAdapterName);
703 
704 /**
705  * @brief This API gets the name of BT adapter.
706  *
707  * @param[in] hBTRCore Bluetooth core handle.
708  * @param[in] pAdapterPath Adapter path.
709  * @param[out] pAdapterName Adapter name.
710  *
711  * @return Returns the status of the operation.
712  * @retval enBTRCoreSuccess on success, appropriate error code otherwise.
713  */
714 enBTRCoreRet BTRCore_GetAdapterName (tBTRCoreHandle hBTRCore, const char* pAdapterPath, char* pAdapterName);
715 
716 /**
717  * @brief This API resets specific adapter.
718  *
719  * @param[in] hBTRCore Bluetooth core handle.
720  * @param[in] apstBTRCoreAdapter Adapter to be reset.
721  *
722  * @return Returns the status of the operation.
723  * @retval enBTRCoreSuccess on success, appropiate error code otherwise.
724  */
725 enBTRCoreRet BTRCore_ResetAdapter(tBTRCoreHandle hBTRCore, stBTRCoreAdapter* apstBTRCoreAdapter);
726 
727 /**
728  * @brief This API gets BT Version.
729  *
730  * @param[in] hBTRCore Bluetooth core handle.
731  * @param[out] apcBtVersion Bluetooth version.
732  *
733  * @return Returns the status of the operation.
734  * @retval enBTRCoreSuccess on success, appropiate error code otherwise.
735  */
736 enBTRCoreRet BTRCore_GetVersionInfo(tBTRCoreHandle hBTRCore, char* apcBtVersion);
737 
738 /**
739  * @brief This method starts the device discovery session.
740  *
741  * This includes an inquiry procedure and remote device name resolving.
742  * This process will start emitting DeviceFound and PropertyChanged "Discovering" signals.
743  *
744  * @param[in] hBTRCore Bluetooth core handle.
745  * @param[in] pAdapterPath Adapter path the message should be sent to.
746  * @param[in] aenBTRCoreDevType Bluetooth device types like headset, speakers, Low energy devices etc.
747  * @param[in] aui32DiscDuration Timeout for the discovery.
748  *
749  * @return Returns the status of the operation.
750  * @retval Returns enBTRCoreSuccess on success, appropriate error code otherwise.
751  */
752 enBTRCoreRet BTRCore_StartDiscovery (tBTRCoreHandle hBTRCore, const char* pAdapterPath, enBTRCoreDeviceType aenBTRCoreDevType, unsigned int aui32DiscDuration);
753 
754 /**
755  * @brief This method will cancel any previous StartDiscovery transaction.
756  *
757  * @param[in] hBTRCore Bluetooth core handle.
758  * @param[in] pAdapterPath Adapter path where the message should be sent to.
759  * @param[in] aenBTRCoreDevType Bluetooth device types like headset, speakers, Low energy devices etc.
760  *
761  * @return Returns the status of the operation.
762  * @retval Returns enBTRCoreSuccess on success, appropriate error code otherwise.
763  *
764  * @note Discovery procedure is shared between all discovery sessions thus calling StopDiscovery will only
765  * release a single session.
766  */
767 enBTRCoreRet BTRCore_StopDiscovery (tBTRCoreHandle hBTRCore, const char* pAdapterPath, enBTRCoreDeviceType aenBTRCoreDevType);
768 
769 /**
770  * @brief This API returns the number of devices scanned.
771  *
772  * This includes the Device name, MAC address, Signal strength etc.
773  *
774  * @param[in] hBTRCore Bluetooth core handle.
775  * @param[out] pListOfScannedDevices Structure which holds the count and the device info.
776  */
777 enBTRCoreRet BTRCore_GetListOfScannedDevices (tBTRCoreHandle hBTRCore, stBTRCoreScannedDevicesCount *pListOfScannedDevices);
778 
779 /**
780  * @brief This API initiates the pairing of the device.
781  *
782  * This method will connect to the remote device and retrieve all SDP records and then initiate the pairing.
783  *
784  * @param[in] hBTRCore Bluetooth core handle.
785  * @param[in] aBTRCoreDevId Device ID for pairing.
786  *
787  * @return Returns the status of the operation.
788  * @retval Returns enBTRCoreSuccess on success, appropriate error code otherwise.
789  */
790 enBTRCoreRet BTRCore_PairDevice (tBTRCoreHandle hBTRCore, tBTRCoreDevId aBTRCoreDevId);
791 
792 /**
793  * @brief This API removes the remote device object at the given path.
794  *
795  * It will remove also the pairing information.
796  * BTRCore_UnPairDevice is similar to BTRCore_ForgetDevice.
797  *
798  * @param[in] hBTRCore Bluetooth core handle.
799  * @param[in] aBTRCoreDevId Device ID for pairing.
800  *
801  * @return Returns the status of the operation.
802  * @retval Returns enBTRCoreSuccess on success, appropriate error code otherwise.
803  */
804 enBTRCoreRet BTRCore_UnPairDevice (tBTRCoreHandle hBTRCore, tBTRCoreDevId aBTRCoreDevId);
805 
806 /**
807  * @brief Gets the paired devices list.
808  *
809  * @param[in] hBTRCore Bluetooth core handle.
810  * @param[out] pListOfDevices List of paired devices that has to be fetched.
811  *
812  * @return Returns the status of the operation.
813  * @retval Returns enBTRCoreSuccess on success, appropriate error code otherwise.
814  */
815 enBTRCoreRet BTRCore_GetListOfPairedDevices (tBTRCoreHandle hBTRCore, stBTRCorePairedDevicesCount *pListOfDevices);
816 
817 /**
818  * @brief This API checks the device entry in the scanned device list.
819  *
820  * @param[in] hBTRCore Bluetooth core handle.
821  * @param[in] aBTRCoreDevId Device ID to be checked.
822  *
823  * @return Returns the status of the operation.
824  * @retval Returns enBTRCoreSuccess on success, appropriate error code otherwise.
825  *
826  */
827 enBTRCoreRet BTRCore_FindDevice (tBTRCoreHandle hBTRCore, tBTRCoreDevId aBTRCoreDevId);
828 
829 /**
830  * @brief This API is used to confirm if a given service exists on a device.
831  *
832  * @param[in] hBTRCore Bluetooth core handle.
833  * @param[in] aBTRCoreDevId Device ID to be checked.
834  * @param[in] UUID UUID of the bluetooth device.
835  * @param[in] XMLdata Service name.
836  * @param[out] found Indicates service found or not.
837  *
838  * @return Returns the status of the operation.
839  * @retval Returns enBTRCoreSuccess on success, appropriate error code otherwise.
840  */
841 enBTRCoreRet BTRCore_FindService (tBTRCoreHandle hBTRCore, tBTRCoreDevId aBTRCoreDevId, const char* UUID, char* XMLdata, int* found);
842 
843 /**
844  * @brief This API retuns the list of services supported by the device.
845  *
846  * @param[in] hBTRCore Bluetooth core handle.
847  * @param[in] aBTRCoreDevId Device ID to be checked.
848  * @param[out] pProfileList List of supported services.
849  *
850  * @return Returns the status of the operation.
851  * @retval Returns enBTRCoreSuccess on success, appropriate error code otherwise.
852  */
853 enBTRCoreRet BTRCore_GetSupportedServices (tBTRCoreHandle hBTRCore, tBTRCoreDevId aBTRCoreDevId, stBTRCoreSupportedServiceList *pProfileList);
854 
855 /**
856  * @brief This API checks the device is connectable.
857  *
858  * It uses ping utility to check the connection with the remote device.
859  *
860  * @param[in] hBTRCore Bluetooth core handle.
861  * @param[in] aBTRCoreDevId Device ID to be checked.
862  *
863  * @return Returns the status of the operation.
864  * @retval Returns enBTRCoreSuccess on success, appropriate error code otherwise.
865  */
866 enBTRCoreRet BTRCore_IsDeviceConnectable (tBTRCoreHandle hBTRCore, tBTRCoreDevId aBTRCoreDevId);
867 
868 /**
869  * @brief This method connect any profiles the remote device supports.
870  *
871  * It is been flagged as auto-connectable on adapter side. If only subset of profiles is already
872  * connected it will try to connect currently disconnected ones.
873  * If at least one profile was connected successfully this method will indicate success.
874  *
875  * @param[in] hBTRCore Bluetooth core handle.
876  * @param[in] aBTRCoreDevId Device Id of the remote device.
877  * @param[in] aenBTRCoreDevType Type of bluetooth device HFP(Hands Free Profile) headset, audio source etc.
878  *
879  * @return Returns the status of the operation.
880  * @retval Returns enBTRCoreSuccess on success, appropriate error code otherwise.
881  */
882 enBTRCoreRet BTRCore_ConnectDevice (tBTRCoreHandle hBTRCore, tBTRCoreDevId aBTRCoreDevId, enBTRCoreDeviceType aenBTRCoreDevType);
883 
884 /**
885  * @brief This method gracefully disconnects all connected profiles and then terminates connection.
886  *
887  * @param[in] hBTRCore Bluetooth core handle.
888  * @param[in] aBTRCoreDevId Device Id of the remote device.
889  * @param[in] aenBTRCoreDevType Type of bluetooth device HFP(Hands Free Profile) headset, audio source etc.
890  *
891  * @return Returns the status of the operation.
892  * @retval Returns enBTRCoreSuccess on success, appropriate error code otherwise.
893  */
894 enBTRCoreRet BTRCore_DisconnectDevice (tBTRCoreHandle hBTRCore, tBTRCoreDevId aBTRCoreDevId, enBTRCoreDeviceType aenBTRCoreDevType);
895 
896 /**
897  * @brief This method checks the current device that is connected.
898  *
899  * @param[in] hBTRCore Bluetooth core handle.
900  * @param[in] aBTRCoreDevId Device Id of the remote device.
901  * @param[in] aenBTRCoreDevType Type of bluetooth device HFP(Hands Free Profile) headset, audio source etc.
902  *
903  * @return Returns the status of the operation.
904  * @retval Returns enBTRCoreSuccess on success, appropriate error code otherwise.
905  */
906 enBTRCoreRet BTRCore_GetDeviceConnected (tBTRCoreHandle hBTRCore, tBTRCoreDevId aBTRCoreDevId, enBTRCoreDeviceType aenBTRCoreDevType);
907 
908 /**
909  * @brief This method checks the current device that is disconnected.
910  *
911  * @param[in] hBTRCore Bluetooth core handle.
912  * @param[in] aBTRCoreDevId Device Id of the remote device.
913  * @param[in] aenBTRCoreDevType Type of bluetooth device HFP(Hands Free Profile) headset, audio source etc.
914  *
915  * @return Returns the status of the operation.
916  * @retval Returns enBTRCoreSuccess on success, appropriate error code otherwise.
917  */
918 enBTRCoreRet BTRCore_GetDeviceDisconnected (tBTRCoreHandle hBTRCore, tBTRCoreDevId aBTRCoreDevId, enBTRCoreDeviceType aenBTRCoreDevType);
919 
920 /**
921  * @brief This API returns current media info that includes the codec info, channel modes, subbands etc.
922  *
923  * @param[in] hBTRCore Bluetooth core handle.
924  * @param[in] aBTRCoreDevId Device Id of the remote device.
925  * @param[in] aenBTRCoreDevType Type of bluetooth device HFP(Hands Free Profile) headset, audio source etc.
926  * @param[out] apstBTRCoreDevMediaInfo Structure which stores the media info.
927  *
928  * @return Returns the status of the operation.
929  * @retval Returns enBTRCoreSuccess on success, appropriate error code otherwise.
930  */
931 enBTRCoreRet BTRCore_GetDeviceTypeClass (tBTRCoreHandle hBTRCore, tBTRCoreDevId aBTRCoreDevId, enBTRCoreDeviceType* apenBTRCoreDevTy, enBTRCoreDeviceClass* apenBTRCoreDevCl);
932 
933 /**
934  * @brief This API returns current media info that includes the codec info, channel modes, subbands etc.
935  *
936  * @param[in] hBTRCore Bluetooth core handle.
937  * @param[in] aBTRCoreDevId Device Id of the remote device.
938  * @param[in] aenBTRCoreDevType Type of bluetooth device HFP(Hands Free Profile) headset, audio source etc.
939  * @param[out] apstBTRCoreDevMediaInfo Structure which stores the media info.
940  *
941  * @return Returns the status of the operation.
942  * @retval Returns enBTRCoreSuccess on success, appropriate error code otherwise.
943  */
944 enBTRCoreRet BTRCore_GetDeviceMediaInfo (tBTRCoreHandle hBTRCore, tBTRCoreDevId aBTRCoreDevId, enBTRCoreDeviceType aenBTRCoreDevType, stBTRCoreDevMediaInfo* apstBTRCoreDevMediaInfo);
945 
946 /**
947  * @brief This API returns the bluetooth device address.
948  *
949  * @param[in] hBTRCore Bluetooth core handle.
950  * @param[in] aBTRCoreDevId Device Id of the remote device.
951  * @param[in] aenBTRCoreDevType Type of bluetooth device HFP(Hands Free Profile) headset, audio source etc.
952  * @param[out] aiDataPath Device address.
953  * @param[in] aidataReadMTU Read data length.
954  * @param[in] aidataWriteMTU Write data length.
955  *
956  * @return Returns the status of the operation.
957  * @retval Returns enBTRCoreSuccess on success, appropriate error code otherwise.
958  */
959 enBTRCoreRet BTRCore_AcquireDeviceDataPath(tBTRCoreHandle hBTRCore, tBTRCoreDevId aBTRCoreDevId, enBTRCoreDeviceType aenBTRCoreDevType, int* aiDataPath, int* aidataReadMTU, int* aidataWriteMTU, unsigned int* apui32Delay);
960 
961 /**
962  * @brief This API release the bluetooth device address.
963  *
964  * @param[in] hBTRCore Bluetooth core handle.
965  * @param[in] aBTRCoreDevId Device Id of the remote device.
966  * @param[in] enDeviceType Type of bluetooth device HFP(Hands Free Profile) headset, audio source etc.
967  *
968  * @return Returns the status of the operation.
969  * @retval Returns enBTRCoreSuccess on success, appropriate error code otherwise.
970  */
971 enBTRCoreRet BTRCore_ReleaseDeviceDataPath(tBTRCoreHandle hBTRCore, tBTRCoreDevId aBTRCoreDevId, enBTRCoreDeviceType enDeviceType);
972 
973 /**
974  * @brief This API release the bluetooth device address.
975  *
976  * @param[in] hBTRCore Bluetooth core handle.
977  * @param[in] aui32AckTOutms Data write acknowledgment timeout
978  *
979  * @return Returns the status of the operation.
980  * @retval Returns enBTRCoreSuccess on success, appropriate error code otherwise.
981  */
982 enBTRCoreRet BTRCore_SetDeviceDataAckTimeout(tBTRCoreHandle hBTRCore, unsigned int aui32AckTOutms);
983 
984 /**
985  * @brief This API is used to perform media control operations like play, pause, NExt, Previous, Rewind etc.
986  *
987  * @param[in] hBTRCore Bluetooth core handle.
988  * @param[in] aBTRCoreDevId Device Id of the remote device.
989  * @param[in] aenBTRCoreDevType Type of bluetooth device HFP(Hands Free Profile) headset, audio source etc.
990  * @param[in] aenBTRCoreMediaCtrl Indicates which operation needs to be performed.
991  *
992  * @return Returns the status of the operation.
993  * @retval Returns enBTRCoreSuccess on success, appropiate error code otherwise.
994  */
995 enBTRCoreRet BTRCore_MediaControl(tBTRCoreHandle hBTRCore, tBTRCoreDevId aBTRCoreDevId, enBTRCoreDeviceType aenBTRCoreDevType, enBTRCoreMediaCtrl aenBTRCoreMediaCtrl, stBTRCoreMediaCtData* apstBTRCoreMediaCData);
996 
997 /**
998  * @brief This API is used to retrieve the media track information.
999  *
1000  * @param[in] hBTRCore Bluetooth core handle.
1001  * @param[in] aBTRCoreDevId Device Id of the remote device.
1002  * @param[in] aenBTRCoreDevType Type of bluetooth device HFP(Hands Free Profile) headset, audio source etc.
1003  * @param[out] apstBTMediaTrackInfo Structure which represents the media track information.
1004  *
1005  * @return Returns the status of the operation.
1006  * @retval Returns enBTRCoreSuccess on success, appropiate error code otherwise.
1007  */
1008 enBTRCoreRet BTRCore_GetMediaTrackInfo (tBTRCoreHandle hBTRCore, tBTRCoreDevId aBTRCoreDevId, enBTRCoreDeviceType aenBTRCoreDevType, stBTRCoreMediaTrackInfo* apstBTMediaTrackInfo);
1009 
1010 /**
1011  * @brief This API is used to retrieve the media track information.
1012  *
1013  * @param[in] hBTRCore Bluetooth core handle.
1014  * @param[in] aBTRCoreDevId Device Id of the remote device.
1015  * @param[in] aenBTRCoreDevType Type of bluetooth device HFP(Hands Free Profile) headset, audio source etc.
1016  * @param[in] aBtrMediaElementId Media Element Id
1017  * @param[out] apstBTMediaTrackInfo Structure which represents the media track information.
1018  *
1019  * @return Returns the status of the operation.
1020  * @retval Returns enBTRCoreSuccess on success, appropiate error code otherwise.
1021  */
1022 enBTRCoreRet BTRCore_GetMediaElementTrackInfo (tBTRCoreHandle hBTRCore, tBTRCoreDevId aBTRCoreDevId, enBTRCoreDeviceType aenBTRCoreDevType,tBTRCoreMediaElementId aBtrMediaElementId, stBTRCoreMediaTrackInfo* apstBTMediaTrackInfo);
1023 
1024 
1025 /**
1026  * @brief This API returns the duration and the current position of the media.
1027  *
1028  * @param[in] hBTRCore Bluetooth core handle.
1029  * @param[in] aBTRCoreDevId Device Id of the remote device.
1030  * @param[in] aenBTRCoreDevType Type of bluetooth device HFP(Hands Free Profile) headset, audio source etc.
1031  * @param[out] apstBTMediaPositionInfo Structure which represents the position information.
1032  *
1033  * @return Returns the status of the operation.
1034  * @retval Returns enBTRCoreSuccess on success, appropriate error code otherwise.
1035  */
1036 enBTRCoreRet BTRCore_GetMediaPositionInfo (tBTRCoreHandle hBTRCore, tBTRCoreDevId aBTRCoreDevId, enBTRCoreDeviceType aenBTRCoreDevType, stBTRCoreMediaPositionInfo* apstBTMediaPositionInfo);
1037 
1038 /**
1039  * @brief This API returns the media file properties of the Bluetooth device.
1040  *
1041  * As of now, it is implemented to return dummy value.
1042  *
1043  * @param[in] hBTRCore Bluetooth core handle.
1044  * @param[in] aBTRCoreDevId Device Id of the remote device.
1045  * @param[in] aenBTRCoreDevType Type of bluetooth device HFP(Hands Free Profile) headset, audio source etc.
1046  * @param[out] mediaPropertyKey Key to the property.
1047  * @param[out] mediaPropertyValue Value to the property.
1048  *
1049  * @return Returns the status of the operation.
1050  * @retval Returns enBTRCoreSuccess on success, appropriate error code otherwise.
1051  */
1052 enBTRCoreRet BTRCore_GetMediaProperty ( tBTRCoreHandle hBTRCore, tBTRCoreDevId aBTRCoreDevId, enBTRCoreDeviceType aenBTRCoreDevType, const char* mediaPropertyKey, void* mediaPropertyValue);
1053 
1054 /**
1055  * @brief This API sets the mentioned media list active/in_scope at the lower to allow further operations on the elements in the list.
1056  *
1057  * @param[in] hBTRCore Bluetooth core handle.
1058  * @param[in] aBTRCoreDevId Device Id of the remote device.
1059  * @param[in] aBtrMediaElementId Media Element Id
1060  * @param[in] aenBTRCoreDevType Type of bluetooth device HFP(Hands Free Profile) headset, audio source etc.
1061  * @param[in] aeBTRCoreMedElementType Media Element type (Albums, Artists, ...)
1062  *
1063  * @return Returns the status of the operation.
1064  * @retval Returns enBTRCoreSuccess on success, appropriate error code otherwise.
1065  */
1066 enBTRCoreRet BTRCore_SetMediaElementActive (tBTRCoreHandle hBTRCore, tBTRCoreDevId aBTRCoreDevId, tBTRCoreMediaElementId aBtrMediaElementId, enBTRCoreDeviceType aenBTRCoreDevType, eBTRCoreMedElementType aeBTRCoreMedElementType);
1067 
1068 /**
1069  * @brief This API returns the mentioned media list.
1070  *
1071  * @param[in] hBTRCore Bluetooth core handle.
1072  * @param[in] aBTRCoreDevId Device Id of the remote device.
1073  * @param[in] aBtrMediaElementId Media Element Id
1074  * @param[in] aui16BtrMedElementStartIdx Starting index of the list.
1075  * @param[in] aui16BtrMedElementEndIdx ending index of the list
1076  * @param[in] aenBTRCoreDevType Type of bluetooth device HFP(Hands Free Profile) headset, audio source etc.
1077  * @param[in] aenBTRCoreMedElementType Media Element type (Albums, Artists, ...)
1078  * @param[out] apstMediaElementListInfo Retrived Media Element List.
1079  *
1080  * @return Returns the status of the operation.
1081  * @retval Returns enBTRCoreSuccess on success, appropriate error code otherwise.
1082  */
1083 enBTRCoreRet BTRCore_GetMediaElementList (tBTRCoreHandle hBTRCore, tBTRCoreDevId aBTRCoreDevId, tBTRCoreMediaElementId aBtrMediaElementId, unsigned short aui16BtrMedElementStartIdx, unsigned short aui16BtrMedElementEndIdx, enBTRCoreDeviceType aenBTRCoreDevType, eBTRCoreMedElementType aenBTRCoreMedElementType, stBTRCoreMediaElementInfoList* apstMediaElementListInfo);
1084 
1085 /**
1086  * @brief This API performs operation according to the element type selected.
1087  * @param[in] hBTRCore Bluetooth core handle.
1088  * @param[in] aBTRCoreDevId Device Id of the remote device.
1089  * @param[in] aBtrMediaElementId Media Element Id
1090  * @param[in] aenBTRCoreDevType Type of bluetooth device HFP(Hands Free Profile) headset, audio source etc.
1091  * @param[in] aeBTRCoreMedElementType Media Element type (Albums, Artists, ...)
1092  *
1093  * @return Returns the status of the operation.
1094  * @retval Returns enBTRCoreSuccess on success, appropriate error code otherwise.
1095  */
1096 enBTRCoreRet BTRCore_SelectMediaElement (tBTRCoreHandle hBTRCore, tBTRCoreDevId aBTRCoreDevId, tBTRCoreMediaElementId aBtrMediaElementId, enBTRCoreDeviceType aenBTRCoreDevType, eBTRCoreMedElementType aenBTRCoreMedElementType);
1097 
1098 /**
1099  * @brief This API returns the Low energy profile device name and address.
1100  *
1101  * @param[in] hBTRCore Bluetooth core handle.
1102  * @param[in] aBTRCoreDevId Device Id of the remote device.
1103  * @param[in] apcBTRCoreLEUuid UUID to distinguish the devices.
1104  * @param[in] aenBTRCoreLeProp Indicates the property name.
1105  * @param[out] apvBTRCorePropVal LE device property value.
1106  *
1107  * @return Returns the status of the operation.
1108  * @retval Returns enBTRCoreSuccess on success, appropriate error code otherwise.
1109  */
1110 enBTRCoreRet BTRCore_GetLEProperty(tBTRCoreHandle hBTRCore, tBTRCoreDevId aBTRCoreDevId, const char* apcBTRCoreLEUuid, enBTRCoreLeProp aenBTRCoreLeProp, void* apvBTRCorePropVal);
1111 
1112 /**
1113  * @brief This API is used to perform read, write, notify operations on LE devices.
1114  *
1115  * @param[in] hBTRCore Bluetooth core handle.
1116  * @param[in] aBTRCoreDevId Device Id of the remote device.
1117  * @param[in] apcBTRCoreLEUuid UUID to distinguish the devices.
1118  * @param[in] aenBTRCoreLeOp Indicates the operation to be performed.
1119  * @param[in] apUserData Data to perform the operation.
1120  * @param[out] rpLeOpRes LE operation result.
1121  *
1122  * @return Returns the status of the operation.
1123  * @retval Returns enBTRCoreSuccess on success, appropriate error code otherwise.
1124  */
1125 enBTRCoreRet BTRCore_PerformLEOp (tBTRCoreHandle hBTRCore, tBTRCoreDevId aBTRCoreDevId, const char* apcBTRCoreLEUuid, enBTRCoreLeOp aenBTRCoreLeOp, char* apLeOpArg, char* rpLeOpRes);
1126 
1127 /**
1128  * @brief This API is used to start advertisement registration
1129  *
1130  * @param[in] hBTRCore Bluetooth core handle
1131  *
1132  * @return Returns the status of the operation.
1133  * @retval Returns enBTRCoreSuccess on success, appropriate error code otherwise.
1134  */
1135 enBTRCoreRet BTRCore_StartAdvertisement(tBTRCoreHandle hBTRCore);
1136 
1137 /**
1138  * @brief This API is used to stop advertisement registration
1139  *
1140  * @param[in] hBTRCore Bluetooth core handle
1141  *
1142  * @return Returns the status of the operation.
1143  * @retval Returns enBTRCoreSuccess on success, appropriate error code otherwise.
1144  */
1145 enBTRCoreRet BTRCore_StopAdvertisement(tBTRCoreHandle hBTRCore);
1146 
1147 /**
1148  * @brief This API is used to set advertisement type
1149  *
1150  * @param[in] hBTRCore Bluetooth core handle
1151  *
1152  * @return Returns the status of the operation.
1153  * @retval Returns enBTRCoreSuccess on success, appropriate error code otherwise.
1154  */
1155 enBTRCoreRet BTRCore_SetAdvertisementType(tBTRCoreHandle hBTRCore, char *aAdvtType);
1156 
1157 /**
1158  * @brief This API is used to set service UUIDs
1159  *
1160  * @param[in] hBTRCore Bluetooth core handle
1161  *
1162  * @return Returns the status of the operation.
1163  * @retval Returns enBTRCoreSuccess on success, appropriate error code otherwise.
1164  */
1165 enBTRCoreRet BTRCore_SetServiceUUIDs(tBTRCoreHandle hBTRCore, char *aUUID);
1166 
1167 /**
1168  * @brief This API is used to set manufacturer data
1169  *
1170  * @param[in] hBTRCore Bluetooth core handle
1171  *
1172  * @return Returns the status of the operation.
1173  * @retval Returns enBTRCoreSuccess on success, appropriate error code otherwise.
1174  */
1175 enBTRCoreRet BTRCore_SetManufacturerData(tBTRCoreHandle hBTRCore, unsigned short aManfId, unsigned char *aDeviceDetails, int aLenManfData);
1176 
1177 /**
1178  * @brief This API is used to Enable Tx Power transmission
1179  *
1180  * @param[in] hBTRCore Bluetooth core handle
1181  *
1182  * @return Returns the status of the operation.
1183  * @retval Returns enBTRCoreSuccess on success, appropriate error code otherwise.
1184  */
1185 enBTRCoreRet BTRCore_SetEnableTxPower(tBTRCoreHandle hBTRCore, BOOLEAN lTxPower);
1186 
1187 /**
1188  * @brief This API is used to Get Property value
1189  *
1190  * @param[in] hBTRCore Bluetooth core handle
1191  *
1192  * @return Returns the status of the operation.
1193  * @retval Returns enBTRCoreSuccess on success, appropriate error code otherwise.
1194  */
1195 enBTRCoreRet BTRCore_GetPropertyValue(tBTRCoreHandle hBTRCore, char *aUUID, char *aValue, enBTRCoreLeProp aElement);
1196 
1197 /**
1198  * @brief This API is used to Set Service Info value
1199  *
1200  * @param[in] hBTRCore Bluetooth core handle
1201  *
1202  * @return Returns the status of the operation.
1203  * @retval Returns enBTRCoreSuccess on success, appropriate error code otherwise.
1204  */
1205 enBTRCoreRet BTRCore_SetServiceInfo(tBTRCoreHandle hBTRCore, char *aUUID, BOOLEAN aServiceType);
1206 
1207 /**
1208  * @brief This API is used to Set Gatt Info value
1209  *
1210  * @param[in] hBTRCore Bluetooth core handle
1211  *
1212  * @return Returns the status of the operation.
1213  * @retval Returns enBTRCoreSuccess on success, appropriate error code otherwise.
1214  */
1215 enBTRCoreRet BTRCore_SetGattInfo(tBTRCoreHandle hBTRCore, char *aParentUUID, char *aCharUUID, unsigned short aFlags, char *aValue, enBTRCoreLeProp aElement);
1216 
1217 /**
1218  * @brief This API is used to Set Property value
1219  *
1220  * @param[in] hBTRCore Bluetooth core handle
1221  *
1222  * @return Returns the status of the operation.
1223  * @retval Returns enBTRCoreSuccess on success, appropriate error code otherwise.
1224  */
1225 enBTRCoreRet BTRCore_SetPropertyValue(tBTRCoreHandle hBTRCore, char *aUUID, char *aValue, enBTRCoreLeProp aElement);
1226 
1227 // Outgoing callbacks Registration Interfaces
1228 /* BTRCore_RegisterDiscoveryCb - Callback to notify the application every time when a new device is found and added to discovery list */
1229 enBTRCoreRet BTRCore_RegisterDiscoveryCb (tBTRCoreHandle hBTRCore, fPtr_BTRCore_DeviceDiscCb afpcBBTRCoreDeviceDiscovery, void* apUserData);
1230 
1231 /* BTRCore_RegisterStatusCallback - callback for unsolicited status changes */
1232 enBTRCoreRet BTRCore_RegisterStatusCb (tBTRCoreHandle hBTRCore, fPtr_BTRCore_StatusCb afpcBBTRCoreStatus, void* apUserData);
1233 
1234 /* BTRCore_RegisterMediaStatusCallback - callback for media state changes */
1235 enBTRCoreRet BTRCore_RegisterMediaStatusCb (tBTRCoreHandle hBTRCore, fPtr_BTRCore_MediaStatusCb afpcBBTRCoreMediaStatus, void* apUserData);
1236 
1237 /* BTRCore_RegisterConnectionAuthenticationCallback - callback for receiving a connection request from another device */
1238 enBTRCoreRet BTRCore_RegisterConnectionIntimationCb (tBTRCoreHandle hBTRCore, fPtr_BTRCore_ConnIntimCb afpcBBTRCoreConnAuth, void* apUserData);
1239 
1240 /* BTRCore_RegisterConnectionAuthenticationCallback - callback for receiving a connection request from another device */
1241 enBTRCoreRet BTRCore_RegisterConnectionAuthenticationCb (tBTRCoreHandle hBTRCore, fPtr_BTRCore_ConnAuthCb afpcBBTRCoreConnAuth, void* apUserData);
1242 
1243 /* @} */ //BLUETOOTH_APIS
1244 
1245 #ifdef __cplusplus
1246 }
1247 #endif
1248 
1249 #endif // __BTR_CORE_H__
BTRCore_GetAdapterAddr
enBTRCoreRet BTRCore_GetAdapterAddr(tBTRCoreHandle hBTRCore, unsigned char aui8adapterIdx, char *apui8adapterAddr)
This API gets Address of BT Adapter.
Definition: btrCore.c:3065
_stBTRCoreBTDevice
Definition: btrCore.h:318
BTRCore_SetEnableTxPower
enBTRCoreRet BTRCore_SetEnableTxPower(tBTRCoreHandle hBTRCore, BOOLEAN lTxPower)
This API is used to Enable Tx Power transmission.
Definition: btrCore.c:5454
BTRCore_Init
enBTRCoreRet BTRCore_Init(tBTRCoreHandle *phBTRCore)
This API connects to a bus daemon and registers the client with it.
Definition: btrCore.c:2494
BOOLEAN
unsigned char BOOLEAN
DTCP Manager return codes.
Definition: dtcpmgr.h:163
BTRCore_GetAdapters
enBTRCoreRet BTRCore_GetAdapters(tBTRCoreHandle hBTRCore, stBTRCoreGetAdapters *pstGetAdapters)
This API returns the value of org.bluez.Manager.Getadapters .
Definition: btrCore.c:2899
BTRCore_DisableAdapter
enBTRCoreRet BTRCore_DisableAdapter(tBTRCoreHandle hBTRCore, stBTRCoreAdapter *apstBTRCoreAdapter)
This API disables specific adapter.
Definition: btrCore.c:3036
BTRCore_SetAdapterDeviceName
enBTRCoreRet BTRCore_SetAdapterDeviceName(tBTRCoreHandle hBTRCore, stBTRCoreAdapter *apstBTRCoreAdapter, char *apcAdapterDeviceName)
This API sets a friendly name to BT adapter device.
Definition: btrCore.c:3194
BTRCore_GetLEProperty
enBTRCoreRet BTRCore_GetLEProperty(tBTRCoreHandle hBTRCore, tBTRCoreDevId aBTRCoreDevId, const char *apcBTRCoreLEUuid, enBTRCoreLeProp aenBTRCoreLeProp, void *apvBTRCorePropVal)
This API returns the Low energy profile device name and address.
Definition: btrCore.c:5173
BTRCore_GetDeviceDisconnected
enBTRCoreRet BTRCore_GetDeviceDisconnected(tBTRCoreHandle hBTRCore, tBTRCoreDevId aBTRCoreDevId, enBTRCoreDeviceType aenBTRCoreDevType)
This method checks the current device that is disconnected.
Definition: btrCore.c:4111
BTRCore_AcquireDeviceDataPath
enBTRCoreRet BTRCore_AcquireDeviceDataPath(tBTRCoreHandle hBTRCore, tBTRCoreDevId aBTRCoreDevId, enBTRCoreDeviceType aenBTRCoreDevType, int *aiDataPath, int *aidataReadMTU, int *aidataWriteMTU, unsigned int *apui32Delay)
This API returns the bluetooth device address.
Definition: btrCore.c:4415
BTRCore_GetPropertyValue
enBTRCoreRet BTRCore_GetPropertyValue(tBTRCoreHandle hBTRCore, char *aUUID, char *aValue, enBTRCoreLeProp aElement)
This API is used to Get Property value.
Definition: btrCore.c:5383
BTRCore_SetGattInfo
enBTRCoreRet BTRCore_SetGattInfo(tBTRCoreHandle hBTRCore, char *aParentUUID, char *aCharUUID, unsigned short aFlags, char *aValue, enBTRCoreLeProp aElement)
This API is used to Set Gatt Info value.
Definition: btrCore.c:5490
BTRCore_GetMediaProperty
enBTRCoreRet BTRCore_GetMediaProperty(tBTRCoreHandle hBTRCore, tBTRCoreDevId aBTRCoreDevId, enBTRCoreDeviceType aenBTRCoreDevType, const char *mediaPropertyKey, void *mediaPropertyValue)
This API returns the media file properties of the Bluetooth device.
Definition: btrCore.c:4875
BTRCore_GetListOfScannedDevices
enBTRCoreRet BTRCore_GetListOfScannedDevices(tBTRCoreHandle hBTRCore, stBTRCoreScannedDevicesCount *pListOfScannedDevices)
This API returns the number of devices scanned.
Definition: btrCore.c:3500
BTRCore_StartAdvertisement
enBTRCoreRet BTRCore_StartAdvertisement(tBTRCoreHandle hBTRCore)
This API is used to start advertisement registration.
Definition: btrCore.c:5345
BTRCore_StartDiscovery
enBTRCoreRet BTRCore_StartDiscovery(tBTRCoreHandle hBTRCore, const char *pAdapterPath, enBTRCoreDeviceType aenBTRCoreDevType, unsigned int aui32DiscDuration)
This method starts the device discovery session.
Definition: btrCore.c:3392
BTRCore_IsDeviceConnectable
enBTRCoreRet BTRCore_IsDeviceConnectable(tBTRCoreHandle hBTRCore, tBTRCoreDevId aBTRCoreDevId)
This API checks the device is connectable.
Definition: btrCore.c:3864
_stBTRCoreFilterMode
Definition: btrCore.h:267
BTRCore_SetManufacturerData
enBTRCoreRet BTRCore_SetManufacturerData(tBTRCoreHandle hBTRCore, unsigned short aManfId, unsigned char *aDeviceDetails, int aLenManfData)
This API is used to set manufacturer data.
Definition: btrCore.c:5435
BTRCore_GetAdapterPower
enBTRCoreRet BTRCore_GetAdapterPower(tBTRCoreHandle hBTRCore, const char *pAdapterPath, unsigned char *pAdapterPower)
This API returns the value of org.bluez.Adapter.powered .
Definition: btrCore.c:3325
BTRCore_SetAdapterPower
enBTRCoreRet BTRCore_SetAdapterPower(tBTRCoreHandle hBTRCore, const char *pAdapterPath, unsigned char powerStatus)
This API sets the bluetooth adapter power as ON/OFF.
Definition: btrCore.c:3294
BTRCore_EnableAdapter
enBTRCoreRet BTRCore_EnableAdapter(tBTRCoreHandle hBTRCore, stBTRCoreAdapter *apstBTRCoreAdapter)
This API enables specific adapter.
Definition: btrCore.c:3005
BTRCore_SelectMediaElement
enBTRCoreRet BTRCore_SelectMediaElement(tBTRCoreHandle hBTRCore, tBTRCoreDevId aBTRCoreDevId, tBTRCoreMediaElementId aBtrMediaElementId, enBTRCoreDeviceType aenBTRCoreDevType, eBTRCoreMedElementType aenBTRCoreMedElementType)
This API performs operation according to the element type selected.
Definition: btrCore.c:4931
_stBTRCoreMediaTrackInfo
Definition: btrCore.h:387
BTRCore_ResetAdapter
enBTRCoreRet BTRCore_ResetAdapter(tBTRCoreHandle hBTRCore, stBTRCoreAdapter *apstBTRCoreAdapter)
This API resets specific adapter.
BTRCore_GetAdapterName
enBTRCoreRet BTRCore_GetAdapterName(tBTRCoreHandle hBTRCore, const char *pAdapterPath, char *pAdapterName)
This API gets the name of BT adapter.
Definition: btrCore.c:3261
BTRCore_FindService
enBTRCoreRet BTRCore_FindService(tBTRCoreHandle hBTRCore, tBTRCoreDevId aBTRCoreDevId, const char *UUID, char *XMLdata, int *found)
This API is used to confirm if a given service exists on a device.
Definition: btrCore.c:3762
_stBTRCoreGetAdapters
Definition: btrCore.h:257
BTRCore_SetDeviceDataAckTimeout
enBTRCoreRet BTRCore_SetDeviceDataAckTimeout(tBTRCoreHandle hBTRCore, unsigned int aui32AckTOutms)
This API release the bluetooth device address.
Definition: btrCore.c:4532
BTRCore_GetVersionInfo
enBTRCoreRet BTRCore_GetVersionInfo(tBTRCoreHandle hBTRCore, char *apcBtVersion)
This API gets BT Version.
Definition: btrCore.c:3356
BTRCore_SetAdapterName
enBTRCoreRet BTRCore_SetAdapterName(tBTRCoreHandle hBTRCore, const char *pAdapterPath, const char *pAdapterName)
This API sets a friendly name to BT adapter.
Definition: btrCore.c:3231
BTRCore_GetMediaPositionInfo
enBTRCoreRet BTRCore_GetMediaPositionInfo(tBTRCoreHandle hBTRCore, tBTRCoreDevId aBTRCoreDevId, enBTRCoreDeviceType aenBTRCoreDevType, stBTRCoreMediaPositionInfo *apstBTMediaPositionInfo)
This API returns the duration and the current position of the media.
Definition: btrCore.c:4820
_stBTRCoreUUIDList
Definition: btrCore.h:454
BTRCore_FindDevice
enBTRCoreRet BTRCore_FindDevice(tBTRCoreHandle hBTRCore, tBTRCoreDevId aBTRCoreDevId)
This API checks the device entry in the scanned device list.
Definition: btrCore.c:3727
BTRCore_GetSupportedServices
enBTRCoreRet BTRCore_GetSupportedServices(tBTRCoreHandle hBTRCore, tBTRCoreDevId aBTRCoreDevId, stBTRCoreSupportedServiceList *pProfileList)
This API retuns the list of services supported by the device.
Definition: btrCore.c:3804
BTRCore_GetDeviceMediaInfo
enBTRCoreRet BTRCore_GetDeviceMediaInfo(tBTRCoreHandle hBTRCore, tBTRCoreDevId aBTRCoreDevId, enBTRCoreDeviceType aenBTRCoreDevType, stBTRCoreDevMediaInfo *apstBTRCoreDevMediaInfo)
This API returns current media info that includes the codec info, channel modes, subbands etc.
Definition: btrCore.c:4232
BTRCore_ReleaseDeviceDataPath
enBTRCoreRet BTRCore_ReleaseDeviceDataPath(tBTRCoreHandle hBTRCore, tBTRCoreDevId aBTRCoreDevId, enBTRCoreDeviceType enDeviceType)
This API release the bluetooth device address.
Definition: btrCore.c:4483
BTRCore_GetDeviceTypeClass
enBTRCoreRet BTRCore_GetDeviceTypeClass(tBTRCoreHandle hBTRCore, tBTRCoreDevId aBTRCoreDevId, enBTRCoreDeviceType *apenBTRCoreDevTy, enBTRCoreDeviceClass *apenBTRCoreDevCl)
This API returns current media info that includes the codec info, channel modes, subbands etc.
Definition: btrCore.c:4161
_stBTRCoreDevMediaSbcInfo
Definition: btrCore.h:359
_stBTRCoreDevMediaPcmInfo
Definition: btrCore.h:353
_stBTRCoreSupportedServiceList
Definition: btrCore.h:294
BTRCore_UnregisterAgent
enBTRCoreRet BTRCore_UnregisterAgent(tBTRCoreHandle hBTRCore)
This unregisters the agent that has been previously registered.
Definition: btrCore.c:2836
_stBTRCoreListAdapters
Definition: btrCore.h:261
BTRCore_GetListOfPairedDevices
enBTRCoreRet BTRCore_GetListOfPairedDevices(tBTRCoreHandle hBTRCore, stBTRCorePairedDevicesCount *pListOfDevices)
Gets the paired devices list.
Definition: btrCore.c:3695
_stBTRCoreAdServiceData
Definition: btrCore.h:299
BTRCore_GetAdapter
enBTRCoreRet BTRCore_GetAdapter(tBTRCoreHandle hBTRCore, stBTRCoreAdapter *apstBTRCoreAdapter)
This API returns the bluetooth adapter path.
Definition: btrCore.c:2926
BTRCore_StopAdvertisement
enBTRCoreRet BTRCore_StopAdvertisement(tBTRCoreHandle hBTRCore)
This API is used to stop advertisement registration.
Definition: btrCore.c:5364
BTRCore_SetAdvertisementType
enBTRCoreRet BTRCore_SetAdvertisementType(tBTRCoreHandle hBTRCore, char *aAdvtType)
This API is used to set advertisement type.
Definition: btrCore.c:5403
BTRCore_PairDevice
enBTRCoreRet BTRCore_PairDevice(tBTRCoreHandle hBTRCore, tBTRCoreDevId aBTRCoreDevId)
This API initiates the pairing of the device.
Definition: btrCore.c:3539
BTRCore_GetMediaTrackInfo
enBTRCoreRet BTRCore_GetMediaTrackInfo(tBTRCoreHandle hBTRCore, tBTRCoreDevId aBTRCoreDevId, enBTRCoreDeviceType aenBTRCoreDevType, stBTRCoreMediaTrackInfo *apstBTMediaTrackInfo)
This API is used to retrieve the media track information.
Definition: btrCore.c:4710
_stBTRCoreMediaPositionInfo
Definition: btrCore.h:397
BTRCore_DeInit
enBTRCoreRet BTRCore_DeInit(tBTRCoreHandle hBTRCore)
This APi deinitialzes and free BTRCore.
Definition: btrCore.c:2657
_stBTRCoreMediaStatusUpdate
Definition: btrCore.h:415
BTRCore_DisconnectDevice
enBTRCoreRet BTRCore_DisconnectDevice(tBTRCoreHandle hBTRCore, tBTRCoreDevId aBTRCoreDevId, enBTRCoreDeviceType aenBTRCoreDevType)
This method gracefully disconnects all connected profiles and then terminates connection.
Definition: btrCore.c:3993
_stBTRCoreDevMediaInfo
Definition: btrCore.h:382
_stBTRCoreMediaCtData
Definition: btrCore.h:436
BTRCore_GetMediaElementTrackInfo
enBTRCoreRet BTRCore_GetMediaElementTrackInfo(tBTRCoreHandle hBTRCore, tBTRCoreDevId aBTRCoreDevId, enBTRCoreDeviceType aenBTRCoreDevType, tBTRCoreMediaElementId aBtrMediaElementId, stBTRCoreMediaTrackInfo *apstBTMediaTrackInfo)
This API is used to retrieve the media track information.
Definition: btrCore.c:4763
BTRCore_SetAdapterDiscoverable
enBTRCoreRet BTRCore_SetAdapterDiscoverable(tBTRCoreHandle hBTRCore, const char *pAdapterPath, unsigned char discoverable)
This API sets adapter as discoverable.
Definition: btrCore.c:3098
BTRCore_SetServiceInfo
enBTRCoreRet BTRCore_SetServiceInfo(tBTRCoreHandle hBTRCore, char *aUUID, BOOLEAN aServiceType)
This API is used to Set Service Info value.
Definition: btrCore.c:5470
BTRCore_GetListOfAdapters
enBTRCoreRet BTRCore_GetListOfAdapters(tBTRCoreHandle hBTRCore, stBTRCoreListAdapters *pstListAdapters)
Returns list of adapter object paths under /org/bluez.
Definition: btrCore.c:2859
_stBTRCoreUUID
Definition: btrCore.h:449
_stBTRCorePairedDevicesCount
Definition: btrCore.h:338
BTRCore_MediaControl
enBTRCoreRet BTRCore_MediaControl(tBTRCoreHandle hBTRCore, tBTRCoreDevId aBTRCoreDevId, enBTRCoreDeviceType aenBTRCoreDevType, enBTRCoreMediaCtrl aenBTRCoreMediaCtrl, stBTRCoreMediaCtData *apstBTRCoreMediaCData)
This API is used to perform media control operations like play, pause, NExt, Previous,...
Definition: btrCore.c:4555
BTRCore_SetMediaElementActive
enBTRCoreRet BTRCore_SetMediaElementActive(tBTRCoreHandle hBTRCore, tBTRCoreDevId aBTRCoreDevId, tBTRCoreMediaElementId aBtrMediaElementId, enBTRCoreDeviceType aenBTRCoreDevType, eBTRCoreMedElementType aeBTRCoreMedElementType)
This API sets the mentioned media list active/in_scope at the lower to allow further operations on th...
Definition: btrCore.c:5104
BTRCore_GetAdapterDiscoverableStatus
enBTRCoreRet BTRCore_GetAdapterDiscoverableStatus(tBTRCoreHandle hBTRCore, const char *pAdapterPath, unsigned char *pDiscoverable)
This API checks whether the discovery is in progress or not.
Definition: btrCore.c:3163
BTRCore_RegisterAgent
enBTRCoreRet BTRCore_RegisterAgent(tBTRCoreHandle hBTRCore, int iBTRCapMode)
This API registers an agent handler.
Definition: btrCore.c:2803
BTRCore_SetAdapter
enBTRCoreRet BTRCore_SetAdapter(tBTRCoreHandle hBTRCore, int adapter_number)
This API sets Current Bluetooth Adapter to use.
Definition: btrCore.c:2958
BTRCore_SetPropertyValue
enBTRCoreRet BTRCore_SetPropertyValue(tBTRCoreHandle hBTRCore, char *aUUID, char *aValue, enBTRCoreLeProp aElement)
This API is used to Set Property value.
Definition: btrCore.c:5520
BTRCore_UnPairDevice
enBTRCoreRet BTRCore_UnPairDevice(tBTRCoreHandle hBTRCore, tBTRCoreDevId aBTRCoreDevId)
This API removes the remote device object at the given path.
Definition: btrCore.c:3630
BTRCore_PerformLEOp
enBTRCoreRet BTRCore_PerformLEOp(tBTRCoreHandle hBTRCore, tBTRCoreDevId aBTRCoreDevId, const char *apcBTRCoreLEUuid, enBTRCoreLeOp aenBTRCoreLeOp, char *apLeOpArg, char *rpLeOpRes)
This API is used to perform read, write, notify operations on LE devices.
Definition: btrCore.c:5262
_stBTRCoreDevStatusCBInfo
Definition: btrCore.h:273
_stBTRCoreMediaElementInfoList
Definition: btrCore.h:410
BTRCore_SetServiceUUIDs
enBTRCoreRet BTRCore_SetServiceUUIDs(tBTRCoreHandle hBTRCore, char *aUUID)
This API is used to set service UUIDs.
Definition: btrCore.c:5419
_stBTRCoreScannedDevicesCount
Definition: btrCore.h:333
BTRCore_GetMediaElementList
enBTRCoreRet BTRCore_GetMediaElementList(tBTRCoreHandle hBTRCore, tBTRCoreDevId aBTRCoreDevId, tBTRCoreMediaElementId aBtrMediaElementId, unsigned short aui16BtrMedElementStartIdx, unsigned short aui16BtrMedElementEndIdx, enBTRCoreDeviceType aenBTRCoreDevType, eBTRCoreMedElementType aenBTRCoreMedElementType, stBTRCoreMediaElementInfoList *apstMediaElementListInfo)
This API returns the mentioned media list.
Definition: btrCore.c:5030
_stBTRCoreMediaStatusCBInfo
Definition: btrCore.h:428
BTRCore_SetAdapterDiscoverableTimeout
enBTRCoreRet BTRCore_SetAdapterDiscoverableTimeout(tBTRCoreHandle hBTRCore, const char *pAdapterPath, unsigned short timeout)
This API sets how long the adapter is discoverable.
Definition: btrCore.c:3130
BTRCore_GetDeviceConnected
enBTRCoreRet BTRCore_GetDeviceConnected(tBTRCoreHandle hBTRCore, tBTRCoreDevId aBTRCoreDevId, enBTRCoreDeviceType aenBTRCoreDevType)
This method checks the current device that is connected.
Definition: btrCore.c:4061
_stBTRCoreDiscoveryCBInfo
Definition: btrCore.h:459
_stBTRCoreMediaElementInfo
Definition: btrCore.h:402
_stBTRCoreSupportedService
Definition: btrCore.h:289
_stBTRCoreConnCBInfo
Definition: btrCore.h:343
BTRCore_ConnectDevice
enBTRCoreRet BTRCore_ConnectDevice(tBTRCoreHandle hBTRCore, tBTRCoreDevId aBTRCoreDevId, enBTRCoreDeviceType aenBTRCoreDevType)
This method connect any profiles the remote device supports.
Definition: btrCore.c:3921
_stBTRCoreDevMediaMpegInfo
Definition: btrCore.h:371
_stBTRCoreAdapter
Definition: btrCore.h:306
BTRCore_StopDiscovery
enBTRCoreRet BTRCore_StopDiscovery(tBTRCoreHandle hBTRCore, const char *pAdapterPath, enBTRCoreDeviceType aenBTRCoreDevType)
This method will cancel any previous StartDiscovery transaction.
Definition: btrCore.c:3459