syntax = "proto2";
import "steammessages_base.proto";
import "steammessages_unified_base.proto";

option py_generic_services = true;

enum EValveIndexComponent {
	k_EValveIndexComponentUnknown = 0;
	k_EValveIndexComponentHMD = 1;
	k_EValveIndexComponentLeftKnuckle = 2;
	k_EValveIndexComponentRightKnuckle = 3;
	k_ETempDTst1 = 4;
	k_ETempDTst2 = 5;
	k_ETempDTst3 = 6;
}

message CAccountHardware_RegisterSteamController_Request {
	optional string serial_number = 1;
	optional string controller_code = 2;
}

message CAccountHardware_RegisterSteamController_Response {
}

message CAccountHardware_CompleteSteamControllerRegistration_Request {
	optional string serial_number = 1;
	optional string controller_code = 2;
}

message CAccountHardware_CompleteSteamControllerRegistration_Response {
}

message CAccountHardware_QueryAccountsRegisteredToSerial_Request {
	optional string serial_number = 1;
	optional string controller_code = 2;
}

message CAccountHardware_QueryAccountsRegisteredToSerial_Accounts {
	optional uint32 accountid = 1;
	optional bool registration_complete = 2;
}

message CAccountHardware_QueryAccountsRegisteredToSerial_Response {
	repeated .CAccountHardware_QueryAccountsRegisteredToSerial_Accounts accounts = 1;
}

message CAccountHardware_SteamControllerSetConfig_ControllerConfig {
	optional string appidorname = 1;
	optional uint64 publishedfileid = 2;
	optional string templatename = 3;
}

message CAccountHardware_SteamControllerSetConfig_Request {
	optional string serial_number = 1;
	optional string controller_code = 2;
	optional uint32 accountid = 3;
	repeated .CAccountHardware_SteamControllerSetConfig_ControllerConfig configurations = 4;
	optional int32 controller_type = 5 [default = 2];
	optional bool only_for_this_serial = 6 [default = false];
}

message CAccountHardware_SteamControllerSetConfig_Response {
}

message CAccountHardware_SteamControllerGetConfig_Request {
	optional string serial_number = 1;
	optional string controller_code = 2;
	optional uint32 accountid = 3;
	optional string appidorname = 4;
	optional int32 controller_type = 5 [default = 2];
	optional bool only_for_this_serial = 6 [default = false];
}

message CAccountHardware_SteamControllerGetConfig_ControllerConfig {
	optional string appidorname = 1;
	optional uint64 publishedfileid = 2;
	optional string templatename = 3;
	optional string serial_number = 4;
	optional bool autosave = 5 [default = false];
}

message CAccountHardware_SteamControllerGetConfig_Response {
	repeated .CAccountHardware_SteamControllerGetConfig_ControllerConfig configurations = 1;
}

message CAccountHardware_DeRegisterSteamController_Request {
	optional string serial_number = 1;
	optional string controller_code = 2;
	optional uint32 accountid = 3;
}

message CAccountHardware_DeRegisterSteamController_Response {
}

message CAccountHardware_SetPersonalizationFile_Request {
	optional string serial_number = 1;
	optional uint64 publishedfileid = 2;
	optional uint32 accountid = 3;
}

message CAccountHardware_SetPersonalizationFile_Response {
}

message CAccountHardware_GetPersonalizationFile_Request {
	optional string serial_number = 1;
	optional uint32 accountid = 2;
}

message CAccountHardware_GetPersonalizationFile_Response {
	optional uint64 publishedfileid = 1;
}

message CAccountHardware_VRCompatibilityCheck_Request {
	message Pair {
		optional string key = 1;
		optional string value = 2;
	}

	optional string product_name = 1;
	repeated .CAccountHardware_VRCompatibilityCheck_Request.Pair values = 2;
}

message CAccountHardware_VRCompatibilityCheck_Response {
	message Pair {
		optional string key = 1;
		optional string value = 2;
	}

	message ComponentDisplay {
		optional string name = 1;
		optional string image = 2;
		optional string value = 3;
	}

	repeated .CAccountHardware_VRCompatibilityCheck_Response.Pair values = 1;
	repeated .CAccountHardware_VRCompatibilityCheck_Response.ComponentDisplay components = 2;
}

message CAccountHardware_RegisterValveIndexComponent_Request {
	optional string serial_number = 1;
	optional string manufacturer_serial_number = 2;
	optional string component_code = 3;
	optional .EValveIndexComponent component_type = 4 [default = k_EValveIndexComponentUnknown];
	optional int32 estimated_time_registered = 5;
}

message CAccountHardware_RegisterValveIndexComponent_Response {
}

message CAccountHardware_GetSteamDeckComponents_Request {
	optional string serial_number = 1;
	optional string controller_code = 2;
}

message CAccountHardware_GetSteamDeckComponents_Response {
	optional string json_components = 1;
}

service AccountHardware {
	rpc RegisterSteamController (.CAccountHardware_RegisterSteamController_Request) returns (.CAccountHardware_RegisterSteamController_Response);
	rpc CompleteSteamControllerRegistration (.CAccountHardware_CompleteSteamControllerRegistration_Request) returns (.CAccountHardware_CompleteSteamControllerRegistration_Response);
	rpc QueryAccountsRegisteredToController (.CAccountHardware_QueryAccountsRegisteredToSerial_Request) returns (.CAccountHardware_QueryAccountsRegisteredToSerial_Response);
	rpc SetDesiredControllerConfigForApp (.CAccountHardware_SteamControllerSetConfig_Request) returns (.CAccountHardware_SteamControllerSetConfig_Response);
	rpc GetDesiredControllerConfigForApp (.CAccountHardware_SteamControllerGetConfig_Request) returns (.CAccountHardware_SteamControllerGetConfig_Response);
	rpc DeRegisterSteamController (.CAccountHardware_DeRegisterSteamController_Request) returns (.CAccountHardware_DeRegisterSteamController_Response);
	rpc SetControllerPersonalizationFile (.CAccountHardware_SetPersonalizationFile_Request) returns (.CAccountHardware_SetPersonalizationFile_Response);
	rpc GetControllerPersonalizationFile (.CAccountHardware_GetPersonalizationFile_Request) returns (.CAccountHardware_GetPersonalizationFile_Response);
	rpc VRCompatibilityCheck (.CAccountHardware_VRCompatibilityCheck_Request) returns (.CAccountHardware_VRCompatibilityCheck_Response);
	rpc RegisterValveIndexComponent (.CAccountHardware_RegisterValveIndexComponent_Request) returns (.CAccountHardware_RegisterValveIndexComponent_Response);
	rpc GetSteamDeckComponents (.CAccountHardware_GetSteamDeckComponents_Request) returns (.CAccountHardware_GetSteamDeckComponents_Response);
}
