1bc03f14fSopenharmony_ci/*
2bc03f14fSopenharmony_ci * Copyright (C) 2021 Huawei Device Co., Ltd.
3bc03f14fSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
4bc03f14fSopenharmony_ci * you may not use this file except in compliance with the License.
5bc03f14fSopenharmony_ci * You may obtain a copy of the License at
6bc03f14fSopenharmony_ci *
7bc03f14fSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
8bc03f14fSopenharmony_ci *
9bc03f14fSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
10bc03f14fSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
11bc03f14fSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12bc03f14fSopenharmony_ci * See the License for the specific language governing permissions and
13bc03f14fSopenharmony_ci * limitations under the License.
14bc03f14fSopenharmony_ci */
15bc03f14fSopenharmony_ci#include "napi_init.h"
16bc03f14fSopenharmony_ci#include "pasteboard_napi.h"
17bc03f14fSopenharmony_ci#include "pastedata_napi.h"
18bc03f14fSopenharmony_ci#include "pastedata_record_napi.h"
19bc03f14fSopenharmony_ci#include "systempasteboard_napi.h"
20bc03f14fSopenharmony_ci
21bc03f14fSopenharmony_cinamespace OHOS {
22bc03f14fSopenharmony_cinamespace MiscServicesNapi {
23bc03f14fSopenharmony_ciEXTERN_C_START
24bc03f14fSopenharmony_ci/*
25bc03f14fSopenharmony_ci * Module export function
26bc03f14fSopenharmony_ci */
27bc03f14fSopenharmony_cistatic napi_value NapiInit(napi_env env, napi_value exports)
28bc03f14fSopenharmony_ci{
29bc03f14fSopenharmony_ci    /*
30bc03f14fSopenharmony_ci* Propertise define
31bc03f14fSopenharmony_ci*/
32bc03f14fSopenharmony_ci    PasteDataRecordNapi::PasteDataRecordInit(env, exports);
33bc03f14fSopenharmony_ci    PasteDataNapi::PasteDataInit(env, exports);
34bc03f14fSopenharmony_ci    SystemPasteboardNapi::SystemPasteboardInit(env, exports);
35bc03f14fSopenharmony_ci    PasteboardNapi::PasteBoardInit(env, exports);
36bc03f14fSopenharmony_ci    return exports;
37bc03f14fSopenharmony_ci}
38bc03f14fSopenharmony_ciEXTERN_C_END
39bc03f14fSopenharmony_ci
40bc03f14fSopenharmony_ci/*
41bc03f14fSopenharmony_ci * Module define
42bc03f14fSopenharmony_ci */
43bc03f14fSopenharmony_cistatic napi_module _module = { .nm_version = 1,
44bc03f14fSopenharmony_ci    .nm_flags = 0,
45bc03f14fSopenharmony_ci    .nm_filename = "pasteboard",
46bc03f14fSopenharmony_ci    .nm_register_func = NapiInit,
47bc03f14fSopenharmony_ci    .nm_modname = "pasteboard",
48bc03f14fSopenharmony_ci    .nm_priv = ((void *)0),
49bc03f14fSopenharmony_ci    .reserved = { 0 } };
50bc03f14fSopenharmony_ci
51bc03f14fSopenharmony_ci/*
52bc03f14fSopenharmony_ci * Module register function
53bc03f14fSopenharmony_ci */
54bc03f14fSopenharmony_ciextern "C" __attribute__((constructor)) void RegisterModule(void)
55bc03f14fSopenharmony_ci{
56bc03f14fSopenharmony_ci    napi_module_register(&_module);
57bc03f14fSopenharmony_ci}
58bc03f14fSopenharmony_ci} // namespace MiscServicesNapi
59bc03f14fSopenharmony_ci} // namespace OHOS
60