PebbleOS
Loading...
Searching...
No Matches
Data Structures | Enumerations | Functions
app_inbox_service.h File Reference
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <applib/app_inbox.h>
#include <pbl/kernel/compiler.h>

Data Structures

struct  AppInboxMessageHeader
 Header preceding each message in the inbox buffer. More...
 

Enumerations

enum  AppInboxServiceTag { AppInboxServiceTagInvalid = -1 , AppInboxServiceTagAppMessageReceiver , NumAppInboxServiceTag }
 Identifies an inbox and the permitted message and dropped handlers for it. More...
 

Functions

void app_inbox_service_init (void)
 Initialize the service, once at boot.
 
bool app_inbox_service_register (uint8_t *storage, size_t storage_size, AppInboxMessageHandler message_handler, AppInboxDroppedHandler dropped_handler, AppInboxServiceTag tag)
 Register an inbox.
 
uint32_t app_inbox_service_unregister_by_storage (uint8_t *storage)
 Unregister the inbox using storage.
 
void app_inbox_service_unregister_all (void)
 Unregister all inboxes.
 
bool app_inbox_service_begin (AppInboxServiceTag tag, size_t required_free_length, void *writer)
 Start writing a message.
 
bool app_inbox_service_write (AppInboxServiceTag tag, const uint8_t *data, size_t length)
 Append data to the message being written.
 
bool app_inbox_service_end (AppInboxServiceTag tag)
 Finish the message being written and notify the app.
 
void app_inbox_service_cancel (AppInboxServiceTag tag)
 Abort the message being written without delivering it.