| Index: blimp/common/proto/helium.proto
|
| diff --git a/blimp/common/proto/helium.proto b/blimp/common/proto/helium.proto
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..b8e7619ff002ab80371be9897f2f744c654af5a4
|
| --- /dev/null
|
| +++ b/blimp/common/proto/helium.proto
|
| @@ -0,0 +1,57 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +//
|
| +// Over-the-wire message definitions used for the Helium synchronization
|
| +// protocol.
|
| +syntax = "proto3";
|
| +
|
| +option optimize_for = LITE_RUNTIME;
|
| +
|
| +import "blimp_message.proto";
|
| +
|
| +package blimp.helium;
|
| +
|
| +// Vector clock that is used to get the partial order of changes
|
| +// This class is the proto definition of
|
| +// blimp/net/helium/vector_clock.h
|
| +message VectorClock {
|
| + uint32 local_revision = 1;
|
| + uint32 remote_revision = 2;
|
| +}
|
| +
|
| +// Sample proto for test purposes
|
| +message TestChangeset {
|
| + int32 value1 = 1;
|
| + int32 value2 = 2;
|
| +}
|
| +
|
| +// A "union" of the allowed types that are going to be serialized. There will
|
| +// be one for each Helium Object that requires serialization.
|
| +// For example: GeoLocation, EngineSettings, etc.
|
| +message Changeset {
|
| + oneof data {
|
| + // Sample message for the test
|
| + TestChangeset test = 1;
|
| + };
|
| +}
|
| +
|
| +// A message encapsulates the actual Changeset with the identifier of the
|
| +// object and the timestamp of the checkpoint.
|
| +message HeliumMessage {
|
| + // Identifies the local revision that this changeset applies to (relative
|
| + // to the sender), and the remote revision that the local side most recently
|
| + // received (i.e. an ACK, in effect).
|
| + VectorClock from = 1;
|
| + // Provides the local view of the vector-clock following application of
|
| + // the changeset. This allows a single changeset to collate changes across
|
| + // several revisions, following a break in connectivity, rather than simply
|
| + // re-transmitting the lost changesets.
|
| + VectorClock to = 2;
|
| +
|
| + // Identifies the Object to which this changeset applies.
|
| + uint32 object_id = 3;
|
| +
|
| + // The changeset that contain the actual changes
|
| + Changeset change = 4;
|
| +}
|
|
|