|
PebbleOS
|
#include <pbl/services/comm_session/session.h>#include <pbl/services/comm_session/session_analytics.h>#include <pbl/util/uuid.h>Data Structures | |
| struct | TransportImplementation |
| Callbacks the session uses to drive its transport. More... | |
Typedefs | |
| typedef struct Transport | Transport |
| Opaque transport context, defined by each transport. | |
| typedef void(* | TransportSendNext) (Transport *transport) |
| Send data enqueued in the session's send queue. | |
| typedef void(* | TransportClose) (Transport *transport) |
| Close the transport. | |
| typedef void(* | TransportReset) (Transport *transport) |
| Reset the transport. | |
| typedef void(* | TransportSetConnectionResponsiveness) (Transport *transport, enum pbl_bt_consumer consumer, enum pbl_bt_response_time_state state, uint16_t max_period_secs, pbl_bt_responsiveness_granted_cb_t granted_handler) |
| Request a connection response time through the Bluetooth connection manager. | |
| typedef const Uuid *(* | TransportGetUUID) (Transport *transport) |
| Get the UUID of the app the transport connects to. | |
| typedef CommSessionTransportType(* | TransportGetType) (Transport *transport) |
| Get the transport type. | |
| typedef bool(* | TransportSchedule) (CommSession *session) |
| Schedule a callback that sends data over the transport. | |
| typedef bool(* | TransportScheduleTask) (Transport *transport) |
| Check whether the current task is the one TransportSchedule runs callbacks on. | |
Enumerations | |
| enum | TransportDestination { TransportDestinationSystem , TransportDestinationApp , TransportDestinationHybrid } |
| Whose traffic a transport carries. More... | |
Functions | |
| CommSession * | comm_session_open (Transport *transport, const TransportImplementation *implementation, TransportDestination destination) |
| Open a session on a transport. | |
| void | comm_session_close (CommSession *session, CommSessionCloseReason reason) |
| Close a session and release its resources. | |
| void | comm_session_receive_router_write (CommSession *session, const uint8_t *data, size_t data_size) |
| Feed received bytes into the session's receive router. | |
| size_t | comm_session_send_queue_get_length (const CommSession *session) |
| Get the total length of all queued outbound data. | |
| size_t | comm_session_send_queue_copy (CommSession *session, uint32_t start_offset, size_t length, uint8_t *data_out) |
| Copy queued outbound data. | |
| size_t | comm_session_send_queue_get_read_pointer (const CommSession *session, const uint8_t **data_out) |
| Get a pointer to the next contiguous chunk of queued data. | |
| void | comm_session_send_queue_consume (CommSession *session, size_t length) |
| Remove sent data from the queue, freeing completed jobs. | |
| void | comm_session_send_next (CommSession *session) |
| Schedule a call to the transport's send_next(). | |