diff options
author | Joshua Haberman <joshua@reverberate.org> | 2011-02-03 16:02:35 -0800 |
---|---|---|
committer | Joshua Haberman <joshua@reverberate.org> | 2011-02-03 16:02:35 -0800 |
commit | f07cd8ff1d2a5079a7ce3cc571b40c9e209175c9 (patch) | |
tree | a040c23f951328414d9e0160dc1583716292b989 /descriptor/descriptor.h | |
parent | 63daaaca4f750d9c1e88b2b3ca258912d58d4120 (diff) | |
parent | 8465e5e65014ac080d62855f8abfd44acdf7beb2 (diff) |
Merge branch 'src-refactoring'
Diffstat (limited to 'descriptor/descriptor.h')
-rw-r--r-- | descriptor/descriptor.h | 404 |
1 files changed, 14 insertions, 390 deletions
diff --git a/descriptor/descriptor.h b/descriptor/descriptor.h index 8c59624..f6d3ca3 100644 --- a/descriptor/descriptor.h +++ b/descriptor/descriptor.h @@ -1,402 +1,26 @@ -/* This file was generated by upbc (the upb compiler). Do not edit. */ +/* + * upb - a minimalist implementation of protocol buffers. + * + * Copyright (c) 2009 Joshua Haberman. See LICENSE for details. + * + * This file contains declarations for an array that contains the contents + * of descriptor.proto, serialized as a protobuf. xxd is used to create + * the actual definition. + */ -#ifndef DESCRIPTOR_DESCRIPTOR_H -#define DESCRIPTOR_DESCRIPTOR_H +#ifndef UPB_DESCRIPTOR_H_ +#define UPB_DESCRIPTOR_H_ -#include <upb_data.h> +#include "upb_string.h" #ifdef __cplusplus extern "C" { #endif -struct google_protobuf_FileDescriptorSet; -extern struct google_protobuf_FileDescriptorSet *upb_file_descriptor_set; - -/* Forward declarations of all message types. - * So they can refer to each other in possibly-recursive ways. */ - -struct google_protobuf_UninterpretedOption_NamePart; -typedef struct google_protobuf_UninterpretedOption_NamePart - google_protobuf_UninterpretedOption_NamePart; -UPB_DEFINE_MSG_ARRAY(google_protobuf_UninterpretedOption_NamePart) - -struct google_protobuf_DescriptorProto; -typedef struct google_protobuf_DescriptorProto - google_protobuf_DescriptorProto; -UPB_DEFINE_MSG_ARRAY(google_protobuf_DescriptorProto) - -struct google_protobuf_EnumDescriptorProto; -typedef struct google_protobuf_EnumDescriptorProto - google_protobuf_EnumDescriptorProto; -UPB_DEFINE_MSG_ARRAY(google_protobuf_EnumDescriptorProto) - -struct google_protobuf_UninterpretedOption; -typedef struct google_protobuf_UninterpretedOption - google_protobuf_UninterpretedOption; -UPB_DEFINE_MSG_ARRAY(google_protobuf_UninterpretedOption) - -struct google_protobuf_FileDescriptorProto; -typedef struct google_protobuf_FileDescriptorProto - google_protobuf_FileDescriptorProto; -UPB_DEFINE_MSG_ARRAY(google_protobuf_FileDescriptorProto) - -struct google_protobuf_MethodDescriptorProto; -typedef struct google_protobuf_MethodDescriptorProto - google_protobuf_MethodDescriptorProto; -UPB_DEFINE_MSG_ARRAY(google_protobuf_MethodDescriptorProto) - -struct google_protobuf_EnumValueOptions; -typedef struct google_protobuf_EnumValueOptions - google_protobuf_EnumValueOptions; -UPB_DEFINE_MSG_ARRAY(google_protobuf_EnumValueOptions) - -struct google_protobuf_EnumValueDescriptorProto; -typedef struct google_protobuf_EnumValueDescriptorProto - google_protobuf_EnumValueDescriptorProto; -UPB_DEFINE_MSG_ARRAY(google_protobuf_EnumValueDescriptorProto) - -struct google_protobuf_ServiceDescriptorProto; -typedef struct google_protobuf_ServiceDescriptorProto - google_protobuf_ServiceDescriptorProto; -UPB_DEFINE_MSG_ARRAY(google_protobuf_ServiceDescriptorProto) - -struct google_protobuf_FileDescriptorSet; -typedef struct google_protobuf_FileDescriptorSet - google_protobuf_FileDescriptorSet; -UPB_DEFINE_MSG_ARRAY(google_protobuf_FileDescriptorSet) - -struct google_protobuf_DescriptorProto_ExtensionRange; -typedef struct google_protobuf_DescriptorProto_ExtensionRange - google_protobuf_DescriptorProto_ExtensionRange; -UPB_DEFINE_MSG_ARRAY(google_protobuf_DescriptorProto_ExtensionRange) - -struct google_protobuf_FieldOptions; -typedef struct google_protobuf_FieldOptions - google_protobuf_FieldOptions; -UPB_DEFINE_MSG_ARRAY(google_protobuf_FieldOptions) - -struct google_protobuf_FileOptions; -typedef struct google_protobuf_FileOptions - google_protobuf_FileOptions; -UPB_DEFINE_MSG_ARRAY(google_protobuf_FileOptions) - -struct google_protobuf_MessageOptions; -typedef struct google_protobuf_MessageOptions - google_protobuf_MessageOptions; -UPB_DEFINE_MSG_ARRAY(google_protobuf_MessageOptions) - -struct google_protobuf_EnumOptions; -typedef struct google_protobuf_EnumOptions - google_protobuf_EnumOptions; -UPB_DEFINE_MSG_ARRAY(google_protobuf_EnumOptions) - -struct google_protobuf_FieldDescriptorProto; -typedef struct google_protobuf_FieldDescriptorProto - google_protobuf_FieldDescriptorProto; -UPB_DEFINE_MSG_ARRAY(google_protobuf_FieldDescriptorProto) - -struct google_protobuf_ServiceOptions; -typedef struct google_protobuf_ServiceOptions - google_protobuf_ServiceOptions; -UPB_DEFINE_MSG_ARRAY(google_protobuf_ServiceOptions) - -struct google_protobuf_MethodOptions; -typedef struct google_protobuf_MethodOptions - google_protobuf_MethodOptions; -UPB_DEFINE_MSG_ARRAY(google_protobuf_MethodOptions) - -/* The message definitions themselves. */ - -struct google_protobuf_UninterpretedOption_NamePart { - upb_data base; - union { - uint8_t bytes[1]; - struct { - bool name_part:1; /* = 1, required. */ - bool is_extension:1; /* = 2, required. */ - } has; - } set_flags; - upb_strptr name_part; - bool is_extension; -}; - -struct google_protobuf_DescriptorProto { - upb_data base; - union { - uint8_t bytes[1]; - struct { - bool name:1; /* = 1, optional. */ - bool field:1; /* = 2, repeated. */ - bool nested_type:1; /* = 3, repeated. */ - bool enum_type:1; /* = 4, repeated. */ - bool extension_range:1; /* = 5, repeated. */ - bool extension:1; /* = 6, repeated. */ - bool options:1; /* = 7, optional. */ - } has; - } set_flags; - upb_strptr name; - UPB_MSG_ARRAYPTR(google_protobuf_FieldDescriptorProto) field; - UPB_MSG_ARRAYPTR(google_protobuf_DescriptorProto) nested_type; - UPB_MSG_ARRAYPTR(google_protobuf_EnumDescriptorProto) enum_type; - UPB_MSG_ARRAYPTR(google_protobuf_DescriptorProto_ExtensionRange) extension_range; - UPB_MSG_ARRAYPTR(google_protobuf_FieldDescriptorProto) extension; - google_protobuf_MessageOptions* options; -}; - -struct google_protobuf_EnumDescriptorProto { - upb_data base; - union { - uint8_t bytes[1]; - struct { - bool name:1; /* = 1, optional. */ - bool value:1; /* = 2, repeated. */ - bool options:1; /* = 3, optional. */ - } has; - } set_flags; - upb_strptr name; - UPB_MSG_ARRAYPTR(google_protobuf_EnumValueDescriptorProto) value; - google_protobuf_EnumOptions* options; -}; - -struct google_protobuf_UninterpretedOption { - upb_data base; - union { - uint8_t bytes[1]; - struct { - bool name:1; /* = 2, repeated. */ - bool identifier_value:1; /* = 3, optional. */ - bool positive_int_value:1; /* = 4, optional. */ - bool negative_int_value:1; /* = 5, optional. */ - bool double_value:1; /* = 6, optional. */ - bool string_value:1; /* = 7, optional. */ - } has; - } set_flags; - UPB_MSG_ARRAYPTR(google_protobuf_UninterpretedOption_NamePart) name; - upb_strptr identifier_value; - uint64_t positive_int_value; - int64_t negative_int_value; - double double_value; - upb_strptr string_value; -}; - -struct google_protobuf_FileDescriptorProto { - upb_data base; - union { - uint8_t bytes[1]; - struct { - bool name:1; /* = 1, optional. */ - bool package:1; /* = 2, optional. */ - bool dependency:1; /* = 3, repeated. */ - bool message_type:1; /* = 4, repeated. */ - bool enum_type:1; /* = 5, repeated. */ - bool service:1; /* = 6, repeated. */ - bool extension:1; /* = 7, repeated. */ - bool options:1; /* = 8, optional. */ - } has; - } set_flags; - upb_strptr name; - upb_strptr package; - upb_arrayptr dependency; - UPB_MSG_ARRAYPTR(google_protobuf_DescriptorProto) message_type; - UPB_MSG_ARRAYPTR(google_protobuf_EnumDescriptorProto) enum_type; - UPB_MSG_ARRAYPTR(google_protobuf_ServiceDescriptorProto) service; - UPB_MSG_ARRAYPTR(google_protobuf_FieldDescriptorProto) extension; - google_protobuf_FileOptions* options; -}; - -struct google_protobuf_MethodDescriptorProto { - upb_data base; - union { - uint8_t bytes[1]; - struct { - bool name:1; /* = 1, optional. */ - bool input_type:1; /* = 2, optional. */ - bool output_type:1; /* = 3, optional. */ - bool options:1; /* = 4, optional. */ - } has; - } set_flags; - upb_strptr name; - upb_strptr input_type; - upb_strptr output_type; - google_protobuf_MethodOptions* options; -}; - -struct google_protobuf_EnumValueOptions { - upb_data base; - union { - uint8_t bytes[1]; - struct { - bool uninterpreted_option:1; /* = 999, repeated. */ - } has; - } set_flags; - UPB_MSG_ARRAYPTR(google_protobuf_UninterpretedOption) uninterpreted_option; -}; - -struct google_protobuf_EnumValueDescriptorProto { - upb_data base; - union { - uint8_t bytes[1]; - struct { - bool name:1; /* = 1, optional. */ - bool number:1; /* = 2, optional. */ - bool options:1; /* = 3, optional. */ - } has; - } set_flags; - upb_strptr name; - int32_t number; - google_protobuf_EnumValueOptions* options; -}; - -struct google_protobuf_ServiceDescriptorProto { - upb_data base; - union { - uint8_t bytes[1]; - struct { - bool name:1; /* = 1, optional. */ - bool method:1; /* = 2, repeated. */ - bool options:1; /* = 3, optional. */ - } has; - } set_flags; - upb_strptr name; - UPB_MSG_ARRAYPTR(google_protobuf_MethodDescriptorProto) method; - google_protobuf_ServiceOptions* options; -}; - -struct google_protobuf_FileDescriptorSet { - upb_data base; - union { - uint8_t bytes[1]; - struct { - bool file:1; /* = 1, repeated. */ - } has; - } set_flags; - UPB_MSG_ARRAYPTR(google_protobuf_FileDescriptorProto) file; -}; - -struct google_protobuf_DescriptorProto_ExtensionRange { - upb_data base; - union { - uint8_t bytes[1]; - struct { - bool start:1; /* = 1, optional. */ - bool end:1; /* = 2, optional. */ - } has; - } set_flags; - int32_t start; - int32_t end; -}; - -struct google_protobuf_FieldOptions { - upb_data base; - union { - uint8_t bytes[1]; - struct { - bool ctype:1; /* = 1, optional. */ - bool packed:1; /* = 2, optional. */ - bool deprecated:1; /* = 3, optional. */ - bool experimental_map_key:1; /* = 9, optional. */ - bool uninterpreted_option:1; /* = 999, repeated. */ - } has; - } set_flags; - int32_t ctype; - bool packed; - bool deprecated; - upb_strptr experimental_map_key; - UPB_MSG_ARRAYPTR(google_protobuf_UninterpretedOption) uninterpreted_option; -}; - -struct google_protobuf_FileOptions { - upb_data base; - union { - uint8_t bytes[1]; - struct { - bool java_package:1; /* = 1, optional. */ - bool java_outer_classname:1; /* = 8, optional. */ - bool optimize_for:1; /* = 9, optional. */ - bool java_multiple_files:1; /* = 10, optional. */ - bool uninterpreted_option:1; /* = 999, repeated. */ - } has; - } set_flags; - upb_strptr java_package; - upb_strptr java_outer_classname; - int32_t optimize_for; - bool java_multiple_files; - UPB_MSG_ARRAYPTR(google_protobuf_UninterpretedOption) uninterpreted_option; -}; - -struct google_protobuf_MessageOptions { - upb_data base; - union { - uint8_t bytes[1]; - struct { - bool message_set_wire_format:1; /* = 1, optional. */ - bool uninterpreted_option:1; /* = 999, repeated. */ - } has; - } set_flags; - bool message_set_wire_format; - UPB_MSG_ARRAYPTR(google_protobuf_UninterpretedOption) uninterpreted_option; -}; - -struct google_protobuf_EnumOptions { - upb_data base; - union { - uint8_t bytes[1]; - struct { - bool uninterpreted_option:1; /* = 999, repeated. */ - } has; - } set_flags; - UPB_MSG_ARRAYPTR(google_protobuf_UninterpretedOption) uninterpreted_option; -}; - -struct google_protobuf_FieldDescriptorProto { - upb_data base; - union { - uint8_t bytes[1]; - struct { - bool name:1; /* = 1, optional. */ - bool extendee:1; /* = 2, optional. */ - bool number:1; /* = 3, optional. */ - bool label:1; /* = 4, optional. */ - bool type:1; /* = 5, optional. */ - bool type_name:1; /* = 6, optional. */ - bool default_value:1; /* = 7, optional. */ - bool options:1; /* = 8, optional. */ - } has; - } set_flags; - upb_strptr name; - upb_strptr extendee; - int32_t number; - int32_t label; - int32_t type; - upb_strptr type_name; - upb_strptr default_value; - google_protobuf_FieldOptions* options; -}; - -struct google_protobuf_ServiceOptions { - upb_data base; - union { - uint8_t bytes[1]; - struct { - bool uninterpreted_option:1; /* = 999, repeated. */ - } has; - } set_flags; - UPB_MSG_ARRAYPTR(google_protobuf_UninterpretedOption) uninterpreted_option; -}; - -struct google_protobuf_MethodOptions { - upb_data base; - union { - uint8_t bytes[1]; - struct { - bool uninterpreted_option:1; /* = 999, repeated. */ - } has; - } set_flags; - UPB_MSG_ARRAYPTR(google_protobuf_UninterpretedOption) uninterpreted_option; -}; +extern upb_string descriptor_str; #ifdef __cplusplus } /* extern "C" */ #endif -#endif /* DESCRIPTOR_DESCRIPTOR_H */ +#endif /* UPB_DESCRIPTOR_H_ */ |