• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 "napi_ashmem.h"
17 #include "napi_message_parcel.h"
18 #include "napi_message_sequence.h"
19 #include "napi/native_api.h"
20 #include "napi/native_node_api.h"
21 #include "napi_remote_object.h"
22 
23 namespace OHOS {
24 EXTERN_C_START
25 extern napi_value NAPIIPCSkeletonExport(napi_env env, napi_value exports);
26 extern napi_value NAPIRemoteProxyExport(napi_env env, napi_value exports);
27 extern napi_value NAPIMessageOptionExport(napi_env env, napi_value exports);
28 
RpcExport(napi_env env,napi_value exports)29 static napi_value RpcExport(napi_env env, napi_value exports)
30 {
31     NAPI_MessageParcel::Export(env, exports);
32     NAPI_MessageSequence::Export(env, exports);
33     NAPIAshmem::AshmemExport(env, exports);
34     NAPIIPCSkeletonExport(env, exports);
35     NAPIRemoteObjectExport(env, exports);
36     NAPIRemoteProxyExport(env, exports);
37     NAPIMessageOptionExport(env, exports);
38     NapiError::NAPIRpcErrorEnumExport(env, exports);
39     return exports;
40 }
41 EXTERN_C_END
42 
43 /*
44  * Module register function
45  */
46 NAPI_MODULE(rpc, RpcExport)
47 } // namesapce OHOS