• 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 OS_ACCOUNT_SERVICES_ACCOUNTMGR_TEST_MOCK_APP_ACCOUNT_MOCK_APP_ACCOUNT_AUTHENTICATOR_STUB_H
17 #define OS_ACCOUNT_SERVICES_ACCOUNTMGR_TEST_MOCK_APP_ACCOUNT_MOCK_APP_ACCOUNT_AUTHENTICATOR_STUB_H
18 
19 #include "app_account_authenticator_stub.h"
20 
21 namespace OHOS {
22 namespace AccountSA {
23 class MockAppAccountAuthenticator : public AppAccountAuthenticatorStub {
24 public:
25     ErrCode AddAccountImplicitly(const std::string &authType, const std::string &callerBundleName,
26         const AAFwk::WantParams &options, const sptr<IRemoteObject> &callback);
27     ErrCode Authenticate(const std::string &name, const std::string &authType, const std::string &callerBundleName,
28         const AAFwk::WantParams &options, const sptr<IRemoteObject> &callback);
29     ErrCode VerifyCredential(
30         const std::string &name, const VerifyCredentialOptions &options, const sptr<IRemoteObject> &callback);
31     ErrCode CheckAccountLabels(
32         const std::string &name, const std::vector<std::string> &labels, const sptr<IRemoteObject> &callback);
33     ErrCode SetProperties(const SetPropertiesOptions &options, const sptr<IRemoteObject> &callback);
34     ErrCode IsAccountRemovable(const std::string &name, const sptr<IRemoteObject> &callback);
35     ErrCode CreateAccountImplicitly(const CreateAccountImplicitlyOptions &options, const sptr<IRemoteObject> &callback);
36     ErrCode Auth(const std::string &name, const std::string &authType, const AAFwk::WantParams &options,
37         const sptr<IRemoteObject> &callback);
38 
39 public:
40     bool status = true;
41 };
42 } // namespace AccountSA
43 } // namespace OHOS
44 
45 #endif // OS_ACCOUNT_SERVICES_ACCOUNTMGR_TEST_MOCK_APP_ACCOUNT_MOCK_APP_ACCOUNT_AUTHENTICATOR_STUB_H