PebbleOS v4.47.0-505-g4bbc630fa
Loading...
Searching...
No Matches
ancs.h File Reference
#include <stddef.h>
#include <stdint.h>
#include <pbl/bluetooth/ancs.h>
#include <pbl/bluetooth/clients/gatt.h>

Data Structures

struct  pbl_bt_ancs_attr_req
 An attribute to ask for. More...
 
struct  pbl_bt_ancs_client_cb
 What a client reports; any may be null. More...
 
struct  pbl_bt_ancs_client
 A client. More...
 

Macros

#define PBL_BT_ANCS_CLIENT_ATTRS_MAX   8
 At most this many attributes in a request.
 
#define PBL_BT_ANCS_CLIENT_DEFINE(_name, _buf_size)
 Define a client.
 

Enumerations

enum  pbl_bt_ancs_source { PBL_BT_ANCS_SOURCE_NOTIFICATION , PBL_BT_ANCS_SOURCE_DATA }
 What the service notifies from. More...
 

Functions

int pbl_bt_ancs_client_start (struct pbl_bt_ancs_client *client, uint16_t conn_handle, const struct pbl_bt_ancs_client_cb *cb)
 Look for the service on a connection.
 
int pbl_bt_ancs_client_rediscover (struct pbl_bt_ancs_client *client)
 Look for the service again, as when the device says its services changed.
 
void pbl_bt_ancs_client_stop (struct pbl_bt_ancs_client *client)
 Forget the service, the connection and the request in progress.
 
int pbl_bt_ancs_client_subscribe (struct pbl_bt_ancs_client *client, enum pbl_bt_ancs_source source, bool enable)
 Subscribe to a source, or unsubscribe.
 
int pbl_bt_ancs_client_get_notif_attrs (struct pbl_bt_ancs_client *client, uint32_t uid, const struct pbl_bt_ancs_attr_req *attrs, uint8_t num_attrs)
 Get attributes of a notification.
 
int pbl_bt_ancs_client_get_app_attrs (struct pbl_bt_ancs_client *client, const void *app_id, size_t app_id_len, const struct pbl_bt_ancs_attr_req *attrs, uint8_t num_attrs)
 Get attributes of an app.
 
int pbl_bt_ancs_client_perform_action (struct pbl_bt_ancs_client *client, uint32_t uid, enum pbl_bt_ancs_action action)
 Perform an action on a notification.
 
void pbl_bt_ancs_client_cancel (struct pbl_bt_ancs_client *client)
 Give up on the request in progress, if any: its outcome is not reported.
 
bool pbl_bt_ancs_client_notify_rx (struct pbl_bt_ancs_client *client, uint16_t conn_handle, uint16_t attr_handle, struct os_mbuf *om)
 Take a notification of a peer if it is of the service of the client.