client-c  0.8.1
kaa_notification_manager.h
Go to the documentation of this file.
1 
17 #ifndef KAA_KAA_NOTIFICATION_H_
18 #define KAA_KAA_NOTIFICATION_H_
19 
20 #include <stdint.h>
21 #include <stdbool.h>
22 #include <stddef.h>
23 
24 #include "kaa_error.h"
26 #include "collections/kaa_list.h"
27 
28 
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 #ifndef KAA_NOTIFICATION_MANAGER_T
35 # define KAA_NOTIFICATION_MANAGER_T
36 
40 #endif
41 
42 
43 
52 kaa_error_t kaa_calculate_topic_listener_id(const kaa_topic_listener_t *listener, uint32_t *listener_id);
53 
63 
74 
86  , uint64_t *topic_id, uint32_t *listener_id);
87 
97 
107 kaa_error_t kaa_remove_optional_notification_listener(kaa_notification_manager_t *self, uint64_t *topic_id, uint32_t *listener_id);
108 
118 kaa_error_t kaa_add_topic_list_listener(kaa_notification_manager_t *self, kaa_topic_listener_t *listener, uint32_t *topic_listener_id);
119 
128 kaa_error_t kaa_remove_topic_list_listener(kaa_notification_manager_t *self, uint32_t *topic_listener_id);
129 
139 
149 kaa_error_t kaa_subscribe_to_topic(kaa_notification_manager_t *self, uint64_t *topic_id, bool force_sync);
150 
161 kaa_error_t kaa_subscribe_to_topics(kaa_notification_manager_t *self, uint64_t *topic_ids, size_t size, bool force_sync);
162 
171 kaa_error_t kaa_unsubscribe_from_topic(kaa_notification_manager_t *self, uint64_t *topic_id, bool force_sync);
172 
183 kaa_error_t kaa_unsubscribe_from_topics(kaa_notification_manager_t *self, uint64_t *topic_ids, size_t size, bool force_sync);
184 
193 
194 #ifdef __cplusplus
195 } /* extern "C" */
196 #endif
197 
198 #endif /* KAA_KAA_NOTIFICATION_H_ */
kaa_error_t kaa_add_notification_listener(kaa_notification_manager_t *self, kaa_notification_listener_t *listener, uint32_t *listener_id)
Adds a mandatory notification listener to receive notifications on mandatory topics.
kaa_error_t kaa_remove_notification_listener(kaa_notification_manager_t *self, uint32_t *listener_id)
Removes the mandatory notification listener.
kaa_error_t kaa_unsubscribe_from_topics(kaa_notification_manager_t *self, uint64_t *topic_ids, size_t size, bool force_sync)
Unsubscribes from the topics.
kaa_error_t kaa_add_topic_list_listener(kaa_notification_manager_t *self, kaa_topic_listener_t *listener, uint32_t *topic_listener_id)
Adds a topic list listener.
kaa_error_t kaa_subscribe_to_topics(kaa_notification_manager_t *self, uint64_t *topic_ids, size_t size, bool force_sync)
Subscribes to the topics.
kaa_error_t
Definition: kaa_error.h:31
struct kaa_list_t kaa_list_t
Definition: kaa_list.h:30
kaa_error_t kaa_subscribe_to_topic(kaa_notification_manager_t *self, uint64_t *topic_id, bool force_sync)
Subscribes to the topic.
Kaa error codes.
kaa_error_t kaa_unsubscribe_from_topic(kaa_notification_manager_t *self, uint64_t *topic_id, bool force_sync)
Unsubscribes from the topic.
struct kaa_notification_manager_t kaa_notification_manager_t
Definition: kaa_context.h:80
kaa_error_t kaa_sync_topic_subscriptions(kaa_notification_manager_t *self)
Sends the sync request to the server.
kaa_error_t kaa_get_topics(kaa_notification_manager_t *self, kaa_list_t **topics)
Retrieves the topic list.
kaa_error_t kaa_calculate_topic_listener_id(const kaa_topic_listener_t *listener, uint32_t *listener_id)
Calculates the topic listener id to manage this topic listener.
kaa_error_t kaa_remove_optional_notification_listener(kaa_notification_manager_t *self, uint64_t *topic_id, uint32_t *listener_id)
Removes the optional notification listener.
kaa_error_t kaa_calculate_notification_listener_id(const kaa_notification_listener_t *listener, uint32_t *listener_id)
Calculates the notification listener id to manage this notification listener.
kaa_error_t kaa_remove_topic_list_listener(kaa_notification_manager_t *self, uint32_t *topic_listener_id)
Removes the topic list listener.
kaa_error_t kaa_add_optional_notification_listener(kaa_notification_manager_t *self, kaa_notification_listener_t *listener, uint64_t *topic_id, uint32_t *listener_id)
Adds an optional notification listener to receive notifications on optional topics.