• 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 FACERECOGNITION_AUTH_BUILD_H
17 #define FACERECOGNITION_AUTH_BUILD_H
18 
19 #include "napi/native_api.h"
20 #include "napi/native_common.h"
21 #include "nocopyable.h"
22 #include "auth_common.h"
23 #include "result_convert.h"
24 
25 namespace OHOS {
26 namespace UserIAM {
27 namespace UserAuth {
28 class AuthBuild {
29 public:
30     DISALLOW_COPY_AND_MOVE(AuthBuild);
31     AuthBuild();
32     virtual ~AuthBuild();
33     Napi_SetPropertyRequest SetPropertyRequestBuild(napi_env env, napi_value object);
34     Napi_GetPropertyRequest GetPropertyRequestBuild(napi_env env, napi_value object);
35     bool NapiTypeObject(napi_env env, napi_value value);
36     bool NapiTypeNumber(napi_env env, napi_value value);
37 
38     uint64_t GetUint8ArrayTo64(napi_env env, napi_value value);
39     int32_t NapiGetValueInt32(napi_env env, napi_value value);
40     napi_value Uint64ToUint8Array(napi_env env, uint64_t value);
41 
42 private:
43     ResultConvert convert_;
44 };
45 } // namespace UserAuth
46 } // namespace UserIAM
47 } // namespace OHOS
48 #endif // FACERECOGNITION_AUTH_BUILD_H
49