Webcom C SDK
|
enum | wc_data_msg_type_t { WC_DATA_MSG_ACTION = 1, WC_DATA_MSG_PUSH, WC_DATA_MSG_RESPONSE } |
enum | wc_action_type_t { WC_ACTION_PUT = 1, WC_ACTION_MERGE, WC_ACTION_LISTEN, WC_ACTION_UNLISTEN, WC_ACTION_AUTHENTICATE, WC_ACTION_UNAUTHENTICATE, WC_ACTION_ON_DISCONNECT_PUT, WC_ACTION_ON_DISCONNECT_MERGE, WC_ACTION_ON_DISCONNECT_CANCEL } |
enum | wc_push_type_t { WC_PUSH_AUTH_REVOKED = 1, WC_PUSH_LISTEN_REVOKED, WC_PUSH_DATA_UPDATE_PUT, WC_PUSH_DATA_UPDATE_MERGE } |
enum | wc_ctrl_msg_type_t { WC_CTRL_MSG_HANDSHAKE = 1, WC_CTRL_MSG_CONNECTION_SHUTDOWN } |
enum | wc_msg_type_t { WC_MSG_CTRL = 1, WC_MSG_DATA } |
typedef void * | wc_action_unauth_t |
void | wc_datasync_msg_init (wc_msg_t *msg) |
void | wc_datasync_msg_free (wc_msg_t *msg) |
char * | wc_datasync_msg_to_json_str (wc_msg_t *msg) |
typedef void* wc_action_unauth_t |
enum wc_action_type_t |
enum wc_ctrl_msg_type_t |
enum wc_data_msg_type_t |
enum wc_msg_type_t |
enum wc_push_type_t |
void wc_datasync_msg_free | ( | wc_msg_t * | msg | ) |
frees the memory allocated for a message structure
This function frees every chunk of memory used by this message (strings, JSON fragments, ...). Note: this does not free the space used by the wc_msg_t structure itself, you have to manually free() it after using this function if if was malloc()'ed.
msg | the message structure to be freed |
void wc_datasync_msg_init | ( | wc_msg_t * | msg | ) |
does the internal initialization of a message structure
msg | pointer to the message to initialize |
char* wc_datasync_msg_to_json_str | ( | wc_msg_t * | msg | ) |
makes a JSON string representation of a Webcom message
msg | the webcom message |