23 #ifndef _THRIFT_PROTOCOL_H
24 #define _THRIFT_PROTOCOL_H
100 const int16_t field_id,
int *error);
105 const u_int32_t size,
int *error);
132 const u_int32_t len,
int *error);
149 u_int32_t *size,
int *error);
166 u_int32_t *len,
int *error);
176 return protocol->
ptype;
182 const char *name,
int *error)
213 const int16_t field_id,
237 const u_int32_t size,
int *error)
249 const u_int8_t value,
252 return protocol->
write_bool (protocol, value, error);
259 return protocol->
write_byte (protocol, value, error);
266 return protocol->
write_i16 (protocol, value, error);
273 return protocol->
write_i32 (protocol, value, error);
280 return protocol->
write_i64 (protocol, value, error);
284 const u_int16_t value,
287 return protocol->
write_u16 (protocol, value, error);
291 const u_int32_t value,
294 return protocol->
write_u32 (protocol, value, error);
298 const u_int64_t value,
301 return protocol->
write_u64 (protocol, value, error);
305 const u_int32_t value,
308 return protocol->
write_ipv4 (protocol, value, error);
337 return protocol->
write_binary (protocol, buf, len, error);
344 return protocol->
write_xml (protocol, str, error);
404 u_int32_t *size,
int *error)
406 return protocol->
read_list_begin (protocol, element_type, size, error);
419 return protocol->
read_bool (protocol, value, error);
426 return protocol->
read_byte (protocol, value, error);
433 return protocol->
read_i16 (protocol, value, error);
440 return protocol->
read_i32 (protocol, value, error);
447 return protocol->
read_i64 (protocol, value, error);
454 return protocol->
read_u16 (protocol, value, error);
461 return protocol->
read_u32 (protocol, value, error);
469 return protocol->
read_u64 (protocol, value, error);
476 return protocol->
read_ipv4 (protocol, value, error);
483 return protocol->
read_ipaddr (protocol, value, error);
487 double *value,
int *error)
489 return protocol->
read_double (protocol, value, error);
493 char **str,
int *error)
495 return protocol->
read_string (protocol, str, error);
499 void **buf, u_int32_t *len,
502 return protocol->
read_binary (protocol, buf, len, error);
506 char **str,
int *error)
508 return protocol->
read_xml (protocol, str, error);
514 return protocol->
read_uuid_t (protocol, value, error);
static int32_t thrift_protocol_read_ipv4(ThriftProtocol *protocol, u_int32_t *value, int *error)
int32_t(* read_binary)(struct _ThriftProtocol *protocol, void **buf, u_int32_t *len, int *error)
static int32_t thrift_protocol_write_list_end(ThriftProtocol *protocol, int *error)
ThriftTransport * transport
int32_t(* write_string)(struct _ThriftProtocol *protocol, const char *str, int *error)
int32_t(* write_sandesh_end)(struct _ThriftProtocol *protocol, int *error)
int32_t(* read_sandesh_begin)(struct _ThriftProtocol *protocol, char **name, int *error)
int32_t(* read_struct_end)(struct _ThriftProtocol *protocol, int *error)
static int32_t thrift_protocol_read_string(ThriftProtocol *protocol, char **str, int *error)
unsigned char ct_uuid_t[16]
int32_t(* read_i64)(struct _ThriftProtocol *protocol, int64_t *value, int *error)
static int32_t thrift_protocol_write_u64(ThriftProtocol *protocol, const u_int64_t value, int *error)
static int32_t thrift_protocol_read_uuid_t(ThriftProtocol *protocol, ct_uuid_t *value, int *error)
static int32_t thrift_protocol_write_field_end(ThriftProtocol *protocol, int *error)
static int32_t thrift_protocol_write_u16(ThriftProtocol *protocol, const u_int16_t value, int *error)
static int32_t thrift_protocol_write_double(ThriftProtocol *protocol, const double value, int *error)
int32_t thrift_protocol_skip(ThriftProtocol *protocol, ThriftType type, int *error)
static int32_t thrift_protocol_write_xml(ThriftProtocol *protocol, const char *str, int *error)
static int32_t thrift_protocol_write_struct_begin(ThriftProtocol *protocol, const char *name, int *error)
int32_t(* read_double)(struct _ThriftProtocol *protocol, double *value, int *error)
static int32_t thrift_protocol_write_string(ThriftProtocol *protocol, const char *str, int *error)
int32_t(* read_sandesh_end)(struct _ThriftProtocol *protocol, int *error)
int32_t(* read_list_begin)(struct _ThriftProtocol *protocol, ThriftType *element_type, u_int32_t *size, int *error)
static int32_t thrift_protocol_read_byte(ThriftProtocol *protocol, int8_t *value, int *error)
int32_t(* write_xml)(struct _ThriftProtocol *protocol, const char *str, int *error)
static ThriftProtocolType thrift_protocol_get_type(ThriftProtocol *protocol)
int32_t(* read_string)(struct _ThriftProtocol *protocol, char **str, int *error)
int32_t(* read_xml)(struct _ThriftProtocol *protocol, char **str, int *error)
int32_t(* write_i32)(struct _ThriftProtocol *protocol, const int32_t value, int *error)
static int32_t thrift_protocol_write_i32(ThriftProtocol *protocol, const int32_t value, int *error)
int32_t(* write_field_begin)(struct _ThriftProtocol *protocol, const char *name, const ThriftType field_type, const int16_t field_id, int *error)
static int32_t thrift_protocol_write_u32(ThriftProtocol *protocol, const u_int32_t value, int *error)
int32_t(* read_field_end)(struct _ThriftProtocol *protocol, int *error)
int32_t(* write_i16)(struct _ThriftProtocol *protocol, const int16_t value, int *error)
int32_t(* read_u16)(struct _ThriftProtocol *protocol, u_int16_t *value, int *error)
static int32_t thrift_protocol_read_struct_begin(ThriftProtocol *protocol, char **name, int *error)
int32_t(* write_u64)(struct _ThriftProtocol *protocol, const u_int64_t value, int *error)
static int32_t thrift_protocol_write_ipv4(ThriftProtocol *protocol, const u_int32_t value, int *error)
static int32_t thrift_protocol_read_i16(ThriftProtocol *protocol, int16_t *value, int *error)
static int32_t thrift_protocol_read_u64(ThriftProtocol *protocol, u_int64_t *value, int *error)
int32_t(* write_ipv4)(struct _ThriftProtocol *protocol, const u_int32_t value, int *error)
void thrift_protocol_init(ThriftProtocol *protocol, ThriftProtocolType ptype, ThriftTransport *transport)
static int32_t thrift_protocol_write_byte(ThriftProtocol *protocol, const int8_t value, int *error)
int32_t(* write_sandesh_begin)(struct _ThriftProtocol *protocol, const char *name, int *error)
int32_t(* write_list_begin)(struct _ThriftProtocol *protocol, const ThriftType element_type, const u_int32_t size, int *error)
int32_t(* read_i32)(struct _ThriftProtocol *protocol, int32_t *value, int *error)
int32_t(* write_struct_begin)(struct _ThriftProtocol *protocol, const char *name, int *error)
int32_t(* read_byte)(struct _ThriftProtocol *protocol, int8_t *value, int *error)
static int32_t thrift_protocol_read_field_begin(ThriftProtocol *protocol, char **name, ThriftType *field_type, int16_t *field_id, int *error)
static int32_t thrift_protocol_read_list_begin(ThriftProtocol *protocol, ThriftType *element_type, u_int32_t *size, int *error)
static int32_t thrift_protocol_read_u16(ThriftProtocol *protocol, u_int16_t *value, int *error)
static int32_t thrift_protocol_read_i32(ThriftProtocol *protocol, int32_t *value, int *error)
int32_t(* write_double)(struct _ThriftProtocol *protocol, const double value, int *error)
static int32_t thrift_protocol_read_double(ThriftProtocol *protocol, double *value, int *error)
int32_t(* write_uuid_t)(struct _ThriftProtocol *protocol, const ct_uuid_t value, int *error)
static int32_t thrift_protocol_read_list_end(ThriftProtocol *protocol, int *error)
static int32_t thrift_protocol_read_ipaddr(ThriftProtocol *protocol, ipaddr_t *value, int *error)
static int32_t thrift_protocol_write_field_begin(ThriftProtocol *protocol, const char *name, const ThriftType field_type, const int16_t field_id, int *error)
static int32_t thrift_protocol_write_sandesh_begin(ThriftProtocol *protocol, const char *name, int *error)
int32_t(* read_i16)(struct _ThriftProtocol *protocol, int16_t *value, int *error)
static int32_t thrift_protocol_write_list_begin(ThriftProtocol *protocol, const ThriftType element_type, const u_int32_t size, int *error)
static int32_t thrift_protocol_read_u32(ThriftProtocol *protocol, u_int32_t *value, int *error)
static int32_t thrift_protocol_read_i64(ThriftProtocol *protocol, int64_t *value, int *error)
int32_t(* read_uuid_t)(struct _ThriftProtocol *protocol, ct_uuid_t *value, int *error)
static int32_t thrift_protocol_read_struct_end(ThriftProtocol *protocol, int *error)
static int32_t thrift_protocol_write_uuid_t(ThriftProtocol *protocol, const ct_uuid_t value, int *error)
static int32_t thrift_protocol_write_struct_end(ThriftProtocol *protocol, int *error)
int32_t(* read_struct_begin)(struct _ThriftProtocol *protocol, char **name, int *error)
int32_t(* read_bool)(struct _ThriftProtocol *protocol, u_int8_t *value, int *error)
static int32_t thrift_protocol_write_i64(ThriftProtocol *protocol, const int64_t value, int *error)
static int32_t thrift_protocol_write_sandesh_end(ThriftProtocol *protocol, int *error)
int32_t(* write_u32)(struct _ThriftProtocol *protocol, const u_int32_t value, int *error)
int32_t(* write_binary)(struct _ThriftProtocol *protocol, const void *buf, const u_int32_t len, int *error)
int32_t(* write_u16)(struct _ThriftProtocol *protocol, const u_int16_t value, int *error)
int32_t(* read_ipaddr)(struct _ThriftProtocol *protocol, ipaddr_t *value, int *error)
int32_t(* write_struct_end)(struct _ThriftProtocol *protocol, int *error)
static int32_t thrift_protocol_write_i16(ThriftProtocol *protocol, const int16_t value, int *error)
int32_t(* write_byte)(struct _ThriftProtocol *protocol, const int8_t value, int *error)
static int32_t thrift_protocol_read_binary(ThriftProtocol *protocol, void **buf, u_int32_t *len, int *error)
static int32_t thrift_protocol_read_bool(ThriftProtocol *protocol, u_int8_t *value, int *error)
int32_t(* write_field_end)(struct _ThriftProtocol *protocol, int *error)
static int32_t thrift_protocol_write_bool(ThriftProtocol *protocol, const u_int8_t value, int *error)
int32_t(* write_bool)(struct _ThriftProtocol *protocol, const u_int8_t value, int *error)
int32_t(* read_u32)(struct _ThriftProtocol *protocol, u_int32_t *value, int *error)
static int32_t thrift_protocol_write_field_stop(ThriftProtocol *protocol, int *error)
int32_t(* read_list_end)(struct _ThriftProtocol *protocol, int *error)
int32_t(* write_ipaddr)(struct _ThriftProtocol *protocol, const ipaddr_t *value, int *error)
int32_t(* read_field_begin)(struct _ThriftProtocol *protocol, char **name, ThriftType *field_type, int16_t *field_id, int *error)
static int32_t thrift_protocol_read_field_end(ThriftProtocol *protocol, int *error)
int32_t(* read_ipv4)(struct _ThriftProtocol *protocol, u_int32_t *value, int *error)
int32_t(* write_field_stop)(struct _ThriftProtocol *protocol, int *error)
static int32_t thrift_protocol_write_binary(ThriftProtocol *protocol, const void *buf, const u_int32_t len, int *error)
int32_t(* read_u64)(struct _ThriftProtocol *protocol, u_int64_t *value, int *error)
static int32_t thrift_protocol_read_sandesh_end(ThriftProtocol *protocol, int *error)
int32_t(* write_list_end)(struct _ThriftProtocol *protocol, int *error)
static int32_t thrift_protocol_read_sandesh_begin(ThriftProtocol *protocol, char **name, int *error)
static int32_t thrift_protocol_read_xml(ThriftProtocol *protocol, char **str, int *error)
int32_t(* write_i64)(struct _ThriftProtocol *protocol, const int64_t value, int *error)
static int32_t thrift_protocol_write_ipaddr(ThriftProtocol *protocol, const ipaddr_t *value, int *error)