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 #ifndef BUNDLE_FRAMEWORK_INTERFACES_KITS_JS_BUNDLE_MANAGER_BUNDLE_MANAGER_SYNC_H 16 #define BUNDLE_FRAMEWORK_INTERFACES_KITS_JS_BUNDLE_MANAGER_BUNDLE_MANAGER_SYNC_H 17 18 #include "ability_info.h" 19 #include "napi/native_api.h" 20 #include "napi/native_common.h" 21 #include "napi/native_node_api.h" 22 #include "want.h" 23 24 namespace OHOS { 25 namespace AppExecFwk { 26 27 struct ExtensionParamInfo { 28 OHOS::AAFwk::Want want; 29 int32_t extensionAbilityType = static_cast<int32_t>(ExtensionAbilityType::UNSPECIFIED); 30 int32_t flags = 0; 31 int32_t userId = Constants::UNSPECIFIED_USERID; 32 std::string extensionTypeName; 33 bool isExtensionTypeName = false; 34 }; 35 36 napi_value SetApplicationEnabledSync(napi_env env, napi_callback_info info); 37 napi_value SetAbilityEnabledSync(napi_env env, napi_callback_info info); 38 napi_value IsApplicationEnabledSync(napi_env env, napi_callback_info info); 39 napi_value IsAbilityEnabledSync(napi_env env, napi_callback_info info); 40 napi_value QueryExtensionInfosSync(napi_env env, napi_callback_info info); 41 napi_value GetPermissionDefSync(napi_env env, napi_callback_info info); 42 napi_value GetAbilityLabelSync(napi_env env, napi_callback_info info); 43 napi_value GetLaunchWantForBundleSync(napi_env env, napi_callback_info info); 44 napi_value GetBundleArchiveInfoSync(napi_env env, napi_callback_info info); 45 napi_value GetBundleNameByUidSync(napi_env env, napi_callback_info info); 46 napi_value GetProfileByAbilitySync(napi_env env, napi_callback_info info); 47 napi_value GetProfileByExAbilitySync(napi_env env, napi_callback_info info); 48 napi_value GetAppProvisionInfoSync(napi_env env, napi_callback_info info); 49 50 bool ParseWantWithParameter(napi_env env, napi_value args, OHOS::AAFwk::Want &want); 51 bool ParseWantListWithParameter(napi_env env, napi_value args, std::vector<OHOS::AAFwk::Want> &wants); 52 bool IsArray(napi_env env, napi_value value); 53 } // namespace AppExecFwk 54 } // namespace OHOS 55 #endif // BUNDLE_FRAMEWORK_INTERFACES_KITS_JS_BUNDLE_MANAGER_BUNDLE_MANAGER_SYNC_H 56