1 /* Copyright JS Foundation and other contributors, http://js.foundation 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 #ifndef _JERRYSCRIPT_MBED_LIBRARY_REGISTRY_WRAP_TOOLS_H 16 #define _JERRYSCRIPT_MBED_LIBRARY_REGISTRY_WRAP_TOOLS_H 17 18 #include <stdlib.h> 19 20 #include "jerry-core/include/jerryscript.h" 21 22 #include "jerryscript-mbed-util/logging.h" 23 #include "jerryscript-mbed-util/wrappers.h" 24 25 26 // 27 // Functions used by the wrapper registration API. 28 // 29 30 bool 31 jsmbed_wrap_register_global_function (const char* name, 32 jerry_external_handler_t handler); 33 34 bool 35 jsmbed_wrap_register_class_constructor (const char* name, 36 jerry_external_handler_t handler); 37 38 bool 39 jsmbed_wrap_register_class_function (jerry_value_t this_obj_p, 40 const char* name, 41 jerry_external_handler_t handler); 42 43 #endif // _JERRYSCRIPT_MBED_LIBRARY_REGISTRY_WRAP_TOOLS_H 44