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.
38 option allow_alias = true;
40 // The initial version of the android channel protocol. Inbound and
41 // outbound channel packets contained a single binary protocol message only.
44 // Adds batching (multiple protocol messages in a single channel message)
47 // The default channel version used by Android clients. Lower major numbers
48 // will represent earlier versions and higher numbers will represent
49 // experimental versions that are not yet released.
52 // The minimum and maximum supported channel major versions. Used to validate
53 // incoming requests, so update as new versions are added or old versions are
54 // no longer supported.
59 // An id that specifies how to route a message to a Ticl on an Android device
61 message AndroidEndpointId {
62 // Field 1 was once the ProtocolVersion of this message.
64 // The "registration_id" returned when the client registers with c2dm. This
65 // id is required by c2dm in order to send a message to the device.
66 optional string c2dm_registration_id = 2;
68 // A key identifying a specific client on a device.
69 optional string client_key = 3;
71 // The C2DM sender ID to use to deliver messages to the endpoint.
72 optional string sender_id = 4 [deprecated = true];
74 // Defines the expected channel version generated by the network endpoint or
75 // expected in messages sent from the server.
76 optional Version channel_version = 5;
78 // The package name of the Android application that will receive the messages.
79 // Replaces sender_id. Must be set (unless sender_id is set; in which case it
81 optional string package_name = 6;
84 // A message addressed to a particular Ticl on an Android device.
85 message AddressedAndroidMessage {
86 // Client on the device to which the message is destined.
87 optional string client_key = 1;
89 // Message contents (serialized ServerToClientMessage).
90 optional bytes message = 2;
93 // A batch of messages addressed to potentially-different Ticls on the same
95 message AddressedAndroidMessageBatch {
96 repeated AddressedAndroidMessage addressed_message = 1;