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

option py_generic_services = true;

message CParental_EnableParentalSettings_Request {
	optional string password = 1;
	optional .ParentalSettings settings = 2;
	optional string sessionid = 3;
	optional uint32 enablecode = 4;
	optional fixed64 steamid = 10;
}

message CParental_EnableParentalSettings_Response {
}

message CParental_DisableParentalSettings_Request {
	optional string password = 1;
	optional fixed64 steamid = 10;
}

message CParental_DisableParentalSettings_Response {
}

message CParental_GetParentalSettings_Request {
	optional fixed64 steamid = 10;
}

message CParental_GetParentalSettings_Response {
	optional .ParentalSettings settings = 1;
}

message CParental_GetSignedParentalSettings_Request {
	optional uint32 priority = 1;
}

message CParental_GetSignedParentalSettings_Response {
	optional bytes serialized_settings = 1;
	optional bytes signature = 2;
}

message CParental_SetParentalSettings_Request {
	optional string password = 1;
	optional .ParentalSettings settings = 2;
	optional string new_password = 3;
	optional string sessionid = 4;
	optional fixed64 steamid = 10;
}

message CParental_SetParentalSettings_Response {
}

message CParental_ValidateToken_Request {
	optional string unlock_token = 1;
}

message CParental_ValidateToken_Response {
}

message CParental_ValidatePassword_Request {
	optional string password = 1;
	optional string session = 2;
	optional bool send_unlock_on_success = 3;
}

message CParental_ValidatePassword_Response {
	optional string token = 1;
}

message CParental_LockClient_Request {
	optional string session = 1;
}

message CParental_LockClient_Response {
}

message CParental_RequestRecoveryCode_Request {
}

message CParental_RequestRecoveryCode_Response {
}

message CParental_DisableWithRecoveryCode_Request {
	optional uint32 recovery_code = 1;
	optional fixed64 steamid = 10;
}

message CParental_DisableWithRecoveryCode_Response {
}

message CParental_RequestFeatureAccess_Request {
	optional uint32 features = 1;
	optional fixed64 steamid = 10;
}

message CParental_RequestFeatureAccess_Response {
	optional fixed64 requestid = 1;
}

message CParental_ApproveFeatureAccess_Request {
	optional bool approve = 1;
	optional fixed64 requestid = 2;
	optional uint32 features = 3;
	optional uint32 duration = 4;
	optional fixed64 steamid = 10;
}

message CParental_ApproveFeatureAccess_Response {
}

message CParental_RequestPlaytime_Request {
	optional uint32 time_expires = 1;
	optional .ParentalPlaytimeDay current_playtime_restrictions = 2;
	optional fixed64 steamid = 10;
}

message CParental_RequestPlaytime_Response {
	optional fixed64 requestid = 1;
}

message CParental_ApprovePlaytime_Request {
	optional bool approve = 1;
	optional fixed64 requestid = 2;
	optional .ParentalTemporaryPlaytimeRestrictions restrictions_approved = 3;
	optional fixed64 steamid = 10;
}

message CParental_ApprovePlaytime_Response {
}

message CParental_GetRequests_Request {
	optional uint32 rt_include_completed_since = 1;
	optional fixed64 family_groupid = 2;
}

message CParental_GetRequests_Response {
	repeated .ParentalFeatureRequest feature_requests = 1;
	repeated .ParentalPlaytimeRequest playtime_requests = 2;
}

message CParental_ReportPlaytimeAndNotify_Request {
	optional uint32 day_of_week = 1;
	optional uint32 minutes_used = 2;
	optional fixed64 steamid = 10;
}

message CParental_ReportPlaytimeAndNotify_Response {
}

message CParental_ParentalSettingsChange_Notification {
	optional bytes serialized_settings = 1;
	optional bytes signature = 2;
	optional string password = 3;
	optional string sessionid = 4;
}

message CParental_ParentalUnlock_Notification {
	optional string password = 1;
	optional string sessionid = 2;
}

message CParental_ParentalLock_Notification {
	optional string sessionid = 1;
}

message CParental_PlaytimeUsed_Notification {
	optional uint32 day_of_week = 1;
	optional uint32 minutes_used = 2;
}

service Parental {
	rpc EnableParentalSettings (.CParental_EnableParentalSettings_Request) returns (.CParental_EnableParentalSettings_Response);
	rpc DisableParentalSettings (.CParental_DisableParentalSettings_Request) returns (.CParental_DisableParentalSettings_Response);
	rpc GetParentalSettings (.CParental_GetParentalSettings_Request) returns (.CParental_GetParentalSettings_Response);
	rpc GetSignedParentalSettings (.CParental_GetSignedParentalSettings_Request) returns (.CParental_GetSignedParentalSettings_Response);
	rpc SetParentalSettings (.CParental_SetParentalSettings_Request) returns (.CParental_SetParentalSettings_Response);
	rpc ValidateToken (.CParental_ValidateToken_Request) returns (.CParental_ValidateToken_Response);
	rpc ValidatePassword (.CParental_ValidatePassword_Request) returns (.CParental_ValidatePassword_Response);
	rpc LockClient (.CParental_LockClient_Request) returns (.CParental_LockClient_Response);
	rpc RequestRecoveryCode (.CParental_RequestRecoveryCode_Request) returns (.CParental_RequestRecoveryCode_Response);
	rpc DisableWithRecoveryCode (.CParental_DisableWithRecoveryCode_Request) returns (.CParental_DisableWithRecoveryCode_Response);
	rpc RequestFeatureAccess (.CParental_RequestFeatureAccess_Request) returns (.CParental_RequestFeatureAccess_Response);
	rpc ApproveFeatureAccess (.CParental_ApproveFeatureAccess_Request) returns (.CParental_ApproveFeatureAccess_Response);
	rpc RequestPlaytime (.CParental_RequestPlaytime_Request) returns (.CParental_RequestPlaytime_Response);
	rpc ApprovePlaytime (.CParental_ApprovePlaytime_Request) returns (.CParental_ApprovePlaytime_Response);
	rpc GetRequests (.CParental_GetRequests_Request) returns (.CParental_GetRequests_Response);
	rpc ReportPlaytimeAndNotify (.CParental_ReportPlaytimeAndNotify_Request) returns (.CParental_ReportPlaytimeAndNotify_Response);
}

service ParentalClient {
	option (service_execution_site) = k_EProtoExecutionSiteSteamClient;

	rpc NotifySettingsChange (.CParental_ParentalSettingsChange_Notification) returns (.NoResponse);
	rpc NotifyUnlock (.CParental_ParentalUnlock_Notification) returns (.NoResponse);
	rpc NotifyLock (.CParental_ParentalLock_Notification) returns (.NoResponse);
	rpc NotifyPlaytimeUsed (.CParental_PlaytimeUsed_Notification) returns (.NoResponse);
}
