1 /*
2  * Copyright (c) 2021 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_ABILITY_RUNTIME_NAPI_COMMON_START_OPTIONS_H
17 #define OHOS_ABILITY_RUNTIME_NAPI_COMMON_START_OPTIONS_H
18 
19 #include "napi_common_data.h"
20 #include "start_options.h"
21 
22 namespace OHOS {
23 namespace AppExecFwk {
24 EXTERN_C_START
25 
26 bool UnwrapStartOptionsWithProcessOption(napi_env env, napi_value param, AAFwk::StartOptions &startOptions);
27 bool UnwrapStartOptions(napi_env env, napi_value param, AAFwk::StartOptions &startOptions);
28 
29 bool UnwrapStartOptionsAndWant(napi_env env, napi_value param, AAFwk::StartOptions &startOptions, AAFwk::Want &want);
30 
31 #ifdef START_WINDOW_OPTIONS_WITH_PIXELMAP
32 bool UnwrapPixelMapByPropertyName(
33     napi_env env, napi_value jsObject, const char *propertyName, std::shared_ptr<Media::PixelMap> &value);
34 
35 bool UnwrapPixelMapFromJS(napi_env env, napi_value param, std::shared_ptr<Media::PixelMap> &value);
36 #endif
37 
38 bool UnwrapStartWindowOption(napi_env env, napi_value param,
39     std::shared_ptr<AAFwk::StartWindowOption> &startWindowOption);
40 
41 EXTERN_C_END
42 }  // namespace AppExecFwk
43 }  // namespace OHOS
44 #endif  // OHOS_ABILITY_RUNTIME_NAPI_COMMON_START_OPTIONS_H
45