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 FONT_MANAGER_FONT_SA_LOAD_CALLBACK_H 17 #define FONT_MANAGER_FONT_SA_LOAD_CALLBACK_H 18 19 #include "system_ability_load_callback_stub.h" 20 21 namespace OHOS { 22 namespace Global { 23 namespace FontManager { 24 /** 25 * @brief Callback implement when loading font service in FontServiceLoadManager. 26 */ 27 class FontSALoadCallback : public SystemAbilityLoadCallbackStub { 28 public: 29 /** 30 * @brief called when loading font service successful. 31 * 32 * @param systemAbilityId I18n system ability id which is FONT_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 font service failed. 39 * 40 * @param systemAbilityId I18n system ability id which is FONT_SA_ID, introduced from LoadSystemAbility function. 41 */ 42 void OnLoadSystemAbilityFail(int32_t systemAbilityId) override; 43 }; 44 } // namespace FontManager 45 } // namespace Global 46 } // namespace OHOS 47 #endif // FONT_MANAGER_FONT_SA_LOAD_CALLBACK_H 48