import "steammessages_base.proto";
import "steammessages_remoteclient_discovery.proto";

option optimize_for = SPEED;
option cc_generic_services = false;

enum ERemoteClientPairWifiAPResult {
	k_ERemoteClientPairWifiAPOK = 1;
	k_ERemoteClientPairWifiAPFail = 2;
	k_ERemoteClientPairWifiAPNetworkError = 3;
	k_ERemoteClientPairWifiAPUnauthorized = 4;
	k_ERemoteClientPairWifiAPNoDonglePresent = 5;
	k_ERemoteClientPairWifiAPTimeout = 6;
	k_ERemoteClientPairWifiAPCanceled = 7;
}

message CMsgRemoteClientStatus {
	optional uint64 client_id = 1;
	optional uint64 instance_id = 2;
	optional .CMsgRemoteClientBroadcastStatus status = 3;
}

message CMsgRemoteClientAppStatus {
	message AppUpdateInfo {
		optional fixed32 time_update_start = 1;
		optional uint64 bytes_to_download = 2;
		optional uint64 bytes_downloaded = 3;
		optional uint64 bytes_to_process = 4;
		optional uint64 bytes_processed = 5;
		optional int32 estimated_seconds_remaining = 6 [default = -1];
		optional int32 update_result = 7;
		optional uint32 update_state = 8;
	}

	message ShortcutInfo {
		optional string name = 1;
		optional string icon = 2;
		repeated string categories = 3;
		optional string exepath = 4;
	}

	message AppStatus {
		optional uint32 app_id = 1;
		optional uint32 app_state = 2;
		optional .CMsgRemoteClientAppStatus.AppUpdateInfo update_info = 3;
		optional .CMsgRemoteClientAppStatus.ShortcutInfo shortcut_info = 4;
		optional bool vr_not_required = 5 [default = true];
	}

	repeated .CMsgRemoteClientAppStatus.AppStatus status_updates = 1;
}

message CMsgRemoteClientStartStream {
	message ReservedGamepad {
		optional uint32 controller_type = 1;
		optional uint32 controller_subtype = 2;
	}

	optional uint32 app_id = 1;
	optional int32 environment = 2;
	optional int32 gamepad_count = 3;
	optional int32 launch_option = 4 [default = -1];
	optional bool lock_parental_lock = 5 [default = false];
	optional string unlock_parental_lock = 6;
	optional int32 maximum_resolution_x = 7;
	optional int32 maximum_resolution_y = 8;
	repeated .CMsgRemoteClientStartStream.ReservedGamepad gamepads = 9;
	optional int32 audio_channel_count = 10 [default = 2];
	repeated .EStreamTransport supported_transport = 11;
}

message CMsgRemoteClientStartStreamResponse {
	optional int32 e_launch_result = 1 [default = 2];
	optional uint32 stream_port = 2;
	repeated int32 launch_options = 3;
	optional bytes auth_token = 4;
	optional .EStreamTransport transport = 5 [default = k_EStreamTransportUDP];
	optional string relay_server = 6;
	optional string launch_task = 7;
	optional string launch_task_detail = 8;
	optional int32 launch_tasks_done = 9;
	optional int32 launch_tasks_total = 10;
	optional string vr_connection_params = 11;
}

message CMsgRemoteClientPing {
}

message CMsgRemoteClientPingResponse {
}

message CMsgRemoteClientAcceptEULA {
	repeated uint32 app_id = 1;
	repeated string eula_id = 2;
	repeated uint32 eula_version = 3;
}

message CMsgRemoteClientGetControllerConfig {
	optional uint32 app_id = 1;
	optional uint32 controller_index = 3;
}

message CMsgRemoteClientGetControllerConfigResponse {
	optional int32 eresult = 1 [default = 2];
	optional bytes config_vdf = 2;
}

message CMsgRemoteClientStreamingEnabled {
	required bool enabled = 1;
}

message CMsgRemoteClientWifiAPStatus {
	optional string ssid = 1;
	optional string password = 2;
	optional bool wpa2_deprecated = 3;
	optional bool is_pairing_capable = 4;
	optional fixed64 paired_network_hash = 5;
}

message CMsgRemoteClientPairWifiAP {
	optional string ssid = 1;
	optional string password = 2;
}

message CMsgRemoteClientPairWifiAPResponse {
	optional int32 e_pair_result = 1 [default = 2];
	optional string ssid = 2;
	optional string password = 3;
}
