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 #include "js_app_control.h"
17
18 #include <string>
19
20 #include "app_log_wrapper.h"
21 #include "bundle_errors.h"
22 #include "business_error.h"
23 #include "common_func.h"
24
25 namespace OHOS {
26 namespace AppExecFwk {
GetDisposedStatus(napi_env env,napi_callback_info info)27 napi_value GetDisposedStatus(napi_env env, napi_callback_info info)
28 {
29 APP_LOGE("SystemCapability.BundleManager.BundleFramework.AppControl not supported.");
30 napi_value error = BusinessError::CreateCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND,
31 "getDisposedStatus");
32 napi_throw(env, error);
33 return nullptr;
34 }
35
SetDisposedStatus(napi_env env,napi_callback_info info)36 napi_value SetDisposedStatus(napi_env env, napi_callback_info info)
37 {
38 APP_LOGE("SystemCapability.BundleManager.BundleFramework.AppControl not supported.");
39 napi_value error = BusinessError::CreateCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND,
40 "setDisposedStatus");
41 napi_throw(env, error);
42 return nullptr;
43 }
44
DeleteDisposedStatus(napi_env env,napi_callback_info info)45 napi_value DeleteDisposedStatus(napi_env env, napi_callback_info info)
46 {
47 APP_LOGE("SystemCapability.BundleManager.BundleFramework.AppControl not supported.");
48 napi_value error = BusinessError::CreateCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND,
49 "deleteDisposedStatus");
50 napi_throw(env, error);
51 return nullptr;
52 }
53 } // AppExecFwk
54 } // OHOS
55