15ccb8f90Sopenharmony_ci/*
25ccb8f90Sopenharmony_ci * Copyright (c) 2021-2023 Huawei Device Co., Ltd.
35ccb8f90Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
45ccb8f90Sopenharmony_ci * you may not use this file except in compliance with the License.
55ccb8f90Sopenharmony_ci * You may obtain a copy of the License at
65ccb8f90Sopenharmony_ci *
75ccb8f90Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
85ccb8f90Sopenharmony_ci *
95ccb8f90Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
105ccb8f90Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
115ccb8f90Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
125ccb8f90Sopenharmony_ci * See the License for the specific language governing permissions and
135ccb8f90Sopenharmony_ci * limitations under the License.
145ccb8f90Sopenharmony_ci */
155ccb8f90Sopenharmony_ci
165ccb8f90Sopenharmony_ci#ifndef POWERMGR_SERVICES_IPOWER_MANAGER_STUB_H
175ccb8f90Sopenharmony_ci#define POWERMGR_SERVICES_IPOWER_MANAGER_STUB_H
185ccb8f90Sopenharmony_ci
195ccb8f90Sopenharmony_ci#include <iremote_stub.h>
205ccb8f90Sopenharmony_ci#include <nocopyable.h>
215ccb8f90Sopenharmony_ci
225ccb8f90Sopenharmony_ci#include "ipower_mgr.h"
235ccb8f90Sopenharmony_ci
245ccb8f90Sopenharmony_cinamespace OHOS {
255ccb8f90Sopenharmony_cinamespace PowerMgr {
265ccb8f90Sopenharmony_ciclass PowerMgrStub : public IRemoteStub<IPowerMgr> {
275ccb8f90Sopenharmony_cipublic:
285ccb8f90Sopenharmony_ci    DISALLOW_COPY_AND_MOVE(PowerMgrStub);
295ccb8f90Sopenharmony_ci    PowerMgrStub() = default;
305ccb8f90Sopenharmony_ci    ~PowerMgrStub() override = default;
315ccb8f90Sopenharmony_ci    int OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) override;
325ccb8f90Sopenharmony_ci
335ccb8f90Sopenharmony_ciprivate:
345ccb8f90Sopenharmony_ci    static bool IsShutdownCommand(uint32_t code);
355ccb8f90Sopenharmony_ci
365ccb8f90Sopenharmony_ci    int32_t WakeupDeviceStub(MessageParcel& data, MessageParcel& reply);
375ccb8f90Sopenharmony_ci    int32_t SuspendDeviceStub(MessageParcel& data, MessageParcel& reply);
385ccb8f90Sopenharmony_ci    int32_t RefreshActivityStub(MessageParcel& data);
395ccb8f90Sopenharmony_ci    int32_t OverrideScreenOffTimeStub(MessageParcel& data, MessageParcel& reply);
405ccb8f90Sopenharmony_ci    int32_t RestoreScreenOffTimeStub(MessageParcel& reply);
415ccb8f90Sopenharmony_ci    int32_t GetStateStub(MessageParcel& reply);
425ccb8f90Sopenharmony_ci    int32_t IsScreenOnStub(MessageParcel& data, MessageParcel& reply);
435ccb8f90Sopenharmony_ci    int32_t IsFoldScreenOnStub(MessageParcel& reply);
445ccb8f90Sopenharmony_ci    int32_t IsCollaborationScreenOnStub(MessageParcel& reply);
455ccb8f90Sopenharmony_ci    int32_t ForceSuspendDeviceStub(MessageParcel& data, MessageParcel& reply);
465ccb8f90Sopenharmony_ci    int32_t ProxyRunningLockStub(MessageParcel& data, MessageParcel& reply);
475ccb8f90Sopenharmony_ci    int32_t ProxyRunningLocksStub(MessageParcel& data, MessageParcel& reply);
485ccb8f90Sopenharmony_ci    int32_t ResetAllPorxyStub(MessageParcel& data, MessageParcel& reply);
495ccb8f90Sopenharmony_ci    int32_t CreateRunningLockStub(MessageParcel& data, MessageParcel& reply);
505ccb8f90Sopenharmony_ci    int32_t ReleaseRunningLockStub(MessageParcel& data);
515ccb8f90Sopenharmony_ci    int32_t IsRunningLockTypeSupportedStub(MessageParcel& data, MessageParcel& reply);
525ccb8f90Sopenharmony_ci    int32_t UpdateWorkSourceStub(MessageParcel& data);
535ccb8f90Sopenharmony_ci    int32_t LockStub(MessageParcel& data, MessageParcel& reply);
545ccb8f90Sopenharmony_ci    int32_t UnLockStub(MessageParcel& data, MessageParcel& reply);
555ccb8f90Sopenharmony_ci    int32_t QueryRunningLockListsStub(MessageParcel& data, MessageParcel& reply);
565ccb8f90Sopenharmony_ci    int32_t IsUsedStub(MessageParcel& data, MessageParcel& reply);
575ccb8f90Sopenharmony_ci    int32_t RebootDeviceStub(MessageParcel& data, MessageParcel& reply);
585ccb8f90Sopenharmony_ci    int32_t RebootDeviceForDeprecatedStub(MessageParcel& data, MessageParcel& reply);
595ccb8f90Sopenharmony_ci    int32_t ShutDownDeviceStub(MessageParcel& data, MessageParcel& reply);
605ccb8f90Sopenharmony_ci    int32_t SetSuspendTagStub(MessageParcel& data, MessageParcel& reply);
615ccb8f90Sopenharmony_ci    int32_t RegisterPowerStateCallbackStub(MessageParcel& data);
625ccb8f90Sopenharmony_ci
635ccb8f90Sopenharmony_ci    int32_t RegisterSyncHibernateCallbackStub(MessageParcel& data);
645ccb8f90Sopenharmony_ci    int32_t UnRegisterSyncHibernateCallbackStub(MessageParcel& data);
655ccb8f90Sopenharmony_ci    int32_t RegisterSyncSleepCallbackStub(MessageParcel& data);
665ccb8f90Sopenharmony_ci    int32_t UnRegisterSyncSleepCallbackStub(MessageParcel& data);
675ccb8f90Sopenharmony_ci
685ccb8f90Sopenharmony_ci    int32_t UnRegisterPowerStateCallbackStub(MessageParcel& data);
695ccb8f90Sopenharmony_ci    int32_t RegisterPowerModeCallbackStub(MessageParcel& data);
705ccb8f90Sopenharmony_ci    int32_t UnRegisterPowerModeCallbackStub(MessageParcel& data);
715ccb8f90Sopenharmony_ci    int32_t RegisterScreenStateCallbackStub(MessageParcel& data);
725ccb8f90Sopenharmony_ci    int32_t UnRegisterScreenStateCallbackStub(MessageParcel& data);
735ccb8f90Sopenharmony_ci    int32_t RegisterRunningLockCallbackStub(MessageParcel& data);
745ccb8f90Sopenharmony_ci    int32_t UnRegisterRunningLockCallbackStub(MessageParcel& data);
755ccb8f90Sopenharmony_ci    int32_t SetDisplaySuspendStub(MessageParcel& data);
765ccb8f90Sopenharmony_ci    int32_t HibernateStub(MessageParcel& data, MessageParcel& reply);
775ccb8f90Sopenharmony_ci    int32_t SetDeviceModeStub(MessageParcel& data, MessageParcel& reply);
785ccb8f90Sopenharmony_ci    int32_t GetDeviceModeStub(MessageParcel& reply);
795ccb8f90Sopenharmony_ci    int32_t ShellDumpStub(MessageParcel& data, MessageParcel& reply);
805ccb8f90Sopenharmony_ci    int32_t IsStandbyStub(MessageParcel& data, MessageParcel& reply);
815ccb8f90Sopenharmony_ci    int32_t SetForceTimingOutStub(MessageParcel& data, MessageParcel& reply);
825ccb8f90Sopenharmony_ci    int32_t LockScreenAfterTimingOutStub(MessageParcel& data, MessageParcel& reply);
835ccb8f90Sopenharmony_ci};
845ccb8f90Sopenharmony_ci} // namespace PowerMgr
855ccb8f90Sopenharmony_ci} // namespace OHOS
865ccb8f90Sopenharmony_ci#endif // POWERMGR_SERVICES_IPOWER_MANAGER_STUB_H
87