Implement subscription tracking, cosmo_unsubscribe()
This commit is contained in:
@@ -15,10 +15,10 @@ typedef struct {
|
||||
pthread_mutex_t lock;
|
||||
pthread_cond_t cond;
|
||||
bool shutdown;
|
||||
json_t *command_queue;
|
||||
uint64_t next_delay_ms;
|
||||
|
||||
char *profile;
|
||||
json_t *command_queue;
|
||||
json_t *subscriptions;
|
||||
uint64_t next_delay_ms;
|
||||
|
||||
pthread_t thread;
|
||||
CURL *curl;
|
||||
@@ -32,11 +32,11 @@ void cosmo_shutdown(cosmo *instance);
|
||||
const char *cosmo_current_profile(cosmo *instance);
|
||||
|
||||
json_t *cosmo_subject(const char *name, const char *readable_only_by, const char *writeable_only_by);
|
||||
void cosmo_subscribe(cosmo *instance, const json_t *subject, const json_int_t messages, const json_int_t last_id);
|
||||
void cosmo_subscribe(cosmo *instance, json_t *subject, const json_int_t messages, const json_int_t last_id);
|
||||
void cosmo_unsubscribe(cosmo *instance, json_t *subject);
|
||||
void cosmo_send_message(cosmo *instance, const json_t *subject, json_t *message);
|
||||
|
||||
// TODO
|
||||
void cosmo_unsubscribe(cosmo *instance, const json_t *subject);
|
||||
json_t *cosmo_get_messages(cosmo *instance, const json_t *subject);
|
||||
json_t *cosmo_get_last_message(cosmo *instance, const json_t *subject);
|
||||
json_t *cosmo_get_pins(cosmo *instance, const json_t *subject);
|
||||
|
||||
Reference in New Issue
Block a user