1 /* 2 * Copyright (c) 2023 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 OHOS_GLOBAL_I18N_SERVICE_ABILITY_LOAD_CALLBACK_H 17 #define OHOS_GLOBAL_I18N_SERVICE_ABILITY_LOAD_CALLBACK_H 18 19 #include "system_ability_load_callback_stub.h" 20 21 namespace OHOS { 22 namespace Global { 23 namespace I18n { 24 /** 25 * @brief Callback implement when loading I18n service in I18nServiceLoadManager. 26 */ 27 class I18nServiceAbilityLoadCallback : public SystemAbilityLoadCallbackStub { 28 public: 29 /** 30 * @brief called when loading I18n service successful. 31 * 32 * @param systemAbilityId I18n system ability id which is I18N_SA_ID, introduced from LoadSystemAbility function. 33 * @param remoteObject Introduced from LoadSystemAbility function. 34 */ 35 void OnLoadSystemAbilitySuccess(int32_t systemAbilityId, const sptr<IRemoteObject> &remoteObject) override; 36 37 /** 38 * @brief called when loading I18n service failed. 39 * 40 * @param systemAbilityId I18n system ability id which is I18N_SA_ID, introduced from LoadSystemAbility function. 41 */ 42 void OnLoadSystemAbilityFail(int32_t systemAbilityId) override; 43 }; 44 } // namespace I18n 45 } // namespace Global 46 } // namespace OHOS 47 #endif // OHOS_GLOBAL_I18N_SERVICE_ABILITY_LOAD_CALLBACK_H