summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/cacheinvalidation/src/proto/client.proto
blob: a9018c76204b9db17ddbaf916d9fa08538d07eb9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/*
 * 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.
 */
//
// Specification of  protocol buffers that are used only on the client
// side.
//
// Note: unless otherwise specified in a comment, all fields in all messages
// are required, even though they are listed as optional.

syntax = "proto2";

package com.google.protos.ipc.invalidation;

option optimize_for = LITE_RUNTIME;

option java_outer_classname = "Client";





import "client_protocol.proto";

// An object that is serialized and given to clients for acknowledgement
// purposes.
message AckHandleP {
  optional InvalidationP invalidation = 1;
}

// The state persisted at a client so that it can be used after a reboot.
message PersistentTiclState {
  // Last token received from the server (required).
  optional bytes client_token = 1;

  // Last time a message was sent to the server (optional). Must be a value
  // returned by the clock in the Ticl system resources.
  optional int64 last_message_send_time_ms = 2 [default = 0];
}

// An envelope containing a Ticl's internal state, along with a digest of the
// serialized representation of this state, to ensure its integrity across
// reads and writes to persistent storage.
message PersistentStateBlob {
  // The (important parts of the) Ticl's internal state.
  optional PersistentTiclState ticl_state = 1;

  // Implementation-specific message authentication code for the Ticl state.
  optional bytes authentication_code = 2;
}

// State of a Ticl RunState.
message RunStateP {
  enum State {
    NOT_STARTED = 1;
    STARTED = 2;
    STOPPED = 3;
  }
  optional State state = 1;
}

// Fields in this message correspond directly to fields in
// ExponentialBackoffDelayGenerator.
message ExponentialBackoffState {
  optional int32 current_max_delay = 1;
  optional bool in_retry_mode = 2;
}