Index: sync/protocol/sync.proto |
diff --git a/sync/protocol/sync.proto b/sync/protocol/sync.proto |
index ec9a1d2365cdc4991977fe3a17d85ea2f9606d8e..d1af6d7261c7626820ca574b14a5f1c422672a09 100644 |
--- a/sync/protocol/sync.proto |
+++ b/sync/protocol/sync.proto |
@@ -455,6 +455,13 @@ message AuthenticateMessage { |
required string auth_token = 1; |
}; |
+message GetEncryptionKeyMessage { |
tim (not reviewing)
2012/07/19 21:42:03
Comments on the messages + fields.
Nicolas Zea
2012/07/24 22:51:24
Done.
|
+} |
+ |
+message GetEncryptionKeyResponse { |
+ optional bytes key = 1; |
+} |
+ |
message ClientToServerMessage { |
required string share = 1; |
optional int32 protocol_version = 2 [default = 31]; |
@@ -463,6 +470,7 @@ message ClientToServerMessage { |
GET_UPDATES = 2; |
AUTHENTICATE = 3; |
CLEAR_DATA = 4; |
+ GET_ENCRYPTION_KEY = 5; |
} |
required Contents message_contents = 3; |
@@ -483,6 +491,8 @@ message ClientToServerMessage { |
// This is only sent on the first getupdates of every sync cycle, |
// as an optimization to save bandwidth. |
optional DebugInfo debug_info = 10; |
+ |
+ optional GetEncryptionKeyMessage get_encryption_key = 11; |
}; |
message CommitResponse { |
@@ -625,25 +635,6 @@ message ClientToServerResponse { |
optional CommitResponse commit = 1; |
optional GetUpdatesResponse get_updates = 2; |
optional AuthenticateResponse authenticate = 3; |
- // DEPRECATED - this field was never used in production. |
- // optional ClearUserDataResponse clear_user_data = 9; |
- optional GetUpdatesMetadataResponse stream_metadata = 10; |
- // If GetUpdatesStreamingResponse is contained in the ClientToServerResponse, |
- // none of the other fields (error_code and etc) will be set. |
- optional GetUpdatesStreamingResponse stream_data = 11; |
- |
- message Error { |
- optional SyncEnums.ErrorType error_type = 1 [default = UNKNOWN]; |
- optional string error_description = 2; |
- optional string url = 3; |
- optional SyncEnums.Action action = 4 [default = UNKNOWN_ACTION]; |
- |
- // Currently only meaningful if |error_type| is throttled. If this field |
- // is absent then the whole client (all datatypes) is throttled. |
- repeated int32 error_data_type_ids = 5; |
- } |
- |
- optional Error error = 13; |
// Up until protocol_version 24, the default was SUCCESS which made it |
// impossible to add new enum values since older clients would parse any |
@@ -663,9 +654,29 @@ message ClientToServerResponse { |
optional ClientCommand client_command = 7; |
optional ProfilingData profiling_data = 8; |
+ // DEPRECATED - this field was never used in production. |
+ // optional ClearUserDataResponse clear_user_data = 9; |
+ optional GetUpdatesMetadataResponse stream_metadata = 10; |
+ // If GetUpdatesStreamingResponse is contained in the ClientToServerResponse, |
+ // none of the other fields (error_code and etc) will be set. |
+ optional GetUpdatesStreamingResponse stream_data = 11; |
// The data types whose storage has been migrated. Present when the value of |
// error_code is MIGRATION_DONE. |
repeated int32 migrated_data_type_id = 12; |
+ |
+ message Error { |
+ optional SyncEnums.ErrorType error_type = 1 [default = UNKNOWN]; |
+ optional string error_description = 2; |
+ optional string url = 3; |
+ optional SyncEnums.Action action = 4 [default = UNKNOWN_ACTION]; |
+ |
+ // Currently only meaningful if |error_type| is throttled. If this field |
+ // is absent then the whole client (all datatypes) is throttled. |
+ repeated int32 error_data_type_ids = 5; |
+ } |
+ optional Error error = 13; |
+ |
+ optional GetEncryptionKeyResponse get_encryption_key = 14; |
}; |