blob: 5cac5471d7d41b03cd7815c15c217063ef850d38 [file] [log] [blame]
// Copyright 2019 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.
syntax = "proto2";
option optimize_for = LITE_RUNTIME;
package remoting.apis.v1;
// A chromoting client or host may send a ChromotingEvent to the chromoting
// service to be logged.
// Next ID to use: 51
message ChromotingEvent {
// The type of this event.
// Next ID to use: 14
enum Type {
// Value returned when the field is not set.
UNSPECIFIED_TYPE = 0;
// The session state has changed.
SESSION_STATE = 1;
// There are new connection statistics.
CONNECTION_STATISTICS = 2;
// The session ID has expired, and a new one has been generated.
// This happens every 24 hours, for sessions that live that long.
// This event contains the expired session ID.
SESSION_ID_OLD = 3;
// The session ID has expired, and a new one has been generated.
// This happens every 24 hours, for sessions that live that long.
// This event contains the new session ID.
// Whenever a session ID expires, the chromoting client or host sends two
// events: one of type SESSION_ID_OLD, and one of type SESSION_ID_NEW.
// The events are separate, to guarantee that session IDs cannot be used
// to track a chromoting client or host for more than 24 hours.
SESSION_ID_NEW = 4;
// A valid heartbeat sent by either the host or the client.
HEARTBEAT = 5;
// An existing host restarted, and sent a heartbeat sequence id of 0.
HEARTBEAT_REJECTED = 6;
// An explicit restart event from hosts that support it.
RESTART = 7;
// Host status change: offline or online.
HOST_STATUS = 8;
// Signal strategy set-up progress.
SIGNAL_STRATEGY_PROGRESS = 9;
// For tracking features like number of ESC press in a session.
FEATURE_TRACKING = 10;
// Host and client screen dimensions and related information.
SCREEN_DIMENSIONS = 11;
// Chromoting.com migration.
CHROMOTING_DOT_COM_MIGRATION = 12;
// Number of network interfaces.
NUMBER_OF_NETWORK_INTERFACES = 13;
}
// The type of Chromoting event.
optional Type type = 1;
// A session ID.
// Unless the user opts out, the chromoting client or host randomly
// generates a session ID at the start of each session, and clears it at the
// end of each session. The client and host involved in one session need not
// choose the same ID for that session. The session ID will expire, and a new
// one will be generated, every 24 hours, for sessions that live that long.
// The session ID is only used by chromoting.
optional string session_id = 2;
// Whether this event was generated by a chromoting client or a
// chromoting host.
// Next ID to use: 2
enum Role {
// The Client is the browser or app side of the connection.
CLIENT = 0;
// The Host is the remote side of the connection that is being accessed.
HOST = 1;
}
// The role this event occurred on.
optional Role role = 3;
// Next ID to use: 8
// (== suppress_warning documentation-presence ==)
enum Os {
// Value returned when the field is not set.
UNSPECIFIED_OS = 0;
CRD_LINUX = 1;
CRD_CHROMEOS = 2;
CRD_MAC = 3;
CRD_WINDOWS = 4;
CRD_OTHER = 5;
CRD_ANDROID = 6;
CRD_IOS = 7;
}
// The OS on which the client is running.
optional Os os = 4;
// The version of the OS on which the client is running.
// It should be a sequence of integers, separated by periods.
optional string os_version = 5;
// The version of the client webapp that generated this event.
// It should be a sequence of integers, separated by periods.
optional string webapp_version = 7;
// The version of the host executable that generated this event.
// It should be a sequence of integers, separated by periods.
optional string host_version = 20;
// The CPU on which the client/host is running.
optional string cpu = 8;
// The following fields are typically associated with
// SESSION_STATE events.
// Types of session states.
enum SessionState {
// Unknown session state.
UNKNOWN = 1 [deprecated = true];
// The connection has been created.
CREATED = 2 [deprecated = true];
// The client plugin are missing or if they could not be loaded.
BAD_PLUGIN_VERSION = 3 [deprecated = true];
// Unknown plugin error.
UNKNOWN_PLUGIN_ERROR = 4 [deprecated = true];
// The session is connecting.
CONNECTING = 5;
// The session is being initialized.
INITIALIZING = 6;
// The session is connected.
CONNECTED = 7;
// The session is closed.
CLOSED = 8;
// The session failed to connect.
CONNECTION_FAILED = 9;
// There was an unknown error.
UNDEFINED = 10 [deprecated = true];
// The plugin was disabled.
PLUGIN_DISABLED = 11 [deprecated = true];
// The session connection dropped.
CONNECTION_DROPPED = 12;
// The connection is canceled by the user before it is connected.
CONNECTION_CANCELED = 13;
// The client has successfully authenticated with the host.
AUTHENTICATED = 14;
// The session has started, either by the user from an UX entry point or
// by the client on behalf on the user (e.g. auto reconnects).
STARTED = 15;
// The session is establishing connection to the signaling channel.
SIGNALING = 16;
// The session is creating the client plugin.
CREATING_PLUGIN = 17;
// The client received the first video packet.
VIDEO_STREAM_STARTED = 18;
}
// The session state reported by the client or host.
optional SessionState session_state = 9;
// Connection type definitions.
// Next ID to use: 4
enum ConnectionType {
// Value returned when the field is not set.
UNSPECIFIED_CONNECTION_TYPE = 0;
// Peer to peer connection.
DIRECT = 1;
// A STUN server is used to get an external network address.
STUN = 2;
// Direct connection was unavailable, using a third party server to route
// the traffic from peer to peer.
RELAY = 3;
}
// The connection type reported by the client or host.
optional ConnectionType connection_type = 10;
// Definition of a connection error.
// Next ID to use: 21
enum ConnectionError {
// No errors.
NONE = 1;
// The host is online.
HOST_OFFLINE = 2;
// Connection rejected since the host is not started.
SESSION_REJECTED = 3;
// The protocol does not match between host and client.
INCOMPATIBLE_PROTOCOL = 4;
// A network issue has prevented the remote connection.
NETWORK_FAILURE = 5;
// Unknown error.
UNKNOWN_ERROR = 6;
// The access code provided does not match the expected code.
INVALID_ACCESS_CODE = 7;
// The plugin on the client side is missing.
MISSING_PLUGIN = 8;
// Authentication has failed for the connection.
AUTHENTICATION_FAILED = 9;
// The plugin version does not match the expected version.
ERROR_BAD_PLUGIN_VERSION = 10;
// Connection rejected by the host due to an overload of failed login
// attempts.
HOST_OVERLOAD = 11;
// There has been an issue connecting peer-to-peer.
P2P_FAILURE = 12;
// An unexpected event.
UNEXPECTED = 13;
// Connection dropped since the client computer is sleeping.
CLIENT_SUSPENDED = 14;
// The plugin fails to initialize as Native Client is disabled.
NACL_DISABLED = 15;
// Maximum session duration has been reached.
MAX_SESSION_LENGTH = 16;
// Host failed to initialize the session.
HOST_CONFIGURATION_ERROR = 17;
// Host failed to initialize the session.
NACL_PLUGIN_CRASHED = 18;
// Host security policies do not allow connections from client.
INVALID_ACCOUNT = 19;
// Connection fails due to invalid third-party authentication token.
INVALID_THIRD_PARTY_TOKEN = 20;
}
// A connection error reported by the client or host.
optional ConnectionError connection_error = 11;
// The time in seconds from the start of a session to a log event.
optional float session_duration = 12;
// The following fields are typically associated with
// CONNECTION_STATISTICS events.
// The video bandwidth reported by the client, in bytes per second.
optional float video_bandwidth = 13;
// The capture latency reported by the client, in milliseconds.
optional float capture_latency = 14;
// The max capture latency reported by the client, in milliseconds.
optional float max_capture_latency = 38;
// The encode latency reported by the client, in milliseconds.
optional float encode_latency = 15;
// The max encode latency reported by the client, in milliseconds.
optional float max_encode_latency = 39;
// The decode latency reported by the client, in milliseconds.
optional float decode_latency = 16;
// The max decode latency reported by the client, in milliseconds.
optional float max_decode_latency = 40;
// The render latency reported by the client, in milliseconds.
optional float render_latency = 17;
// The max render latency reported by the client, in milliseconds.
optional float max_render_latency = 41;
// The roundtrip latency reported by the client, in milliseconds.
optional float roundtrip_latency = 18;
// The max roundtrip latency reported by the client, in milliseconds.
optional float max_roundtrip_latency = 42;
// Definition of mode of operation.
enum Mode {
// Value returned when the field is not set.
UNSPECIFIED_MODE = 0;
// Help/support mode.
IT2ME = 1;
// Personal connection.
ME2ME = 2;
}
// The mode in which the client or host is operating.
optional Mode mode = 19;
// Signaling strategies available.
// Next ID to use: 5
enum SignalStrategyType {
// Value returned when the field is not set.
UNSPECIFIED_SIGNALING_STRATEGY_TYPE = 0;
// XMPP, gTalk.
XMPP = 1;
// Web Connection Server, Babel.
WCS = 2;
// XMPP, Marmoset.
LCS = 3;
// Protobuf, Tachyon.
FTL = 4;
}
// The signal strategy in use.
optional SignalStrategyType signal_strategy_type = 24;
// The previous state of the session. Only used in SESSION_STATE events.
optional SessionState previous_session_state = 28;
// This enum identifies how a remote session is being intitiated.
enum SessionEntryPoint {
// Value returned when the field is not set.
UNSPECIFIED_SESSION_ENTRY_POINT = 0;
// The user initiates the session by clicking on the connect button (or
// access button for IT2ME).
CONNECT_BUTTON = 1;
// The user initiates the connection by clicking on the reconnect button
// on the Me2Me finished dialog.
RECONNECT_BUTTON = 2;
// This session is initiated on behalf on the user to auto-reconnect after
// a connection drop.
AUTO_RECONNECT_ON_CONNECTION_DROPPED = 3;
// A user-initiated connection attempt has just failed with HOST_OFFLINE.
// The client refreshes the JID of the host and initiates a new connection
// on behalf of the user.
AUTO_RECONNECT_ON_HOST_OFFLINE = 4;
}
// This field identifies how a remote session is being intitiated.
optional SessionEntryPoint session_entry_point = 29;
// The OS on which the host is running.
optional Os host_os = 32;
// The version of the OS on which the host is running.
optional string host_os_version = 33;
// This enum identifies how a chromoting session is being authenticated.
enum AuthMethod {
// Value returned when the field is not set.
UNSPECIFIED_AUTH_METHOD = 0;
// A numeric passcode set locally.
PIN = 1;
// A IT2ME style auth.
ACCESS_CODE = 2;
// Trusted connection without a pin.
PINLESS = 3;
// Other security, like a corp auth.
THIRD_PARTY = 4;
}
// This field identifies how a chromoting session is being authenticated.
optional AuthMethod auth_method = 34;
}