*/
#include "rbug_internal.h"
-#include "rbug/rbug_context.h"
+#include "rbug_context.h"
int rbug_send_context_list(struct rbug_connection *__con,
uint32_t *__serial)
int rbug_send_context_flush(struct rbug_connection *__con,
rbug_context_t context,
- int32_t flags,
uint32_t *__serial)
{
uint32_t __len = 0;
LEN(8); /* header */
LEN(8); /* context */
- LEN(4); /* flags */
/* align */
PAD(__len, 8);
WRITE(4, int32_t, ((int32_t)RBUG_OP_CONTEXT_FLUSH));
WRITE(4, uint32_t, ((uint32_t)(__len / 4)));
WRITE(8, rbug_context_t, context); /* context */
- WRITE(4, int32_t, flags); /* flags */
/* final pad */
PAD(__pos, 8);
struct rbug_proto_context_list * rbug_demarshal_context_list(struct rbug_proto_header *header)
{
- uint32_t len = 0;
- uint32_t pos = 0;
- uint8_t *data = NULL;
struct rbug_proto_context_list *ret;
if (!header)
return NULL;
- if (header->opcode != (int16_t)RBUG_OP_CONTEXT_LIST)
+ if (header->opcode != (int32_t)RBUG_OP_CONTEXT_LIST)
return NULL;
- pos = 0;
- len = header->length * 4;
- data = (uint8_t*)&header[1];
ret = MALLOC(sizeof(*ret));
if (!ret)
return NULL;
ret->header.__message = header;
ret->header.opcode = header->opcode;
-
return ret;
}
if (!header)
return NULL;
- if (header->opcode != (int16_t)RBUG_OP_CONTEXT_INFO)
+ if (header->opcode != (int32_t)RBUG_OP_CONTEXT_INFO)
return NULL;
pos = 0;
if (!header)
return NULL;
- if (header->opcode != (int16_t)RBUG_OP_CONTEXT_DRAW_BLOCK)
+ if (header->opcode != (int32_t)RBUG_OP_CONTEXT_DRAW_BLOCK)
return NULL;
pos = 0;
if (!header)
return NULL;
- if (header->opcode != (int16_t)RBUG_OP_CONTEXT_DRAW_STEP)
+ if (header->opcode != (int32_t)RBUG_OP_CONTEXT_DRAW_STEP)
return NULL;
pos = 0;
if (!header)
return NULL;
- if (header->opcode != (int16_t)RBUG_OP_CONTEXT_DRAW_UNBLOCK)
+ if (header->opcode != (int32_t)RBUG_OP_CONTEXT_DRAW_UNBLOCK)
return NULL;
pos = 0;
if (!header)
return NULL;
- if (header->opcode != (int16_t)RBUG_OP_CONTEXT_DRAW_RULE)
+ if (header->opcode != (int32_t)RBUG_OP_CONTEXT_DRAW_RULE)
return NULL;
pos = 0;
if (!header)
return NULL;
- if (header->opcode != (int16_t)RBUG_OP_CONTEXT_FLUSH)
+ if (header->opcode != (int32_t)RBUG_OP_CONTEXT_FLUSH)
return NULL;
pos = 0;
ret->header.opcode = header->opcode;
READ(8, rbug_context_t, context); /* context */
- READ(4, int32_t, flags); /* flags */
return ret;
}
if (!header)
return NULL;
- if (header->opcode != (int16_t)RBUG_OP_CONTEXT_LIST_REPLY)
+ if (header->opcode != (int32_t)RBUG_OP_CONTEXT_LIST_REPLY)
return NULL;
pos = 0;
if (!header)
return NULL;
- if (header->opcode != (int16_t)RBUG_OP_CONTEXT_INFO_REPLY)
+ if (header->opcode != (int32_t)RBUG_OP_CONTEXT_INFO_REPLY)
return NULL;
pos = 0;
if (!header)
return NULL;
- if (header->opcode != (int16_t)RBUG_OP_CONTEXT_DRAW_BLOCKED)
+ if (header->opcode != (int32_t)RBUG_OP_CONTEXT_DRAW_BLOCKED)
return NULL;
pos = 0;