import "enums.proto";
import "steammessages_base.proto";
import "webuimessages_base.proto";

option optimize_for = SPEED;
option cc_generic_services = true;

message CMsgFactoryResetState {
	optional bool is_running = 1;
	optional int32 progress = 2;
	optional bool is_restart_pending = 3;
	optional fixed32 rtime_estimated_completion = 4;
}

message CSteamOSManagerState {
	optional bool is_service_available = 1;
	optional string os_version = 2;
	optional bool is_mandatory_update_available = 3;
	optional .EStartupMovieVariant startup_movie_variant = 4 [default = k_EStartupMovieVariant_Invalid];
	optional bool is_status_led_control_available = 5;
	optional .CMsgFactoryResetState factory_reset_state = 6;
	optional bool is_tdp_limit_available = 7;
	optional int32 tdp_limit_min = 8;
	optional int32 tdp_limit_max = 9;
	optional bool is_cec_available = 10;
	optional bool is_wifi_debug_supported = 11;
	optional bool is_wifi_debug_force_disabled = 12;
	optional bool is_wifi_force_wpa_supplicant_supported = 13;
	optional bool is_manual_gpu_clock_available = 14;
	optional int32 manual_gpu_clock_min = 15;
	optional int32 manual_gpu_clock_max = 16;
	repeated string platform_performance_profiles_available = 17;
	optional string platform_performance_profile_default = 18;
	optional bool is_charge_limit_available = 20;
	optional int32 charge_limit_min = 21;
	optional int32 charge_limit_max = 22;
	optional int32 charge_limit_default = 23;
	optional bool is_screen_reader_supported = 24;
	repeated string screen_reader_locales_available = 25;
	optional string screen_reader_locale_default = 26;
	optional bool is_system_tracing_available = 27;
	optional bool is_vrs_available = 28;
}

message CSteamOSManager_GetState_Request {
}

message CSteamOSManager_GetState_Response {
	optional .CSteamOSManagerState state = 1;
}

message CSteamOSManager_StateChanged_Notification {
}

message CSteamOSManager_IsTelemetryHelperAvailable_Request {
	optional .ESLSHelper etype = 1 [default = k_ESLSHelper_Invalid];
}

message CSteamOSManager_IsTelemetryHelperAvailable_Response {
	optional bool available = 1;
}

message CSteamOSManager_OptOutOfSideloadedClient_Request {
}

message CSteamOSManager_OptOutOfSideloadedClient_Response {
}

message CSteamOSManager_ApplyMandatoryUpdate_Request {
}

message CSteamOSManager_ApplyMandatoryUpdate_Response {
}

message CSteamOSManager_FactoryReset_Request {
	optional bool reset_os = 1;
	optional bool reset_user_data = 2;
}

message CSteamOSManager_FactoryReset_Response {
}

message CSteamOSSLSPlugin {
	optional .ESLSHelper etype = 1 [default = k_ESLSHelper_Invalid];
	optional bool is_available = 2;
	optional bool is_enabled = 3;
}

message CSteamOSSLSState {
	optional bool is_available = 1;
	optional bool is_enabled = 2;
	repeated .CSteamOSSLSPlugin plugins = 3;
}

message CSteamOSSLS_GetState_Request {
}

message CSteamOSSLS_GetState_Response {
	optional .CSteamOSSLSState state = 1;
}

message CSteamOSSLS_StateChanged_Notification {
}

message CSteamOSSLS_SetEnabled_Request {
	optional bool enabled = 1;
}

message CSteamOSSLS_SetEnabled_Response {
}

message CSteamOSSLS_SetPluginEnabled_Request {
	optional .ESLSHelper etype = 1 [default = k_ESLSHelper_Invalid];
	optional bool enabled = 2;
}

message CSteamOSSLS_SetPluginEnabled_Response {
}

service SteamOSManager {
	option (webui_service_execution_site) = k_EClientExecutionSiteSteamUI;

	rpc GetState (.CSteamOSManager_GetState_Request) returns (.CSteamOSManager_GetState_Response);
	rpc NotifyStateChanged (.CSteamOSManager_StateChanged_Notification) returns (.WebUINoResponse);
	rpc OptOutOfSideloadedClient (.CSteamOSManager_OptOutOfSideloadedClient_Request) returns (.CSteamOSManager_OptOutOfSideloadedClient_Response);
	rpc ApplyMandatoryUpdate (.CSteamOSManager_ApplyMandatoryUpdate_Request) returns (.CSteamOSManager_ApplyMandatoryUpdate_Response);
	rpc FactoryReset (.CSteamOSManager_FactoryReset_Request) returns (.CSteamOSManager_FactoryReset_Response);
}

service SteamOSSLS {
	option (webui_service_execution_site) = k_EClientExecutionSiteSteamUI;

	rpc GetState (.CSteamOSSLS_GetState_Request) returns (.CSteamOSSLS_GetState_Response);
	rpc NotifyStateChanged (.CSteamOSSLS_StateChanged_Notification) returns (.WebUINoResponse);
	rpc SetEnabled (.CSteamOSSLS_SetEnabled_Request) returns (.CSteamOSSLS_SetEnabled_Response);
	rpc SetPluginEnabled (.CSteamOSSLS_SetPluginEnabled_Request) returns (.CSteamOSSLS_SetPluginEnabled_Response);
}
