2 * Copyright 2011 Google Inc.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 // The Android delivery service's network endpoint id descriptor.
18 // This proto is internal to the Android channel.
22 package com.google.protos.ipc.invalidation;
24 option optimize_for = LITE_RUNTIME;
28 option java_outer_classname = "NanoAndroidChannel";
29 option java_package = "com.google.protos.ipc.invalidation";
32 import "client_protocol.proto";
34 // Defines the valid major versions of the android channel protocol. The
35 // channel version controls the expected envelope syntax and semantics of
36 // http and c2dm messages sent between the client and server.
39 // The initial version of the android channel protocol. Inbound and
40 // outbound channel packets contained a single binary protocol message only.
43 // Adds batching (multiple protocol messages in a single channel message)
46 // The default channel version used by Android clients. Lower major numbers
47 // will represent earlier versions and higher numbers will represent
48 // experimental versions that are not yet released.
51 // The minimum and maximum supported channel major versions. Used to validate
52 // incoming requests, so update as new versions are added or old versions are
53 // no longer supported.
58 // An id that specifies how to route a message to a Ticl on an Android device
60 message AndroidEndpointId {
61 // Field 1 was once the ProtocolVersion of this message.
63 // The "registration_id" returned when the client registers with c2dm. This
64 // id is required by c2dm in order to send a message to the device.
65 optional string c2dm_registration_id = 2;
67 // A key identifying a specific client on a device.
68 optional string client_key = 3;
70 // The C2DM sender ID to use to deliver messages to the endpoint.
71 optional string sender_id = 4 [deprecated = true];
73 // Defines the expected channel version generated by the network endpoint or
74 // expected in messages sent from the server.
75 optional Version channel_version = 5;
77 // The package name of the Android application that will receive the messages.
78 // Replaces sender_id. Must be set (unless sender_id is set; in which case it
80 optional string package_name = 6;
83 // A message addressed to a particular Ticl on an Android device.
84 message AddressedAndroidMessage {
85 // Client on the device to which the message is destined.
86 optional string client_key = 1;
88 // Message contents (serialized ServerToClientMessage).
89 optional bytes message = 2;
92 // A batch of messages addressed to potentially-different Ticls on the same
94 message AddressedAndroidMessageBatch {
95 repeated AddressedAndroidMessage addressed_message = 1;