Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-21 10:05:22

0001 #ifndef SRC_NODE_API_TYPES_H_
0002 #define SRC_NODE_API_TYPES_H_
0003 
0004 #include "js_native_api_types.h"
0005 
0006 typedef struct napi_callback_scope__* napi_callback_scope;
0007 typedef struct napi_async_context__* napi_async_context;
0008 typedef struct napi_async_work__* napi_async_work;
0009 
0010 #if NAPI_VERSION >= 3
0011 typedef void(NAPI_CDECL* napi_cleanup_hook)(void* arg);
0012 #endif  // NAPI_VERSION >= 3
0013 
0014 #if NAPI_VERSION >= 4
0015 typedef struct napi_threadsafe_function__* napi_threadsafe_function;
0016 #endif  // NAPI_VERSION >= 4
0017 
0018 #if NAPI_VERSION >= 4
0019 typedef enum {
0020   napi_tsfn_release,
0021   napi_tsfn_abort
0022 } napi_threadsafe_function_release_mode;
0023 
0024 typedef enum {
0025   napi_tsfn_nonblocking,
0026   napi_tsfn_blocking
0027 } napi_threadsafe_function_call_mode;
0028 #endif  // NAPI_VERSION >= 4
0029 
0030 typedef void(NAPI_CDECL* napi_async_execute_callback)(napi_env env, void* data);
0031 typedef void(NAPI_CDECL* napi_async_complete_callback)(napi_env env,
0032                                                        napi_status status,
0033                                                        void* data);
0034 #if NAPI_VERSION >= 4
0035 typedef void(NAPI_CDECL* napi_threadsafe_function_call_js)(
0036     napi_env env, napi_value js_callback, void* context, void* data);
0037 #endif  // NAPI_VERSION >= 4
0038 
0039 typedef struct {
0040   uint32_t major;
0041   uint32_t minor;
0042   uint32_t patch;
0043   const char* release;
0044 } napi_node_version;
0045 
0046 #if NAPI_VERSION >= 8
0047 typedef struct napi_async_cleanup_hook_handle__* napi_async_cleanup_hook_handle;
0048 typedef void(NAPI_CDECL* napi_async_cleanup_hook)(
0049     napi_async_cleanup_hook_handle handle, void* data);
0050 #endif  // NAPI_VERSION >= 8
0051 
0052 #endif  // SRC_NODE_API_TYPES_H_