15 #define MAX_NAME_LENGTH 32
16 #define MAX_DESCRIPTION_LENGTH 255
17 #define MAX_BODY_LENGTH 512
50 "/login [“user_name”] : set the user_name used by client",
56 "/logout : disconnect the client from the server",
62 "/users : get the list of all users that exist on the domain",
68 "/user [“user_uuid”] : get details about the requested user",
74 "/send [“user_uuid”] [“message_body”] :"
75 " send a message to specific user",
81 "/messages [“user_uuid”] : list all messages"
82 " exchanged with the specified user",
88 "/subscribe [“team_uuid”] : subscribe to the events of a team and "
89 "its sub directories (enable reception of all events from a team)",
95 "/subscribed ?[“team_uuid”] : list all subscribed teams"
96 " or list all users subscribed to a team",
102 "/unsubscribe [“team_uuid”] : unsubscribe from a team",
108 "/use ?[“team_uuid”] ?[“channel_uuid”] ?[“thread_uuid”] : "
109 "Sets the command context to a team/channel/thread",
115 "/create : based on the context, create the"
116 " sub resource (see /help create)",
122 "/list : based on the context, list all the sub"
123 "resources (see /help list)",
129 "/info : based on the context, display details of"
130 " the current resource (see /help info)",
void cmd_logout(char **args, void *data, p_packet_t *packet)
struct command_s command_t
void cmd_user(char **args, void *data, p_packet_t *packet)
void cmd_login(char **args, void *data, p_packet_t *packet)
void cmd_send(char **args, void *data, p_packet_t *packet)
void cmd_use(char **args, void *data, p_packet_t *packet)
void cmd_info(char **args, void *data, p_packet_t *packet)
void cmd_unsubscribe(char **args, void *data, p_packet_t *packet)
void cmd_subscribe(char **args, void *data, p_packet_t *packet)
void cmd_users(char **args, void *data, p_packet_t *packet)
void cmd_create(char **args, void *data, p_packet_t *packet)
void cmd_messages(char **args, void *data, p_packet_t *packet)
void cmd_subscribed(char **args, void *data, p_packet_t *packet)
void cmd_help(char **args, void *data, p_packet_t *packet)
void cmd_list(char **args, void *data, p_packet_t *packet)
Definition: commands.h:19
bool need_login
Definition: commands.h:23
char * name
Definition: commands.h:20
char * description
Definition: commands.h:21
void(* func)(char **args, void *data, p_packet_t *packet)
Definition: commands.h:22
Represents a packet with type and data.
Definition: protocol.h:31