Hide cosmo struct definition from the public API.

This commit is contained in:
Ian Gulliver
2015-06-19 22:18:24 +00:00
parent d89d1cc2f6
commit a850c79817
4 changed files with 42 additions and 32 deletions

View File

@@ -17,38 +17,7 @@ typedef struct {
void (*message)(const json_t *, void *);
} cosmo_callbacks;
typedef struct {
char client_id[COSMO_UUID_SIZE];
char instance_id[COSMO_UUID_SIZE];
cosmo_callbacks callbacks;
void *passthrough;
pthread_mutex_t lock;
pthread_cond_t cond;
bool shutdown;
char *profile;
json_t *command_queue;
json_t *ack;
json_t *subscriptions;
uint64_t next_delay_ms;
unsigned int seedp;
enum {
INITIAL_CONNECT,
CONNECTED,
DISCONNECTED,
} connect_state;
struct timespec last_success;
enum {
LOGIN_UNKNOWN,
LOGGED_OUT,
LOGGED_IN,
} login_state;
pthread_t thread;
CURL *curl;
} cosmo;
typedef struct cosmo cosmo;
void cosmo_uuid(char *uuid);