mirror of
https://github.com/openharmony/useriam_user_auth.git
synced 2026-07-01 20:36:57 -04:00
ec3de660b6
Signed-off-by: https://gitee.com/WALL_EYE <wangguoqiang12@huawei.com> Change-Id: I3f46d5250653e1b3654e8d51df8fe2abd3a112e6
50 lines
2.0 KiB
C++
50 lines
2.0 KiB
C++
/*
|
|
* Copyright (c) 2022 Huawei Device Co., Ltd.
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
#ifndef USERAUTH_PROXY_H
|
|
#define USERAUTH_PROXY_H
|
|
|
|
#include <iremote_proxy.h>
|
|
#include <nocopyable.h>
|
|
|
|
#include "iuser_auth.h"
|
|
|
|
namespace OHOS {
|
|
namespace UserIAM {
|
|
namespace UserAuth {
|
|
class UserAuthProxy : public IRemoteProxy<IUserAuth> {
|
|
public:
|
|
DISALLOW_COPY_AND_MOVE(UserAuthProxy);
|
|
explicit UserAuthProxy(const sptr<IRemoteObject> &object);
|
|
~UserAuthProxy() override = default;
|
|
|
|
int32_t GetAvailableStatus(const AuthType authType, const AuthTurstLevel authTurstLevel) override;
|
|
void GetProperty(const GetPropertyRequest request, sptr<IUserAuthCallback> &callback) override;
|
|
void SetProperty(const SetPropertyRequest request, sptr<IUserAuthCallback> &callback) override;
|
|
uint64_t Auth(const uint64_t challenge, const AuthType authType, const AuthTurstLevel authTurstLevel,
|
|
sptr<IUserAuthCallback> &callback) override;
|
|
uint64_t AuthUser(const int32_t userId, const uint64_t challenge, const AuthType authType,
|
|
const AuthTurstLevel authTurstLevel, sptr<IUserAuthCallback> &callback) override;
|
|
int32_t CancelAuth(const uint64_t contextId) override;
|
|
int32_t GetVersion() override;
|
|
|
|
private:
|
|
bool SendRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption option);
|
|
static inline BrokerDelegator<UserAuthProxy> delegator_;
|
|
};
|
|
} // namespace UserAuth
|
|
} // namespace UserIAM
|
|
} // namespace OHOS
|
|
#endif // USERAUTH_PROXY_H
|