/* * Copyright (c) 2021 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 OS_ACCOUNT_TEST_SYSTEMTEST_COMMON_RESOURCE_FUZZTEST_INCLUDE_GET_PARAM_H #define OS_ACCOUNT_TEST_SYSTEMTEST_COMMON_RESOURCE_FUZZTEST_INCLUDE_GET_PARAM_H #include #include #include #include "app_account_info.h" #include "app_account_manager.h" #include "app_account_subscribe_info.h" #include "app_account_subscriber.h" #include "os_account_manager.h" namespace OHOS { namespace AccountSA { bool GetBoolParam(); uint8_t GetU8Param(); unsigned int GetUIntParam(); uint16_t GetU16Param(); uint32_t GetU32Param(); uint64_t GetU64Param(); int8_t GetS8Param(); int16_t GetS16Param(); int32_t GetS32Param(); int64_t GetS64Param(); char32_t GetChar32Param(); short GetShortParam(); long GetLongParam(); int GetIntParam(); double GetDoubleParam(); float GetFloatParam(); char GetCharParam(); char *GetCharArryParam(); std::string GetStringParam(); std::vector GetBoolVectorParam(); std::vector GetShortVectorParam(); std::vector GetLongVectorParam(); std::vector GetIntVectorParam(); std::vector GetFloatVectorParam(); std::vector GetDoubleVectorParam(); std::vector GetCharVectorParam(); std::vector GetStringVectorParam(); template std::vector GetUnsignVectorParam(); std::vector GetS8VectorParam(); std::vector GetS16VectorParam(); std::vector GetS32VectorParam(); std::vector GetS64VectorParam(); OsAccountType GetParamOsAccountType(); OsAccountInfo GetParamOsAccountInfo(); DomainAccountInfo GetParamDomainAccountInfo(); AppAccountInfo GetParamAppAccountInfo(); std::vector GetVectorParamAppAccountInfo(); std::shared_ptr GetAppAccountSubscriber(); class TestAppAccountSubscriber : public AppAccountSubscriber { public: TestAppAccountSubscriber() {} ~TestAppAccountSubscriber() {} virtual void OnAccountsChanged(const std::vector &accounts) { printf("Fuzz Test OnAccountsChanged\n"); } }; class TestOsAccountSubscriber : public OsAccountSubscriber { public: TestOsAccountSubscriber() {}; ~TestOsAccountSubscriber() {}; virtual void OnAccountsChanged(const int &id) { printf("Fuzz Test OnAccountsChanged\n"); } }; } // namespace AccountSA } // namespace OHOS #endif // OS_ACCOUNT_TEST_SYSTEMTEST_COMMON_RESOURCE_FUZZTEST_INCLUDE_GET_PARAM_H