• 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 FACEAUTH_SERVICES_INCLUDE_FACE_AUTH_SERVICE_H
17 #define FACEAUTH_SERVICES_INCLUDE_FACE_AUTH_SERVICE_H
18 
19 #include <mutex>
20 #include "system_ability.h"
21 #include "system_ability_definition.h"
22 #include "singleton.h"
23 #include "face_auth_manager.h"
24 
25 namespace OHOS {
26 namespace UserIAM {
27 namespace FaceAuth {
28 class FaceAuthService : public SystemAbility {
29 public:
30     DECLEAR_SYSTEM_ABILITY(FaceAuthService);
31     static FaceAuthService *GetInstance();
32     FaceAuthService();
33     virtual ~FaceAuthService() override;
34 public:
35     virtual void OnStart() override;
36     virtual void OnStop() override;
37     void Start();
38     void ReRegister();
39 private:
40     static FaceAuthService *instance_;
41     static std::shared_ptr<FaceAuthManager> manager_;
42 };
43 } // namespace FaceAuth
44 } // namespace UserIAM
45 } // namespace OHOS
46 
47 #endif // FACEAUTH_SERVICES_INCLUDE_FACE_AUTH_SERVICE_H