Update Iot.js
[platform/upstream/iotjs.git] / tools / src / iotjs_binding_helper.h
1 /* Copyright 2015-present Samsung Electronics Co., Ltd. and other contributors
2  *
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 IOTJS_BINDING_HELPER_H
17 #define IOTJS_BINDING_HELPER_H
18
19
20 #include "iotjs_binding.h"
21
22
23 void iotjs_uncaught_exception(const iotjs_jval_t* jexception);
24
25 void iotjs_process_emit_exit(int code);
26
27 bool iotjs_process_next_tick();
28
29 void iotjs_make_callback(const iotjs_jval_t* jfunction,
30                          const iotjs_jval_t* jthis, const iotjs_jargs_t* jargs);
31
32 iotjs_jval_t iotjs_make_callback_with_result(const iotjs_jval_t* jfunction,
33                                              const iotjs_jval_t* jthis,
34                                              const iotjs_jargs_t* jargs);
35
36
37 const iotjs_jval_t* iotjs_init_process_module();
38
39
40 #endif /* IOTJS_BINDING_HELPER_H */