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

Data Structures

struct  pbl_bt_ams_client_cb
 What a client reports; any may be null. More...
 
struct  pbl_bt_ams_client
 A client. More...
 

Macros

#define PBL_BT_AMS_CLIENT_ATTRS_MAX   8
 At most this many attributes in a registration.
 
#define PBL_BT_AMS_CLIENT_DEFINE(_name)
 Define a client.
 

Enumerations

enum  pbl_bt_ams_source { PBL_BT_AMS_SOURCE_REMOTE_COMMAND , PBL_BT_AMS_SOURCE_ENTITY_UPDATE }
 What the service notifies from. More...
 

Functions

int pbl_bt_ams_client_start (struct pbl_bt_ams_client *client, uint16_t conn_handle, const struct pbl_bt_ams_client_cb *cb)
 Look for the service on a connection.
 
int pbl_bt_ams_client_rediscover (struct pbl_bt_ams_client *client)
 Look for the service again, as when the device says its services changed.
 
void pbl_bt_ams_client_stop (struct pbl_bt_ams_client *client)
 Forget the service, the connection and the read in progress.
 
int pbl_bt_ams_client_subscribe (struct pbl_bt_ams_client *client, enum pbl_bt_ams_source source, bool enable)
 Subscribe to a source, or unsubscribe.
 
int pbl_bt_ams_client_send_command (struct pbl_bt_ams_client *client, enum pbl_bt_ams_command command)
 Send a command to the media player.
 
int pbl_bt_ams_client_register (struct pbl_bt_ams_client *client, enum pbl_bt_ams_entity entity, const uint8_t *attrs, uint8_t num_attrs)
 Register for attributes of an entity: their values are told now, and as they change.
 
int pbl_bt_ams_client_read_attr (struct pbl_bt_ams_client *client, enum pbl_bt_ams_entity entity, uint8_t attr)
 Read the whole value of an attribute, as when an update had it cut.
 
bool pbl_bt_ams_client_notify_rx (struct pbl_bt_ams_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.