Loading...
Searching...
No Matches
pubsub.h
Go to the documentation of this file.
1
5#pragma once
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
12typedef void (*FuriPubSubCallback)(const void* message, void* context);
13
15typedef struct FuriPubSub FuriPubSub;
16
19
27
32void furi_pubsub_free(FuriPubSub* pubsub);
33
45 furi_pubsub_subscribe(FuriPubSub* pubsub, FuriPubSubCallback callback, void* callback_context);
46
55void furi_pubsub_unsubscribe(FuriPubSub* pubsub, FuriPubSubSubscription* pubsub_subscription);
56
64void furi_pubsub_publish(FuriPubSub* pubsub, void* message);
65
66#ifdef __cplusplus
67}
68#endif
FuriPubSubSubscription * furi_pubsub_subscribe(FuriPubSub *pubsub, FuriPubSubCallback callback, void *callback_context)
Subscribe to FuriPubSub.
Definition pubsub.c:42
void furi_pubsub_free(FuriPubSub *pubsub)
Free FuriPubSub.
Definition pubsub.c:29
void furi_pubsub_unsubscribe(FuriPubSub *pubsub, FuriPubSubSubscription *pubsub_subscription)
Unsubscribe from FuriPubSub.
Definition pubsub.c:59
FuriPubSub * furi_pubsub_alloc(void)
Allocate FuriPubSub.
Definition pubsub.c:19
void(* FuriPubSubCallback)(const void *message, void *context)
FuriPubSub Callback type.
Definition pubsub.h:12
void furi_pubsub_publish(FuriPubSub *pubsub, void *message)
Publish message to FuriPubSub.
Definition pubsub.c:84
Definition pubsub.c:14
Definition pubsub.c:7