Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / sync / protocol / sync.proto
index b9f0de5..1e9b66a 100644 (file)
@@ -19,6 +19,7 @@ import "app_notification_specifics.proto";
 import "app_setting_specifics.proto";
 import "app_specifics.proto";
 import "article_specifics.proto";
+import "attachments.proto";
 import "autofill_specifics.proto";
 import "bookmark_specifics.proto";
 import "client_commands.proto";
@@ -366,6 +367,9 @@ message SyncEntity {
   // Refer to its definition in unique_position.proto for more information about
   // its internal representation.
   optional UniquePosition unique_position = 25;
+
+  // Attachment ids of attachments associated with this SyncEntity.
+  repeated AttachmentIdProto attachment_id = 26;
 };
 
 // This message contains diagnostic information used to correlate
@@ -408,6 +412,9 @@ message CommitMessage {
   // syncing a particular data type regardless of whether a commit for that
   // datatype is currently being sent up.
   optional ClientConfigParams config_params = 4;
+
+  // Set of optional per-client datatype contexts.
+  repeated DataTypeContext client_contexts = 5;
 };
 
 // This message communicates additional per-type information related to
@@ -626,6 +633,9 @@ message GetUpdatesMessage {
   // Whether this GU also serves as a retry GU. Any GU that happens after
   // retry timer timeout is a retry GU effectively.
   optional bool is_retry = 10 [default = false];
+
+  // Set of optional per-client datatype contexts.
+  repeated DataTypeContext client_contexts = 11;
 };
 
 message AuthenticateMessage {
@@ -669,9 +679,20 @@ message ClientStatus {
   optional bool hierarchy_conflict_detected = 1;
 }
 
+// A single datatype's sync context. Allows the datatype to pass along
+// datatype specific information with its own server backend.
+message DataTypeContext {
+  // The type this context is associated with.
+  optional int32 data_type_id = 1;
+  // The context for the datatype.
+  optional bytes context = 2;
+  // The version of the context.
+  optional int64 version = 3;
+}
+
 message ClientToServerMessage {
   required string share = 1;
-  optional int32 protocol_version = 2 [default = 31];
+  optional int32 protocol_version = 2 [default = 32];
   enum Contents {
     COMMIT = 1;
     GET_UPDATES = 2;
@@ -832,6 +853,9 @@ message GetUpdatesResponse {
   // the server has updated the set of encryption keys (e.g. due to a key
   // rotation).
   repeated bytes encryption_keys = 6;
+
+  // Set of optional datatype contexts server mutations.
+  repeated DataTypeContext context_mutations = 7;
 };
 
 // The metadata response for GetUpdatesMessage.  This response is sent when
@@ -930,4 +954,3 @@ message ClientToServerResponse {
   // sent with any subsequent ClientToServerMessages.
   optional ChipBag new_bag_of_chips = 14;
 };
-