• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2022 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef SERVICES_INCLUDE_SCLOCK_SERVICE_INTERFACE_H
17 #define SERVICES_INCLUDE_SCLOCK_SERVICE_INTERFACE_H
18 
19 #include <string>
20 
21 #include "iremote_broker.h"
22 
23 #include "screenlock_common.h"
24 #include "screenlock_system_ability_interface.h"
25 
26 namespace OHOS {
27 namespace ScreenLock {
28 class ScreenLockManagerInterface : public IRemoteBroker {
29 public:
30     DECLARE_INTERFACE_DESCRIPTOR(u"ohos.screenlock.ScreenLockManagerInterface");
31     virtual bool IsScreenLocked() = 0;
32     virtual bool GetSecure() = 0;
33     virtual void RequestUnlock(const sptr<ScreenLockSystemAbilityInterface> &listener) = 0;
34     virtual bool On(const sptr<ScreenLockSystemAbilityInterface> &listener, const std::string &type) = 0;
35     virtual bool Off(const std::string &type) = 0;
36     virtual bool SendScreenLockEvent(const std::string &event, int param) = 0;
37     virtual bool Test_SetScreenLocked(const bool isScreenlocked) = 0;
38     virtual bool Test_RuntimeNotify(const std::string &event, int param) = 0;
39     virtual int Test_GetRuntimeState(const std::string &event) = 0;
40 };
41 
42 enum {
43     IS_SCREEN_LOCKED = 0,
44     IS_SECURE_MODE = 1,
45     REQUEST_UNLOCK = 2,
46     ON = 3,
47     OFF = 4,
48     SEND_SCREENLOCK_EVENT = 5,
49     TEST_SET_SCREENLOCKED = 6,
50     TEST_RUNTIME_NOTIFY = 7,
51     TEST_GET_RUNTIME_STATE = 8,
52 };
53 } // namespace ScreenLock
54 } // namespace OHOS
55 #endif // SERVICES_INCLUDE_SCLOCK_SERVICE_INTERFACE_H