|
Barrelfish
|
Publish/Subscribe client API implementation. More...
Functions | |
| errval_t | oct_subscribe (subscription_handler_fn function, const void *state, subscription_t *id, const char *query,...) |
| Subscribe for a given type of message. More... | |
| errval_t | oct_unsubscribe (subscription_t id) |
| Unsubscribes a subscription. More... | |
| errval_t | oct_publish (const char *record,...) |
| Publishes a record. More... | |
Publish/Subscribe client API implementation.
The individual handler functions are stored in a function table on the client side. The API provides convenience functions for subscribe/ unsubscribe and publish.
| errval_t oct_publish | ( | const char * | record, |
| ... | |||
| ) |
Publishes a record.
| record | The record to publish. |
| ... | Additional arguments to format the record using vsprintf. |
| SYS_ERR_OK | |
| OCT_ERR_PARSER_FAIL | |
| OCT_ERR_ENGINE_FAIL |
| errval_t oct_subscribe | ( | subscription_handler_fn | function, |
| const void * | state, | ||
| subscription_t * | id, | ||
| const char * | query, | ||
| ... | |||
| ) |
Subscribe for a given type of message.
| [in] | function | Handler function in case a matching record is published. |
| [in] | state | State passed on to handler function. |
| [out] | id | Id of the subscription. In case of the value is undefined. |
| query | What type of records you want to subscribe. | |
| ... | Additional arguments to format the record using vsprintf. |
| SYS_ERR_OK | |
| OCT_ERR_MAX_SUBSCRIPTIONS | |
| OCT_ERR_PARSER_FAIL | |
| OCT_ERR_ENGINE_FAIL |
| errval_t oct_unsubscribe | ( | subscription_t | id | ) |
Unsubscribes a subscription.
| id | Id of the subscription (as provided by oct_subscribe). |
| SYS_ERR_OK | |
| OCT_ERR_PARSER_FAIL | |
| OCT_ERR_ENGINE_FAIL |
1.8.11