Commit 462a6843 authored by lahiker42's avatar lahiker42

misc progress


git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@116 00440858-1255-0410-a3e6-75ea37f81c3a
parent bc20a9a3
......@@ -23,6 +23,7 @@ protoc_c_LDADD = \
libprotobuf_c_la_SOURCES = \
google/protobuf-c/protobuf-c-dispatch.c \
google/protobuf-c/protobuf-c-data-buffer.c \
google/protobuf-c/protobuf-c-rpc.c \
google/protobuf-c/protobuf-c.c
......
......@@ -22,12 +22,13 @@ struct _ProtobufCDataBuffer
ProtobufCDataBufferFragment *first_frag;
ProtobufCDataBufferFragment *last_frag;
ProtobufCAllocator *allocator;
};
#define PROTOBUF_C_DATA_BUFFER_STATIC_INIT { 0, NULL, NULL }
void protobuf_c_data_buffer_construct (ProtobufCDataBuffer *buffer);
void protobuf_c_data_buffer_init (ProtobufCDataBuffer *buffer,
ProtobufCAllocator *allocator);
void protobuf_c_data_buffer_clear (ProtobufCDataBuffer *buffer);
void protobuf_c_data_buffer_reset (ProtobufCDataBuffer *buffer);
size_t protobuf_c_data_buffer_read (ProtobufCDataBuffer *buffer,
void* data,
......@@ -101,11 +102,11 @@ int protobuf_c_data_buffer_read_in_fd (ProtobufCDataBuffer *
/*
* Scanning the buffer.
*/
ssize_t protobuf_c_data_buffer_index_of (ProtobufCDataBuffer *buffer,
int protobuf_c_data_buffer_index_of (ProtobufCDataBuffer *buffer,
char char_to_find);
ssize_t protobuf_c_data_buffer_str_index_of (ProtobufCDataBuffer *buffer,
int protobuf_c_data_buffer_str_index_of (ProtobufCDataBuffer *buffer,
const char *str_to_find);
ssize_t protobuf_c_data_buffer_polystr_index_of (ProtobufCDataBuffer *buffer,
int protobuf_c_data_buffer_polystr_index_of (ProtobufCDataBuffer *buffer,
char **strings);
/* This deallocates memory used by the buffer-- you are responsible
......
......@@ -17,6 +17,8 @@ typedef enum
ProtobufCDispatch *protobuf_c_dispatch_new (ProtobufCAllocator *allocator);
void protobuf_c_dispatch_free(ProtobufCDispatch *dispatch);
ProtobufCDispatch *protobuf_c_dispatch_default (void);
ProtobufCAllocator *protobuf_c_dispatch_peek_allocator (ProtobufCDispatch *);
typedef void (*ProtobufCDispatchCallback) (int fd,
......
This diff is collapsed.
......@@ -313,6 +313,9 @@ struct _ProtobufCBufferSimple
/* ====== private ====== */
#include "protobuf-c-private.h"
/* TODO: crib from glib */
#define PROTOBUF_C_GNUC_PRINTF(format_argno, ellipsis_argno)
PROTOBUF_C_END_DECLS
#endif /* __PROTOBUF_C_RUNTIME_H_ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment