|
PebbleOS
|
Sending of app Pebble Protocol messages queued in the app outbox. More...
Data Structures |
Enumerations | |
| enum | AppMessageSenderError { AppMessageSenderErrorSuccess = AppOutboxStatusSuccess , AppMessageSenderErrorDisconnected = AppOutboxStatusConsumerDoesNotExist , AppMessageSenderErrorDataTooShort = AppOutboxStatusUserRangeStart , AppMessageSenderErrorEndpointDisallowed , NumAppMessageSenderError } |
Sender status, extending AppOutboxStatus with values in its user range. More... | |
Functions | |
| void | app_message_sender_init (void) |
| Register with the app outbox service; called once at boot. | |
Sending of app Pebble Protocol messages queued in the app outbox.
Glue between the app outbox service and the session send queue; all state is kept by the app outbox service. Only the app message endpoint is allowed.
| struct AppMessageSendJob |
Send job, stored as the consumer_data of the AppOutboxMessage.
Always contained within the AppOutboxMessage.
| Data Fields | ||
|---|---|---|
| size_t | consumed_length | Bytes of header and payload already sent. |
| PebbleProtocolHeader | header | Pebble Protocol header, sent before the payload. |
| SessionSendQueueJob | send_queue_job | Send queue job; must be first. |
| CommSession * | session | Session the message is sent on. |
| struct AppMessageAppOutboxData |
Layout of an outbox message's data, in app memory.
Untrusted: every field is sanitized before use. Must not grow beyond 12 bytes, as apps depend on it.
| Data Fields | ||
|---|---|---|
| uint16_t | endpoint_id | Pebble Protocol endpoint. |
| uint8_t | padding[6] | Reserved. |
| uint8_t | payload[] | Pebble Protocol payload, not empty. |
| CommSession * | session | Session to send on, or NULL to select it from the UUID of the running app. |
Sender status, extending AppOutboxStatus with values in its user range.
| void app_message_sender_init | ( | void | ) |
Register with the app outbox service; called once at boot.