chromium/remoting/proto/ftl/v1/chromoting_message.proto

// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package remoting.ftl;

// Next Id: 6
message ChromotingMessage {
  // Monotonically increasing sequence id for messages, starting at 1.
  // Use 0 (or don't set) for messages that are not part of a sequence.
  optional int32 sequence_id = 2;

  oneof message {
    ChromotingEchoMessage echo = 4;
    ChromotingXmppMessage xmpp = 1;
    HostStatusChangeMessage status = 3;
    ReconnectSessionMessage reconnect = 5;
  }
}

// Chromoting Legacy XMPP message.
// Next Id: 2
message ChromotingXmppMessage {
  // A serialized version of the IQ stanza.
  optional string stanza = 1;
}

// Notifies the host of a change in its status in the Directory.
// Next Id: 2
message HostStatusChangeMessage {
  enum DirectoryState {
    NOT_SET = 0;
    DELETED = 1;
  }
  // Most recent operation that was performed on the host entry.
  optional DirectoryState directory_state = 1;
}

// Sent to the client to notify it that a new host instance is available for
// reconnections. This is used for reconnectable ChromeOS enterprise sessions
// where the ash-chrome process has been restarted and a new support host
// instance is available for the client to reconnect to.
// Note: Sessions which were interrupted due to flaky network conditions can
// recover via an ICE restart and should not send this message. It is only
// for cases where the host has been completely torn down and a new session must
// be established.
// Next Id: 2
message ReconnectSessionMessage {
  // The 7 digit value used for the Directory look-up which is used to ensure
  // the message is associated with the current session.
  optional string support_id = 1;
}

// A message which can be used to establish whether a client or host is
// responding to signaling messages (i.e. reachable via signaling channel).
// Use cases include checking to see if an endpoint is online after a
// disconnect or before displaying it in the host list with an online
// status.
// Next Id: 2
message ChromotingEchoMessage {
  // The message which should be echoed back.  Though the message can have
  // an arbitrary length, only the first 16 characters will be echoed back.
  optional string message = 1;
}