summaryrefslogtreecommitdiffstats
path: root/generator/nanopb.proto
diff options
context:
space:
mode:
authorPetteri Aimonen <jpa@git.mail.kapsi.fi>2012-10-29 18:55:49 +0200
committerPetteri Aimonen <jpa@git.mail.kapsi.fi>2012-10-29 18:55:49 +0200
commitdb1eefc24bd9d1181dee35683c5fe12329f7d969 (patch)
treecc38ed9ba2fe8ca9b63b1ca9c9077bd9658a0245 /generator/nanopb.proto
parent0ee4bb96b1e53d16a29869864eff87c8934894ae (diff)
Add option to use short names for enum values.
Update issue 38 Status: FixedInGit
Diffstat (limited to 'generator/nanopb.proto')
-rw-r--r--generator/nanopb.proto13
1 files changed, 13 insertions, 0 deletions
diff --git a/generator/nanopb.proto b/generator/nanopb.proto
index e7bea139..e548a137 100644
--- a/generator/nanopb.proto
+++ b/generator/nanopb.proto
@@ -14,9 +14,17 @@ enum FieldType {
}
message NanoPBOptions {
+ // Allocated size for 'bytes' and 'string' fields.
optional int32 max_size = 1;
+
+ // Allocated number of entries in arrays ('repeated' fields)
optional int32 max_count = 2;
+
+ // Force type of field (callback or static allocation)
optional FieldType type = 3 [default = FT_DEFAULT];
+
+ // Use long names for enums, i.e. EnumName_EnumValue.
+ optional bool long_names = 4 [default = true];
}
// Protocol Buffers extension number registry
@@ -35,7 +43,12 @@ extend google.protobuf.MessageOptions {
optional NanoPBOptions nanopb_msgopt = 1010;
}
+extend google.protobuf.EnumOptions {
+ optional NanoPBOptions nanopb_enumopt = 1010;
+}
+
extend google.protobuf.FieldOptions {
optional NanoPBOptions nanopb = 1010;
}
+