just add skeleton request handling
This commit is contained in:
parent
b2fc9cbb62
commit
ffcc9f60f7
@ -12,6 +12,7 @@ struct dc_gateway_;
|
||||
typedef struct dc_gateway_ *dc_gateway_t;
|
||||
|
||||
typedef enum {
|
||||
GATEWAY_OPCODE_EVENT = 0,
|
||||
GATEWAY_OPCODE_PING = 1,
|
||||
GATEWAY_OPCODE_IDENTIFY = 2,
|
||||
GATEWAY_OPCODE_UPDATE = 3,
|
||||
|
@ -228,6 +228,11 @@ static bool dc_gateway_handle_update(dc_gateway_t gw, json_t *d)
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool dc_gateway_handle_event(dc_gateway_t gw, json_t *d)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool dc_gateway_handle_op(dc_gateway_t gw, json_t *j)
|
||||
{
|
||||
json_t *val = NULL;
|
||||
@ -241,6 +246,7 @@ static bool dc_gateway_handle_op(dc_gateway_t gw, json_t *j)
|
||||
return_if_true(val == NULL || !json_is_object(val), false);
|
||||
|
||||
switch (op) {
|
||||
case GATEWAY_OPCODE_EVENT: dc_gateway_handle_event(gw, val); break;
|
||||
case GATEWAY_OPCODE_HELLO: dc_gateway_handle_hello(gw, val); break;
|
||||
case GATEWAY_OPCODE_UPDATE: dc_gateway_handle_update(gw, val); break;
|
||||
case GATEWAY_OPCODE_PONG: break;
|
||||
|
Loading…
Reference in New Issue
Block a user