mirror of
https://github.com/protobuf-c/protobuf-c.git
synced 2024-12-27 05:11:04 +08:00
13b6e1fd00
Make sure we actually include the proto3 generated header and test nested submessages
41 lines
519 B
Protocol Buffer
41 lines
519 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
package foo;
|
|
|
|
message Person {
|
|
string name = 1;
|
|
int32 id = 2;
|
|
string email = 3;
|
|
|
|
enum PhoneType {
|
|
MOBILE = 0;
|
|
HOME = 1;
|
|
WORK = 2;
|
|
}
|
|
|
|
message PhoneNumber {
|
|
message Comment {
|
|
string comment = 1;
|
|
}
|
|
|
|
string number = 1;
|
|
PhoneType type = 2;
|
|
Comment comment = 3;
|
|
}
|
|
|
|
repeated PhoneNumber phone = 4;
|
|
}
|
|
|
|
message LookupResult
|
|
{
|
|
Person person = 1;
|
|
}
|
|
|
|
message Name {
|
|
string name = 1;
|
|
};
|
|
|
|
service DirLookup {
|
|
rpc ByName (Name) returns (LookupResult);
|
|
}
|