1 /* 2 * Copyright (c) 2021-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_INCLUDE_OSACCOUNT_OS_ACCOUNT_INTERFACE_H 17 #define OS_ACCOUNT_SERVICES_ACCOUNTMGR_INCLUDE_OSACCOUNT_OS_ACCOUNT_INTERFACE_H 18 19 #include <vector> 20 #include "account_error_no.h" 21 #include "os_account_info.h" 22 23 namespace OHOS { 24 namespace AccountSA { 25 class OsAccountInterface { 26 public: 27 static ErrCode SendToAMSAccountStart(OsAccountInfo &osAccountInfo); 28 static ErrCode SendToAMSAccountStop(OsAccountInfo &osAccountInfo); 29 static ErrCode SendToBMSAccountCreate(OsAccountInfo &osAccountInfo); 30 static ErrCode SendToBMSAccountDelete(OsAccountInfo &osAccountInfo); 31 #ifdef HAS_USER_IDM_PART 32 static ErrCode SendToIDMAccountDelete(OsAccountInfo &osAccountInfo); 33 #endif // HAS_USER_IDM_PART 34 static void SendToCESAccountCreate(OsAccountInfo &osAccountInfo); 35 static void SendToCESAccountDelete(OsAccountInfo &osAccountInfo); 36 static void SendToCESAccountSwitched(OsAccountInfo &osAccountInfo); 37 static ErrCode SendToStorageAccountCreate(OsAccountInfo &osAccountInfo); 38 static ErrCode SendToStorageAccountRemove(OsAccountInfo &osAccountInfo); 39 static ErrCode SendToStorageAccountStart(OsAccountInfo &osAccountInfo); 40 static ErrCode SendToStorageAccountStop(OsAccountInfo &osAccountInfo); 41 static void PublishCommonEvent( 42 const OsAccountInfo &osAccountInfo, const std::string &commonEvent, const std::string &operation); 43 }; 44 } // namespace AccountSA 45 } // namespace OHOS 46 47 #endif // OS_ACCOUNT_SERVICES_ACCOUNTMGR_INCLUDE_OSACCOUNT_OS_ACCOUNT_INTERFACE_H 48