1 /* 2 * Copyright (c) 2020 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_ABILITYINFO_UTILS_H 17 #define OHOS_ABILITYINFO_UTILS_H 18 19 #include "ability_info.h" 20 21 namespace OHOS { 22 struct AbilityInfoUtils { 23 static void CopyAbilityInfo(AbilityInfo *des, AbilityInfo src); 24 static bool SetAbilityInfoBundleName(AbilityInfo *abilityInfo, const char *bundleName); 25 #ifdef OHOS_APPEXECFWK_BMS_BUNDLEMANAGER 26 static bool SetAbilityInfoModuleName(AbilityInfo *abilityInfo, const char *moduleName); 27 static bool SetAbilityInfoName(AbilityInfo *abilityInfo, const char *name); 28 static bool SetAbilityInfoDescription(AbilityInfo *abilityInfo, const char *description); 29 static bool SetAbilityInfoIconPath(AbilityInfo *abilityInfo, const char *iconPath); 30 static bool SetAbilityInfoDeviceId(AbilityInfo *abilityInfo, const char *deviceId); 31 static bool SetAbilityInfoLabel(AbilityInfo *abilityInfo, const char *label); 32 #else 33 static bool SetAbilityInfoSrcPath(AbilityInfo *abilityInfo, const char *srcPath); 34 #endif 35 private: 36 AbilityInfoUtils() = default; 37 ~AbilityInfoUtils() = default; 38 }; // AbilityInfoUtils 39 } // OHOS 40 #endif // OHOS_ABILITYINFO_UTILS_H