From fbaaef999ba563838ebd00874ed8a1c01fbf286d Mon Sep 17 00:00:00 2001 From: Wink Saville Date: Thu, 27 May 2010 16:25:37 -0700 Subject: Add protobuf 2.2.0a sources This is the contents of protobuf-2.2.0a.tar.bz2 from http://code.google.com/p/protobuf/downloads/list and is the base code for the javamicro code generator. Change-Id: Ie9a0440a824d615086445b6636944484b3155afa --- examples/addressbook.proto | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 examples/addressbook.proto (limited to 'examples/addressbook.proto') diff --git a/examples/addressbook.proto b/examples/addressbook.proto new file mode 100644 index 0000000..b14829e --- /dev/null +++ b/examples/addressbook.proto @@ -0,0 +1,30 @@ +// See README.txt for information and build instructions. + +package tutorial; + +option java_package = "com.example.tutorial"; +option java_outer_classname = "AddressBookProtos"; + +message Person { + required string name = 1; + required int32 id = 2; // Unique ID number for this person. + optional string email = 3; + + enum PhoneType { + MOBILE = 0; + HOME = 1; + WORK = 2; + } + + message PhoneNumber { + required string number = 1; + optional PhoneType type = 2 [default = HOME]; + } + + repeated PhoneNumber phone = 4; +} + +// Our address book file is just one of these. +message AddressBook { + repeated Person person = 1; +} -- cgit v1.1