RDK Documentation (Open Sourced RDK Components)
btmgr.h
Go to the documentation of this file.
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 #ifndef __BTR_MGR_H__
20 #define __BTR_MGR_H__
21 /**
22  * @file btmgr.h
23  *
24  * @defgroup BTR_MGR Bluetooth Manager
25  *
26  * Bluetooth Manager (An RDK component) interfaces with BlueZ through the D-Bus API,
27  * so there is no direct linking of the BlueZ library with Bluetooth Manager.
28  * Bluetooth manager provides an interface to port any Bluetooth stack on RDK
29  * The Bluetooth manager daemon manages Bluetooth services in RDK.
30  * It uses IARM Bus to facilitate communication between the application and Bluetooth driver
31  * through Bluetooth Manager component.
32  * @ingroup Bluetooth
33  *
34  * @defgroup BTR_MGR_API Bluetooth Manager Data Types and API(s)
35  * This file provides the data types and API(s) used by the bluetooth manager.
36  * @ingroup BTR_MGR
37  *
38  */
39 
40 #ifdef __cplusplus
41 extern "C"
42 {
43 #endif
44 
45 /**
46  * @addtogroup BTR_MGR_API
47  * @{
48  */
49 
50 #define BTRMGR_MAX_STR_LEN 256
51 #define BTRMGR_NAME_LEN_MAX 64
52 #define BTRMGR_STR_LEN 32
53 #define BTRMGR_DEVICE_COUNT_MAX 32
54 #define BTRMGR_ADAPTER_COUNT_MAX 16
55 #define BTRMGR_MAX_DEVICE_PROFILE 32
56 #define BTRMGR_LE_FLAG_LIST_SIZE 10
57 #define BTRMGR_MEDIA_ELEMENT_COUNT_MAX 64
58 #define BTRMGR_DEVICE_MAC_LEN 6
59 #define BTRMGR_MAX_DEV_OP_DATA_LEN BTRMGR_MAX_STR_LEN * 3
60 #define BTRMGR_SERVICE_DATA_LEN_MAX 32
61 #define BTRMGR_UUID_STR_LEN_MAX 64
62 
63 #define BTRMGR_DEVICE_INFORMATION_UUID "0x180a"
64 #define BTRMGR_RDKDIAGNOSTICS_UUID "0xFDB9"
65 #define BTRMGR_COLUMBO_UUID "64d9f574-7756-4ebc-9ebe-ed5f7f2871ab"
66 
67 #define BTRMGR_SYSTEM_ID_UUID "0x2a23"
68 #define BTRMGR_MODEL_NUMBER_UUID "0x2a24"
69 #define BTRMGR_SERIAL_NUMBER_UUID "0x2a25"
70 #define BTRMGR_FIRMWARE_REVISION_UUID "0x2a26"
71 #define BTRMGR_HARDWARE_REVISION_UUID "0x2a27"
72 #define BTRMGR_SOFTWARE_REVISION_UUID "0x2a28"
73 #define BTRMGR_MANUFACTURER_NAME_UUID "0x2a29"
74 
75 #define BTRMGR_DEVICE_STATUS_UUID "1f113f2c-cc01-4f03-9c5c-4b273ed631bb"
76 #define BTRMGR_FWDOWNLOAD_STATUS_UUID "915f96a6-3788-4271-a7ea-6820e98896b8"
77 #define BTRMGR_WEBPA_STATUS_UUID "9d5d3aae-51e3-4767-a055-59febd71de9d"
78 #define BTRMGR_WIFIRADIO1_STATUS_UUID "59a99d5a-3d2f-4265-af13-316c7c76b1f0"
79 #define BTRMGR_WIFIRADIO2_STATUS_UUID "9d6cf473-4fa6-4868-bf2b-c310f38df0c8"
80 #define BTRMGR_RF_STATUS_UUID "91b9497e-634c-408a-9f77-8375b1461b8b"
81 
82 #define BTRMGR_COLUMBO_START "7c3fea2e-c082-4e17-b78b-1e69ca3889b9"
83 #define BTRMGR_COLUMBO_STOP "5a7e479b-9fac-4d73-b5b0-906669946720"
84 #define BTRMGR_COLUMBO_STATUS "26f05ee1-cefa-460d-8985-98c0dc078d6c"
85 #define BTRMGR_COLUMBO_REPORT "c1e62616-b4de-4f72-86ca-9d9469041b6d"
86 #define BTRMGR_DEVICE_MAC "device_mac"
87 #define BTRMGR_WIFI_CONNECT_DUMMY_UUID "4ffab12b-e545-1baf-1dc6-bd3fd749716a"
88 #define BTRMGR_WIFI_SSID_DUMMY_UUID "22d68435-f7af-1156-b2e2-c7d17211b026"
89 #define BTRMGR_WIFI_PWD_DUMMY_UUID "6bfebfe7-294d-2f4e-a4b3-b04f2a66f2f0"
90 #define BTRMGR_WIFI_SEC_MODE_DUMMY_UUID "112f9c72-82c1-93a3-d4fc-3dba3441b2c8"
91 #define BTRMGR_LEONBRDG_SERVICE_UUID_SETUP "8DF5AD72-9BBC-4167-BCD9-E8EB9E4D671B"
92 #define BTRMGR_LEONBRDG_UUID_QR_CODE "12984C43-3B43-4952-A387-715DCF9795C6"
93 #define BTRMGR_LEONBRDG_UUID_PROVISION_STATUS "79DEFBC1-EB45-448D-9F2A-1ECC3A47A242"
94 #define BTRMGR_LEONBRDG_UUID_PUBLIC_KEY "CB9FEE4D-C6ED-48C1-AB46-C3F2DA38EEDD"
95 #define BTRMGR_LEONBRDG_UUID_WIFI_CONFIG "B87A896B-4052-4CAB-A7E7-A71594D9C353"
96 #define BTRMGR_LEONBRDG_UUID_SSID_LIST "AAF92F88-7F35-48F1-9C3E-1FE5C3978B7A"
97 
98 typedef unsigned long long int BTRMgrDeviceHandle;
99 typedef unsigned long long int BTRMgrMediaElementHandle;
100 
101 /**
102  * @brief Represents the status of the operation.
103  */
104 typedef enum _BTRMGR_Result_t {
105  BTRMGR_RESULT_SUCCESS = 0,
106  BTRMGR_RESULT_GENERIC_FAILURE = -1,
107  BTRMGR_RESULT_INVALID_INPUT = -2,
108  BTRMGR_RESULT_INIT_FAILED = -3
110 
111 /**
112  * @brief Represents the event status.
113  */
114 typedef enum _BTRMGR_Events_t {
115  BTRMGR_EVENT_DEVICE_OUT_OF_RANGE = 100,
116  BTRMGR_EVENT_DEVICE_DISCOVERY_UPDATE,
117  BTRMGR_EVENT_DEVICE_DISCOVERY_COMPLETE,
118  BTRMGR_EVENT_DEVICE_PAIRING_COMPLETE,
119  BTRMGR_EVENT_DEVICE_UNPAIRING_COMPLETE,
120  BTRMGR_EVENT_DEVICE_CONNECTION_COMPLETE,
121  BTRMGR_EVENT_DEVICE_DISCONNECT_COMPLETE,
122  BTRMGR_EVENT_DEVICE_PAIRING_FAILED,
123  BTRMGR_EVENT_DEVICE_UNPAIRING_FAILED,
124  BTRMGR_EVENT_DEVICE_CONNECTION_FAILED,
125  BTRMGR_EVENT_DEVICE_DISCONNECT_FAILED,
126  BTRMGR_EVENT_RECEIVED_EXTERNAL_PAIR_REQUEST,
127  BTRMGR_EVENT_RECEIVED_EXTERNAL_CONNECT_REQUEST,
128  BTRMGR_EVENT_RECEIVED_EXTERNAL_PLAYBACK_REQUEST,
129  BTRMGR_EVENT_DEVICE_FOUND,
130  BTRMGR_EVENT_MEDIA_TRACK_STARTED,
131  BTRMGR_EVENT_MEDIA_TRACK_PLAYING,
132  BTRMGR_EVENT_MEDIA_TRACK_PAUSED,
133  BTRMGR_EVENT_MEDIA_TRACK_STOPPED,
134  BTRMGR_EVENT_MEDIA_TRACK_POSITION,
135  BTRMGR_EVENT_MEDIA_TRACK_CHANGED,
136  BTRMGR_EVENT_MEDIA_PLAYBACK_ENDED,
137  BTRMGR_EVENT_DEVICE_DISCOVERY_STARTED,
138  BTRMGR_EVENT_DEVICE_OP_READY,
139  BTRMGR_EVENT_DEVICE_OP_INFORMATION,
140  BTRMGR_EVENT_MEDIA_PLAYER_NAME,
141  BTRMGR_EVENT_MEDIA_PLAYER_VOLUME,
142  BTRMGR_EVENT_MEDIA_PLAYER_EQUALIZER_OFF,
143  BTRMGR_EVENT_MEDIA_PLAYER_EQUALIZER_ON,
144  BTRMGR_EVENT_MEDIA_PLAYER_SHUFFLE_OFF,
145  BTRMGR_EVENT_MEDIA_PLAYER_SHUFFLE_ALLTRACKS,
146  BTRMGR_EVENT_MEDIA_PLAYER_SHUFFLE_GROUP,
147  BTRMGR_EVENT_MEDIA_PLAYER_REPEAT_OFF,
148  BTRMGR_EVENT_MEDIA_PLAYER_REPEAT_SINGLETRACK,
149  BTRMGR_EVENT_MEDIA_PLAYER_REPEAT_ALLTRACKS,
150  BTRMGR_EVENT_MEDIA_PLAYER_REPEAT_GROUP,
151  BTRMGR_EVENT_MEDIA_ALBUM_INFO,
152  BTRMGR_EVENT_MEDIA_ARTIST_INFO,
153  BTRMGR_EVENT_MEDIA_GENRE_INFO,
154  BTRMGR_EVENT_MEDIA_COMPILATION_INFO,
155  BTRMGR_EVENT_MEDIA_PLAYLIST_INFO,
156  BTRMGR_EVENT_MEDIA_TRACKLIST_INFO,
157  BTRMGR_EVENT_MEDIA_TRACK_INFO,
158  BTRMGR_EVENT_MEDIA_PLAYER_MUTE,
159  BTRMGR_EVENT_MEDIA_PLAYER_UNMUTE,
160  BTRMGR_EVENT_DEVICE_MEDIA_STATUS,
161  BTRMGR_EVENT_MAX
163 
164 /**
165  * @brief Represents the bluetooth device types.
166  */
167 typedef enum _BTRMGR_DeviceType_t {
168  BTRMGR_DEVICE_TYPE_UNKNOWN,
169  BTRMGR_DEVICE_TYPE_WEARABLE_HEADSET,
170  BTRMGR_DEVICE_TYPE_HANDSFREE,
171  BTRMGR_DEVICE_TYPE_RESERVED,
172  BTRMGR_DEVICE_TYPE_MICROPHONE,
173  BTRMGR_DEVICE_TYPE_LOUDSPEAKER,
174  BTRMGR_DEVICE_TYPE_HEADPHONES,
175  BTRMGR_DEVICE_TYPE_PORTABLE_AUDIO,
176  BTRMGR_DEVICE_TYPE_CAR_AUDIO,
177  BTRMGR_DEVICE_TYPE_STB,
178  BTRMGR_DEVICE_TYPE_HIFI_AUDIO_DEVICE,
179  BTRMGR_DEVICE_TYPE_VCR,
180  BTRMGR_DEVICE_TYPE_VIDEO_CAMERA,
181  BTRMGR_DEVICE_TYPE_CAMCODER,
182  BTRMGR_DEVICE_TYPE_VIDEO_MONITOR,
183  BTRMGR_DEVICE_TYPE_TV,
184  BTRMGR_DEVICE_TYPE_VIDEO_CONFERENCE,
185  BTRMGR_DEVICE_TYPE_SMARTPHONE,
186  BTRMGR_DEVICE_TYPE_TABLET,
187  // LE
188  BTRMGR_DEVICE_TYPE_TILE,
189  BTRMGR_DEVICE_TYPE_HID,
190  BTRMGR_DEVICE_TYPE_HID_GAMEPAD,
191  BTRMGR_DEVICE_TYPE_END
193 
194 /**
195  * @brief Represents the stream output types.
196  */
198  BTRMGR_STREAM_PRIMARY = 0,
199  BTRMGR_STREAM_AUXILIARY
201 
202 /**
203  * @brief Represents the operation type for bluetooth device.
204  */
206  BTRMGR_DEVICE_OP_TYPE_AUDIO_OUTPUT = 1 << 0,
207  BTRMGR_DEVICE_OP_TYPE_AUDIO_INPUT = 1 << 1,
208  BTRMGR_DEVICE_OP_TYPE_LE = 1 << 2,
209  BTRMGR_DEVICE_OP_TYPE_HID = 1 << 3,
210  BTRMGR_DEVICE_OP_TYPE_UNKNOWN = 1 << 4
212 
213 /**
214  * @brief Represents the bluetooth power states.
215  */
216 typedef enum _BTRMGR_DevicePower_t {
217  BTRMGR_DEVICE_POWER_ACTIVE = 0,
218  BTRMGR_DEVICE_POWER_LOW,
219  BTRMGR_DEVICE_POWER_STANDBY
221 
222 /**
223  * @brief Represents the bluetooth signal strength
224  */
226  BTRMGR_RSSI_NONE = 0, //!< No signal (0 bar)
227  BTRMGR_RSSI_POOR, //!< Poor (1 bar)
228  BTRMGR_RSSI_FAIR, //!< Fair (2 bars)
229  BTRMGR_RSSI_GOOD, //!< Good (3 bars)
230  BTRMGR_RSSI_EXCELLENT //!< Excellent (4 bars)
232 
233 /**
234  * @brief Represents the bluetooth Discovery Status
235  */
237  BTRMGR_DISCOVERY_STATUS_OFF,
238  BTRMGR_DISCOVERY_STATUS_IN_PROGRESS,
240 
241 
242 /**
243  * @brief Represents the commands to control the media files.
244  */
246  BTRMGR_MEDIA_CTRL_PLAY,
247  BTRMGR_MEDIA_CTRL_PAUSE,
248  BTRMGR_MEDIA_CTRL_STOP,
249  BTRMGR_MEDIA_CTRL_NEXT,
250  BTRMGR_MEDIA_CTRL_PREVIOUS,
251  BTRMGR_MEDIA_CTRL_FASTFORWARD,
252  BTRMGR_MEDIA_CTRL_REWIND,
253  BTRMGR_MEDIA_CTRL_VOLUMEUP,
254  BTRMGR_MEDIA_CTRL_VOLUMEDOWN,
255  BTRMGR_MEDIA_CTRL_EQUALIZER_OFF,
256  BTRMGR_MEDIA_CTRL_EQUALIZER_ON,
257  BTRMGR_MEDIA_CTRL_SHUFFLE_OFF,
258  BTRMGR_MEDIA_CTRL_SHUFFLE_ALLTRACKS,
259  BTRMGR_MEDIA_CTRL_SHUFFLE_GROUP,
260  BTRMGR_MEDIA_CTRL_REPEAT_OFF,
261  BTRMGR_MEDIA_CTRL_REPEAT_SINGLETRACK,
262  BTRMGR_MEDIA_CTRL_REPEAT_ALLTRACKS,
263  BTRMGR_MEDIA_CTRL_REPEAT_GROUP,
264  BTRMGR_MEDIA_CTRL_SCAN_OFF,
265  BTRMGR_MEDIA_CTRL_SCAN_ALLTRACKS,
266  BTRMGR_MEDIA_CTRL_SCAN_GROUP,
267  BTRMGR_MEDIA_CTRL_MUTE,
268  BTRMGR_MEDIA_CTRL_UNMUTE,
269  BTRMGR_MEDIA_CTRL_UNKNOWN
271 
272 /**
273  * @brief Represents LE properties.
274  */
275 typedef enum _BTRMGR_LeProperty_t { // looking for a better enum name
276  BTRMGR_LE_PROP_UUID,
277  BTRMGR_LE_PROP_PRIMARY,
278  BTRMGR_LE_PROP_DEVICE,
279  BTRMGR_LE_PROP_SERVICE,
280  BTRMGR_LE_PROP_VALUE,
281  BTRMGR_LE_PROP_NOTIFY,
282  BTRMGR_LE_PROP_FLAGS,
283  BTRMGR_LE_PROP_CHAR,
284  BTRMGR_LE_PROP_DESC
286 
287 /**
288  * @brief Represents the Low energy operations.
289  */
290 typedef enum _BTRMGR_LeOp_t {
291  BTRMGR_LE_OP_READY,
292  BTRMGR_LE_OP_READ_VALUE,
293  BTRMGR_LE_OP_WRITE_VALUE,
294  BTRMGR_LE_OP_START_NOTIFY,
295  BTRMGR_LE_OP_STOP_NOTIFY,
296  BTRMGR_LE_OP_UNKNOWN
297 } BTRMGR_LeOp_t;
298 
299 /**
300  * @brief Represents Gatt Characteristic Flags.
301  */
303  BTRMGR_GATT_CHAR_FLAG_READ = 1 << 0,
304  BTRMGR_GATT_CHAR_FLAG_WRITE = 1 << 1,
305  BTRMGR_GATT_CHAR_FLAG_ENCRYPT_READ = 1 << 2,
306  BTRMGR_GATT_CHAR_FLAG_ENCRYPT_WRITE = 1 << 3,
307  BTRMGR_GATT_CHAR_FLAG_ENCRYPT_AUTHENTICATED_READ = 1 << 4,
308  BTRMGR_GATT_CHAR_FLAG_ENCRYPT_AUTHENTICATED_WRITE = 1 << 5,
309  BTRMGR_GATT_CHAR_FLAG_SECURE_READ = 1 << 6,
310  BTRMGR_GATT_CHAR_FLAG_SECURE_WRITE = 1 << 7,
311  BTRMGR_GATT_CHAR_FLAG_NOTIFY = 1 << 8,
312  BTRMGR_GATT_CHAR_FLAG_INDICATE = 1 << 9,
313  BTRMGR_GATT_CHAR_FLAG_BROADCAST = 1 << 10,
314  BTRMGR_GATT_CHAR_FLAG_WRITE_WITHOUT_RESPONSE = 1 << 11,
315  BTRMGR_GATT_CHAR_FLAG_AUTHENTICATED_SIGNED_WRITES = 1 << 12,
316  BTRMGR_GATT_CHAR_FLAG_RELIABLE_WRITE = 1 << 13,
317  BTRMGR_GATT_CHAR_FLAG_WRITABLE_AUXILIARIES = 1 << 14
319 
320 
321 typedef enum _BTRMGR_ScanFilter_t {
322  BTRMGR_DISCOVERY_FILTER_UUID,
323  BTRMGR_DISCOVERY_FILTER_RSSI,
324  BTRMGR_DISCOVERY_FILTER_PATH_LOSS,
325  BTRMGR_DISCOVERY_FILTER_SCAN_TYPE
326 } BTRMGR_ScanFilter_t;
327 
328 /**
329  * @brief Represents Media Element Types.
330  */
332  BTRMGR_MEDIA_ELEMENT_TYPE_UNKNOWN,
333  BTRMGR_MEDIA_ELEMENT_TYPE_ALBUM,
334  BTRMGR_MEDIA_ELEMENT_TYPE_ARTIST,
335  BTRMGR_MEDIA_ELEMENT_TYPE_GENRE,
336  BTRMGR_MEDIA_ELEMENT_TYPE_COMPILATIONS,
337  BTRMGR_MEDIA_ELEMENT_TYPE_PLAYLIST,
338  BTRMGR_MEDIA_ELEMENT_TYPE_TRACKLIST,
339  BTRMGR_MEDIA_ELEMENT_TYPE_TRACK
341 
342 
343 /**
344  * @brief Represents the media track info.
345  */
346 typedef struct _BTRMGR_MediaTrackInfo_t {
347  char pcAlbum[BTRMGR_MAX_STR_LEN];
348  char pcGenre[BTRMGR_MAX_STR_LEN];
349  char pcTitle[BTRMGR_MAX_STR_LEN];
350  char pcArtist[BTRMGR_MAX_STR_LEN];
351  unsigned int ui32TrackNumber;
352  unsigned int ui32Duration;
353  unsigned int ui32NumberOfTracks;
355 
356 /**
357  * @brief Represents the media position info.
358  */
360  unsigned int m_mediaDuration;
361  unsigned int m_mediaPosition;
363 
364 typedef struct _BTRMGR_LeUUID_t {
365  unsigned short flags;
366  char m_uuid[BTRMGR_NAME_LEN_MAX];
368 
369 /**
370  * @brief Represents the supported service of the device.
371  */
372 typedef struct _BTRMGR_DeviceService_t {
373  unsigned short m_uuid;
374  char m_profile[BTRMGR_NAME_LEN_MAX];
376 
377 /**
378  * @brief Represents device services list.
379  */
381  unsigned short m_numOfService;
382 
383  union { /* have introduced BTRMGR_LeUUID_t inorder that the usage of BTRMGR_DeviceService_t shouldn't be confused
384  if BTRMGR_DeviceService_t alone is sufficient, then lets change in the next commit */
385  BTRMGR_DeviceService_t m_profileInfo[BTRMGR_MAX_DEVICE_PROFILE];
386  BTRMGR_LeUUID_t m_uuidInfo[BTRMGR_MAX_DEVICE_PROFILE];
387  };
389 
390 
392  char m_UUIDs[BTRMGR_UUID_STR_LEN_MAX];;
393  unsigned char m_ServiceData[BTRMGR_SERVICE_DATA_LEN_MAX];
394  unsigned int m_len;
396 
397 /**
398  * @brief Represents the property of the device.
399  */
401  BTRMgrDeviceHandle m_deviceHandle;
402  BTRMGR_DeviceType_t m_deviceType;
403  char m_name [BTRMGR_NAME_LEN_MAX];
404  char m_deviceAddress [BTRMGR_NAME_LEN_MAX];
405  BTRMGR_RSSIValue_t m_rssi;
406  int m_signalLevel;
407  unsigned short m_vendorID;
408  unsigned char m_isPaired;
409  unsigned char m_isConnected; /* This must be used only when m_isPaired is TRUE */
410  unsigned char m_isLowEnergyDevice;
411  BTRMGR_DeviceServiceList_t m_serviceInfo;
412  BTRMGR_DeviceAdServiceData_t m_adServiceData[BTRMGR_MAX_DEVICE_PROFILE];
414 
415 /**
416  * @brief Represents the details of device connected.
417  */
419  BTRMgrDeviceHandle m_deviceHandle;
420  BTRMGR_DeviceType_t m_deviceType;
421  char m_name [BTRMGR_NAME_LEN_MAX];
422  char m_deviceAddress [BTRMGR_NAME_LEN_MAX];
423  BTRMGR_DeviceServiceList_t m_serviceInfo;
424  unsigned short m_vendorID;
425  unsigned char m_isLowEnergyDevice;
426  unsigned char m_isConnected; /* This must be used only when m_isPaired is TRUE */
427  BTRMGR_DevicePower_t m_powerStatus;
429 
430 /**
431  * @brief Represents the paired devices information.
432  */
433 typedef struct _BTRMGR_PairedDevices_t {
434  BTRMgrDeviceHandle m_deviceHandle;
435  BTRMGR_DeviceType_t m_deviceType;
436  char m_name [BTRMGR_NAME_LEN_MAX];
437  char m_deviceAddress [BTRMGR_NAME_LEN_MAX];
438  BTRMGR_DeviceServiceList_t m_serviceInfo;
439  unsigned short m_vendorID;
440  unsigned char m_isLowEnergyDevice;
441  unsigned char m_isConnected; /* This must be used only when m_isPaired is TRUE */
442  unsigned char m_isLastConnectedDevice;
443  unsigned int m_ui32DevClassBtSpec;
445 
446 /**
447  * @brief Represents the discovered device's details.
448  */
450  BTRMgrDeviceHandle m_deviceHandle;
451  BTRMGR_DeviceType_t m_deviceType;
452  char m_name [BTRMGR_NAME_LEN_MAX];
453  char m_deviceAddress [BTRMGR_NAME_LEN_MAX];
454  unsigned short m_vendorID;
455  unsigned char m_isPairedDevice;
456  unsigned char m_isConnected; /* This must be used only when m_isPaired is TRUE */
457  unsigned char m_isLowEnergyDevice;
458  BTRMGR_RSSIValue_t m_rssi;
459  int m_signalLevel;
460  unsigned char m_isDiscovered;
461  unsigned char m_isLastConnectedDevice;
462  unsigned int m_ui32DevClassBtSpec;
464 
465 /**
466  * @brief Represents the connected devices list.
467  */
469  unsigned short m_numOfDevices;
470  BTRMGR_ConnectedDevice_t m_deviceProperty[BTRMGR_DEVICE_COUNT_MAX];
472 
473 /**
474  * @brief Represents the list of paired devices.
475  */
477  unsigned short m_numOfDevices;
478  BTRMGR_PairedDevices_t m_deviceProperty[BTRMGR_DEVICE_COUNT_MAX];
480 
481 /**
482  * @brief Represents the list of scanned devices.
483  */
485  unsigned short m_numOfDevices;
486  BTRMGR_DiscoveredDevices_t m_deviceProperty[BTRMGR_DEVICE_COUNT_MAX];
488 
489 /**
490  * @brief Represents the details of external devices connected.
491  */
492 typedef struct _BTRMGR_ExternalDevice_t {
493  BTRMgrDeviceHandle m_deviceHandle;
494  BTRMGR_DeviceType_t m_deviceType;
495  char m_name [BTRMGR_NAME_LEN_MAX];
496  char m_deviceAddress [BTRMGR_NAME_LEN_MAX];
497  BTRMGR_DeviceServiceList_t m_serviceInfo;
498  unsigned short m_vendorID;
499  unsigned char m_isLowEnergyDevice;
500  unsigned int m_externalDevicePIN;
501  unsigned char m_requestConfirmation;
503 
504 /**
505  * @brief Represents Media Element details.
506  */
508  BTRMgrMediaElementHandle m_mediaElementHdl;
509  unsigned char m_IsPlayable;
510  char m_mediaElementName[BTRMGR_MAX_STR_LEN];
511  BTRMGR_MediaTrackInfo_t m_mediaTrackInfo;
513 
514 /**
515  * @brief Represents Media Element List.
516  */
518  unsigned short m_numberOfElements;
519  BTRMGR_MediaElementInfo_t m_mediaElementInfo[BTRMGR_MEDIA_ELEMENT_COUNT_MAX];
521 
522 /**
523  * @brief Represents Media Element List.
524  */
526  unsigned char m_ui8mediaDevVolume;
527  unsigned char m_ui8mediaDevMute;
528  BTRMGR_MediaControlCommand_t m_enmediaCtrlCmd;
530 
531 /**
532  * @brief Represents the media info.
533  */
534 typedef struct _BTRMGR_MediaInfo_t {
535  BTRMgrDeviceHandle m_deviceHandle;
536  BTRMGR_DeviceType_t m_deviceType;
537  char m_name [BTRMGR_NAME_LEN_MAX];
538 
539  union {
540  BTRMGR_MediaTrackInfo_t m_mediaTrackInfo;
541  BTRMGR_MediaPositionInfo_t m_mediaPositionInfo;
542  BTRMGR_MediaElementListInfo_t m_mediaAlbumListInfo;
543  BTRMGR_MediaElementListInfo_t m_mediaArtistListInfo;
544  BTRMGR_MediaElementListInfo_t m_mediaGenreListInfo;
545  BTRMGR_MediaElementListInfo_t m_mediaCompilationInfo;
546  BTRMGR_MediaElementListInfo_t m_mediaPlayListInfo;
547  BTRMGR_MediaElementListInfo_t m_mediaTrackListInfo;
548  char m_mediaPlayerName[BTRMGR_MAX_STR_LEN];
549  unsigned char m_mediaPlayerVolume;
550  BTRMGR_MediaDeviceStatus_t m_mediaDevStatus;
551  };
553 
554 /**
555  * @brief Represents the notification data
556  */
557 typedef struct _BTRMGR_DeviceOpInfo_t {
558  BTRMgrDeviceHandle m_deviceHandle;
559  BTRMGR_DeviceType_t m_deviceType;
560  BTRMGR_DeviceOperationType_t m_deviceOpType;
561  char m_deviceAddress[BTRMGR_NAME_LEN_MAX];
562  char m_name[BTRMGR_NAME_LEN_MAX];
563  char m_uuid[BTRMGR_MAX_STR_LEN];
564  BTRMGR_LeOp_t m_leOpType;
565 
566  union {
567  char m_readData[BTRMGR_MAX_DEV_OP_DATA_LEN];
568  char m_writeData[BTRMGR_MAX_DEV_OP_DATA_LEN];
569  char m_notifyData[BTRMGR_MAX_DEV_OP_DATA_LEN];
570  };
572 
573 /**
574  * @brief Represents the event message info.
575  */
576 typedef struct _BTRMGR_EventMessage_t {
577  unsigned char m_adapterIndex;
578  BTRMGR_Events_t m_eventType;
579  union {
580  BTRMGR_DiscoveredDevices_t m_discoveredDevice;
581  BTRMGR_ExternalDevice_t m_externalDevice;
582  BTRMGR_PairedDevices_t m_pairedDevice;
583  BTRMGR_MediaInfo_t m_mediaInfo;
584  BTRMGR_DeviceOpInfo_t m_deviceOpInfo;
585  };
587 
588 /**
589  * @brief Represents the event response.
590  */
591 typedef struct _BTRMGR_EventResponse_t {
592  BTRMGR_Events_t m_eventType;
593  BTRMgrDeviceHandle m_deviceHandle;
594  char m_writeData[BTRMGR_MAX_DEV_OP_DATA_LEN];
595  union {
596  unsigned char m_eventResp;
597  };
599 
600 typedef struct _BTRMGR_UUID_t {
601  char** m_uuid;
602  short m_uuidCount;
603 } BTRMGR_UUID_t;
604 
606 
607  BTRMGR_UUID_t m_btuuid;
608  int m_rssi;
609  int m_pathloss;
610  //BTRMGR_DeviceScanType_t m_scanType;
612 
613 /**
614  * @brief Structure for the custom advertisement payload
615  */
617  unsigned char len_flags;
618  unsigned char type_flags;
619  unsigned char val_flags;
620  unsigned char len_comcastflags;
621  unsigned char type_comcastflags;
622  unsigned char deviceInfo_UUID_LO;
623  unsigned char deviceInfo_UUID_HI;
624  unsigned char rdk_diag_UUID_LO;
625  unsigned char rdk_diag_UUID_HI;
626  unsigned char len_manuf;
627  unsigned char type_manuf;
628  /* First two bytes must contain the manufacturer ID (little-endian order) */
629  unsigned char company_LO;
630  unsigned char company_HI;
631  unsigned short device_model;
632  unsigned char device_mac[BTRMGR_DEVICE_MAC_LEN];
634 
635 /* Fptr Callbacks types */
636 typedef BTRMGR_Result_t (*BTRMGR_EventCallback)(BTRMGR_EventMessage_t astEventMessage);
637 
638 
639 /* Interfaces */
640 
641 /**
642  * @brief This API initializes the bluetooth manager.
643  *
644  * This API performs the following operations:
645  *
646  * - Initializes the bluetooth core layer.
647  * - Initialize the Paired Device List for Default adapter.
648  * - Register for callback to get the status of connected Devices.
649  * - Register for callback to get the Discovered Devices.
650  * - Register for callback to process incoming pairing requests.
651  * - Register for callback to process incoming connection requests.
652  * - Register for callback to process incoming media events.
653  * - Activates the default agent.
654  * - Initializes the persistant interface and saves all bluetooth profiles to the database.
655  *
656  * @return Returns the status of the operation.
657  * @retval BTRMGR_RESULT_SUCCESS on success, appropriate error code otherwise.
658  */
660 
661 /**
662  * @brief This API invokes the deinit function of bluetooth core and persistant interface module.
663  *
664  * @return Returns the status of the operation.
665  * @retval BTRMGR_RESULT_SUCCESS on success, appropriate error code otherwise.
666  */
668 
669 /**
670  * @brief This API registers all the IARM call backs for BTRMGR and Third party Clients.
671  *
672  * @return Returns the status of the operation.
673  * @retval BTRMGR_RESULT_SUCCESS on success, appropriate error code otherwise.
674  */
675 BTRMGR_Result_t BTRMGR_RegisterForCallbacks(const char* apcProcessName);
676 
677 /**
678  * @brief This API Unregisters all the IARM call backs for BTRMGR and Third party Clients.
679  *
680  * @return Returns the status of the operation.
681  * @retval BTRMGR_RESULT_SUCCESS on success, appropriate error code otherwise.
682  */
683 BTRMGR_Result_t BTRMGR_UnRegisterFromCallbacks(const char* apcProcessName);
684 
685 /**
686  * @brief This API returns the number of bluetooth adapters available.
687  *
688  * @param[out] pNumOfAdapters Indicates the number of adapters available.
689  *
690  * @return Returns the status of the operation.
691  * @retval eBTRMgrSuccess on success, appropriate error code otherwise.
692  */
693 BTRMGR_Result_t BTRMGR_GetNumberOfAdapters(unsigned char *pNumOfAdapters);
694 
695 
696 /**
697  * @brief This API is designed to reset the bluetooth adapter.
698  *
699  * As of now, HAL implementation is not available for this API.
700  *
701  * @param[in] aui8AdapterIdx Index of bluetooth adapter.
702  *
703  * @return Returns the status of the operation.
704  * @retval eBTRMgrSuccess on success, appropriate error code otherwise.
705  */
706 BTRMGR_Result_t BTRMGR_ResetAdapter(unsigned char aui8AdapterIdx);
707 
708 /**
709  * @brief This API is used to set the new name to the bluetooth adapter
710  *
711  * @param[in] aui8AdapterIdx Index of bluetooth adapter.
712  * @param[in] pNameOfAdapter The name to set.
713  *
714  * @return Returns the status of the operation.
715  * @retval eBTRMgrSuccess on success, appropriate error code otherwise.
716  */
717 BTRMGR_Result_t BTRMGR_SetAdapterName(unsigned char aui8AdapterIdx, const char* pNameOfAdapter);
718 
719 
720 /**
721  * @brief This API fetches the bluetooth adapter name.
722  *
723  * @param[in] aui8AdapterIdx Index of bluetooth adapter.
724  * @param[out] pNameOfAdapter Bluetooth adapter name.
725  *
726  * @return Returns the status of the operation.
727  * @retval eBTRMgrSuccess on success, appropriate error code otherwise.
728  */
729 BTRMGR_Result_t BTRMGR_GetAdapterName(unsigned char aui8AdapterIdx, char* pNameOfAdapter);
730 
731 /**
732  * @brief This API sets the bluetooth adapter power to ON/OFF.
733  *
734  * @param[in] aui8AdapterIdx Index of bluetooth adapter.
735  * @param[in] power_status Value to set the power. 0 to OFF & 1 to ON.
736  *
737  * @return Returns the status of the operation.
738  * @retval eBTRMgrSuccess on success, appropriate error code otherwise.
739  */
740 BTRMGR_Result_t BTRMGR_SetAdapterPowerStatus(unsigned char aui8AdapterIdx, unsigned char power_status);
741 
742 /**
743  * @brief This API fetches the power status, either 0 or 1.
744  *
745  * @param[in] aui8AdapterIdx Index of bluetooth adapter.
746  * @param[out] pPowerStatus Indicates the power status.
747  *
748  * @return Returns the status of the operation.
749  * @retval eBTRMgrSuccess on success, appropriate error code otherwise.
750  */
751 BTRMGR_Result_t BTRMGR_GetAdapterPowerStatus(unsigned char aui8AdapterIdx, unsigned char *pPowerStatus);
752 
753 /**
754  * @brief This API is to make the adapter discoverable until the given timeout.
755  *
756  * @param[in] aui8AdapterIdx Index of bluetooth adapter.
757  * @param[in] discoverable Value to turn on or off the discovery.
758  * @param[in] timeout Timeout to turn on discovery.
759  *
760  * @return Returns the status of the operation.
761  * @retval eBTRMgrSuccess on success, appropriate error code otherwise.
762  */
763 BTRMGR_Result_t BTRMGR_SetAdapterDiscoverable(unsigned char aui8AdapterIdx, unsigned char discoverable, int timeout);
764 
765 /**
766  * @brief This API checks the adapter is discoverable or not.
767  *
768  * @param[in] aui8AdapterIdx Index of bluetooth adapter.
769  * @param[out] pDiscoverable Indicates discoverable or not.
770  *
771  * @return Returns the status of the operation.
772  * @retval eBTRMgrSuccess on success, appropriate error code otherwise.
773  */
774 BTRMGR_Result_t BTRMGR_IsAdapterDiscoverable(unsigned char aui8AdapterIdx, unsigned char *pDiscoverable);
775 
776 /**
777  * @brief This API initiates the scanning process.
778  *
779  * @param[in] aui8AdapterIdx Index of bluetooth adapter.
780  * @param[in] aenBTRMgrDevOpT Device operation type.
781  *
782  * @return Returns the status of the operation.
783  * @retval eBTRMgrSuccess on success, appropriate error code otherwise.
784  */
785 BTRMGR_Result_t BTRMGR_StartDeviceDiscovery(unsigned char aui8AdapterIdx, BTRMGR_DeviceOperationType_t aenBTRMgrDevOpT);
786 
787 /**
788  * @brief This API terminates the scanning process.
789  *
790  * @param[in] aui8AdapterIdx Index of bluetooth adapter.
791  * @param[in] aenBTRMgrDevOpT Device operation type.
792  *
793  * @return Returns the status of the operation.
794  * @retval eBTRMgrSuccess on success, appropriate error code otherwise.
795  */
796 BTRMGR_Result_t BTRMGR_StopDeviceDiscovery(unsigned char aui8AdapterIdx, BTRMGR_DeviceOperationType_t aenBTRMgrDevOpT);
797 
798 /**
799  * @brief This API gives the discovery status.
800  *
801  * @param[in] aui8AdapterIdx Index of bluetooth adapter.
802  * @param[out] aeDiscoveryStatus Device discovery status.
803  * @param[out] aenBTRMgrDevOpT Device operation type.
804  *
805  * @return Returns the status of the operation.
806  * @retval eBTRMgrSuccess on success, appropriate error code otherwise.
807  */
808 BTRMGR_Result_t BTRMGR_GetDiscoveryStatus (unsigned char aui8AdapterIdx, BTRMGR_DiscoveryStatus_t *aeDiscoveryStatus, BTRMGR_DeviceOperationType_t *aenBTRMgrDevOpT);
809 /**
810  * @brief This API fetches the list of devices scanned.
811  *
812  * @param[in] aui8AdapterIdx Index of bluetooth adapter.
813  * @param[out] pDiscoveredDevices Structure which holds the details of device scanned.
814  *
815  * @return Returns the status of the operation.
816  * @retval eBTRMgrSuccess on success, appropriate error code otherwise.
817  */
818 BTRMGR_Result_t BTRMGR_GetDiscoveredDevices(unsigned char aui8AdapterIdx, BTRMGR_DiscoveredDevicesList_t *pDiscoveredDevices);
819 
820 /**
821  * @brief This API is used to pair the device that you wish to pair.
822  *
823  * @param[in] aui8AdapterIdx Index of bluetooth adapter.
824  * @param[in] ahBTRMgrDevHdl Indicates the device handle.
825  *
826  * @return Returns the status of the operation.
827  * @retval eBTRMgrSuccess on success, appropriate error code otherwise.
828  */
829 BTRMGR_Result_t BTRMGR_PairDevice(unsigned char aui8AdapterIdx, BTRMgrDeviceHandle ahBTRMgrDevHdl);
830 
831 /**
832  * @brief This API is used to remove the pairing information of the device selected.
833  *
834  * @param[in] aui8AdapterIdx Index of bluetooth adapter.
835  * @param[in] ahBTRMgrDevHdl Device handle.
836  *
837  * @return Returns the status of the operation.
838  * @retval eBTRMgrSuccess on success, appropriate error code otherwise.
839  */
840 BTRMGR_Result_t BTRMGR_UnpairDevice(unsigned char aui8AdapterIdx, BTRMgrDeviceHandle ahBTRMgrDevHdl);
841 
842 /**
843  * @brief This API returns the list of devices paired.
844  *
845  * @param[in] aui8AdapterIdx Index of bluetooth adapter.
846  * @param[in] pPairedDevices Structure which holds the paired devices information.
847  *
848  * @return Returns the status of the operation.
849  * @retval eBTRMgrSuccess on success, appropriate error code otherwise.
850  */
851 BTRMGR_Result_t BTRMGR_GetPairedDevices(unsigned char aui8AdapterIdx, BTRMGR_PairedDevicesList_t *pPairedDevices);
852 
853 /**
854  * @brief This API connects the device as audio sink/headset/audio src based on the device type specified.
855  *
856  * @param[in] aui8AdapterIdx Index of bluetooth adapter.
857  * @param[in] ahBTRMgrDevHdl Indicates device handle.
858  * @param[in] connectAs Device operation type.
859  *
860  * @return Returns the status of the operation.
861  * @retval eBTRMgrSuccess on success, appropriate error code otherwise.
862  */
863 BTRMGR_Result_t BTRMGR_ConnectToDevice(unsigned char aui8AdapterIdx, BTRMgrDeviceHandle ahBTRMgrDevHdl, BTRMGR_DeviceOperationType_t connectAs);
864 
865 /**
866  * @brief This API terminates the current connection.
867  *
868  * @param[in] aui8AdapterIdx Index of bluetooth adapter.
869  * @param[in] ahBTRMgrDevHdl Indicates device handle.
870  *
871  * @return Returns the status of the operation.
872  * @retval eBTRMgrSuccess on success, appropriate error code otherwise.
873  */
874 BTRMGR_Result_t BTRMGR_DisconnectFromDevice(unsigned char aui8AdapterIdx, BTRMgrDeviceHandle ahBTRMgrDevHdl);
875 
876 /**
877  * @brief This API returns the list of devices connected.
878  *
879  * @param[in] aui8AdapterIdx Index of bluetooth adapter.
880  * @param[out] pConnectedDevices List of connected devices.
881  *
882  * @return Returns the status of the operation.
883  * @retval eBTRMgrSuccess on success, appropriate error code otherwise.
884  */
885 BTRMGR_Result_t BTRMGR_GetConnectedDevices(unsigned char aui8AdapterIdx, BTRMGR_ConnectedDevicesList_t *pConnectedDevices);
886 
887 /**
888  * @brief This API returns the device information that includes the device name, mac address, RSSI value etc.
889  *
890  * @param[in] aui8AdapterIdx Index of bluetooth adapter.
891  * @param[in] ahBTRMgrDevHdl Indicates device handle.
892  * @param[out] pDeviceProperty Device property information.
893  *
894  * @return Returns the status of the operation.
895  * @retval eBTRMgrSuccess on success, appropriate error code otherwise.
896  */
897 
898 BTRMGR_Result_t BTRMGR_GetDeviceProperties(unsigned char aui8AdapterIdx, BTRMgrDeviceHandle ahBTRMgrDevHdl, BTRMGR_DevicesProperty_t *pDeviceProperty);
899 /**
900  * @brief This API initates the streaming from the device with default operation type.
901  *
902  * @param[in] aui8AdapterIdx Index of bluetooth adapter.
903  * @param[in] aenBTRMgrDevConT Device opeartion type.
904  *
905  * @return Returns the status of the operation.
906  * @retval eBTRMgrSuccess on success, appropriate error code otherwise.
907  */
908 
909 BTRMGR_Result_t BTRMGR_StartAudioStreamingOut_StartUp(unsigned char aui8AdapterIdx, BTRMGR_DeviceOperationType_t aenBTRMgrDevConT);
910 /**
911  * @brief This API initates the streaming from the device with the selected operation type.
912  *
913  * @param[in] aui8AdapterIdx Index of bluetooth adapter.
914  * @param[in] ahBTRMgrDevHdl Indicates device Handle.
915  * @param[in] connectAs Device operation type.
916  *
917  * @return Returns the status of the operation.
918  * @retval eBTRMgrSuccess on success, appropriate error code otherwise.
919  */
920 
921 BTRMGR_Result_t BTRMGR_StartAudioStreamingOut(unsigned char aui8AdapterIdx, BTRMgrDeviceHandle ahBTRMgrDevHdl, BTRMGR_DeviceOperationType_t connectAs);
922 
923 /**
924  * @brief This API terminates the streaming from the device.
925  *
926  * @param[in] aui8AdapterIdx Index of bluetooth adapter.
927  * @param[in] ahBTRMgrDevHdl Indicates device Handle.
928  *
929  * @return Returns the status of the operation.
930  * @retval eBTRMgrSuccess on success, appropriate error code otherwise.
931  */
932 BTRMGR_Result_t BTRMGR_StopAudioStreamingOut(unsigned char aui8AdapterIdx, BTRMgrDeviceHandle ahBTRMgrDevHdl);
933 
934 /**
935  * @brief This API returns the stream out status.
936  *
937  * @param[in] aui8AdapterIdx Index of bluetooth adapter.
938  * @param[out] pStreamingStatus Streaming status.
939  *
940  * @return Returns the status of the operation.
941  * @retval eBTRMgrSuccess on success, appropriate error code otherwise.
942  */
943 //TODO: Return deviceHandle if we are streaming out
944 BTRMGR_Result_t BTRMGR_IsAudioStreamingOut(unsigned char aui8AdapterIdx, unsigned char *pStreamingStatus);
945 
946 /**
947  * @brief This API is to set the audio type as primary or secondary.
948  *
949  * Secondary audio support is not implemented yet. Always primary audio is played for now.
950  *
951  * @param[in] aui8AdapterIdx Index of bluetooth adapter.
952  * @param[in] type Streaming type primary/secondary
953  *
954  * @return Returns the status of the operation.
955  * @retval eBTRMgrSuccess on success, appropriate error code otherwise.
956  */
958 
959 /**
960  * @brief This API starts the audio streaming.
961  *
962  * @param[in] aui8AdapterIdx Index of bluetooth adapter.
963  * @param[in] ahBTRMgrDevHdl Device handle.
964  * @param[in] connectAs Device opeartion type.
965  *
966  * @return Returns the status of the operation.
967  * @retval eBTRMgrSuccess on success, appropriate error code otherwise.
968  */
969 BTRMGR_Result_t BTRMGR_StartAudioStreamingIn(unsigned char aui8AdapterIdx, BTRMgrDeviceHandle ahBTRMgrDevHdl, BTRMGR_DeviceOperationType_t connectAs);
970 
971 /**
972  * @brief This API termines the audio streaming.
973  *
974  * @param[in] aui8AdapterIdx Index of bluetooth adapter.
975  * @param[in] ahBTRMgrDevHdl Device handle.
976  *
977  * @return Returns the status of the operation.
978  * @retval eBTRMgrSuccess on success, appropriate error code otherwise.
979  */
980 BTRMGR_Result_t BTRMGR_StopAudioStreamingIn(unsigned char aui8AdapterIdx, BTRMgrDeviceHandle ahBTRMgrDevHdl);
981 
982 /**
983  * @brief This API returns the audio streaming status.
984  *
985  * @param[in] aui8AdapterIdx Index of bluetooth adapter.
986  * @param[out] pStreamingStatus Streaming status.
987  *
988  * @return Returns the status of the operation.
989  * @retval eBTRMgrSuccess on success, appropriate error code otherwise.
990  */
991 //TODO: Return deviceHandle if we are streaming in
992 BTRMGR_Result_t BTRMGR_IsAudioStreamingIn(unsigned char aui8AdapterIdx, unsigned char *pStreamingStatus);
993 
994 /**
995  * @brief This API handles the events received.
996  *
997  * @param[in] aui8AdapterIdx Index of bluetooth adapter.
998  * @param[in] apstBTRMgrEvtRsp Structure which holds the event response.
999  *
1000  * @return Returns the status of the operation.
1001  * @retval eBTRMgrSuccess on success, appropriate error code otherwise.
1002  */
1003 BTRMGR_Result_t BTRMGR_SetEventResponse(unsigned char aui8AdapterIdx, BTRMGR_EventResponse_t* apstBTRMgrEvtRsp);
1004 
1005 /**
1006  * @brief This API is used to perform the media control operations.
1007  *
1008  * @param[in] aui8AdapterIdx Index of bluetooth adapter.
1009  * @param[in] ahBTRMgrDevHdl Device handle.
1010  * @param[in] mediaCtrlCmd Indicates the play, pause, resume etc.
1011  *
1012  * @return Returns the status of the operation.
1013  * @retval eBTRMgrSuccess on success, appropriate error code otherwise.
1014  */
1015 BTRMGR_Result_t BTRMGR_MediaControl(unsigned char aui8AdapterIdx, BTRMgrDeviceHandle ahBTRMgrDevHdl, BTRMGR_MediaControlCommand_t mediaCtrlCmd);
1016 
1017 /**
1018  * @brief This API is used to fetch the media volume and mute data.
1019  *
1020  * @param[in] aui8AdapterIdx Index of bluetooth adapter.
1021  * @param[in] ahBTRMgrDevHdl Device handle.
1022  * @param[in] deviceOpType device operation type audio out or in etc.
1023  * @param[out] pui8Volume Media volume value.
1024  * @param[out] pui8Mute Media mute set or not.
1025  *
1026  * @return Returns the status of the operation.
1027  * @retval eBTRMgrSuccess on success, appropriate error code otherwise.
1028  */
1029 BTRMGR_Result_t BTRMGR_GetDeviceVolumeMute(unsigned char aui8AdapterIdx, BTRMgrDeviceHandle ahBTRMgrDevHdl, BTRMGR_DeviceOperationType_t deviceOpType, unsigned char *pui8Volume, unsigned char *pui8Mute);
1030 
1031 /**
1032  * @brief This API is used to set the media volume and mute data.
1033  *
1034  * @param[in] aui8AdapterIdx Index of bluetooth adapter.
1035  * @param[in] ahBTRMgrDevHdl Device handle.
1036  * @param[in] deviceOpType device operation type audio out or in etc.
1037  * @param[out] ui8Volume Media volume value.
1038  * @param[out] ui8Mute Media mute set or not.
1039  *
1040  * @return Returns the status of the operation.
1041  * @retval eBTRMgrSuccess on success, appropriate error code otherwise.
1042  */
1043 BTRMGR_Result_t BTRMGR_SetDeviceVolumeMute(unsigned char aui8AdapterIdx, BTRMgrDeviceHandle ahBTRMgrDevHdl, BTRMGR_DeviceOperationType_t deviceOpType, unsigned char ui8Volume, unsigned char ui8Mute);
1044 
1045 /**
1046  * @brief This API fetches the media track info like title, genre, duration, number of tracks, current track number.
1047  *
1048  * @param[in] aui8AdapterIdx Index of bluetooth adapter.
1049  * @param[in] ahBTRMgrDevHdl Device handle.
1050  * @param[out] mediaTrackInfo Track info like title, genre, duration etc.
1051  *
1052  * @return Returns the status of the operation.
1053  * @retval eBTRMgrSuccess on success, appropriate error code otherwise.
1054  */
1055 BTRMGR_Result_t BTRMGR_GetMediaTrackInfo(unsigned char aui8AdapterIdx, BTRMgrDeviceHandle ahBTRMgrDevHdl, BTRMGR_MediaTrackInfo_t *mediaTrackInfo);
1056 
1057 /**
1058  * @brief This API fetches the media track info like title, genre, duration, number of tracks, current track number.
1059  *
1060  * @param[in] aui8AdapterIdx Index of bluetooth adapter.
1061  * @param[in] ahBTRMgrDevHdl Device handle.
1062  * @param[in] ahBTRMgrMedElementHdl Media Element handle .
1063  * @param[out] mediaTrackInfo Track info like title, genre, duration etc.
1064  *
1065  * @return Returns the status of the operation.
1066  * @retval eBTRMgrSuccess on success, appropriate error code otherwise.
1067  */
1068 BTRMGR_Result_t BTRMGR_GetMediaElementTrackInfo(unsigned char aui8AdapterIdx, BTRMgrDeviceHandle ahBTRMgrDevHdl, BTRMgrMediaElementHandle ahBTRMgrMedElementHdl, BTRMGR_MediaTrackInfo_t *mediaTrackInfo);
1069 
1070 
1071 /**
1072  * @brief This API fetches the current position and total duration of the media.
1073  *
1074  * @param[in] aui8AdapterIdx Index of bluetooth adapter.
1075  * @param[in] ahBTRMgrDevHdl Device handle.
1076  * @param[out] mediaPositionInfo Media position info.
1077  *
1078  * @return Returns the status of the operation.
1079  * @retval BTRMGR_RESULT_SUCCESS on success, appropriate error code otherwise.
1080  */
1081 BTRMGR_Result_t BTRMGR_GetMediaCurrentPosition(unsigned char aui8AdapterIdx, BTRMgrDeviceHandle ahBTRMgrDevHdl, BTRMGR_MediaPositionInfo_t* mediaPositionInfo);
1082 
1083 /**
1084  * @brief This API sets the mentioned media element list active/in_scope for further operations on it.
1085  *
1086  * @param[in] aui8AdapterIdx Index of bluetooth adapter.
1087  * @param[in] ahBTRMgrDevHdl Device handle.
1088  * @param[in] ahBTRMgrMedElementHdl Media Element handle
1089  * @param[in] aui16MediaElementStartIdx Starting index of the list.
1090  * @param[in] aui16MediaElementEndIdx Ending index of the list
1091  * @param[in] aMediaElementType Media Element Type.
1092  *
1093  * @return Returns the status of the operation.
1094  * @retval BTRMGR_RESULT_SUCCESS on success, appropriate error code otherwise.
1095  */
1096 BTRMGR_Result_t BTRMGR_SetMediaElementActive (unsigned char aui8AdapterIdx, BTRMgrDeviceHandle ahBTRMgrDevHdl, BTRMgrMediaElementHandle ahBTRMgrMedElementHdl,
1097  BTRMGR_MediaElementType_t aMediaElementType);
1098 /**
1099  * @brief This API gets the media element list.
1100  * @param[in] aui8AdapterIdx Index of bluetooth adapter.
1101  * @param[in] ahBTRMgrDevHdl Device handle.
1102  * @param[in] ahBTRMgrMedElementHdl Media Element handle
1103  * @param[in] aui16MediaElementStartIdx Starting index of the list.
1104  * @param[in] aui16MediaElementEndIdx Ending index of the list
1105  * @param[in] aMediaElementType Media Element Type.
1106  * @param[out] aMediaElementListInfo Media Element List.
1107  *
1108  * @return Returns the status of the operation.
1109  * @retval BTRMGR_RESULT_SUCCESS on success, appropriate error code otherwise.
1110  */
1111 BTRMGR_Result_t BTRMGR_GetMediaElementList (unsigned char aui8AdapterIdx, BTRMgrDeviceHandle ahBTRMgrDevHdl, BTRMgrMediaElementHandle ahBTRMgrMedElementHdl, unsigned short aui16MediaElementStartIdx,
1112  unsigned short aui16MediaElementEndIdx, unsigned char abMediaElementListDepth, BTRMGR_MediaElementType_t aMediaElementType, BTRMGR_MediaElementListInfo_t* aMediaElementListInfo);
1113 /**
1114  * @brief This API performs operation based on the element type selected.
1115  * @param[in] aui8AdapterIdx Index of bluetooth adapter.
1116  * @param[in] ahBTRMgrDevHdl Device handle.
1117  * @param[in] ahBTRMgrMedElementHdl Media Element handle
1118  * @param[in] aMediaElementType Media Element Type.
1119  *
1120  * @return Returns the status of the operation.
1121  * @retval BTRMGR_RESULT_SUCCESS on success, appropriate error code otherwise.
1122  */
1123 BTRMGR_Result_t BTRMGR_SelectMediaElement (unsigned char aui8AdapterIdx, BTRMgrDeviceHandle ahBTRMgrDevHdl, BTRMgrMediaElementHandle ahBTRMgrMedElementHdl, BTRMGR_MediaElementType_t aMediaElementType);
1124 
1125 /**
1126  * @brief This API fetches the Device name of the media.
1127  *
1128  * @param[in] type Device type.
1129  *
1130  * @return Returns the device name.
1131  */
1133 
1134 /**
1135  * @brief This API Enable/Disables Audio-In on the specified bluetooth adapter.
1136  *
1137  * @param[in] aui8AdapterIdx Index of bluetooth adapter.
1138  * @param[in] aui8State 0/1- Enable or Disable AudioIn service.
1139  *
1140  * @return Returns the status of the operation.
1141  * @retval BTRMGR_RESULT_SUCCESS on success.
1142  */
1143 BTRMGR_Result_t BTRMGR_SetAudioInServiceState (unsigned char aui8AdapterIdx, unsigned char aui8State);
1144 
1145 /**
1146  * @brief This API Enable/Disables Hid GamePad on the specified bluetooth adapter.
1147  *
1148  * @param[in] aui8AdapterIdx Index of bluetooth adapter.
1149  * @param[in] aui8State 0/1- Enable or Disable AudioIn service.
1150  *
1151  * @return Returns the status of the operation.
1152  * @retval BTRMGR_RESULT_SUCCESS on success.
1153  */
1154 BTRMGR_Result_t BTRMGR_SetHidGamePadServiceState (unsigned char aui8AdapterIdx, unsigned char aui8State);
1155 
1156 /**
1157  * @brief This API Gets Beacon Detection status on the specified bluetooth adapter.
1158  *
1159  * @param[in] aui8AdapterIdx Index of bluetooth adapter.
1160  * @param[out] isLimited Current Beacon Detection Status.
1161  *
1162  * @return Returns the status of the operation.
1163  * @retval BTRMGR_RESULT_SUCCESS on success.
1164  */
1165 BTRMGR_Result_t BTRMGR_GetLimitBeaconDetection(unsigned char aui8AdapterIdx, unsigned char *isLimited);
1166 
1167 /**
1168  * @brief This API Sets Beacon Detection status on the specified bluetooth adapter.
1169  *
1170  * @param[in] aui8AdapterIdx Index of bluetooth adapter.
1171  * @param[in] isLimited Current Beacon Detection Status.
1172  *
1173  * @return Returns the status of the operation.
1174  * @retval BTRMGR_RESULT_SUCCESS on success.
1175  */
1176 BTRMGR_Result_t BTRMGR_SetLimitBeaconDetection(unsigned char aui8AdapterIdx, unsigned char isLimited);
1177 
1178 
1179 
1180 BTRMGR_Result_t BTRMGR_GetLeProperty (unsigned char aui8AdapterIdx, BTRMgrDeviceHandle ahBTRMgrDevHdl, const char* apBtrPropUuid, BTRMGR_LeProperty_t aenLeProperty, void* vpPropValue);
1181 
1182 /**
1183  * @brief This API fetches the characteristic uuid of Le device.
1184  *
1185  * @param[in] aui8AdapterIdx Index of bluetooth adapter.
1186  * @param[in] ahBTRMgrDevHdl Device handle.
1187  * @param[in] apBtrServiceUuid service UUID.
1188  * @param[out] apBtrCharUuidList uuid list.
1189  *
1190  * @return Returns the status of the operation.
1191  * @retval BTRMGR_RESULT_SUCCESS on success, appropriate error code otherwise.
1192  */
1193 BTRMGR_Result_t BTRMGR_GetLeCharacteristicUUID (unsigned char aui8AdapterIdx, BTRMgrDeviceHandle ahBTRMgrDevHdl, const char* apBtrServiceUuid, char* apBtrCharUuidList);
1194 
1195 /**
1196  * @brief This API performs LE operations on the specified bluetooth adapter.
1197  *
1198  * @param[in] aui8AdapterIdx Index of bluetooth adapter.
1199  * @param[in] ahBTRMgrDevHdl Device handle.
1200  * @param[in] aBtrLeUuid LE device uuid.
1201  * @param[in] aLeOpType LE device operation type.
1202  * @param[out] rOpResult LE device operation result.
1203  *
1204  * @return Returns the status of the operation.
1205  * @retval BTRMGR_RESULT_SUCCESS on success, appropriate error code otherwise.
1206  */
1207 BTRMGR_Result_t BTRMGR_PerformLeOp (unsigned char aui8AdapterIdx, BTRMgrDeviceHandle ahBTRMgrDevHdl, const char* aBtrLeUuid, BTRMGR_LeOp_t aLeOpType, char* aLeOpArg, char* rOpResult);
1208 
1209 
1210 BTRMGR_Result_t BTRMGR_LE_StartAdvertisement(unsigned char aui8AdapterIdx, BTRMGR_LeCustomAdvertisement_t *pstBTMGR_LeCustomAdvt);
1211 
1212 BTRMGR_Result_t BTRMGR_LE_StopAdvertisement(unsigned char aui8AdapterIdx);
1213 
1214 BTRMGR_Result_t BTRMGR_LE_GetPropertyValue(unsigned char aui8AdapterIdx, char* lUUID, char *aValue, BTRMGR_LeProperty_t aElement);
1215 
1216 BTRMGR_Result_t BTRMGR_LE_SetServiceUUIDs(unsigned char aui8AdapterIdx, char *aUUID);
1217 
1218 BTRMGR_Result_t BTRMGR_LE_SetServiceInfo(unsigned char aui8AdapterIdx, char *aUUID, unsigned char aServiceType);
1219 
1220 BTRMGR_Result_t BTRMGR_LE_SetGattInfo(unsigned char aui8AdapterIdx, char *aParentUUID, char *aCharUUID, unsigned short aFlags, char *aValue, BTRMGR_LeProperty_t aElement);
1221 
1222 BTRMGR_Result_t BTRMGR_LE_SetGattPropertyValue(unsigned char aui8AdapterIdx, char* aUUID, char *aValue, BTRMGR_LeProperty_t aElement);
1223 
1224 BTRMGR_Result_t BTRMGR_SysDiagInfo(unsigned char aui8AdapterIdx, char *apDiagElement, char *apValue, BTRMGR_LeOp_t aOpType);
1225 
1226 BTRMGR_Result_t BTRMGR_ConnectToWifi(unsigned char aui8AdapterIdx, char *apSSID, char *apPassword, int aSecMode);
1227 
1228 // Outgoing callbacks Registration Interfaces
1229 BTRMGR_Result_t BTRMGR_RegisterEventCallback(BTRMGR_EventCallback afpcBBTRMgrEventOut);
1230 
1231 /** @} */
1232 
1233 #ifdef __cplusplus
1234 }
1235 #endif
1236 
1237 #endif /* __BTR_MGR_H__ */
BTRMGR_GetMediaCurrentPosition
BTRMGR_Result_t BTRMGR_GetMediaCurrentPosition(unsigned char aui8AdapterIdx, BTRMgrDeviceHandle ahBTRMgrDevHdl, BTRMGR_MediaPositionInfo_t *mediaPositionInfo)
This API fetches the current position and total duration of the media.
Definition: btrMgr.c:5251
BTRMGR_MediaTrackInfo_t
struct _BTRMGR_MediaTrackInfo_t BTRMGR_MediaTrackInfo_t
Represents the media track info.
_BTRMGR_DeviceService_t
Represents the supported service of the device.
Definition: btmgr.h:372
_BTRMGR_DeviceServiceList_t
Represents device services list.
Definition: btmgr.h:380
BTRMGR_GetLeCharacteristicUUID
BTRMGR_Result_t BTRMGR_GetLeCharacteristicUUID(unsigned char aui8AdapterIdx, BTRMgrDeviceHandle ahBTRMgrDevHdl, const char *apBtrServiceUuid, char *apBtrCharUuidList)
This API fetches the characteristic uuid of Le device.
BTRMGR_DiscoveredDevicesList_t
struct _BTRMGR_DiscoveredDevicesList_t BTRMGR_DiscoveredDevicesList_t
Represents the list of scanned devices.
_BTRMGR_DiscoveredDevices_t
Represents the discovered device's details.
Definition: btmgr.h:449
BTRMGR_DeviceOpInfo_t
struct _BTRMGR_DeviceOpInfo_t BTRMGR_DeviceOpInfo_t
Represents the notification data.
BTRMGR_DevicesProperty_t
struct _BTRMGR_DevicesProperty_t BTRMGR_DevicesProperty_t
Represents the property of the device.
BTRMGR_DeInit
BTRMGR_Result_t BTRMGR_DeInit(void)
This API invokes the deinit function of bluetooth core and persistant interface module.
Definition: btrMgr.c:2455
BTRMGR_SetAdapterName
BTRMGR_Result_t BTRMGR_SetAdapterName(unsigned char aui8AdapterIdx, const char *pNameOfAdapter)
This API is used to set the new name to the bluetooth adapter.
Definition: btrMgr.c:2645
BTRMGR_UnpairDevice
BTRMGR_Result_t BTRMGR_UnpairDevice(unsigned char aui8AdapterIdx, BTRMgrDeviceHandle ahBTRMgrDevHdl)
This API is used to remove the pairing information of the device selected.
Definition: btrMgr.c:3440
_BTRMGR_MediaElementInfo_t
Represents Media Element details.
Definition: btmgr.h:507
BTRMGR_RSSIValue_t
enum _BTRMGR_RSSIValue_type_t BTRMGR_RSSIValue_t
Represents the bluetooth signal strength.
_BTRMGR_MediaControlCommand_t
_BTRMGR_MediaControlCommand_t
Represents the commands to control the media files.
Definition: btmgr.h:245
BTRMGR_ExternalDevice_t
struct _BTRMGR_ExternalDevice_t BTRMGR_ExternalDevice_t
Represents the details of external devices connected.
_BTRMGR_Result_t
_BTRMGR_Result_t
Represents the status of the operation.
Definition: btmgr.h:104
BTRMGR_ConnectedDevicesList_t
struct _BTRMGR_ConnectedDevicesList_t BTRMGR_ConnectedDevicesList_t
Represents the connected devices list.
_BTRMGR_MediaElementType_t
_BTRMGR_MediaElementType_t
Represents Media Element Types.
Definition: btmgr.h:331
BTRMGR_MediaInfo_t
struct _BTRMGR_MediaInfo_t BTRMGR_MediaInfo_t
Represents the media info.
_BTRMGR_LeOp_t
_BTRMGR_LeOp_t
Represents the Low energy operations.
Definition: btmgr.h:290
BTRMGR_SetAdapterDiscoverable
BTRMGR_Result_t BTRMGR_SetAdapterDiscoverable(unsigned char aui8AdapterIdx, unsigned char discoverable, int timeout)
This API is to make the adapter discoverable until the given timeout.
Definition: btrMgr.c:2830
BTRMGR_GetMediaTrackInfo
BTRMGR_Result_t BTRMGR_GetMediaTrackInfo(unsigned char aui8AdapterIdx, BTRMgrDeviceHandle ahBTRMgrDevHdl, BTRMGR_MediaTrackInfo_t *mediaTrackInfo)
This API fetches the media track info like title, genre, duration, number of tracks,...
Definition: btrMgr.c:5172
BTRMGR_IsAdapterDiscoverable
BTRMGR_Result_t BTRMGR_IsAdapterDiscoverable(unsigned char aui8AdapterIdx, unsigned char *pDiscoverable)
This API checks the adapter is discoverable or not.
Definition: btrMgr.c:2894
BTRMGR_PairDevice
BTRMGR_Result_t BTRMGR_PairDevice(unsigned char aui8AdapterIdx, BTRMgrDeviceHandle ahBTRMgrDevHdl)
This API is used to pair the device that you wish to pair.
Definition: btrMgr.c:3313
BTRMGR_Result_t
enum _BTRMGR_Result_t BTRMGR_Result_t
Represents the status of the operation.
_BTRMGR_StreamOut_Type_t
_BTRMGR_StreamOut_Type_t
Represents the stream output types.
Definition: btmgr.h:197
BTRMGR_DeviceType_t
enum _BTRMGR_DeviceType_t BTRMGR_DeviceType_t
Represents the bluetooth device types.
_BTRMGR_DeviceType_t
_BTRMGR_DeviceType_t
Represents the bluetooth device types.
Definition: btmgr.h:167
_BTRMGR_MediaElementListInfo_t
Represents Media Element List.
Definition: btmgr.h:517
BTRMGR_PerformLeOp
BTRMGR_Result_t BTRMGR_PerformLeOp(unsigned char aui8AdapterIdx, BTRMgrDeviceHandle ahBTRMgrDevHdl, const char *aBtrLeUuid, BTRMGR_LeOp_t aLeOpType, char *aLeOpArg, char *rOpResult)
This API performs LE operations on the specified bluetooth adapter.
Definition: btrMgr.c:5801
BTRMGR_Events_t
enum _BTRMGR_Events_t BTRMGR_Events_t
Represents the event status.
_BTRMGR_LeCustomAdvertisement_t
Structure for the custom advertisement payload.
Definition: btmgr.h:616
_BTRMGR_ExternalDevice_t
Represents the details of external devices connected.
Definition: btmgr.h:492
BTRMGR_RSSI_NONE
@ BTRMGR_RSSI_NONE
No signal (0 bar)
Definition: btmgr.h:226
_BTRMGR_MediaInfo_t
Represents the media info.
Definition: btmgr.h:534
_BTRMGR_DeviceOpInfo_t
Represents the notification data.
Definition: btmgr.h:557
BTRMGR_DeviceOperationType_t
enum _BTRMGR_DeviceOperationType_t BTRMGR_DeviceOperationType_t
Represents the operation type for bluetooth device.
BTRMGR_GetAdapterPowerStatus
BTRMGR_Result_t BTRMGR_GetAdapterPowerStatus(unsigned char aui8AdapterIdx, unsigned char *pPowerStatus)
This API fetches the power status, either 0 or 1.
Definition: btrMgr.c:2790
BTRMGR_MediaDeviceStatus_t
struct _BTRMGR_MediaDeviceStatus_t BTRMGR_MediaDeviceStatus_t
Represents Media Element List.
BTRMGR_RegisterForCallbacks
BTRMGR_Result_t BTRMGR_RegisterForCallbacks(const char *apcProcessName)
This API registers all the IARM call backs for BTRMGR and Third party Clients.
Definition: btmgr_iarm_external_interface.c:100
_BTRMGR_DevicePower_t
_BTRMGR_DevicePower_t
Represents the bluetooth power states.
Definition: btmgr.h:216
BTRMGR_MediaControl
BTRMGR_Result_t BTRMGR_MediaControl(unsigned char aui8AdapterIdx, BTRMgrDeviceHandle ahBTRMgrDevHdl, BTRMGR_MediaControlCommand_t mediaCtrlCmd)
This API is used to perform the media control operations.
Definition: btrMgr.c:4680
BTRMGR_StartAudioStreamingOut
BTRMGR_Result_t BTRMGR_StartAudioStreamingOut(unsigned char aui8AdapterIdx, BTRMgrDeviceHandle ahBTRMgrDevHdl, BTRMGR_DeviceOperationType_t connectAs)
This API initates the streaming from the device with the selected operation type.
Definition: btrMgr.c:4179
_BTRMGR_Events_t
_BTRMGR_Events_t
Represents the event status.
Definition: btmgr.h:114
_BTRMGR_RSSIValue_type_t
_BTRMGR_RSSIValue_type_t
Represents the bluetooth signal strength.
Definition: btmgr.h:225
BTRMGR_DeviceServiceList_t
struct _BTRMGR_DeviceServiceList_t BTRMGR_DeviceServiceList_t
Represents device services list.
_BTRMGR_DeviceOperationType_t
_BTRMGR_DeviceOperationType_t
Represents the operation type for bluetooth device.
Definition: btmgr.h:205
BTRMGR_StartDeviceDiscovery
BTRMGR_Result_t BTRMGR_StartDeviceDiscovery(unsigned char aui8AdapterIdx, BTRMGR_DeviceOperationType_t aenBTRMgrDevOpT)
This API initiates the scanning process.
Definition: btrMgr.c:3141
BTRMGR_GetLimitBeaconDetection
BTRMGR_Result_t BTRMGR_GetLimitBeaconDetection(unsigned char aui8AdapterIdx, unsigned char *isLimited)
This API Gets Beacon Detection status on the specified bluetooth adapter.
Definition: btrMgr.c:5590
BTRMGR_GattCharFlags_t
enum _BTRMGR_GattCharFlags_t BTRMGR_GattCharFlags_t
Represents Gatt Characteristic Flags.
_BTRMGR_LeUUID_t
Definition: btmgr.h:364
_BTRMGR_PairedDevicesList_t
Represents the list of paired devices.
Definition: btmgr.h:476
_BTRMGR_DiscoveryFilterHandle_t
Definition: btmgr.h:605
BTRMGR_GetNumberOfAdapters
BTRMGR_Result_t BTRMGR_GetNumberOfAdapters(unsigned char *pNumOfAdapters)
This API returns the number of bluetooth adapters available.
Definition: btrMgr.c:2550
_BTRMGR_MediaDeviceStatus_t
Represents Media Element List.
Definition: btmgr.h:525
BTRMGR_DisconnectFromDevice
BTRMGR_Result_t BTRMGR_DisconnectFromDevice(unsigned char aui8AdapterIdx, BTRMgrDeviceHandle ahBTRMgrDevHdl)
This API terminates the current connection.
Definition: btrMgr.c:3674
_BTRMGR_PairedDevices_t
Represents the paired devices information.
Definition: btmgr.h:433
BTRMGR_SelectMediaElement
BTRMGR_Result_t BTRMGR_SelectMediaElement(unsigned char aui8AdapterIdx, BTRMgrDeviceHandle ahBTRMgrDevHdl, BTRMgrMediaElementHandle ahBTRMgrMedElementHdl, BTRMGR_MediaElementType_t aMediaElementType)
This API performs operation based on the element type selected.
Definition: btrMgr.c:5444
_BTRMGR_UUID_t
Definition: btmgr.h:600
BTRMGR_UnRegisterFromCallbacks
BTRMGR_Result_t BTRMGR_UnRegisterFromCallbacks(const char *apcProcessName)
This API Unregisters all the IARM call backs for BTRMGR and Third party Clients.
Definition: btmgr_iarm_external_interface.c:231
BTRMGR_SetMediaElementActive
BTRMGR_Result_t BTRMGR_SetMediaElementActive(unsigned char aui8AdapterIdx, BTRMgrDeviceHandle ahBTRMgrDevHdl, BTRMgrMediaElementHandle ahBTRMgrMedElementHdl, BTRMGR_MediaElementType_t aMediaElementType)
This API sets the mentioned media element list active/in_scope for further operations on it.
Definition: btrMgr.c:5290
_BTRMGR_LeProperty_t
_BTRMGR_LeProperty_t
Represents LE properties.
Definition: btmgr.h:275
_BTRMGR_ConnectedDevicesList_t
Represents the connected devices list.
Definition: btmgr.h:468
BTRMGR_LeCustomAdvertisement_t
struct _BTRMGR_LeCustomAdvertisement_t BTRMGR_LeCustomAdvertisement_t
Structure for the custom advertisement payload.
BTRMGR_StartAudioStreamingOut_StartUp
BTRMGR_Result_t BTRMGR_StartAudioStreamingOut_StartUp(unsigned char aui8AdapterIdx, BTRMGR_DeviceOperationType_t aenBTRMgrDevConT)
This API initates the streaming from the device with default operation type.
Definition: btrMgr.c:4100
BTRMGR_GetAdapterName
BTRMGR_Result_t BTRMGR_GetAdapterName(unsigned char aui8AdapterIdx, char *pNameOfAdapter)
This API fetches the bluetooth adapter name.
Definition: btrMgr.c:2685
BTRMGR_GetDiscoveryStatus
BTRMGR_Result_t BTRMGR_GetDiscoveryStatus(unsigned char aui8AdapterIdx, BTRMGR_DiscoveryStatus_t *aeDiscoveryStatus, BTRMGR_DeviceOperationType_t *aenBTRMgrDevOpT)
This API gives the discovery status.
Definition: btrMgr.c:3195
BTRMGR_StopAudioStreamingIn
BTRMGR_Result_t BTRMGR_StopAudioStreamingIn(unsigned char aui8AdapterIdx, BTRMgrDeviceHandle ahBTRMgrDevHdl)
This API termines the audio streaming.
Definition: btrMgr.c:4530
BTRMGR_StopAudioStreamingOut
BTRMGR_Result_t BTRMGR_StopAudioStreamingOut(unsigned char aui8AdapterIdx, BTRMgrDeviceHandle ahBTRMgrDevHdl)
This API terminates the streaming from the device.
Definition: btrMgr.c:4205
BTRMGR_SetDeviceVolumeMute
BTRMGR_Result_t BTRMGR_SetDeviceVolumeMute(unsigned char aui8AdapterIdx, BTRMgrDeviceHandle ahBTRMgrDevHdl, BTRMGR_DeviceOperationType_t deviceOpType, unsigned char ui8Volume, unsigned char ui8Mute)
This API is used to set the media volume and mute data.
Definition: btrMgr.c:5051
_BTRMGR_EventMessage_t
Represents the event message info.
Definition: btmgr.h:576
_BTRMGR_DiscoveredDevicesList_t
Represents the list of scanned devices.
Definition: btmgr.h:484
BTRMGR_GetDeviceProperties
BTRMGR_Result_t BTRMGR_GetDeviceProperties(unsigned char aui8AdapterIdx, BTRMgrDeviceHandle ahBTRMgrDevHdl, BTRMGR_DevicesProperty_t *pDeviceProperty)
This API returns the device information that includes the device name, mac address,...
Definition: btrMgr.c:3961
BTRMGR_MediaControlCommand_t
enum _BTRMGR_MediaControlCommand_t BTRMGR_MediaControlCommand_t
Represents the commands to control the media files.
BTRMGR_SetLimitBeaconDetection
BTRMGR_Result_t BTRMGR_SetLimitBeaconDetection(unsigned char aui8AdapterIdx, unsigned char isLimited)
This API Sets Beacon Detection status on the specified bluetooth adapter.
Definition: btrMgr.c:5619
BTRMGR_GetConnectedDevices
BTRMGR_Result_t BTRMGR_GetConnectedDevices(unsigned char aui8AdapterIdx, BTRMGR_ConnectedDevicesList_t *pConnectedDevices)
This API returns the list of devices connected.
Definition: btrMgr.c:3845
BTRMGR_SetAdapterPowerStatus
BTRMGR_Result_t BTRMGR_SetAdapterPowerStatus(unsigned char aui8AdapterIdx, unsigned char power_status)
This API sets the bluetooth adapter power to ON/OFF.
Definition: btrMgr.c:2728
BTRMGR_SetAudioInServiceState
BTRMGR_Result_t BTRMGR_SetAudioInServiceState(unsigned char aui8AdapterIdx, unsigned char aui8State)
This API Enable/Disables Audio-In on the specified bluetooth adapter.
Definition: btrMgr.c:5562
BTRMGR_ConnectToDevice
BTRMGR_Result_t BTRMGR_ConnectToDevice(unsigned char aui8AdapterIdx, BTRMgrDeviceHandle ahBTRMgrDevHdl, BTRMGR_DeviceOperationType_t connectAs)
This API connects the device as audio sink/headset/audio src based on the device type specified.
Definition: btrMgr.c:3635
BTRMGR_RSSI_FAIR
@ BTRMGR_RSSI_FAIR
Fair (2 bars)
Definition: btmgr.h:228
BTRMGR_StartAudioStreamingIn
BTRMGR_Result_t BTRMGR_StartAudioStreamingIn(unsigned char aui8AdapterIdx, BTRMgrDeviceHandle ahBTRMgrDevHdl, BTRMGR_DeviceOperationType_t connectAs)
This API starts the audio streaming.
Definition: btrMgr.c:4339
BTRMGR_MediaPositionInfo_t
struct _BTRMGR_MediaPositionInfo_t BTRMGR_MediaPositionInfo_t
Represents the media position info.
BTRMGR_DeviceService_t
struct _BTRMGR_DeviceService_t BTRMGR_DeviceService_t
Represents the supported service of the device.
BTRMGR_ConnectedDevice_t
struct _BTRMGR_ConnectedDevice_t BTRMGR_ConnectedDevice_t
Represents the details of device connected.
BTRMGR_ResetAdapter
BTRMGR_Result_t BTRMGR_ResetAdapter(unsigned char aui8AdapterIdx)
This API is designed to reset the bluetooth adapter.
Definition: btrMgr.c:2589
_BTRMGR_GattCharFlags_t
_BTRMGR_GattCharFlags_t
Represents Gatt Characteristic Flags.
Definition: btmgr.h:302
BTRMGR_DiscoveredDevices_t
struct _BTRMGR_DiscoveredDevices_t BTRMGR_DiscoveredDevices_t
Represents the discovered device's details.
BTRMGR_DevicePower_t
enum _BTRMGR_DevicePower_t BTRMGR_DevicePower_t
Represents the bluetooth power states.
BTRMGR_GetDiscoveredDevices
BTRMGR_Result_t BTRMGR_GetDiscoveredDevices(unsigned char aui8AdapterIdx, BTRMGR_DiscoveredDevicesList_t *pDiscoveredDevices)
This API fetches the list of devices scanned.
Definition: btrMgr.c:3226
_BTRMGR_DevicesProperty_t
Represents the property of the device.
Definition: btmgr.h:400
BTRMGR_EventResponse_t
struct _BTRMGR_EventResponse_t BTRMGR_EventResponse_t
Represents the event response.
BTRMGR_GetPairedDevices
BTRMGR_Result_t BTRMGR_GetPairedDevices(unsigned char aui8AdapterIdx, BTRMGR_PairedDevicesList_t *pPairedDevices)
This API returns the list of devices paired.
Definition: btrMgr.c:3556
BTRMGR_GetDeviceVolumeMute
BTRMGR_Result_t BTRMGR_GetDeviceVolumeMute(unsigned char aui8AdapterIdx, BTRMgrDeviceHandle ahBTRMgrDevHdl, BTRMGR_DeviceOperationType_t deviceOpType, unsigned char *pui8Volume, unsigned char *pui8Mute)
This API is used to fetch the media volume and mute data.
Definition: btrMgr.c:4966
BTRMGR_RSSI_GOOD
@ BTRMGR_RSSI_GOOD
Good (3 bars)
Definition: btmgr.h:229
BTRMGR_GetMediaElementList
BTRMGR_Result_t BTRMGR_GetMediaElementList(unsigned char aui8AdapterIdx, BTRMgrDeviceHandle ahBTRMgrDevHdl, BTRMgrMediaElementHandle ahBTRMgrMedElementHdl, unsigned short aui16MediaElementStartIdx, unsigned short aui16MediaElementEndIdx, unsigned char abMediaElementListDepth, BTRMGR_MediaElementType_t aMediaElementType, BTRMGR_MediaElementListInfo_t *aMediaElementListInfo)
This API gets the media element list.
Definition: btrMgr.c:5362
BTRMGR_LeProperty_t
enum _BTRMGR_LeProperty_t BTRMGR_LeProperty_t
Represents LE properties.
BTRMGR_StopDeviceDiscovery
BTRMGR_Result_t BTRMGR_StopDeviceDiscovery(unsigned char aui8AdapterIdx, BTRMGR_DeviceOperationType_t aenBTRMgrDevOpT)
This API terminates the scanning process.
Definition: btrMgr.c:3169
BTRMGR_GetMediaElementTrackInfo
BTRMGR_Result_t BTRMGR_GetMediaElementTrackInfo(unsigned char aui8AdapterIdx, BTRMgrDeviceHandle ahBTRMgrDevHdl, BTRMgrMediaElementHandle ahBTRMgrMedElementHdl, BTRMGR_MediaTrackInfo_t *mediaTrackInfo)
This API fetches the media track info like title, genre, duration, number of tracks,...
Definition: btrMgr.c:5210
BTRMGR_PairedDevicesList_t
struct _BTRMGR_PairedDevicesList_t BTRMGR_PairedDevicesList_t
Represents the list of paired devices.
BTRMGR_IsAudioStreamingIn
BTRMGR_Result_t BTRMGR_IsAudioStreamingIn(unsigned char aui8AdapterIdx, unsigned char *pStreamingStatus)
This API returns the audio streaming status.
Definition: btrMgr.c:4574
BTRMGR_StreamOut_Type_t
enum _BTRMGR_StreamOut_Type_t BTRMGR_StreamOut_Type_t
Represents the stream output types.
BTRMGR_GetDeviceTypeAsString
const char * BTRMGR_GetDeviceTypeAsString(BTRMGR_DeviceType_t type)
This API fetches the Device name of the media.
Definition: btrMgr.c:5515
_BTRMGR_EventResponse_t
Represents the event response.
Definition: btmgr.h:591
_BTRMGR_DeviceAdServiceData_t
Definition: btmgr.h:391
BTRMGR_RSSI_POOR
@ BTRMGR_RSSI_POOR
Poor (1 bar)
Definition: btmgr.h:227
BTRMGR_SetEventResponse
BTRMGR_Result_t BTRMGR_SetEventResponse(unsigned char aui8AdapterIdx, BTRMGR_EventResponse_t *apstBTRMgrEvtRsp)
This API handles the events received.
Definition: btrMgr.c:4602
_BTRMGR_MediaPositionInfo_t
Represents the media position info.
Definition: btmgr.h:359
BTRMGR_PairedDevices_t
struct _BTRMGR_PairedDevices_t BTRMGR_PairedDevices_t
Represents the paired devices information.
BTRMGR_MediaElementListInfo_t
struct _BTRMGR_MediaElementListInfo_t BTRMGR_MediaElementListInfo_t
Represents Media Element List.
_BTRMGR_ConnectedDevice_t
Represents the details of device connected.
Definition: btmgr.h:418
BTRMGR_SetAudioStreamingOutType
BTRMGR_Result_t BTRMGR_SetAudioStreamingOutType(unsigned char aui8AdapterIdx, BTRMGR_StreamOut_Type_t type)
This API is to set the audio type as primary or secondary.
Definition: btrMgr.c:4287
_BTRMGR_MediaTrackInfo_t
Represents the media track info.
Definition: btmgr.h:346
BTRMGR_LeOp_t
enum _BTRMGR_LeOp_t BTRMGR_LeOp_t
Represents the Low energy operations.
BTRMGR_MediaElementInfo_t
struct _BTRMGR_MediaElementInfo_t BTRMGR_MediaElementInfo_t
Represents Media Element details.
BTRMGR_SetHidGamePadServiceState
BTRMGR_Result_t BTRMGR_SetHidGamePadServiceState(unsigned char aui8AdapterIdx, unsigned char aui8State)
This API Enable/Disables Hid GamePad on the specified bluetooth adapter.
Definition: btrMgr.c:5576
BTRMGR_EventMessage_t
struct _BTRMGR_EventMessage_t BTRMGR_EventMessage_t
Represents the event message info.
BTRMGR_Init
BTRMGR_Result_t BTRMGR_Init(void)
This API initializes the bluetooth manager.
Definition: btrMgr.c:2295
BTRMGR_DiscoveryStatus_t
enum _BTRMGR_DiscoveryStatus_t BTRMGR_DiscoveryStatus_t
Represents the bluetooth Discovery Status.
BTRMGR_IsAudioStreamingOut
BTRMGR_Result_t BTRMGR_IsAudioStreamingOut(unsigned char aui8AdapterIdx, unsigned char *pStreamingStatus)
This API returns the stream out status.
Definition: btrMgr.c:4252
_BTRMGR_DiscoveryStatus_t
_BTRMGR_DiscoveryStatus_t
Represents the bluetooth Discovery Status.
Definition: btmgr.h:236
BTRMGR_MediaElementType_t
enum _BTRMGR_MediaElementType_t BTRMGR_MediaElementType_t
Represents Media Element Types.
BTRMGR_RSSI_EXCELLENT
@ BTRMGR_RSSI_EXCELLENT
Excellent (4 bars)
Definition: btmgr.h:230