import "common_base.proto";

message CMsgSleepManagerState {
	optional bool is_low_power_download_supported = 1;
	optional int32 current_state = 2 [(.description) = "enum"];
}

message CSleepManager_GetState_Request {
}

message CSleepManager_GetState_Response {
	optional .CMsgSleepManagerState state = 1;
}

message CSleepManager_RequestSleep_Request {
}

message CSleepManager_RequestSleep_Response {
}

message CSleepManager_RequestSuspend_Notification {
	optional bool optionally_transition_to_low_power_downloads = 1;
}

message CSleepManager_ResumeFromSuspend_Notification {
}

message CSleepManager_ShowPowerMenu_Notification {
}

message CSleepManager_StateChanged_Notification {
}

message CSleepManager_SwitchToPowerState_Request {
	optional int32 state = 1 [(.description) = "enum"];
	optional string reason = 2;
}

message CSleepManager_SwitchToPowerState_Response {
}

service SleepManager {
	// ePrivilege=1, eClientExecutionSite=1
	rpc GetState (.CSleepManager_GetState_Request) returns (.CSleepManager_GetState_Response);
	// ePrivilege=1, eClientExecutionSite=1
	rpc NotifyRequestSuspend (.CSleepManager_RequestSuspend_Notification) returns (.NoResponse);
	// ePrivilege=1, eClientExecutionSite=1
	rpc NotifyResumeFromSuspend (.CSleepManager_ResumeFromSuspend_Notification) returns (.NoResponse);
	// ePrivilege=1, eClientExecutionSite=1
	rpc NotifyShowPowerMenu (.CSleepManager_ShowPowerMenu_Notification) returns (.NoResponse);
	// ePrivilege=1, eClientExecutionSite=1
	rpc NotifyStateChanged (.CSleepManager_StateChanged_Notification) returns (.NoResponse);
	// ePrivilege=1, eClientExecutionSite=1
	rpc RequestSleep (.CSleepManager_RequestSleep_Request) returns (.CSleepManager_RequestSleep_Response);
	// ePrivilege=1, eClientExecutionSite=1
	rpc SwitchToPowerState (.CSleepManager_SwitchToPowerState_Request) returns (.CSleepManager_SwitchToPowerState_Response);
}

