Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(336)

Unified Diff: third_party/cacheinvalidation/src/google/cacheinvalidation/android_channel.proto

Issue 1162033004: Pull cacheinvalidations code directory into chromium repo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/cacheinvalidation/src/google/cacheinvalidation/android_channel.proto
diff --git a/third_party/cacheinvalidation/src/google/cacheinvalidation/android_channel.proto b/third_party/cacheinvalidation/src/google/cacheinvalidation/android_channel.proto
new file mode 100644
index 0000000000000000000000000000000000000000..1e6a1fbd27a56736956b5490e5f6b7591632c4e7
--- /dev/null
+++ b/third_party/cacheinvalidation/src/google/cacheinvalidation/android_channel.proto
@@ -0,0 +1,91 @@
+/*
+ * Copyright 2011 Google Inc.
+ *
+ * Licensed 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 Android delivery service's network endpoint id descriptor.
+// This proto is internal to the Android channel.
+
+syntax = "proto2";
+
+option optimize_for = LITE_RUNTIME;
+
+package ipc.invalidation;
+
+import "client_protocol.proto";
+
+// Defines the valid major versions of the android channel protocol. The
+// channel version controls the expected envelope syntax and semantics of
+// http and c2dm messages sent between the client and server.
+enum MajorVersion {
+ option allow_alias = true;
+
+ // The initial version of the android channel protocol. Inbound and
+ // outbound channel packets contained a single binary protocol message only.
+ INITIAL = 0;
+
+ // Adds batching (multiple protocol messages in a single channel message)
+ BATCH = 1;
+
+ // The default channel version used by Android clients. Lower major numbers
+ // will represent earlier versions and higher numbers will represent
+ // experimental versions that are not yet released.
+ DEFAULT = 0;
+
+ // The minimum and maximum supported channel major versions. Used to validate
+ // incoming requests, so update as new versions are added or old versions are
+ // no longer supported.
+ MIN_SUPPORTED = 0;
+ MAX_SUPPORTED = 1;
+}
+
+// An id that specifies how to route a message to a Ticl on an Android device
+// via C2DM.
+message EndpointId {
+ // Field 1 was once the ProtocolVersion of this message.
+
+ // The "registration_id" returned when the client registers with c2dm. This
+ // id is required by c2dm in order to send a message to the device.
+ optional string c2dm_registration_id = 2;
+
+ // A key identifying a specific client on a device.
+ optional string client_key = 3;
+
+ // The C2DM sender ID to use to deliver messages to the endpoint.
+ optional string sender_id = 4 [deprecated = true];
+
+ // Defines the expected channel version generated by the network endpoint or
+ // expected in messages sent from the server.
+ optional Version channel_version = 5;
+
+ // The package name of the Android application that will receive the messages.
+ // Replaces sender_id. Must be set (unless sender_id is set; in which case it
+ // must not be set).
+ optional string package_name = 6;
+}
+
+// A message addressed to a particular Ticl on an Android device.
+message AddressedAndroidMessage {
+ // Client on the device to which the message is destined.
+ optional string client_key = 1;
+
+ // Message contents (serialized ServerToClientMessage).
+ optional bytes message = 2;
+}
+
+// A batch of messages addressed to potentially-different Ticls on the same
+// Android device.
+message AddressedAndroidMessageBatch {
+ repeated AddressedAndroidMessage addressed_message = 1;
+}

Powered by Google App Engine
This is Rietveld 408576698