http://git-wip-us.apache.org/repos/asf/incubator-wave/blob/b15695b9/pst/src/main/proto/google/protobuf/descriptor.proto
----------------------------------------------------------------------
diff --git a/pst/src/main/proto/google/protobuf/descriptor.proto 
b/pst/src/main/proto/google/protobuf/descriptor.proto
new file mode 100644
index 0000000..a753601
--- /dev/null
+++ b/pst/src/main/proto/google/protobuf/descriptor.proto
@@ -0,0 +1,687 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc.  All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+//     * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+//     * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Author: ken...@google.com (Kenton Varda)
+//  Based on original Protocol Buffers design by
+//  Sanjay Ghemawat, Jeff Dean, and others.
+//
+// The messages in this file describe the definitions found in .proto files.
+// A valid .proto file can be translated directly to a FileDescriptorProto
+// without any other information (e.g. without reading its imports).
+
+
+
+package google.protobuf;
+option java_package = "com.google.protobuf";
+option java_outer_classname = "DescriptorProtos";
+
+// descriptor.proto must be optimized for speed because reflection-based
+// algorithms don't work during bootstrapping.
+option optimize_for = SPEED;
+
+// The protocol compiler can output a FileDescriptorSet containing the .proto
+// files it parses.
+message FileDescriptorSet {
+  repeated FileDescriptorProto file = 1;
+}
+
+// Describes a complete .proto file.
+message FileDescriptorProto {
+  optional string name = 1;       // file name, relative to root of source tree
+  optional string package = 2;    // e.g. "foo", "foo.bar", etc.
+
+  // Names of files imported by this file.
+  repeated string dependency = 3;
+  // Indexes of the public imported files in the dependency list above.
+  repeated int32 public_dependency = 10;
+  // Indexes of the weak imported files in the dependency list.
+  // For Google-internal migration only. Do not use.
+  repeated int32 weak_dependency = 11;
+
+  // All top-level definitions in this file.
+  repeated DescriptorProto message_type = 4;
+  repeated EnumDescriptorProto enum_type = 5;
+  repeated ServiceDescriptorProto service = 6;
+  repeated FieldDescriptorProto extension = 7;
+
+  optional FileOptions options = 8;
+
+  // This field contains optional information about the original source code.
+  // You may safely remove this entire field whithout harming runtime
+  // functionality of the descriptors -- the information is needed only by
+  // development tools.
+  optional SourceCodeInfo source_code_info = 9;
+}
+
+// Describes a message type.
+message DescriptorProto {
+  optional string name = 1;
+
+  repeated FieldDescriptorProto field = 2;
+  repeated FieldDescriptorProto extension = 6;
+
+  repeated DescriptorProto nested_type = 3;
+  repeated EnumDescriptorProto enum_type = 4;
+
+  message ExtensionRange {
+    optional int32 start = 1;
+    optional int32 end = 2;
+  }
+  repeated ExtensionRange extension_range = 5;
+
+  repeated OneofDescriptorProto oneof_decl = 8;
+
+  optional MessageOptions options = 7;
+}
+
+// Describes a field within a message.
+message FieldDescriptorProto {
+  enum Type {
+    // 0 is reserved for errors.
+    // Order is weird for historical reasons.
+    TYPE_DOUBLE         = 1;
+    TYPE_FLOAT          = 2;
+    // Not ZigZag encoded.  Negative numbers take 10 bytes.  Use TYPE_SINT64 if
+    // negative values are likely.
+    TYPE_INT64          = 3;
+    TYPE_UINT64         = 4;
+    // Not ZigZag encoded.  Negative numbers take 10 bytes.  Use TYPE_SINT32 if
+    // negative values are likely.
+    TYPE_INT32          = 5;
+    TYPE_FIXED64        = 6;
+    TYPE_FIXED32        = 7;
+    TYPE_BOOL           = 8;
+    TYPE_STRING         = 9;
+    TYPE_GROUP          = 10;  // Tag-delimited aggregate.
+    TYPE_MESSAGE        = 11;  // Length-delimited aggregate.
+
+    // New in version 2.
+    TYPE_BYTES          = 12;
+    TYPE_UINT32         = 13;
+    TYPE_ENUM           = 14;
+    TYPE_SFIXED32       = 15;
+    TYPE_SFIXED64       = 16;
+    TYPE_SINT32         = 17;  // Uses ZigZag encoding.
+    TYPE_SINT64         = 18;  // Uses ZigZag encoding.
+  };
+
+  enum Label {
+    // 0 is reserved for errors
+    LABEL_OPTIONAL      = 1;
+    LABEL_REQUIRED      = 2;
+    LABEL_REPEATED      = 3;
+    // TODO(sanjay): Should we add LABEL_MAP?
+  };
+
+  optional string name = 1;
+  optional int32 number = 3;
+  optional Label label = 4;
+
+  // If type_name is set, this need not be set.  If both this and type_name
+  // are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
+  optional Type type = 5;
+
+  // For message and enum types, this is the name of the type.  If the name
+  // starts with a '.', it is fully-qualified.  Otherwise, C++-like scoping
+  // rules are used to find the type (i.e. first the nested types within this
+  // message are searched, then within the parent, on up to the root
+  // namespace).
+  optional string type_name = 6;
+
+  // For extensions, this is the name of the type being extended.  It is
+  // resolved in the same manner as type_name.
+  optional string extendee = 2;
+
+  // For numeric types, contains the original text representation of the value.
+  // For booleans, "true" or "false".
+  // For strings, contains the default text contents (not escaped in any way).
+  // For bytes, contains the C escaped value.  All bytes >= 128 are escaped.
+  // TODO(kenton):  Base-64 encode?
+  optional string default_value = 7;
+
+  // If set, gives the index of a oneof in the containing type's oneof_decl
+  // list.  This field is a member of that oneof.  Extensions of a oneof should
+  // not set this since the oneof to which they belong will be inferred based
+  // on the extension range containing the extension's field number.
+  optional int32 oneof_index = 9;
+
+  optional FieldOptions options = 8;
+}
+
+// Describes a oneof.
+message OneofDescriptorProto {
+  optional string name = 1;
+}
+
+// Describes an enum type.
+message EnumDescriptorProto {
+  optional string name = 1;
+
+  repeated EnumValueDescriptorProto value = 2;
+
+  optional EnumOptions options = 3;
+}
+
+// Describes a value within an enum.
+message EnumValueDescriptorProto {
+  optional string name = 1;
+  optional int32 number = 2;
+
+  optional EnumValueOptions options = 3;
+}
+
+// Describes a service.
+message ServiceDescriptorProto {
+  optional string name = 1;
+  repeated MethodDescriptorProto method = 2;
+
+  optional ServiceOptions options = 3;
+}
+
+// Describes a method of a service.
+message MethodDescriptorProto {
+  optional string name = 1;
+
+  // Input and output type names.  These are resolved in the same way as
+  // FieldDescriptorProto.type_name, but must refer to a message type.
+  optional string input_type = 2;
+  optional string output_type = 3;
+
+  optional MethodOptions options = 4;
+}
+
+
+// ===================================================================
+// Options
+
+// Each of the definitions above may have "options" attached.  These are
+// just annotations which may cause code to be generated slightly differently
+// or may contain hints for code that manipulates protocol messages.
+//
+// Clients may define custom options as extensions of the *Options messages.
+// These extensions may not yet be known at parsing time, so the parser cannot
+// store the values in them.  Instead it stores them in a field in the *Options
+// message called uninterpreted_option. This field must have the same name
+// across all *Options messages. We then use this field to populate the
+// extensions when we build a descriptor, at which point all protos have been
+// parsed and so all extensions are known.
+//
+// Extension numbers for custom options may be chosen as follows:
+// * For options which will only be used within a single application or
+//   organization, or for experimental options, use field numbers 50000
+//   through 99999.  It is up to you to ensure that you do not use the
+//   same number for multiple options.
+// * For options which will be published and used publicly by multiple
+//   independent entities, e-mail protobuf-global-extension-regis...@google.com
+//   to reserve extension numbers. Simply provide your project name (e.g.
+//   Object-C plugin) and your porject website (if available) -- there's no 
need
+//   to explain how you intend to use them. Usually you only need one extension
+//   number. You can declare multiple options with only one extension number by
+//   putting them in a sub-message. See the Custom Options section of the docs
+//   for examples:
+//   https://developers.google.com/protocol-buffers/docs/proto#options
+//   If this turns out to be popular, a web service will be set up
+//   to automatically assign option numbers.
+
+
+message FileOptions {
+
+  // Sets the Java package where classes generated from this .proto will be
+  // placed.  By default, the proto package is used, but this is often
+  // inappropriate because proto packages do not normally start with backwards
+  // domain names.
+  optional string java_package = 1;
+
+
+  // If set, all the classes from the .proto file are wrapped in a single
+  // outer class with the given name.  This applies to both Proto1
+  // (equivalent to the old "--one_java_file" option) and Proto2 (where
+  // a .proto always translates to a single class, but you may want to
+  // explicitly choose the class name).
+  optional string java_outer_classname = 8;
+
+  // If set true, then the Java code generator will generate a separate .java
+  // file for each top-level message, enum, and service defined in the .proto
+  // file.  Thus, these types will *not* be nested inside the outer class
+  // named by java_outer_classname.  However, the outer class will still be
+  // generated to contain the file's getDescriptor() method as well as any
+  // top-level extensions defined in the file.
+  optional bool java_multiple_files = 10 [default=false];
+
+  // If set true, then the Java code generator will generate equals() and
+  // hashCode() methods for all messages defined in the .proto file.
+  // - In the full runtime, this is purely a speed optimization, as the
+  // AbstractMessage base class includes reflection-based implementations of
+  // these methods.
+  //- In the lite runtime, setting this option changes the semantics of
+  // equals() and hashCode() to more closely match those of the full runtime;
+  // the generated methods compute their results based on field values rather
+  // than object identity. (Implementations should not assume that hashcodes
+  // will be consistent across runtimes or versions of the protocol compiler.)
+  optional bool java_generate_equals_and_hash = 20 [default=false];
+
+  // If set true, then the Java2 code generator will generate code that
+  // throws an exception whenever an attempt is made to assign a non-UTF-8
+  // byte sequence to a string field.
+  // Message reflection will do the same.
+  // However, an extension field still accepts non-UTF-8 byte sequences.
+  // This option has no effect on when used with the lite runtime.
+  optional bool java_string_check_utf8 = 27 [default=false];
+
+
+  // Generated classes can be optimized for speed or code size.
+  enum OptimizeMode {
+    SPEED = 1;        // Generate complete code for parsing, serialization,
+                      // etc.
+    CODE_SIZE = 2;    // Use ReflectionOps to implement these methods.
+    LITE_RUNTIME = 3; // Generate code using MessageLite and the lite runtime.
+  }
+  optional OptimizeMode optimize_for = 9 [default=SPEED];
+
+  // Sets the Go package where structs generated from this .proto will be
+  // placed.  There is no default.
+  optional string go_package = 11;
+
+
+
+  // Should generic services be generated in each language?  "Generic" services
+  // are not specific to any particular RPC system.  They are generated by the
+  // main code generators in each language (without additional plugins).
+  // Generic services were the only kind of service generation supported by
+  // early versions of proto2.
+  //
+  // Generic services are now considered deprecated in favor of using plugins
+  // that generate code specific to your particular RPC system.  Therefore,
+  // these default to false.  Old code which depends on generic services should
+  // explicitly set them to true.
+  optional bool cc_generic_services = 16 [default=false];
+  optional bool java_generic_services = 17 [default=false];
+  optional bool py_generic_services = 18 [default=false];
+
+  // Is this file deprecated?
+  // Depending on the target platform, this can emit Deprecated annotations
+  // for everything in the file, or it will be completely ignored; in the very
+  // least, this is a formalization for deprecating files.
+  optional bool deprecated = 23 [default=false];
+
+
+  // The parser stores options it doesn't recognize here. See above.
+  repeated UninterpretedOption uninterpreted_option = 999;
+
+  // Clients can define custom options in extensions of this message. See 
above.
+  extensions 1000 to max;
+}
+
+message MessageOptions {
+  // Set true to use the old proto1 MessageSet wire format for extensions.
+  // This is provided for backwards-compatibility with the MessageSet wire
+  // format.  You should not use this for any other reason:  It's less
+  // efficient, has fewer features, and is more complicated.
+  //
+  // The message must be defined exactly as follows:
+  //   message Foo {
+  //     option message_set_wire_format = true;
+  //     extensions 4 to max;
+  //   }
+  // Note that the message cannot have any defined fields; MessageSets only
+  // have extensions.
+  //
+  // All extensions of your type must be singular messages; e.g. they cannot
+  // be int32s, enums, or repeated messages.
+  //
+  // Because this is an option, the above two restrictions are not enforced by
+  // the protocol compiler.
+  optional bool message_set_wire_format = 1 [default=false];
+
+  // Disables the generation of the standard "descriptor()" accessor, which can
+  // conflict with a field of the same name.  This is meant to make migration
+  // from proto1 easier; new code should avoid fields named "descriptor".
+  optional bool no_standard_descriptor_accessor = 2 [default=false];
+
+  // Is this message deprecated?
+  // Depending on the target platform, this can emit Deprecated annotations
+  // for the message, or it will be completely ignored; in the very least,
+  // this is a formalization for deprecating messages.
+  optional bool deprecated = 3 [default=false];
+
+  // The parser stores options it doesn't recognize here. See above.
+  repeated UninterpretedOption uninterpreted_option = 999;
+
+  // Clients can define custom options in extensions of this message. See 
above.
+  extensions 1000 to max;
+}
+
+message FieldOptions {
+  // The ctype option instructs the C++ code generator to use a different
+  // representation of the field than it normally would.  See the specific
+  // options below.  This option is not yet implemented in the open source
+  // release -- sorry, we'll try to include it in a future version!
+  optional CType ctype = 1 [default = STRING];
+  enum CType {
+    // Default mode.
+    STRING = 0;
+
+    CORD = 1;
+
+    STRING_PIECE = 2;
+  }
+  // The packed option can be enabled for repeated primitive fields to enable
+  // a more efficient representation on the wire. Rather than repeatedly
+  // writing the tag and type for each element, the entire array is encoded as
+  // a single length-delimited blob.
+  optional bool packed = 2;
+
+
+
+  // Should this field be parsed lazily?  Lazy applies only to message-type
+  // fields.  It means that when the outer message is initially parsed, the
+  // inner message's contents will not be parsed but instead stored in encoded
+  // form.  The inner message will actually be parsed when it is first 
accessed.
+  //
+  // This is only a hint.  Implementations are free to choose whether to use
+  // eager or lazy parsing regardless of the value of this option.  However,
+  // setting this option true suggests that the protocol author believes that
+  // using lazy parsing on this field is worth the additional bookkeeping
+  // overhead typically needed to implement it.
+  //
+  // This option does not affect the public interface of any generated code;
+  // all method signatures remain the same.  Furthermore, thread-safety of the
+  // interface is not affected by this option; const methods remain safe to
+  // call from multiple threads concurrently, while non-const methods continue
+  // to require exclusive access.
+  //
+  //
+  // Note that implementations may choose not to check required fields within
+  // a lazy sub-message.  That is, calling IsInitialized() on the outher 
message
+  // may return true even if the inner message has missing required fields.
+  // This is necessary because otherwise the inner message would have to be
+  // parsed in order to perform the check, defeating the purpose of lazy
+  // parsing.  An implementation which chooses not to check required fields
+  // must be consistent about it.  That is, for any particular sub-message, the
+  // implementation must either *always* check its required fields, or *never*
+  // check its required fields, regardless of whether or not the message has
+  // been parsed.
+  optional bool lazy = 5 [default=false];
+
+  // Is this field deprecated?
+  // Depending on the target platform, this can emit Deprecated annotations
+  // for accessors, or it will be completely ignored; in the very least, this
+  // is a formalization for deprecating fields.
+  optional bool deprecated = 3 [default=false];
+
+  // EXPERIMENTAL.  DO NOT USE.
+  // For "map" fields, the name of the field in the enclosed type that
+  // is the key for this map.  For example, suppose we have:
+  //   message Item {
+  //     required string name = 1;
+  //     required string value = 2;
+  //   }
+  //   message Config {
+  //     repeated Item items = 1 [experimental_map_key="name"];
+  //   }
+  // In this situation, the map key for Item will be set to "name".
+  // TODO: Fully-implement this, then remove the "experimental_" prefix.
+  optional string experimental_map_key = 9;
+
+  // For Google-internal migration only. Do not use.
+  optional bool weak = 10 [default=false];
+
+
+
+  // The parser stores options it doesn't recognize here. See above.
+  repeated UninterpretedOption uninterpreted_option = 999;
+
+  // Clients can define custom options in extensions of this message. See 
above.
+  extensions 1000 to max;
+}
+
+message EnumOptions {
+
+  // Set this option to true to allow mapping different tag names to the same
+  // value.
+  optional bool allow_alias = 2;
+
+  // Is this enum deprecated?
+  // Depending on the target platform, this can emit Deprecated annotations
+  // for the enum, or it will be completely ignored; in the very least, this
+  // is a formalization for deprecating enums.
+  optional bool deprecated = 3 [default=false];
+
+  // The parser stores options it doesn't recognize here. See above.
+  repeated UninterpretedOption uninterpreted_option = 999;
+
+  // Clients can define custom options in extensions of this message. See 
above.
+  extensions 1000 to max;
+}
+
+message EnumValueOptions {
+  // Is this enum value deprecated?
+  // Depending on the target platform, this can emit Deprecated annotations
+  // for the enum value, or it will be completely ignored; in the very least,
+  // this is a formalization for deprecating enum values.
+  optional bool deprecated = 1 [default=false];
+
+  // The parser stores options it doesn't recognize here. See above.
+  repeated UninterpretedOption uninterpreted_option = 999;
+
+  // Clients can define custom options in extensions of this message. See 
above.
+  extensions 1000 to max;
+}
+
+message ServiceOptions {
+
+  // Note:  Field numbers 1 through 32 are reserved for Google's internal RPC
+  //   framework.  We apologize for hoarding these numbers to ourselves, but
+  //   we were already using them long before we decided to release Protocol
+  //   Buffers.
+
+  // Is this service deprecated?
+  // Depending on the target platform, this can emit Deprecated annotations
+  // for the service, or it will be completely ignored; in the very least,
+  // this is a formalization for deprecating services.
+  optional bool deprecated = 33 [default=false];
+
+  // The parser stores options it doesn't recognize here. See above.
+  repeated UninterpretedOption uninterpreted_option = 999;
+
+  // Clients can define custom options in extensions of this message. See 
above.
+  extensions 1000 to max;
+}
+
+message MethodOptions {
+
+  // Note:  Field numbers 1 through 32 are reserved for Google's internal RPC
+  //   framework.  We apologize for hoarding these numbers to ourselves, but
+  //   we were already using them long before we decided to release Protocol
+  //   Buffers.
+
+  // Is this method deprecated?
+  // Depending on the target platform, this can emit Deprecated annotations
+  // for the method, or it will be completely ignored; in the very least,
+  // this is a formalization for deprecating methods.
+  optional bool deprecated = 33 [default=false];
+
+  // The parser stores options it doesn't recognize here. See above.
+  repeated UninterpretedOption uninterpreted_option = 999;
+
+  // Clients can define custom options in extensions of this message. See 
above.
+  extensions 1000 to max;
+}
+
+
+// A message representing a option the parser does not recognize. This only
+// appears in options protos created by the compiler::Parser class.
+// DescriptorPool resolves these when building Descriptor objects. Therefore,
+// options protos in descriptor objects (e.g. returned by 
Descriptor::options(),
+// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions
+// in them.
+message UninterpretedOption {
+  // The name of the uninterpreted option.  Each string represents a segment in
+  // a dot-separated name.  is_extension is true iff a segment represents an
+  // extension (denoted with parentheses in options specs in .proto files).
+  // E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents
+  // "foo.(bar.baz).qux".
+  message NamePart {
+    required string name_part = 1;
+    required bool is_extension = 2;
+  }
+  repeated NamePart name = 2;
+
+  // The value of the uninterpreted option, in whatever type the tokenizer
+  // identified it as during parsing. Exactly one of these should be set.
+  optional string identifier_value = 3;
+  optional uint64 positive_int_value = 4;
+  optional int64 negative_int_value = 5;
+  optional double double_value = 6;
+  optional bytes string_value = 7;
+  optional string aggregate_value = 8;
+}
+
+// ===================================================================
+// Optional source code info
+
+// Encapsulates information about the original source file from which a
+// FileDescriptorProto was generated.
+message SourceCodeInfo {
+  // A Location identifies a piece of source code in a .proto file which
+  // corresponds to a particular definition.  This information is intended
+  // to be useful to IDEs, code indexers, documentation generators, and similar
+  // tools.
+  //
+  // For example, say we have a file like:
+  //   message Foo {
+  //     optional string foo = 1;
+  //   }
+  // Let's look at just the field definition:
+  //   optional string foo = 1;
+  //   ^       ^^     ^^  ^  ^^^
+  //   a       bc     de  f  ghi
+  // We have the following locations:
+  //   span   path               represents
+  //   [a,i)  [ 4, 0, 2, 0 ]     The whole field definition.
+  //   [a,b)  [ 4, 0, 2, 0, 4 ]  The label (optional).
+  //   [c,d)  [ 4, 0, 2, 0, 5 ]  The type (string).
+  //   [e,f)  [ 4, 0, 2, 0, 1 ]  The name (foo).
+  //   [g,h)  [ 4, 0, 2, 0, 3 ]  The number (1).
+  //
+  // Notes:
+  // - A location may refer to a repeated field itself (i.e. not to any
+  //   particular index within it).  This is used whenever a set of elements 
are
+  //   logically enclosed in a single code segment.  For example, an entire
+  //   extend block (possibly containing multiple extension definitions) will
+  //   have an outer location whose path refers to the "extensions" repeated
+  //   field without an index.
+  // - Multiple locations may have the same path.  This happens when a single
+  //   logical declaration is spread out across multiple places.  The most
+  //   obvious example is the "extend" block again -- there may be multiple
+  //   extend blocks in the same scope, each of which will have the same path.
+  // - A location's span is not always a subset of its parent's span.  For
+  //   example, the "extendee" of an extension declaration appears at the
+  //   beginning of the "extend" block and is shared by all extensions within
+  //   the block.
+  // - Just because a location's span is a subset of some other location's span
+  //   does not mean that it is a descendent.  For example, a "group" defines
+  //   both a type and a field in a single declaration.  Thus, the locations
+  //   corresponding to the type and field and their components will overlap.
+  // - Code which tries to interpret locations should probably be designed to
+  //   ignore those that it doesn't understand, as more types of locations 
could
+  //   be recorded in the future.
+  repeated Location location = 1;
+  message Location {
+    // Identifies which part of the FileDescriptorProto was defined at this
+    // location.
+    //
+    // Each element is a field number or an index.  They form a path from
+    // the root FileDescriptorProto to the place where the definition.  For
+    // example, this path:
+    //   [ 4, 3, 2, 7, 1 ]
+    // refers to:
+    //   file.message_type(3)  // 4, 3
+    //       .field(7)         // 2, 7
+    //       .name()           // 1
+    // This is because FileDescriptorProto.message_type has field number 4:
+    //   repeated DescriptorProto message_type = 4;
+    // and DescriptorProto.field has field number 2:
+    //   repeated FieldDescriptorProto field = 2;
+    // and FieldDescriptorProto.name has field number 1:
+    //   optional string name = 1;
+    //
+    // Thus, the above path gives the location of a field name.  If we removed
+    // the last element:
+    //   [ 4, 3, 2, 7 ]
+    // this path refers to the whole field declaration (from the beginning
+    // of the label to the terminating semicolon).
+    repeated int32 path = 1 [packed=true];
+
+    // Always has exactly three or four elements: start line, start column,
+    // end line (optional, otherwise assumed same as start line), end column.
+    // These are packed into a single field for efficiency.  Note that line
+    // and column numbers are zero-based -- typically you will want to add
+    // 1 to each before displaying to a user.
+    repeated int32 span = 2 [packed=true];
+
+    // If this SourceCodeInfo represents a complete declaration, these are any
+    // comments appearing before and after the declaration which appear to be
+    // attached to the declaration.
+    //
+    // A series of line comments appearing on consecutive lines, with no other
+    // tokens appearing on those lines, will be treated as a single comment.
+    //
+    // Only the comment content is provided; comment markers (e.g. //) are
+    // stripped out.  For block comments, leading whitespace and an asterisk
+    // will be stripped from the beginning of each line other than the first.
+    // Newlines are included in the output.
+    //
+    // Examples:
+    //
+    //   optional int32 foo = 1;  // Comment attached to foo.
+    //   // Comment attached to bar.
+    //   optional int32 bar = 2;
+    //
+    //   optional string baz = 3;
+    //   // Comment attached to baz.
+    //   // Another line attached to baz.
+    //
+    //   // Comment attached to qux.
+    //   //
+    //   // Another line attached to qux.
+    //   optional double qux = 4;
+    //
+    //   optional string corge = 5;
+    //   /* Block comment attached
+    //    * to corge.  Leading asterisks
+    //    * will be removed. */
+    //   /* Block comment attached to
+    //    * grault. */
+    //   optional int32 grault = 6;
+    optional string leading_comments = 3;
+    optional string trailing_comments = 4;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-wave/blob/b15695b9/pst/src/main/proto/org/apache/wave/pst/protobuf/extensions.proto
----------------------------------------------------------------------
diff --git a/pst/src/main/proto/org/apache/wave/pst/protobuf/extensions.proto 
b/pst/src/main/proto/org/apache/wave/pst/protobuf/extensions.proto
new file mode 100644
index 0000000..d9b8e9a
--- /dev/null
+++ b/pst/src/main/proto/org/apache/wave/pst/protobuf/extensions.proto
@@ -0,0 +1,34 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+syntax = "proto2";
+
+import "google/protobuf/descriptor.proto";
+
+option java_package = "org.apache.wave.pst.protobuf";
+option java_outer_classname = "Extensions";
+
+extend google.protobuf.FieldOptions {
+  // Annotates an int64, noting that only the lower 52 bits are important.
+  // This allows languages without 64-bit primitives (like JavaScript) to use
+  // other primtive types instead.
+  //
+  // Annotation ids are apparently meant to be globally unique.  Not sure why,
+  // given that proto names and field ids do not have to be globally unique.
+  // If it becomes an issue, get a unique number from the number distributor.
+  optional bool int52 = 50000 [default = false];
+}

http://git-wip-us.apache.org/repos/asf/incubator-wave/blob/b15695b9/scripts/vagrant/setup-fedora.sh
----------------------------------------------------------------------
diff --git a/scripts/vagrant/setup-fedora.sh b/scripts/vagrant/setup-fedora.sh
index c15a83f..7c1123f 100644
--- a/scripts/vagrant/setup-fedora.sh
+++ b/scripts/vagrant/setup-fedora.sh
@@ -32,6 +32,6 @@ cd /vagrant
 WAVE_VERSION=`sed "s/[\\t ]*=[\\t ]*/=/g" wave/config/wave.conf | grep 
^version= | cut -f2 -d=`
 
 cd distributions
-sudo tar -C /opt/apache/wave -xvf apache-wave-bin-$WAVE_VERSION.tar
+sudo tar -C /opt/apache/wave -zxvf apache-wave-bin-$WAVE_VERSION.tar
 cd ..
 cp scripts/vagrant/application.conf 
/opt/apache/wave/apache-wave/config/application.conf
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-wave/blob/b15695b9/scripts/vagrant/setup-ubuntu.sh
----------------------------------------------------------------------
diff --git a/scripts/vagrant/setup-ubuntu.sh b/scripts/vagrant/setup-ubuntu.sh
index 907576a..41eae45 100644
--- a/scripts/vagrant/setup-ubuntu.sh
+++ b/scripts/vagrant/setup-ubuntu.sh
@@ -39,6 +39,6 @@ cd /vagrant
 WAVE_VERSION=`sed "s/[\\t ]*=[\\t ]*/=/g" wave/config/wave.conf | grep 
^version= | cut -f2 -d=`
 
 cd distributions
-sudo tar -C /opt/apache/wave -xvf apache-wave-bin-$WAVE_VERSION.tar
+sudo tar -C /opt/apache/wave -zxvf apache-wave-bin-$WAVE_VERSION.tar.gz
 cd ..
 cp scripts/vagrant/application.conf 
/opt/apache/wave/apache-wave/config/application.conf

http://git-wip-us.apache.org/repos/asf/incubator-wave/blob/b15695b9/settings.gradle
----------------------------------------------------------------------
diff --git a/settings.gradle b/settings.gradle
index cf6215d..049f73d 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1 +1 @@
-include "wave", "pst", "wave-proto"
\ No newline at end of file
+include "wave", "pst"
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-wave/blob/b15695b9/sonar-project.properties
----------------------------------------------------------------------
diff --git a/sonar-project.properties b/sonar-project.properties
new file mode 100644
index 0000000..b8e0e6a
--- /dev/null
+++ b/sonar-project.properties
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+sonar.projectKey=org.apache.wave:wave
+sonar.projectName=Apache Wave
+sonar.projectVersion=1.0
+sonar.sources=./pst/src/main/java, ./wave/src/main/java
+sonar.tests=./wave/src/test/java
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-wave/blob/b15695b9/wave/build.gradle
----------------------------------------------------------------------
diff --git a/wave/build.gradle b/wave/build.gradle
index 9d57241..fcb199a 100644
--- a/wave/build.gradle
+++ b/wave/build.gradle
@@ -1,202 +1,243 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+//=============================================================================
 // Plugins
+//=============================================================================
 plugins {
     id 'java'
     id 'application'
 }
+apply plugin: 'com.google.protobuf'
 
+//=============================================================================
+// Project Level Settings
+//=============================================================================
 /* Meta Data Info */
 def title = 'Apache Wave Server'
 def vendor = 'The Apache Software Foundation'
-
-/* 3rd Part Repositories */
-repositories {
-    mavenCentral()
-    maven {
-        url 'http://archiva.comunes.org/repository/comunes-snapshots/'
-    }
-    maven {
-        url 'https://oauth.googlecode.com/svn/code/maven/'
-    }
-    maven {
-        url 'https://oss.sonatype.org/content/repositories/google-snapshots/'
-    }
-
-}
-
+version = 0.4
 mainClassName = "org.waveprotocol.box.server.ServerMain"
 applicationDefaultJvmArgs = [
         "-Xmx1024M",
         "-Dorg.eclipse.jetty.LEVEL=DEBUG",
         "-Djava.security.auth.login.config=config/jaas.config"
 ]
+sourceCompatibility = 1.7
+targetCompatibility = 1.7
+compileJava {
+    options.incremental = true
+}
 
+//=============================================================================
+// Extra Configurations (used for separation of dependencies)
+//=============================================================================
 configurations {
-    compile {
-        description = 'compile classpath'
+    generateMessages
+    generateGXP
+    gwt
+}
+
+//=============================================================================
+// Source's
+//=============================================================================
+sourceSets {
+    main {
+        java {
+            srcDirs = [
+                    'src/main/java',
+                    'generated/main/java',
+                    'generated/proto/java'
+            ]
+        }
+        resources {
+            srcDir 'src/main/resources'
+        }
     }
-    generateGXP {
-        description = 'classpath for generating GXP files'
+    proto {
+        proto {
+            srcDir 'src/proto/proto'
+            include '**/*.protodevel'
+        }
     }
-    gwt {
-        description = 'classpath for compiling the gwt sources'
+    test {
+        java {
+            srcDir 'src/test/java'
+        }
+        resources {
+            srcDir 'src/test/resources'
+        }
     }
 }
 
-sonarqube {
-    properties {
-        property "sonar.exclusions", "src/generated/**/*.java"
+//=============================================================================
+// Dependencies
+// Note: next to each dependency is a review stamp [last review, next review].
+//       If a dependency is past its review date pls create a jira issue.
+//       https://issues.apache.org/jira/browse/WAVE
+//=============================================================================
+repositories {
+    mavenCentral()
+    maven {
+        url 'http://archiva.comunes.org/repository/comunes-snapshots/'
+    }
+    maven {
+        url 'https://oauth.googlecode.com/svn/code/maven/'
+    }
+    maven {
+        url 'https://oss.sonatype.org/content/repositories/google-snapshots/'
     }
 }
 
-/* Project Dependencies */
 dependencies {
-    // code-gen
-    compile(
-            [group: "org.antlr", name: "antlr", version: "3.2"],
-            //TODO(wisebaldone) renable when gwt using jetty 9
-            //[group: "com.google.gwt", name: "gwt-dev", version: "2.8.0"],
-            //[group: "com.google.gwt", name: "gwt-user", version: "2.8.0"],
-            //[group: "com.google.gwt", name: "gwt-codeserver", version: 
"2.8.0"],
-            [group: "org.apache.velocity", name: "velocity", version: "1.6.3"]
-    )
-
     gwt(
-            [group: "org.antlr", name: "antlr", version: "3.2"],
-            [group: "org.apache.velocity", name: "velocity", version: "1.6.3"],
-            [group: "javax.validation", name: "validation-api", version: 
"1.1.0.Final"],
-            [group: "javax.validation", name: "validation-api", version: 
"1.1.0.Final", classifier: "sources"]
+            [group: "javax.validation", name: "validation-api", version: 
"1.1.0.Final"],                        // [?, ?]
+            [group: "javax.validation", name: "validation-api", version: 
"1.1.0.Final", classifier: "sources"]  // [?, ?]
     )
-    // compile
     compile (
-            [group: "aopalliance", name: "aopalliance", version: "1.0"],
-            [group: "org.bouncycastle", name: "bcprov-jdk16", version: "1.45"],
-            [group: "commons-fileupload", name: "commons-fileupload", version: 
"1.2.2"],
-            [group: "commons-cli", name: "commons-cli", version: "1.2"],
-            [group: "commons-codec", name: "commons-codec", version: "1.4"],
-            [group: "commons-io", name: "commons-io", version: "2.4"],
-            [group: "commons-collections", name: "commons-collections", 
version: "3.2.1"],
-            [group: "commons-configuration", name: "commons-configuration", 
version: "1.6"],
-            [group: "commons-httpclient", name: "commons-httpclient", version: 
"3.1"],
-            [group: "commons-lang", name: "commons-lang", version: "2.5"],
-            [group: "commons-logging", name: "commons-logging-api", version: 
"1.1"],
-            [group: "commons-logging", name: "commons-logging", version: 
"1.1.1"],
-            [group: "dom4j", name: "dom4j", version: "1.6.1"],
-            [group: "com.google.code.gson", name: "gson", version: "2.2.4"],
-            [group: "com.google.guava", name: "guava", version: "15.0"],
-            [group: "com.google.guava", name: "guava-gwt", version: "15.0"],
-            [group: "com.google.inject.extensions", name: 
"guice-assistedinject", version: "3.0"],
-            [group: "com.google.inject.extensions", name: "guice-servlet", 
version: "3.0"],
-            [group: "com.google.inject", name: "guice", version: "3.0"],
-            [group: "javax.inject", name: "javax.inject", version: "1"],
-            [group: "com.google.gxp", name: "google-gxp", version: 
"0.2.4-beta"],
-            [group: "javax.jdo", name: "jdo2-api", version: "2.1"],
-            [group: "org.jdom", name: "jdom", version: "1.1.3"],
-            [group: "com.google.code.findbugs", name: "jsr305", version: 
"2.0.1"],
-            [group: "jline", name: "jline", version: "0.9.94"],
-            [group: "joda-time", name: "joda-time", version: "1.6"],
-            [group: "org.apache.lucene", name: "lucene-core", version: 
"3.5.0"],
-            [group: "org.mongodb", name: "mongo-java-driver", version: 
"2.11.2"],
-            [group: "net.oauth.core", name: "oauth-provider", version: 
"20100527"],
-            [group: "net.oauth.core", name: "oauth", version: "20100527"],
-            [group: "net.oauth.core", name: "oauth-consumer", version: 
"20100527"],
-            [group: "com.google.protobuf", name: "protobuf-java", version: 
"2.5.0"],
-            [group: "com.googlecode.protobuf-java-format", name: 
"protobuf-java-format", version: "1.2"],
-            [group: "org.igniterealtime", name: "tinder", version: "1.2.1"],
-            [group: "xpp3", name: "xpp3", version: "1.1.4c"],
-            [group: "xpp3", name: "xpp3_xpath", version: "1.1.4c"],
-            [group: "org.gnu.inet", name: "libidn", version: "1.15"],
-            [group: "cc.kune", name: "gwt-initials-avatars-shared", version: 
"1.0-SNAPSHOT"],
-            [group: "cc.kune", name: "gwt-initials-avatars-server", version: 
"1.0-SNAPSHOT"],
-            [group: "com.typesafe", name: "config", version: "1.2.1"],
-            [group: "xerces", name: "xerces", version: "2.4.0"],
-            [group: "org.slf4j", name: "slf4j-api", version: "1.6.1"],
-            [group: "org.slf4j", name: "slf4j-simple", version: "1.6.1"],
-            [group: "org.eclipse.jetty", name: "jetty-annotations", version: 
"9.1.1.v20140108"],
-            [group: "org.eclipse.jetty", name: "jetty-client", version: 
"9.1.1.v20140108"],
-            [group: "org.eclipse.jetty", name: "jetty-continuation", version: 
"9.1.1.v20140108"],
-            [group: "org.eclipse.jetty", name: "jetty-http", version: 
"9.1.1.v20140108"],
-            [group: "org.eclipse.jetty", name: "jetty-io", version: 
"9.1.1.v20140108"],
-            [group: "org.eclipse.jetty", name: "jetty-proxy", version: 
"9.1.1.v20140108"],
-            [group: "org.eclipse.jetty", name: "jetty-security", version: 
"9.1.1.v20140108"],
-            [group: "org.eclipse.jetty", name: "jetty-server", version: 
"9.1.1.v20140108"],
-            [group: "org.eclipse.jetty", name: "jetty-servlet", version: 
"9.1.1.v20140108"],
-            [group: "org.eclipse.jetty", name: "jetty-servlets", version: 
"9.1.1.v20140108"],
-            [group: "org.eclipse.jetty", name: "jetty-util", version: 
"9.1.1.v20140108"],
-            [group: "org.eclipse.jetty", name: "jetty-webapp", version: 
"9.1.1.v20140108"],
-            [group: "org.eclipse.jetty", name: "jetty-xml", version: 
"9.1.1.v20140108"],
-            [group: "org.eclipse.jetty.websocket", name: "websocket-api", 
version: "9.1.1.v20140108"],
-            [group: "org.eclipse.jetty.websocket", name: "websocket-client", 
version: "9.1.1.v20140108"],
-            [group: "org.eclipse.jetty.websocket", name: "websocket-common", 
version: "9.1.1.v20140108"],
-            [group: "org.eclipse.jetty.websocket", name: "websocket-server", 
version: "9.1.1.v20140108"],
-            [group: "org.eclipse.jetty.websocket", name: "websocket-servlet", 
version: "9.1.1.v20140108"],
+            [group: "aopalliance", name: "aopalliance", version: "1.0"],       
                                 // [?, ?]
+            [group: "cc.kune", name: "gwt-initials-avatars-shared", version: 
"1.0-SNAPSHOT"],                   // [?, ?]
+            [group: "cc.kune", name: "gwt-initials-avatars-server", version: 
"1.0-SNAPSHOT"],                   // [?, ?]
+            [group: "commons-fileupload", name: "commons-fileupload", version: 
"1.2.2"],                        // [?, ?]
+            [group: "commons-cli", name: "commons-cli", version: "1.2"],       
                                 // [?, ?]
+            [group: "commons-codec", name: "commons-codec", version: "1.4"],   
                                 // [?, ?]
+            [group: "commons-io", name: "commons-io", version: "2.4"],         
                                 // [?, ?]
+            [group: "commons-collections", name: "commons-collections", 
version: "3.2.1"],                      // [?, ?]
+            [group: "commons-configuration", name: "commons-configuration", 
version: "1.6"],                    // [?, ?]
+            [group: "commons-httpclient", name: "commons-httpclient", version: 
"3.1"],                          // [?, ?]
+            [group: "commons-lang", name: "commons-lang", version: "2.5"],     
                                 // [?, ?]
+            [group: "commons-logging", name: "commons-logging-api", version: 
"1.1"],                            // [?, ?]
+            [group: "commons-logging", name: "commons-logging", version: 
"1.1.1"],                              // [?, ?]
+            [group: "com.google.code.findbugs", name: "jsr305", version: 
"2.0.1"],                              // [?, ?]
+            [group: "com.google.code.gson", name: "gson", version: "2.2.4"],   
                                 // [?, ?]
+            [group: "com.google.guava", name: "guava", version: "15.0"],       
                                 // [?, ?]
+            [group: "com.google.guava", name: "guava-gwt", version: "15.0"],   
                                 // [?, ?]
+            [group: "com.google.gxp", name: "google-gxp", version: 
"0.2.4-beta"],                               // [?, ?]
+            [group: "com.google.inject.extensions", name: 
"guice-assistedinject", version: "3.0"],              // [?, ?]
+            [group: "com.google.inject.extensions", name: "guice-servlet", 
version: "3.0"],                     // [?, ?]
+            [group: "com.google.inject", name: "guice", version: "3.0"],       
                                 // [?, ?]
+            [group: "com.google.protobuf", name: "protobuf-java", version: 
"2.6.1"],                            // [?, ?]
+            [group: "com.googlecode.protobuf-java-format", name: 
"protobuf-java-format", version: "1.2"],       // [?, ?]
+            [group: "com.typesafe", name: "config", version: "1.2.1"],         
                                 // [?, ?]
+            [group: "dom4j", name: "dom4j", version: "1.6.1"],                 
                                 // [?, ?]
+            [group: "eu.infomas", name: "annotation-detector", version: 
"3.0.0"],                               // [?, ?]
+            [group: "org.antlr", name: "antlr", version: "3.2"],               
                                 // [?, ?]
+            [group: "org.apache.velocity", name: "velocity", version: 
"1.6.3"],                                 // [?, ?]
+            [group: "org.apache.lucene", name: "lucene-core", version: 
"3.5.0"],                                // [?, ?]
+            [group: "org.atmosphere", name: "atmosphere-guice", version: 
"0.8.3"],                              // [?, ?]
+            [group: "org.atmosphere", name: "atmosphere-runtime", version: 
"2.1.0"],                            // [?, ?]
+            [group: "org.bouncycastle", name: "bcprov-jdk16", version: 
"1.45"],                                 // [?, ?]
+            [group: "org.eclipse.jetty", name: "jetty-annotations", version: 
"9.1.1.v20140108"],                // [?, ?]
+            [group: "org.eclipse.jetty", name: "jetty-client", version: 
"9.1.1.v20140108"],                     // [?, ?]
+            [group: "org.eclipse.jetty", name: "jetty-continuation", version: 
"9.1.1.v20140108"],               // [?, ?]
+            [group: "org.eclipse.jetty", name: "jetty-http", version: 
"9.1.1.v20140108"],                       // [?, ?]
+            [group: "org.eclipse.jetty", name: "jetty-io", version: 
"9.1.1.v20140108"],                         // [?, ?]
+            [group: "org.eclipse.jetty", name: "jetty-proxy", version: 
"9.1.1.v20140108"],                      // [?, ?]
+            [group: "org.eclipse.jetty", name: "jetty-security", version: 
"9.1.1.v20140108"],                   // [?, ?]
+            [group: "org.eclipse.jetty", name: "jetty-server", version: 
"9.1.1.v20140108"],                     // [?, ?]
+            [group: "org.eclipse.jetty", name: "jetty-servlet", version: 
"9.1.1.v20140108"],                    // [?, ?]
+            [group: "org.eclipse.jetty", name: "jetty-servlets", version: 
"9.1.1.v20140108"],                   // [?, ?]
+            [group: "org.eclipse.jetty", name: "jetty-util", version: 
"9.1.1.v20140108"],                       // [?, ?]
+            [group: "org.eclipse.jetty", name: "jetty-webapp", version: 
"9.1.1.v20140108"],                     // [?, ?]
+            [group: "org.eclipse.jetty", name: "jetty-xml", version: 
"9.1.1.v20140108"],                        // [?, ?]
+            [group: "org.eclipse.jetty.websocket", name: "websocket-api", 
version: "9.1.1.v20140108"],          // [?, ?]
+            [group: "org.eclipse.jetty.websocket", name: "websocket-client", 
version: "9.1.1.v20140108"],       // [?, ?]
+            [group: "org.eclipse.jetty.websocket", name: "websocket-common", 
version: "9.1.1.v20140108"],       // [?, ?]
+            [group: "org.eclipse.jetty.websocket", name: "websocket-server", 
version: "9.1.1.v20140108"],       // [?, ?]
+            [group: "org.eclipse.jetty.websocket", name: "websocket-servlet", 
version: "9.1.1.v20140108"],      // [?, ?]
+            [group: "org.gnu.inet", name: "libidn", version: "1.15"],          
                                 // [?, ?]
+            [group: "org.igniterealtime", name: "tinder", version: "1.2.3"],   
                                 // [1/2016, 6/2016]
+            [group: "org.igniterealtime.whack", name: "core", version: 
"2.0.0"],                                // [1/2016, 6/2016]
+            [group: "org.jdom", name: "jdom", version: "1.1.3"],               
                                 // [?, ?]
+            [group: "org.mongodb", name: "mongo-java-driver", version: 
"2.11.2"],                               // [?, ?]
+            [group: "org.slf4j", name: "slf4j-api", version: "1.6.1"],         
                                 // [?, ?]
+            [group: "org.slf4j", name: "slf4j-simple", version: "1.6.1"],      
                                 // [?, ?]
+            [group: "javax.inject", name: "javax.inject", version: "1"],       
                                 // [?, ?]
+            [group: "javax.servlet", name: "javax.servlet-api", version: 
"3.1.0"],                              // [?, ?]
+            [group: "javax.jdo", name: "jdo2-api", version: "2.1"],            
                                 // [?, ?]
+            [group: "jline", name: "jline", version: "0.9.94"],                
                                 // [?, ?]
+            [group: "joda-time", name: "joda-time", version: "1.6"],           
                                 // [?, ?]
+            [group: "net.oauth.core", name: "oauth-provider", version: 
"20100527"],                             // [?, ?]
+            [group: "net.oauth.core", name: "oauth", version: "20100527"],     
                                 // [?, ?]
+            [group: "net.oauth.core", name: "oauth-consumer", version: 
"20100527"],                             // [?, ?]
+            [group: "xerces", name: "xerces", version: "2.4.0"],               
                                 // [?, ?]
+            [group: "xpp3", name: "xpp3", version: "1.1.4c"],                  
                                 // [?, ?]
+            [group: "xpp3", name: "xpp3_xpath", version: "1.1.4c"],            
                                 // [?, ?]
             //TODO: Following are included due to tests being in the main src 
directory
-            [group: "org.mockito", name: "mockito-all", version: "1.9.5"],
-            [group: "org.hamcrest", name: "hamcrest-all", version: "1.3"]
+            [group: "org.mockito", name: "mockito-all", version: "1.9.5"],     
                                 // [?, ?]
+            [group: "org.hamcrest", name: "hamcrest-all", version: "1.3"]      
                                 // [?, ?]
 
     )
-    compile fileTree(dir: 'dependencies/compile', include: "**/*.jar")
-    compile fileTree(dir: '../wave-proto/build/libs', include: "**/*.jar")
-
+    compile fileTree(dir: 'dependencies/compile', include: "**/*.jar")         
                                 // [?, ?]
+    compile fileTree(dir: '../pst/build/libs', include: '**/*.jar')            
                                 // [?, ?]
     generateGXP (
-        [group: "com.google.gxp", name: "google-gxp", version: "0.2.4-beta"]
+        [group: "com.google.gxp", name: "google-gxp", version: "0.2.4-beta"]   
                                 // [?, ?]
+    )
+    protoCompile (
+        [group: "com.google.protobuf", name: "protobuf-java", version: 
"2.6.1"],                                // [?, ?]
+        fileTree(dir: '../pst/build/libs', include: '**/*.jar')                
                                 // [?, ?]
+    )
+    generateMessages (
+         fileTree(dir: '../pst/build/libs', include: '**/*.jar')               
                                 // [?, ?]
     )
-
-    // tests
     testCompile(
-            [group: 'junit', name: 'junit', version: '4.11'],
-            [group: "org.ow2.asm", name: "asm", version: "5.0.4"],
-            [group: "cglib", name: "cglib", version: "2.2"],
-            [group: "com.novocode", name: "junit-interface", version: "0.11"],
-            [group: "emma", name: "emma", version: "2.0.5312"],
-            [group: "emma", name: "emma_ant", version: "2.1.5320"],
-            [group: "org.hamcrest", name: "hamcrest-all", version: "1.3"],
-            [group: "org.jmock", name: "jmock-junit3", version: "2.6.0"],
-            [group: "org.jmock", name: "jmock", version: "2.6.0"],
-            [group: "org.mockito", name: "mockito-all", version: "1.9.5"]
+            [group: 'junit', name: 'junit', version: '4.12'],                  
                                 // [?, ?]
+            [group: "org.ow2.asm", name: "asm", version: "5.0.4"],             
                                 // [?, ?]
+            [group: "cglib", name: "cglib", version: "2.2"],                   
                                 // [?, ?]
+            [group: "com.novocode", name: "junit-interface", version: "0.11"], 
                                 // [?, ?]
+            [group: "emma", name: "emma", version: "2.0.5312"],                
                                 // [?, ?]
+            [group: "emma", name: "emma_ant", version: "2.1.5320"],            
                                 // [?, ?]
+            [group: "org.hamcrest", name: "hamcrest-all", version: "1.3"],     
                                 // [?, ?]
+            [group: "org.jmock", name: "jmock-junit3", version: "2.6.0"],      
                                 // [?, ?]
+            [group: "org.jmock", name: "jmock", version: "2.6.0"],             
                                 // [?, ?]
+            [group: "org.mockito", name: "mockito-all", version: "1.9.5"]      
                                 // [?, ?]
     )
 }
 
-/* Source Sets */
-sourceSets {
-    main {
-        java {
-            srcDirs = [
-                    'src/main/java',
-                    'src/generated/gxp',
-                    'src/generated/messages'
-            ]
-        }
-        resources {
-            srcDir 'src/main/resources'
-        }
-    }
-
-    test {
-        java {
-            srcDir 'src/test/java'
-        }
-        resources {
-            srcDir 'src/test/resources'
-        }
+//=============================================================================
+// Protobuf Config
+//=============================================================================
+protobuf {
+    protoc {
+        artifact = 'com.google.protobuf:protoc:2.6.1'
     }
+    generatedFilesBaseDir = "$projectDir/generated"
 }
 
+//=============================================================================
+// Task - Generation Tasks (External Compilers)
+//=============================================================================
+
 task generateMessages {
     description = 'Generates source files from Antlr String types and protobuf'
-    FileTree inputFiles = fileTree(dir: '../wave-proto/build/classes/main/', 
include: '**/*.class')
+    FileTree inputFiles = fileTree(dir: 'generated/src/main/java', include: 
'**/*.java')
     inputs.property "files", inputFiles
-    File outputDir = file("src/generated/messages")
+    File outputDir = file("generated/main/java")
     outputs.dir outputDir
     doLast {
         List<String> proto_classes = [
-                
"../wave-proto/build/classes/main/org/waveprotocol/box/common/comms/WaveClientRpc.class",
-                
"../wave-proto/build/classes/main/org/waveprotocol/box/search/SearchProto.class",
-                
"../wave-proto/build/classes/main/org/waveprotocol/box/profile/ProfilesProto.class",
-                
"../wave-proto/build/classes/main/org/waveprotocol/box/server/rpc/Rpc.class",
-                
"../wave-proto/build/classes/main/org/waveprotocol/box/attachment/AttachmentProto.class",
-                
"../wave-proto/build/classes/main/org/waveprotocol/wave/federation/Proto.class",
-                
"../wave-proto/build/classes/main/org/waveprotocol/wave/concurrencycontrol/ClientServer.class",
-                
"../wave-proto/build/classes/main/org/waveprotocol/wave/diff/Diff.class"
+                
"build/classes/proto/org/waveprotocol/box/common/comms/WaveClientRpc.class",
+                
"build/classes/proto/org/waveprotocol/box/search/SearchProto.class",
+                
"build/classes/proto/org/waveprotocol/box/profile/ProfilesProto.class",
+                
"build/classes/proto/org/waveprotocol/box/server/rpc/Rpc.class",
+                
"build/classes/proto/org/waveprotocol/box/attachment/AttachmentProto.class",
+                
"build/classes/proto/org/waveprotocol/wave/federation/Proto.class",
+                
"build/classes/proto/org/waveprotocol/wave/concurrencycontrol/ClientServer.class",
+                "build/classes/proto/org/waveprotocol/wave/diff/Diff.class"
         ]
         List<String> templates = [
                 "src/main/java/org/waveprotocol/pst/templates/api/api.st",
@@ -209,13 +250,13 @@ task generateMessages {
         ]
         proto_classes.each { proto ->
             javaexec {
-                main = "org.waveprotocol.pst.PstMain"
-                classpath += configurations.compile
+                main = "org.apache.wave.pst.PstMain"
+                classpath += configurations.generateMessages
                 args = [
                         '-s',
                         'pst',
                         '-d',
-                        'src/generated/messages',
+                        'generated/main/java',
                         '-f',
                         proto
                 ]
@@ -225,13 +266,13 @@ task generateMessages {
     }
 }
 
-generateMessages.dependsOn ":pst:jar"
+generateMessages.dependsOn ":pst:shadowJar", "compileProtoJava"
 
 task generateGXP {
     description = 'Generate source files from GXP prototypes'
     FileTree inputFiles = fileTree(dir: 'src/main/gxp', include: '**/*.gxp')
     inputs.property "files", inputFiles
-    File outputDir = file("src/generated/gxp")
+    File outputDir = file("generated/main/java")
     outputs.dir outputDir
     doLast {
         javaexec {
@@ -239,7 +280,7 @@ task generateGXP {
             classpath += configurations.generateGXP
             args = [
                     "--dir",
-                    "src/generated/gxp",
+                    "generated/main/java",
                     "--source",
                     "src/main/gxp",
                     "--output_language",
@@ -250,6 +291,9 @@ task generateGXP {
     }
 }
 
+//=============================================================================
+// Gwt Compilation Options
+//=============================================================================
 task compileGwt {
     description = 'Compiles the GWT sources for production'
     doLast {
@@ -326,14 +370,7 @@ task compileGwtDev {
     }
 }
 
-task extractApi(type: Copy) {
-    from (configurations.compile.collect { zipTree(it) }) {
-        //Note: readonly files which get overwritten crash windows.
-        exclude "LICENSE"
-    } into "$buildDir/api"
-}
 
-extractApi.mustRunAfter compileJava
 
 compileJava.dependsOn = [generateMessages, generateGXP]
 
@@ -372,7 +409,9 @@ task gwtDev {
     }
 }
 
-/* Test Tasks */
+//=============================================================================
+// Tests
+//=============================================================================
 
 test {
     include "**/*Test*"
@@ -460,6 +499,19 @@ testLarge.mustRunAfter test
 
 ant.importBuild 'config/server-config.xml'
 
+//=============================================================================
+// Custom UberJar Implementation
+// Author Note: this custom implementation should be replaced by the shadow
+//              plugin as shown in the pst project.
+//=============================================================================
+task extractApi(type: Copy) {
+    from (configurations.compile.collect { zipTree(it) }) {
+        //Note: readonly files which get overwritten crash windows.
+        exclude "LICENSE"
+    } into "$buildDir/api"
+}
+
+extractApi.mustRunAfter compileJava
 
 jar {
     manifest {
@@ -506,6 +558,7 @@ jar {
     include "org/apache/lucene/**/*"
     include "org/apache/commons/io/**/*"
     include "org/apache/xerces/**/*"
+    include "org/apache/wave/**/*"
     include "org/bson/**/*"
     include "org/dom4j/**/*"
     include "org/eclipse/**/*"
@@ -545,7 +598,11 @@ jar {
 
 jar.dependsOn compileJava, compileGwt, extractApi
 
-/* Distribution Tasks */
+//=============================================================================
+// Binary Distribution
+//=============================================================================
+
+def binName = this.group + "-bin"
 
 task createPropertiesFile(type: Copy) {
     from 'src/main/configs'
@@ -557,7 +614,7 @@ task createPropertiesFile(type: Copy) {
 }
 
 task createDistBinZip(type: Zip) {
-    baseName = this.group + "-bin"
+    baseName = binName
     destinationDir = file('../distributions')
     from(jar) {
         into 'apache-wave/bin'
@@ -586,7 +643,9 @@ task createDistBinZip(type: Zip) {
 }
 
 task createDistBinTar(type: Tar) {
-    baseName = this.group + "-bin"
+    compression = Compression.GZIP
+    extension = 'tar.gz'
+    baseName = binName
     destinationDir = file('../distributions')
     from(jar) {
         into 'apache-wave/bin'
@@ -617,6 +676,9 @@ task createDistBinTar(type: Tar) {
 createDistBinZip.dependsOn jar, createPropertiesFile
 createDistBinTar.dependsOn jar, createPropertiesFile
 
+//=============================================================================
+// Distribution's
+//=============================================================================
 task createDistBin() {
     doFirst {
         println ''
@@ -633,6 +695,6 @@ createDistBin.dependsOn createDistBinZip, createDistBinTar
 clean {
     delete "war/WEB-INF"
     delete "war/webclient"
-    delete "src/generated"
+    delete "generated/"
     delete "gwt-unitCache"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-wave/blob/b15695b9/wave/src/proto/proto/org/waveprotocol/box/attachment/attachment.proto
----------------------------------------------------------------------
diff --git 
a/wave/src/proto/proto/org/waveprotocol/box/attachment/attachment.proto 
b/wave/src/proto/proto/org/waveprotocol/box/attachment/attachment.proto
new file mode 100644
index 0000000..78c95cc
--- /dev/null
+++ b/wave/src/proto/proto/org/waveprotocol/box/attachment/attachment.proto
@@ -0,0 +1,50 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+// The image attachment metadata.
+//
+// Author: akapla...@gmail.com (Kaplanov A.)
+
+syntax = "proto2";
+
+package attachment;
+
+option java_package = "org.waveprotocol.box.attachment";
+option java_outer_classname = "AttachmentProto";
+
+message AttachmentsResponse {
+  repeated AttachmentMetadata attachment = 1;
+}
+
+message AttachmentMetadata {
+  required string attachmentId = 1;
+  required string waveRef = 2;
+  required string fileName = 3;
+  required string mimeType = 4;
+  required int64 size = 5;
+  required string creator = 6;
+  required string attachmentUrl = 7;
+  required string thumbnailUrl = 8;
+  optional ImageMetadata imageMetadata = 9;
+  optional ImageMetadata thumbnailMetadata = 10;
+  optional bool malware = 11;
+}
+
+message ImageMetadata {
+  required int32 width = 1;
+  required int32 height = 2;
+}

http://git-wip-us.apache.org/repos/asf/incubator-wave/blob/b15695b9/wave/src/proto/proto/org/waveprotocol/box/common/comms/waveclient-rpc.proto
----------------------------------------------------------------------
diff --git 
a/wave/src/proto/proto/org/waveprotocol/box/common/comms/waveclient-rpc.proto 
b/wave/src/proto/proto/org/waveprotocol/box/common/comms/waveclient-rpc.proto
new file mode 100644
index 0000000..7b308a8
--- /dev/null
+++ 
b/wave/src/proto/proto/org/waveprotocol/box/common/comms/waveclient-rpc.proto
@@ -0,0 +1,199 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+// The wave view client-server protocol
+//
+// Author: joc...@google.com (Jochen Bekmann)
+// Author: ano...@google.com (Alex North)
+
+syntax = "proto2";
+
+import "org/waveprotocol/box/server/rpc/rpc.proto";
+import "org/waveprotocol/wave/federation/federation.protodevel";
+
+package waveserver;
+
+option java_package = "org.waveprotocol.box.common.comms";
+option java_outer_classname = "WaveClientRpc";
+option java_generic_services = true;
+
+/**
+ * Provides streaming wave views.
+ *
+ * A client requests a possibly filtered view of wavelets in a wave.
+ * The response stream contains first a snapshot for each wavelet
+ * currently in view, and then deltas for those wavelets. The end of
+ * the initial set of snapshots is indicated by a "marker" message.
+ * New wavelets may come into view after the marker, resulting in 
+ * another snapshot.
+ * 
+ * The client may indicate that it already has a snapshot for some wavelets
+ * by providing one or more known versions and signatures. If one matches
+ * the server history the server will not send a snapshot but will instead
+ * begin the stream with an empty delta specifying the resynchronization
+ * version.
+ * 
+ * TODO(anorth):
+ * - make the first response message a channel id only, then no more
+ *   channel ids
+ */
+service ProtocolWaveClientRpc {
+  rpc Open (ProtocolOpenRequest) returns (ProtocolWaveletUpdate) {
+    option (rpc.is_streaming_rpc) = true;
+  };
+  rpc Submit (ProtocolSubmitRequest) returns (ProtocolSubmitResponse);
+  rpc Authenticate (ProtocolAuthenticate) returns 
(ProtocolAuthenticationResult);
+}
+
+// A workaround for clients which do not support sending cookies over a 
websocket
+// connection. See: http://code.google.com/p/wave-protocol/issues/detail?id=119
+message ProtocolAuthenticate {
+  required string token = 1;
+}
+
+// RPCs require a return type, although in this case no return data is desired.
+// We don't want to return anything here because clients which implement
+// websockets correctly (and thus don't use ProtocolAuthenticate) cannot
+// recieve the authentication related information.
+// If the client's authentication is not valid, the connection will be closed.
+message ProtocolAuthenticationResult {
+}
+
+/**
+ * A request to open a wave view.
+ */
+message ProtocolOpenRequest {
+  // User making the request.
+  // TODO(anorth): Remove this, replacing it with the implicit logged-in user.
+  required string participant_id = 1;
+  // Wave id to open.
+  required string wave_id = 2;
+  // Wavelet id prefixes by which to filter the view, empty means no filter.
+  repeated string wavelet_id_prefix = 3;
+  // Known wavelet versions for resynchronization.
+  repeated WaveletVersion known_wavelet = 4;
+}
+
+// A pair of (wavelet id, wavelet version)
+message WaveletVersion {
+  required string wavelet_id = 1;
+  required federation.ProtocolHashedVersion hashed_version = 2;
+}
+
+// A document and associated metadata
+message DocumentSnapshot {
+  required string document_id = 1;
+  // This is a document operation that takes the document from zero to its 
current state.
+  required federation.ProtocolDocumentOperation document_operation = 2;
+
+  // ** Metadata
+  // The participant who submitted the first operation to the document
+  required string author = 3;
+  // All participants who have submitted operations to the document
+  repeated string contributor = 4;
+  // The wavelet version when the document was last modified
+  required int64 last_modified_version = 5;
+  required int64 last_modified_time = 6;
+}
+
+// A wavelet and associated metadata.
+message WaveletSnapshot {
+  required string wavelet_id = 1;
+  // The list of participants of this wavelet.
+  repeated string participant_id = 2;
+  // Snapshots of all the documents in the wavelet.
+  repeated DocumentSnapshot document = 3;
+
+  // ** Metadata
+  // The current version of the wavelet
+  required federation.ProtocolHashedVersion version = 4;
+  // The participant that created the wavelet
+  required int64 last_modified_time = 5;
+  required string creator = 6;
+  required int64 creation_time = 7;
+}
+
+// A snapshot of a user's view of a wave.
+// Contains snapshots of all the wavelets visible to a user
+message WaveViewSnapshot {
+  required string wave_id = 1;
+  repeated WaveletSnapshot wavelet = 2;
+}
+
+/**
+ * Update message for a wave view.
+ * Contains either:
+ * - a channel id (only)
+ * - a marker (only)
+ * - a wavelet name, snapshot, version, and commit version
+ * - a wavelet name, deltas, version
+ * Must contain either one or more applied deltas or a commit notice.
+ *
+ * TODO(anorth): rename to reflect that this is a view update, not wavelet
+ */
+message ProtocolWaveletUpdate {
+  // Specifies the wavelet name in the URI netpath notation.
+  // Set only if there are deltas
+  // TODO(anorth) make optional for channel id, marker updates
+  required string wavelet_name = 1;
+
+  // Zero or more deltas for this wavelet, streamed in order.
+  // If snapshot is set, there should be zero deltas.
+  // TODO(soren): consider using this in the snapshot case for uncommitted 
deltas.
+  repeated federation.ProtocolWaveletDelta applied_delta = 2;
+
+  // Indicates that the host server has committed the wavelet to disk at the
+  // given version. Mandatory for snapshots.
+  optional federation.ProtocolHashedVersion commit_notice = 3;
+
+  // Resulting version of the wavelet after all deltas have been applied
+  // May only be missing if there are no appliedDeltas
+  // If snapshot is set, this is the version number of the snapshot, and is
+  // mandatory.
+  optional federation.ProtocolHashedVersion resulting_version = 4;
+
+  // An optional snapshot of the wavelet
+  optional WaveletSnapshot snapshot = 5;
+
+  // View open marker, signifies all current snapshots have been sent.
+  optional bool marker = 6 [default=false];
+
+  // Channel id, set only in the first update to a client.
+  // The client includes it in submits.
+  optional string channel_id = 7;
+}
+
+/**
+ * The client requests that the given delta be applied to the wavelet.
+ */
+message ProtocolSubmitRequest {
+  required string wavelet_name = 1;
+  required federation.ProtocolWaveletDelta delta = 2;
+  optional string channel_id = 3;
+}
+
+/**
+ * The result of submitting the delta to the server. If an error occurs
+ * errorMessage will be present, otherwise hashedVersionAfterApplication will 
be
+ * present. operationsApplied will report the actual number of operations
+ * successfully applied to the wavelet by the server.
+ */
+message ProtocolSubmitResponse {
+  required int32 operations_applied = 1;
+  optional string error_message = 2;
+  optional federation.ProtocolHashedVersion hashed_version_after_application = 
3;
+}

http://git-wip-us.apache.org/repos/asf/incubator-wave/blob/b15695b9/wave/src/proto/proto/org/waveprotocol/box/profile/profiles.proto
----------------------------------------------------------------------
diff --git a/wave/src/proto/proto/org/waveprotocol/box/profile/profiles.proto 
b/wave/src/proto/proto/org/waveprotocol/box/profile/profiles.proto
new file mode 100644
index 0000000..4370ee1
--- /dev/null
+++ b/wave/src/proto/proto/org/waveprotocol/box/profile/profiles.proto
@@ -0,0 +1,51 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+// The profile fetch request and response.
+//
+// Author: yur...@apache.org (Yuri Zelikov)
+
+syntax = "proto2";
+
+package profile;
+
+option java_package = "org.waveprotocol.box.profile";
+option java_outer_classname = "ProfilesProto";
+
+
+message ProfileRequest {
+  // The profile addresses in email format.
+  repeated string addresses = 1;
+}
+
+message ProfileResponse {
+  
+  message FetchedProfile {
+    // The profile address in email format.
+    required string address = 1;
+    // The name.
+    required string name = 2;
+    // The image URL.
+    required string imageUrl = 3;
+    // The link to website.
+    optional string profileUrl = 4;
+  }
+  
+  // The fetched profiles.
+  repeated FetchedProfile profiles = 1;
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-wave/blob/b15695b9/wave/src/proto/proto/org/waveprotocol/box/search/search.proto
----------------------------------------------------------------------
diff --git a/wave/src/proto/proto/org/waveprotocol/box/search/search.proto 
b/wave/src/proto/proto/org/waveprotocol/box/search/search.proto
new file mode 100644
index 0000000..889ee05
--- /dev/null
+++ b/wave/src/proto/proto/org/waveprotocol/box/search/search.proto
@@ -0,0 +1,68 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+// The search query and response.
+//
+// Author: vega...@gmail.com (Yuri Z.)
+
+syntax = "proto2";
+
+package search;
+
+option java_package = "org.waveprotocol.box.search";
+option java_outer_classname = "SearchProto";
+
+
+message SearchRequest {
+  // The query to execute.
+  required string query = 1;
+  // The index from which to return results.
+  required int32 index = 2;
+  // The number of results to return.
+  required int32 numResults = 3;
+}
+
+message SearchResponse {
+  // The wave list digest.
+  message Digest {
+    // The wave title.
+       required string title = 1;
+       // The text snippet.
+       required string snippet = 2;
+       // Serialized wave id
+       required string waveId = 3;
+       // Last modified time of the wave.
+       required int64 lastModified = 4;
+       // Unread count for the user.
+       required int32 unreadCount = 5;
+       // Number of blips in the wave.
+       required int32 blipCount = 6;
+       // Wave participants.
+       repeated string participants = 7;
+       // The wave author.
+       required string author = 8;
+  }
+
+  // The search query.
+  required string query = 1;
+  // The total number of results to the query (not necessarily all returned).
+  required int32 totalResults = 2;
+  // A list of digests, representing the segment [index, index + result_count] 
+  // from the query parameters.
+  repeated Digest digests = 3;
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-wave/blob/b15695b9/wave/src/proto/proto/org/waveprotocol/box/server/persistence/protos/account-store.proto
----------------------------------------------------------------------
diff --git 
a/wave/src/proto/proto/org/waveprotocol/box/server/persistence/protos/account-store.proto
 
b/wave/src/proto/proto/org/waveprotocol/box/server/persistence/protos/account-store.proto
new file mode 100644
index 0000000..cd52a51
--- /dev/null
+++ 
b/wave/src/proto/proto/org/waveprotocol/box/server/persistence/protos/account-store.proto
@@ -0,0 +1,78 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+// Account Data data structures. These are used as the on-disk representation 
of the internal
+// AccountData classes.
+//
+// Author: tad.gli...@gmail.com (Tad Glines)
+
+syntax = "proto2";
+
+package protoaccountstore;
+
+option java_package = "org.waveprotocol.box.server.persistence.protos";
+option java_outer_classname = "ProtoAccountStoreData";
+
+// Represents an AccountData instance
+message ProtoAccountData {
+       enum AccountDataType {
+               HUMAN_ACCOUNT = 1;
+               ROBOT_ACCOUNT = 2;
+       }
+
+       required AccountDataType account_type = 1;
+       
+       // The participant id
+       required string account_id = 2;
+
+       // One must be provided depending on the value of account_type. 
+       optional ProtoHumanAccountData human_account_data = 3;
+       optional ProtoRobotAccountData robot_account_data = 4;
+}
+
+// Data specific to a human account
+message ProtoHumanAccountData {
+       optional ProtoPasswordDigest password_digest = 1;
+}
+
+// The values from a PAsswordDigest instance
+message ProtoPasswordDigest {
+       required bytes salt = 1;
+       required bytes digest = 2;
+}
+
+// Data specific to a robot account
+message ProtoRobotAccountData {
+       required string url = 1;
+       required string consumer_secret = 2;
+       optional ProtoRobotCapabilities robot_capabilities = 3;
+       required bool is_verified = 4;
+}
+
+// Data found in a RobotCapabilities instance
+message ProtoRobotCapabilities {
+       required string capabilities_hash = 1;
+       required string protocol_version = 2;
+       repeated ProtoRobotCapability capability = 3;
+}
+
+// Data found in a com.google.api.robot.Capability instance
+message ProtoRobotCapability {
+       required string event_type = 1;
+       repeated string context = 2;
+       required string filter = 3;
+}

http://git-wip-us.apache.org/repos/asf/incubator-wave/blob/b15695b9/wave/src/proto/proto/org/waveprotocol/box/server/persistence/protos/delta-store.proto
----------------------------------------------------------------------
diff --git 
a/wave/src/proto/proto/org/waveprotocol/box/server/persistence/protos/delta-store.proto
 
b/wave/src/proto/proto/org/waveprotocol/box/server/persistence/protos/delta-store.proto
new file mode 100644
index 0000000..09b1adb
--- /dev/null
+++ 
b/wave/src/proto/proto/org/waveprotocol/box/server/persistence/protos/delta-store.proto
@@ -0,0 +1,38 @@
+
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+// Account Data data structures. These are used as the on-disk representation 
of the internal
+// AccountData classes.
+//
+// Author: tad.gli...@gmail.com (Tad Glines)
+
+syntax = "proto2";
+
+import "org/waveprotocol/wave/federation/federation.protodevel";
+
+package protodeltastore;
+
+option java_package = "org.waveprotocol.box.server.persistence.protos";
+option java_outer_classname = "ProtoDeltaStoreData";
+
+message ProtoTransformedWaveletDelta {
+  required string author = 1;
+  required federation.ProtocolHashedVersion resulting_version = 2;
+  required int64 application_timestamp = 3;
+  repeated federation.ProtocolWaveletOperation operation = 4;
+}

http://git-wip-us.apache.org/repos/asf/incubator-wave/blob/b15695b9/wave/src/proto/proto/org/waveprotocol/box/server/rpc/rpc.proto
----------------------------------------------------------------------
diff --git a/wave/src/proto/proto/org/waveprotocol/box/server/rpc/rpc.proto 
b/wave/src/proto/proto/org/waveprotocol/box/server/rpc/rpc.proto
new file mode 100644
index 0000000..370cd74
--- /dev/null
+++ b/wave/src/proto/proto/org/waveprotocol/box/server/rpc/rpc.proto
@@ -0,0 +1,66 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+// Author: thorog...@google.com (Sam Thorogood)
+//
+// Internal protocol buffers used as part of the client-server RPC subsystem.
+// This package also provides options which must be used to better define the
+// way messages are passed between client/server.
+
+syntax = "proto2";
+
+import "google/protobuf/descriptor.proto";
+
+package rpc;
+
+option java_package = "org.waveprotocol.box.server.rpc";
+option java_outer_classname = "Rpc";
+
+extend google.protobuf.MethodOptions {
+  /**
+   * Mark a service method as a streaming RPC. This indicates that the server
+   * end-point of this RPC may return 0-n responses before it is complete.
+   *
+   * Completion of this RPC should be specified by finally passing null as a
+   * result to the callback provided to the interface implementation. Or, by
+   * raising an error condition as normal (through setFailed on the 
controller).
+   */
+  // TODO: Create a message type for options instead of using a single bool.
+  optional bool is_streaming_rpc = 1003 [default = false];
+}
+
+/**
+ * Used internally by the RPC subsystem.
+ *
+ * Passed from client -> server to indicate that a RPC, streaming or otherwise,
+ * should be cancelled. The server still has a responsibility to finish the RPC
+ * in a standard manner, and this is purely a request.
+ */
+message CancelRpc {
+}
+
+/**
+ * Used internally by the RPC subsystem.
+ *
+ * Passed from server -> client in two cases;
+ *  - a streaming RPC has finished, in which case failed may be true or false
+ *  - a normal RPC has failed, in which case failed must be true
+ */
+message RpcFinished {
+  required bool failed = 1;
+  optional string error_text = 2;
+}

Reply via email to