| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 // |
| 5 // Over-the-wire message definitions used for the Helium synchronization |
| 6 // protocol. |
| 7 |
| 8 syntax = "proto3"; |
| 9 |
| 10 option optimize_for = LITE_RUNTIME; |
| 11 |
| 12 import "blimp_message.proto"; |
| 13 |
| 14 package blimp.proto; |
| 15 |
| 16 // Vector clock that is used to get the partial order of changes. |
| 17 // This class is the proto definition of |
| 18 // //blimp/net/helium/vector_clock.h |
| 19 message VectorClockMessage { |
| 20 uint64 local_revision = 1; |
| 21 uint64 remote_revision = 2; |
| 22 } |
| 23 |
| 24 // Sample proto for test purposes. |
| 25 message TestChangesetMessage { |
| 26 int32 value1 = 1; |
| 27 int32 value2 = 2; |
| 28 } |
| 29 |
| 30 // A union of serializable Changeset types. There will be one for each Helium |
| 31 // Object that requires serialization. |
| 32 message ChangesetMessage { |
| 33 oneof payload { |
| 34 // Sample message for the test |
| 35 TestChangesetMessage test = 1; |
| 36 }; |
| 37 } |
| 38 |
| 39 // Message that encapsulates a change for a helium object. It contains |
| 40 // information required to restore the object from the time specified in |from| |
| 41 // until |to|. |
| 42 // |
| 43 // This is the main object that will be sent in the Helium transport |
| 44 message HeliumMessage { |
| 45 // Identifies the local revision that this changeset applies to (relative |
| 46 // to the sender), and the remote revision that the local side most recently |
| 47 // received (i.e. an ACK, in effect). |
| 48 VectorClockMessage from = 1; |
| 49 |
| 50 // Provides the local view of the vector-clock following application of |
| 51 // the changeset. This allows a single changeset to collate changes across |
| 52 // several revisions, following a break in connectivity, rather than simply |
| 53 // re-transmitting the lost changesets. |
| 54 VectorClockMessage to = 2; |
| 55 |
| 56 // Identifies the Object to which this changeset applies. |
| 57 uint32 object_id = 3; |
| 58 |
| 59 // The changeset that contain the actual changes. |
| 60 ChangesetMessage change = 4; |
| 61 } |
| OLD | NEW |