Commit e9cfa2dd authored by lahiker42's avatar lahiker42

git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@249 00440858-1255-0410-a3e6-75ea37f81c3a
parent 6c49e55c
......@@ -2,7 +2,9 @@
typedef struct _ProtobufC_ParseResult ProtobufC_ParseResult;
struct _ProtobufC_ParseResult
{
...
const char *message;
const char *filename;
unsigned line_no;
};
struct _ProtobufC_ParserPackage
......@@ -10,6 +12,8 @@ struct _ProtobufC_ParserPackage
char *name;
unsigned n_messages;
ProtobufCMessageDescriptor *message_descriptors;
unsigned n_enums;
ProtobufCEnumDescriptor *enum_descriptors;
};
ProtobufC_Parser *protobuf_c_parser_new (void);
......@@ -31,3 +35,22 @@ ProtobufC_ParserPackage *
const char *package_name,
ProtobufC_ParseResult *error);
void protobuf_c_parser_free (ProtobufC_Parser *parser);
typedef enum
{
PROTOBUF_C_CODEGEN_MODE_H,
PROTOBUF_C_CODEGEN_MODE_C
} ProtobufC_CodegenMode;
struct _ProtobufC_CodegenInfo
{
const char *package_name;
ProtobufC_CodegenMode mode;
const char *output_filename;
};
#define PROTOBUF_C_CODEGEN_INFO_INIT { NULL, PROTOBUF_C_CODEGEN_MODE_H, NULL }
protobuf_c_boolean protobuf_c_parser_codegen(ProtobufC_Parser *parser,
ProtobufC_CodegenInfo *codegen);
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