35 #ifndef __BT_NOTIFY_H__ 36 #define __BT_NOTIFY_H__ 41 #ifdef __MTK_BLE_ONLY_ENABLE__ 42 #include "bt_spp_dummy.h" 187 #define BT_NOTIFY_MIN_RECEIVE_DATA_BUF_SIZE (2*1024 + 1) 188 #define BT_NOTIFY_MIN_PARSER_BUF_SIZE (3*1024) 189 #define BT_NOTIFY_MAX_CHANNEL 1 190 #define BT_NOTIFY_MAX_SENDER_LENGTH 50 191 #define BT_NOTIFY_MAX_PAGE_CONTENT_LENGTH 300 192 #define BT_NOTIFY_MAX_PAGE_TITLE_LENGTH 30 193 #define BT_NOTIFY_MAX_PHONE_NUMBER_LENGTH 20 196 #define BT_NOTIFY_MAX_ACTION_NUM 5 197 #define BT_NOTIFY_MAX_ACTION_NAME_LENGTH 20 198 #define BT_NOTIFY_MAX_ACTION_ID_LENGTH 20 199 #define BT_NOTIFY_MAX_GROUP_ID_LENGTH 30 200 #define BT_NOTIFY_MAX_SENDER_RECEIVER_ID_LENGTH 16 201 #ifdef _ICON_SUPPORT_ 202 #define BT_NOTIFY_MAX_ICON_SIZE 2560 273 #ifdef _ICON_SUPPORT_ 275 uint8_t icon_buffer[BT_NOTIFY_MAX_ICON_SIZE];
277 } bt_notify_data_icon_t;
314 #ifdef _ICON_SUPPORT_ 315 bt_notify_data_icon_t *icon;
uint32_t msg_id
The notification ID.
Definition: bt_notify.h:328
Registration is successful.
Definition: bt_notify.h:374
Define the page structure of the notification received from a remote device.
Definition: bt_notify.h:284
Connection indication event.
Definition: bt_notify.h:229
Invalid event.
Definition: bt_notify.h:228
#define BT_NOTIFY_MAX_SENDER_RECEIVER_ID_LENGTH
The maximum length of the sender ID or the receiver ID.
Definition: bt_notify.h:200
Data received event.
Definition: bt_notify.h:232
bt_notify_data_source_t bt_notify_get_data_source(bt_bd_addr_t *bt_addr)
Call this function to get the data transfer mode.
Define the missed call content received from the remote device.
Definition: bt_notify.h:336
#define BT_NOTIFY_MAX_ACTION_NAME_LENGTH
The maximum length of the action name.
Definition: bt_notify.h:197
Notification parsing error.
Definition: bt_notify.h:367
Define the notification content received from a remote device.
Definition: bt_notify.h:303
#define BT_NOTIFY_MAX_PHONE_NUMBER_LENGTH
The maximum length of the phone number.
Definition: bt_notify.h:193
uint16_t length
The length of the data received from the remote device.
Definition: bt_notify.h:249
uint32_t page_num
The notification's page number.
Definition: bt_notify.h:305
struct page_struct * next
The next page.
Definition: bt_notify.h:287
Data transfer in the DOGP mode.
Definition: bt_notify.h:385
uint32_t msg_id
The notification ID.
Definition: bt_notify.h:313
bt_notify_remote_system_type_t
Define the remote device system type.
Definition: bt_notify.h:257
#define BT_NOTIFY_MAX_GROUP_ID_LENGTH
The maximum length of the group ID field of the notification.
Definition: bt_notify.h:199
uint32_t app_id
The application ID of a remote device.
Definition: bt_notify.h:311
bt_notify_sms_t sms
SMS notification.
Definition: bt_notify.h:355
Data transfer in the SPP mode.
Definition: bt_notify.h:384
The action type to add a new notification.
Definition: bt_notify.h:268
uint32_t missed_call_count
The number of missed calls.
Definition: bt_notify.h:340
void(* bt_notify_callback_t)(void *data)
Defines the callback function type.
Definition: bt_notify.h:222
The command type (DATA, SYNC, ACKY, ACKN, VERN) have already registered in the service,.
Definition: bt_notify.h:371
bt_notify_notification_t notification
Generic notification.
Definition: bt_notify.h:354
bt_notify_data_source_t
This structure defines the data transfer mode, SPP or DOGP mode.
Definition: bt_notify.h:382
SMS notification event.
Definition: bt_notify.h:235
Define the structure for the callback content.
Definition: bt_notify.h:349
bt_notify_result_t
This structure defines the Bluetooth notification service results.
Definition: bt_notify.h:364
Repeated registration from the same sender with the same customized command.
Definition: bt_notify.h:372
Disconnection indication event.
Definition: bt_notify.h:230
uint32_t action_number
The action number.
Definition: bt_notify.h:307
Generic notification.
Definition: bt_notify.h:233
#define BT_NOTIFY_MAX_PAGE_TITLE_LENGTH
The maximum length of the page title.
Definition: bt_notify.h:192
uint32_t msg_id
The notification ID.
Definition: bt_notify.h:339
Success.
Definition: bt_notify.h:375
bt_notify_event_t evt_id
If the event ID is BT_NOTIFY_EVENT_DATA_RECEIVED, read the corresponding event_data field from this s...
Definition: bt_notify.h:350
Not implemented yet.
Definition: bt_notify.h:373
The remote device is an iOS device.
Definition: bt_notify.h:260
int32_t bt_notify_send_data(bt_bd_addr_t *bt_addr, const char *data, uint16_t data_len, bool is_new)
Call this function to send data.
#define BT_NOTIFY_MAX_ACTION_ID_LENGTH
The maximum length of the action ID field.
Definition: bt_notify.h:198
uint32_t timestamp
The timestamp.
Definition: bt_notify.h:310
The remote device is an Android device.
Definition: bt_notify.h:259
void bt_notify_init(uint8_t sdp_id)
This function initializes the Bluetooth notification service.
No available channel.
Definition: bt_notify.h:368
struct page_struct bt_notify_page_content_list_t
Define the page structure of the notification received from a remote device.
The action type to delete a notification.
Definition: bt_notify.h:269
bt_notify_action_type_t action
The action type.
Definition: bt_notify.h:312
uint32_t timestamp
The timestamp.
Definition: bt_notify.h:341
Invalid parameter is given during the registration.
Definition: bt_notify.h:370
bt_bd_addr_t bt_addr
The remote device's Bluetooth address.
Definition: bt_notify.h:352
The event indicating that the data could be sent.
Definition: bt_notify.h:231
Define the SMS content received from a remote device.
Definition: bt_notify.h:324
bt_notify_page_content_list_t * page_content
The message content.
Definition: bt_notify.h:327
#define BT_NOTIFY_MAX_PAGE_CONTENT_LENGTH
The length of the page content.
Definition: bt_notify.h:191
uint8_t bt_bd_addr_t[6]
Address type, defined in Bluetooth core specification version 4.2.
Definition: bt_type.h:180
Not supported.
Definition: bt_notify.h:365
bt_notify_event_t
The structure defines the Bluetooth notification service indication event.
Definition: bt_notify.h:227
Define the structure of the event BT_NOTIFY_EVENT_DATA_RECEIVED.
Definition: bt_notify.h:244
Missed call notification event.
Definition: bt_notify.h:234
uint32_t timestamp
the timestamp.
Definition: bt_notify.h:329
Invalid value.
Definition: bt_notify.h:383
bt_notify_result_t bt_notify_deregister_callback(const bt_bd_addr_t *bt_addr, bt_notify_callback_t cb_ptr)
This function unregisters the callback function that has already been registered. ...
uint16_t content[300]
The page content.
Definition: bt_notify.h:285
Invalid parameter.
Definition: bt_notify.h:366
#define BT_NOTIFY_MIN_RECEIVE_DATA_BUF_SIZE
Define the macros for the maximum and minimum buffer sizes and lengths.
Definition: bt_notify.h:187
bt_notify_event_data_t event_data
Data from remote device.
Definition: bt_notify.h:353
uint16_t title[30]
The page title.
Definition: bt_notify.h:286
int32_t error_code
The error code from the remote device.
Definition: bt_notify.h:247
bt_notify_action_type_t
Define the action type of the notification received from a remote device.
Definition: bt_notify.h:267
#define BT_NOTIFY_MAX_ACTION_NUM
The maximum number of actions.
Definition: bt_notify.h:196
bt_notify_result_t bt_notify_register_callback(const bt_bd_addr_t *bt_addr, char *sender, bt_notify_callback_t cb_ptr)
This function registers a callback function to the Bluetooth notification service.
Define the action content of the notification received from a remote device.
Definition: bt_notify.h:294
Invalid value.
Definition: bt_notify.h:258
#define BT_NOTIFY_MAX_SENDER_LENGTH
The maximum length of the sender field of the notification.
Definition: bt_notify.h:190
bt_notify_page_content_list_t * page_content
The notification's page content.
Definition: bt_notify.h:306
The end of event definition.
Definition: bt_notify.h:236
Failed.
Definition: bt_notify.h:369
bt_notify_missed_call_t missed_call
Missed call notification.
Definition: bt_notify.h:356
bt_notify_remote_system_type_t remote_system
The remote device's OS.
Definition: bt_notify.h:351