1 /* 2 * Copyright (c) 2024 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 COMMON_EXTERNAL_INCLUDE_IEDM_OS_ACCOUNT_MANAGER_H 17 #define COMMON_EXTERNAL_INCLUDE_IEDM_OS_ACCOUNT_MANAGER_H 18 19 #include <vector> 20 21 #include "edm_errors.h" 22 #ifdef OS_ACCOUNT_EDM_ENABLE 23 #include "ohos_account_kits.h" 24 #include "os_account_info.h" 25 #include "os_account_manager.h" 26 #endif 27 namespace OHOS { 28 namespace EDM { 29 class IEdmOsAccountManager { 30 public: 31 virtual ~IEdmOsAccountManager() = default; 32 virtual ErrCode QueryActiveOsAccountIds(std::vector<int32_t> &ids) = 0; 33 virtual ErrCode IsOsAccountExists(int32_t id, bool &isExist) = 0; 34 #ifdef OS_ACCOUNT_EDM_ENABLE 35 virtual ErrCode CreateOsAccount(const std::string &name, const OHOS::AccountSA::OsAccountType &type, 36 OHOS::AccountSA::OsAccountInfo &osAccountInfo) = 0; 37 #endif 38 }; 39 } // namespace EDM 40 } // namespace OHOS 41 42 #endif // COMMON_EXTERNAL_INCLUDE_IEDM_OS_ACCOUNT_MANAGER_H