1365d9939Sopenharmony_ci/* 2365d9939Sopenharmony_ci * Copyright (C) 2022 Huawei Device Co., Ltd. 3365d9939Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 4365d9939Sopenharmony_ci * you may not use this file except in compliance with the License. 5365d9939Sopenharmony_ci * You may obtain a copy of the License at 6365d9939Sopenharmony_ci * 7365d9939Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 8365d9939Sopenharmony_ci * 9365d9939Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 10365d9939Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 11365d9939Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12365d9939Sopenharmony_ci * See the License for the specific language governing permissions and 13365d9939Sopenharmony_ci * limitations under the License. 14365d9939Sopenharmony_ci */ 15365d9939Sopenharmony_ci 16365d9939Sopenharmony_ci#ifndef SERVICES_INCLUDE_SCLOCK_SERVICE_STUB_H 17365d9939Sopenharmony_ci#define SERVICES_INCLUDE_SCLOCK_SERVICE_STUB_H 18365d9939Sopenharmony_ci 19365d9939Sopenharmony_ci#include <cstdint> 20365d9939Sopenharmony_ci#include <map> 21365d9939Sopenharmony_ci 22365d9939Sopenharmony_ci#include "iremote_stub.h" 23365d9939Sopenharmony_ci#include "screenlock_manager_interface.h" 24365d9939Sopenharmony_ci 25365d9939Sopenharmony_cinamespace OHOS { 26365d9939Sopenharmony_cinamespace ScreenLock { 27365d9939Sopenharmony_ciclass ScreenLockManagerStub : public IRemoteStub<ScreenLockManagerInterface> { 28365d9939Sopenharmony_ci using handleFunc = int32_t (ScreenLockManagerStub::*)(MessageParcel &, MessageParcel &); 29365d9939Sopenharmony_ci using HandleFuncMap = std::map<uint32_t, handleFunc>; 30365d9939Sopenharmony_ci 31365d9939Sopenharmony_cipublic: 32365d9939Sopenharmony_ci ScreenLockManagerStub(); 33365d9939Sopenharmony_ci ~ScreenLockManagerStub() = default; 34365d9939Sopenharmony_ci int32_t OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) override; 35365d9939Sopenharmony_ci 36365d9939Sopenharmony_ciprivate: 37365d9939Sopenharmony_ci void InitHandleMap(void); 38365d9939Sopenharmony_ci int32_t OnIsLocked(MessageParcel &data, MessageParcel &reply); 39365d9939Sopenharmony_ci int32_t OnIsScreenLocked(MessageParcel &data, MessageParcel &reply); 40365d9939Sopenharmony_ci int32_t OnGetSecure(MessageParcel &data, MessageParcel &reply); 41365d9939Sopenharmony_ci int32_t OnUnlock(MessageParcel &data, MessageParcel &reply); 42365d9939Sopenharmony_ci int32_t OnUnlockScreen(MessageParcel &data, MessageParcel &reply); 43365d9939Sopenharmony_ci int32_t OnLock(MessageParcel &data, MessageParcel &reply); 44365d9939Sopenharmony_ci int32_t OnSendScreenLockEvent(MessageParcel &data, MessageParcel &reply); 45365d9939Sopenharmony_ci int32_t OnScreenLockOn(MessageParcel &data, MessageParcel &reply); 46365d9939Sopenharmony_ci int32_t OnLockScreen(MessageParcel &data, MessageParcel &reply); 47365d9939Sopenharmony_ci int32_t OnIsScreenLockDisabled(MessageParcel &data, MessageParcel &reply); 48365d9939Sopenharmony_ci int32_t OnSetScreenLockDisabled(MessageParcel &data, MessageParcel &reply); 49365d9939Sopenharmony_ci int32_t OnSetScreenLockAuthState(MessageParcel &data, MessageParcel &reply); 50365d9939Sopenharmony_ci int32_t OnGetScreenLockAuthState(MessageParcel &data, MessageParcel &reply); 51365d9939Sopenharmony_ci int32_t OnRequestStrongAuth(MessageParcel &data, MessageParcel &reply); 52365d9939Sopenharmony_ci int32_t OnGetStrongAuth(MessageParcel &data, MessageParcel &reply); 53365d9939Sopenharmony_ci 54365d9939Sopenharmony_ciprivate: 55365d9939Sopenharmony_ci HandleFuncMap handleFuncMap; 56365d9939Sopenharmony_ci}; 57365d9939Sopenharmony_ci} // namespace ScreenLock 58365d9939Sopenharmony_ci} // namespace OHOS 59365d9939Sopenharmony_ci#endif // SERVICES_INCLUDE_SCLOCK_SERVICE_STUB_H