Plumbing for promise integration.
This commit is contained in:
@@ -8,6 +8,8 @@
|
||||
#include <stdint.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "promise.h"
|
||||
|
||||
#define COSMO_UUID_SIZE 37
|
||||
|
||||
typedef struct {
|
||||
@@ -32,16 +34,17 @@ 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, json_t *subjects, 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, json_t *subject, json_t *message);
|
||||
void cosmo_subscribe(cosmo *instance, json_t *subjects, const json_int_t messages, const json_int_t last_id, promise *promise_obj);
|
||||
void cosmo_unsubscribe(cosmo *instance, json_t *subject, promise *promise_obj);
|
||||
void cosmo_send_message(cosmo *instance, json_t *subject, json_t *message, promise *promise_obj);
|
||||
|
||||
json_t *cosmo_get_messages(cosmo *instance, json_t *subject);
|
||||
json_t *cosmo_get_last_message(cosmo *instance, json_t *subject);
|
||||
|
||||
// TODO
|
||||
json_t *cosmo_get_pins(cosmo *instance, json_t *subject);
|
||||
void cosmo_pin(cosmo *instance, json_t *subject, json_t *message);
|
||||
void cosmo_unpin(cosmo *instance, json_t *subject, json_t *message);
|
||||
void cosmo_get_profile(cosmo *instance, promise *promise_obj);
|
||||
json_t *cosmo_get_pins(cosmo *instance, json_t *subject, promise *promise_obj);
|
||||
void cosmo_pin(cosmo *instance, json_t *subject, json_t *message, promise *promise_obj);
|
||||
void cosmo_unpin(cosmo *instance, json_t *subject, json_t *message, promise *promise_obj);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user