• 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 SEC_USER_INFO_IMPL_H
17 #define SEC_USER_INFO_IMPL_H
18 
19 #include "user_idm_callback_interface.h"
20 
21 #include "nocopyable.h"
22 
23 namespace OHOS {
24 namespace UserIam {
25 namespace UserAuth {
26 using SecEnrolledInfo = IdmGetSecureUserInfoCallbackInterface::EnrolledInfo;
27 class SecUserInfoImpl final : public IdmGetSecureUserInfoCallbackInterface::SecureUserInfo, public NoCopyable {
28 public:
29     SecUserInfoImpl(uint64_t secUserId, std::vector<std::shared_ptr<SecEnrolledInfo>> info);
30     ~SecUserInfoImpl() override = default;
31     int32_t GetUserId() const override;
32     PinSubType GetPinSubType() const override;
33     uint64_t GetSecUserId() const override;
34     std::vector<std::shared_ptr<SecEnrolledInfo>> GetEnrolledInfo() const override;
35 
36 private:
37     uint64_t secUserId_ {0};
38     std::vector<std::shared_ptr<SecEnrolledInfo>> info_;
39 };
40 } // namespace UserAuth
41 } // namespace UserIam
42 } // namespace OHOS
43 #endif // SEC_USER_INFO_IMPL_H