FuriPubSub. More...
Go to the source code of this file.
Typedefs | |
typedef void(* | FuriPubSubCallback) (const void *message, void *context) |
FuriPubSub Callback type. | |
typedef struct FuriPubSub | FuriPubSub |
FuriPubSub type. | |
Functions | |
FuriPubSub * | furi_pubsub_alloc (void) |
Allocate FuriPubSub. | |
void | furi_pubsub_free (FuriPubSub *pubsub) |
Free FuriPubSub. | |
FuriPubSubSubscription * | furi_pubsub_subscribe (FuriPubSub *pubsub, FuriPubSubCallback callback, void *callback_context) |
Subscribe to FuriPubSub. | |
void | furi_pubsub_unsubscribe (FuriPubSub *pubsub, FuriPubSubSubscription *pubsub_subscription) |
Unsubscribe from FuriPubSub. | |
void | furi_pubsub_publish (FuriPubSub *pubsub, void *message) |
Publish message to FuriPubSub. | |
FuriPubSub.
FuriPubSub * furi_pubsub_alloc | ( | void | ) |
Allocate FuriPubSub.
Reentrable, Not threadsafe, one owner
void furi_pubsub_free | ( | FuriPubSub * | pubsub | ) |
Free FuriPubSub.
pubsub | FuriPubSub instance |
void furi_pubsub_publish | ( | FuriPubSub * | pubsub, |
void * | message ) |
Publish message to FuriPubSub.
Threadsafe, Reentrable.
pubsub | pointer to FuriPubSub instance |
message | message pointer to publish |
FuriPubSubSubscription * furi_pubsub_subscribe | ( | FuriPubSub * | pubsub, |
FuriPubSubCallback | callback, | ||
void * | callback_context ) |
Subscribe to FuriPubSub.
Threadsafe, Reentrable
pubsub | pointer to FuriPubSub instance | |
[in] | callback | The callback |
callback_context | The callback context |
void furi_pubsub_unsubscribe | ( | FuriPubSub * | pubsub, |
FuriPubSubSubscription * | pubsub_subscription ) |
Unsubscribe from FuriPubSub.
No use of pubsub_subscription
allowed after call of this method Threadsafe, Reentrable.
pubsub | pointer to FuriPubSub instance |
pubsub_subscription | pointer to FuriPubSubSubscription instance |