123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301 |
- extern "C" {
- struct bt_vocs;
- struct bt_vocs_register_param {
-
- uint32_t location;
-
- bool location_writable;
-
- int16_t offset;
-
- char *output_desc;
-
- bool desc_writable;
-
- struct bt_vocs_cb *cb;
- };
- struct bt_vocs_discover_param {
-
- uint16_t start_handle;
-
- uint16_t end_handle;
- };
- struct bt_vocs *bt_vocs_free_instance_get(void);
- void *bt_vocs_svc_decl_get(struct bt_vocs *vocs);
- int bt_vocs_client_conn_get(const struct bt_vocs *vocs, struct bt_conn **conn);
- int bt_vocs_register(struct bt_vocs *vocs,
- const struct bt_vocs_register_param *param);
- typedef void (*bt_vocs_state_cb)(struct bt_vocs *inst, int err, int16_t offset);
- typedef void (*bt_vocs_set_offset_cb)(struct bt_vocs *inst, int err);
- typedef void (*bt_vocs_location_cb)(struct bt_vocs *inst, int err,
- uint32_t location);
- typedef void (*bt_vocs_description_cb)(struct bt_vocs *inst, int err,
- char *description);
- typedef void (*bt_vocs_discover_cb)(struct bt_vocs *inst, int err);
- struct bt_vocs_cb {
- bt_vocs_state_cb state;
- bt_vocs_location_cb location;
- bt_vocs_description_cb description;
-
- bt_vocs_discover_cb discover;
- bt_vocs_set_offset_cb set_offset;
- };
- int bt_vocs_state_get(struct bt_vocs *inst);
- int bt_vocs_state_set(struct bt_vocs *inst, int16_t offset);
- int bt_vocs_location_get(struct bt_vocs *inst);
- int bt_vocs_location_set(struct bt_vocs *inst, uint32_t location);
- int bt_vocs_description_get(struct bt_vocs *inst);
- int bt_vocs_description_set(struct bt_vocs *inst, const char *description);
- void bt_vocs_client_cb_register(struct bt_vocs *inst, struct bt_vocs_cb *cb);
- struct bt_vocs *bt_vocs_client_free_instance_get(void);
- int bt_vocs_discover(struct bt_conn *conn, struct bt_vocs *inst,
- const struct bt_vocs_discover_param *param);
- }
|