@lynx-js/lynx-library-headers 0.0.1-alpha.4 → 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +1 -0
- package/package.json +3 -26
- package/README.md +0 -53
- package/include/base/include/value/lynx_api_types.h +0 -57
- package/include/base/include/value/lynx_value_api.h +0 -204
- package/include/base/include/value/lynx_value_types.h +0 -73
- package/include/capi/lynx_env_capi.h +0 -47
- package/include/capi/lynx_event_reporter_service_capi.h +0 -67
- package/include/capi/lynx_export.h +0 -27
- package/include/capi/lynx_extension_module_capi.h +0 -148
- package/include/capi/lynx_extension_module_types_capi.h +0 -17
- package/include/capi/lynx_generic_resource_fetcher_capi.h +0 -124
- package/include/capi/lynx_group_capi.h +0 -42
- package/include/capi/lynx_http_service_capi.h +0 -113
- package/include/capi/lynx_load_meta_capi.h +0 -52
- package/include/capi/lynx_log_capi.h +0 -69
- package/include/capi/lynx_memory_capi.h +0 -28
- package/include/capi/lynx_native_module_capi.h +0 -51
- package/include/capi/lynx_native_view_capi.h +0 -163
- package/include/capi/lynx_resource_request_capi.h +0 -71
- package/include/capi/lynx_resource_response_capi.h +0 -92
- package/include/capi/lynx_runtime_lifecycle_observer_capi.h +0 -62
- package/include/capi/lynx_security_service_capi.h +0 -52
- package/include/capi/lynx_service_center_capi.h +0 -50
- package/include/capi/lynx_template_bundle_capi.h +0 -39
- package/include/capi/lynx_template_data_capi.h +0 -33
- package/include/capi/lynx_trace_capi.h +0 -62
- package/include/capi/lynx_trail_service_capi.h +0 -35
- package/include/capi/lynx_types.h +0 -750
- package/include/capi/lynx_update_meta_capi.h +0 -33
- package/include/capi/lynx_view_builder_capi.h +0 -113
- package/include/capi/lynx_view_capi.h +0 -174
- package/include/capi/lynx_view_client_capi.h +0 -81
- package/include/capi/lynx_vsync_monitor_capi.h +0 -38
- package/include/capi/lynx_windowless_renderer_capi.h +0 -213
- package/include/js_native_api.h +0 -608
- package/include/js_native_api_types.h +0 -202
- package/include/lynx/base/include/value/lynx_api_types.h +0 -57
- package/include/lynx/base/include/value/lynx_value_api.h +0 -204
- package/include/lynx/base/include/value/lynx_value_types.h +0 -73
- package/include/lynx/extension.h +0 -6
- package/include/lynx/platform/embedder/public/capi/lynx_env_capi.h +0 -47
- package/include/lynx/platform/embedder/public/capi/lynx_event_reporter_service_capi.h +0 -67
- package/include/lynx/platform/embedder/public/capi/lynx_export.h +0 -27
- package/include/lynx/platform/embedder/public/capi/lynx_extension_module_capi.h +0 -148
- package/include/lynx/platform/embedder/public/capi/lynx_extension_module_types_capi.h +0 -17
- package/include/lynx/platform/embedder/public/capi/lynx_generic_resource_fetcher_capi.h +0 -124
- package/include/lynx/platform/embedder/public/capi/lynx_group_capi.h +0 -42
- package/include/lynx/platform/embedder/public/capi/lynx_http_service_capi.h +0 -113
- package/include/lynx/platform/embedder/public/capi/lynx_load_meta_capi.h +0 -52
- package/include/lynx/platform/embedder/public/capi/lynx_log_capi.h +0 -69
- package/include/lynx/platform/embedder/public/capi/lynx_memory_capi.h +0 -28
- package/include/lynx/platform/embedder/public/capi/lynx_native_module_capi.h +0 -51
- package/include/lynx/platform/embedder/public/capi/lynx_native_view_capi.h +0 -163
- package/include/lynx/platform/embedder/public/capi/lynx_resource_request_capi.h +0 -71
- package/include/lynx/platform/embedder/public/capi/lynx_resource_response_capi.h +0 -92
- package/include/lynx/platform/embedder/public/capi/lynx_runtime_lifecycle_observer_capi.h +0 -62
- package/include/lynx/platform/embedder/public/capi/lynx_security_service_capi.h +0 -52
- package/include/lynx/platform/embedder/public/capi/lynx_service_center_capi.h +0 -50
- package/include/lynx/platform/embedder/public/capi/lynx_template_bundle_capi.h +0 -39
- package/include/lynx/platform/embedder/public/capi/lynx_template_data_capi.h +0 -33
- package/include/lynx/platform/embedder/public/capi/lynx_trace_capi.h +0 -62
- package/include/lynx/platform/embedder/public/capi/lynx_trail_service_capi.h +0 -35
- package/include/lynx/platform/embedder/public/capi/lynx_types.h +0 -750
- package/include/lynx/platform/embedder/public/capi/lynx_update_meta_capi.h +0 -33
- package/include/lynx/platform/embedder/public/capi/lynx_view_builder_capi.h +0 -113
- package/include/lynx/platform/embedder/public/capi/lynx_view_capi.h +0 -174
- package/include/lynx/platform/embedder/public/capi/lynx_view_client_capi.h +0 -81
- package/include/lynx/platform/embedder/public/capi/lynx_vsync_monitor_capi.h +0 -38
- package/include/lynx/platform/embedder/public/capi/lynx_windowless_renderer_capi.h +0 -213
- package/include/lynx/platform/embedder/public/lynx_env.h +0 -104
- package/include/lynx/platform/embedder/public/lynx_event_reporter_service.h +0 -96
- package/include/lynx/platform/embedder/public/lynx_event_simulation_proxy.h +0 -31
- package/include/lynx/platform/embedder/public/lynx_extension_module.h +0 -521
- package/include/lynx/platform/embedder/public/lynx_generic_resource_fetcher.h +0 -178
- package/include/lynx/platform/embedder/public/lynx_group.h +0 -70
- package/include/lynx/platform/embedder/public/lynx_http_service.h +0 -211
- package/include/lynx/platform/embedder/public/lynx_load_meta.h +0 -120
- package/include/lynx/platform/embedder/public/lynx_native_module.h +0 -9
- package/include/lynx/platform/embedder/public/lynx_native_view.h +0 -201
- package/include/lynx/platform/embedder/public/lynx_resource_request.h +0 -56
- package/include/lynx/platform/embedder/public/lynx_resource_response.h +0 -63
- package/include/lynx/platform/embedder/public/lynx_runtime_lifecycle_observer.h +0 -102
- package/include/lynx/platform/embedder/public/lynx_security_service.h +0 -78
- package/include/lynx/platform/embedder/public/lynx_service_center.h +0 -64
- package/include/lynx/platform/embedder/public/lynx_template_bundle.h +0 -65
- package/include/lynx/platform/embedder/public/lynx_template_data.h +0 -104
- package/include/lynx/platform/embedder/public/lynx_trail_service.h +0 -81
- package/include/lynx/platform/embedder/public/lynx_update_meta.h +0 -56
- package/include/lynx/platform/embedder/public/lynx_value.h +0 -270
- package/include/lynx/platform/embedder/public/lynx_view.h +0 -364
- package/include/lynx/platform/embedder/public/lynx_view_client.h +0 -226
- package/include/lynx/platform/embedder/public/lynx_vsync_monitor.h +0 -70
- package/include/lynx/platform/embedder/public/lynx_windowless_renderer.h +0 -302
- package/include/lynx/registration.h +0 -178
- package/include/lynx_env.h +0 -104
- package/include/lynx_event_reporter_service.h +0 -96
- package/include/lynx_event_simulation_proxy.h +0 -31
- package/include/lynx_extension.h +0 -10
- package/include/lynx_extension_module.h +0 -521
- package/include/lynx_generic_resource_fetcher.h +0 -178
- package/include/lynx_group.h +0 -70
- package/include/lynx_http_service.h +0 -211
- package/include/lynx_load_meta.h +0 -120
- package/include/lynx_native_module.h +0 -9
- package/include/lynx_native_view.h +0 -201
- package/include/lynx_resource_request.h +0 -56
- package/include/lynx_resource_response.h +0 -63
- package/include/lynx_runtime_lifecycle_observer.h +0 -102
- package/include/lynx_security_service.h +0 -78
- package/include/lynx_service_center.h +0 -64
- package/include/lynx_template_bundle.h +0 -65
- package/include/lynx_template_data.h +0 -104
- package/include/lynx_trail_service.h +0 -81
- package/include/lynx_update_meta.h +0 -56
- package/include/lynx_value.h +0 -270
- package/include/lynx_view.h +0 -364
- package/include/lynx_view_client.h +0 -226
- package/include/lynx_vsync_monitor.h +0 -70
- package/include/lynx_windowless_renderer.h +0 -302
- package/include/napi-inl.deprecated.h +0 -186
- package/include/napi-inl.h +0 -6607
- package/include/napi.h +0 -3208
- package/include/node_api.h +0 -276
- package/include/node_api_types.h +0 -59
- package/include/third_party/weak-node-api/headers/js_native_api.h +0 -608
- package/include/third_party/weak-node-api/headers/js_native_api_types.h +0 -202
- package/include/third_party/weak-node-api/headers/napi-inl.deprecated.h +0 -186
- package/include/third_party/weak-node-api/headers/napi-inl.h +0 -6607
- package/include/third_party/weak-node-api/headers/napi.h +0 -3208
- package/include/third_party/weak-node-api/headers/node_api.h +0 -276
- package/include/third_party/weak-node-api/headers/node_api_types.h +0 -59
- package/include/third_party/weak-node-api/headers/weak_napi_defines.h +0 -331
- package/include/third_party/weak-node-api/headers/weak_napi_undefs.h +0 -282
- package/include/weak_napi_defines.h +0 -331
- package/include/weak_napi_undefs.h +0 -282
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
#ifndef WEAK_NODE_API_SRC_JS_NATIVE_API_TYPES_H_
|
|
2
|
-
#define WEAK_NODE_API_SRC_JS_NATIVE_API_TYPES_H_
|
|
3
|
-
|
|
4
|
-
// This file needs to be compatible with C compilers.
|
|
5
|
-
// This is a public include file, and these includes have essentially
|
|
6
|
-
// became part of it's API.
|
|
7
|
-
#include <stddef.h> // NOLINT(modernize-deprecated-headers)
|
|
8
|
-
#include <stdint.h> // NOLINT(modernize-deprecated-headers)
|
|
9
|
-
#if defined(USE_WEAK_SUFFIX_NAPI) || defined(OS_HARMONY)
|
|
10
|
-
#include "weak_napi_defines.h"
|
|
11
|
-
#endif
|
|
12
|
-
|
|
13
|
-
#if !defined __cplusplus || (defined(_MSC_VER) && _MSC_VER < 1900)
|
|
14
|
-
typedef uint16_t char16_t;
|
|
15
|
-
#endif
|
|
16
|
-
|
|
17
|
-
#ifndef NAPI_CDECL
|
|
18
|
-
#ifdef _WIN32
|
|
19
|
-
#define NAPI_CDECL __cdecl
|
|
20
|
-
#else
|
|
21
|
-
#define NAPI_CDECL
|
|
22
|
-
#endif
|
|
23
|
-
#endif
|
|
24
|
-
|
|
25
|
-
// JSVM API types are all opaque pointers for ABI stability
|
|
26
|
-
// typedef undefined structs instead of void* for compile time type safety
|
|
27
|
-
typedef struct napi_env__* napi_env;
|
|
28
|
-
|
|
29
|
-
// We need to mark APIs which can be called during garbage collection (GC),
|
|
30
|
-
// meaning that they do not affect the state of the JS engine, and can
|
|
31
|
-
// therefore be called synchronously from a finalizer that itself runs
|
|
32
|
-
// synchronously during GC. Such APIs can receive either a `napi_env` or a
|
|
33
|
-
// `node_api_basic_env` as their first parameter, because we should be able to
|
|
34
|
-
// also call them during normal, non-garbage-collecting operations, whereas
|
|
35
|
-
// APIs that affect the state of the JS engine can only receive a `napi_env` as
|
|
36
|
-
// their first parameter, because we must not call them during GC. In lieu of
|
|
37
|
-
// inheritance, we use the properties of the const qualifier to accomplish
|
|
38
|
-
// this, because both a const and a non-const value can be passed to an API
|
|
39
|
-
// expecting a const value, but only a non-const value can be passed to an API
|
|
40
|
-
// expecting a non-const value.
|
|
41
|
-
//
|
|
42
|
-
// In conjunction with appropriate CFLAGS to warn us if we're passing a const
|
|
43
|
-
// (basic) environment into an API that expects a non-const environment, and
|
|
44
|
-
// the definition of basic finalizer function pointer types below, which
|
|
45
|
-
// receive a basic environment as their first parameter, and can thus only call
|
|
46
|
-
// basic APIs (unless the user explicitly casts the environment), we achieve
|
|
47
|
-
// the ability to ensure at compile time that we do not call APIs that affect
|
|
48
|
-
// the state of the JS engine from a synchronous (basic) finalizer.
|
|
49
|
-
typedef struct napi_env__* node_api_nogc_env;
|
|
50
|
-
typedef node_api_nogc_env node_api_basic_env;
|
|
51
|
-
|
|
52
|
-
typedef struct napi_value__* napi_value;
|
|
53
|
-
typedef struct napi_ref__* napi_ref;
|
|
54
|
-
typedef struct napi_handle_scope__* napi_handle_scope;
|
|
55
|
-
typedef struct napi_escapable_handle_scope__* napi_escapable_handle_scope;
|
|
56
|
-
typedef struct napi_callback_info__* napi_callback_info;
|
|
57
|
-
typedef struct napi_deferred__* napi_deferred;
|
|
58
|
-
|
|
59
|
-
typedef enum {
|
|
60
|
-
napi_default = 0,
|
|
61
|
-
napi_writable = 1 << 0,
|
|
62
|
-
napi_enumerable = 1 << 1,
|
|
63
|
-
napi_configurable = 1 << 2,
|
|
64
|
-
|
|
65
|
-
// Used with napi_define_class to distinguish static properties
|
|
66
|
-
// from instance properties. Ignored by napi_define_properties.
|
|
67
|
-
napi_static = 1 << 10,
|
|
68
|
-
|
|
69
|
-
#if NAPI_VERSION >= 8
|
|
70
|
-
// Default for class methods.
|
|
71
|
-
napi_default_method = napi_writable | napi_configurable,
|
|
72
|
-
|
|
73
|
-
// Default for object properties, like in JS obj[prop].
|
|
74
|
-
napi_default_jsproperty = napi_writable | napi_enumerable | napi_configurable,
|
|
75
|
-
#endif // NAPI_VERSION >= 8
|
|
76
|
-
} napi_property_attributes;
|
|
77
|
-
|
|
78
|
-
typedef enum {
|
|
79
|
-
// ES6 types (corresponds to typeof)
|
|
80
|
-
napi_undefined,
|
|
81
|
-
napi_null,
|
|
82
|
-
napi_boolean,
|
|
83
|
-
napi_number,
|
|
84
|
-
napi_string,
|
|
85
|
-
napi_symbol,
|
|
86
|
-
napi_object,
|
|
87
|
-
napi_function,
|
|
88
|
-
napi_external,
|
|
89
|
-
napi_bigint,
|
|
90
|
-
} napi_valuetype;
|
|
91
|
-
|
|
92
|
-
typedef enum {
|
|
93
|
-
napi_int8_array,
|
|
94
|
-
napi_uint8_array,
|
|
95
|
-
napi_uint8_clamped_array,
|
|
96
|
-
napi_int16_array,
|
|
97
|
-
napi_uint16_array,
|
|
98
|
-
napi_int32_array,
|
|
99
|
-
napi_uint32_array,
|
|
100
|
-
napi_float32_array,
|
|
101
|
-
napi_float64_array,
|
|
102
|
-
napi_bigint64_array,
|
|
103
|
-
napi_biguint64_array,
|
|
104
|
-
} napi_typedarray_type;
|
|
105
|
-
|
|
106
|
-
typedef enum {
|
|
107
|
-
napi_ok,
|
|
108
|
-
napi_invalid_arg,
|
|
109
|
-
napi_object_expected,
|
|
110
|
-
napi_string_expected,
|
|
111
|
-
napi_name_expected,
|
|
112
|
-
napi_function_expected,
|
|
113
|
-
napi_number_expected,
|
|
114
|
-
napi_boolean_expected,
|
|
115
|
-
napi_array_expected,
|
|
116
|
-
napi_generic_failure,
|
|
117
|
-
napi_pending_exception,
|
|
118
|
-
napi_cancelled,
|
|
119
|
-
napi_escape_called_twice,
|
|
120
|
-
napi_handle_scope_mismatch,
|
|
121
|
-
napi_callback_scope_mismatch,
|
|
122
|
-
napi_queue_full,
|
|
123
|
-
napi_closing,
|
|
124
|
-
napi_bigint_expected,
|
|
125
|
-
napi_date_expected,
|
|
126
|
-
napi_arraybuffer_expected,
|
|
127
|
-
napi_detachable_arraybuffer_expected,
|
|
128
|
-
napi_would_deadlock, // unused
|
|
129
|
-
napi_no_external_buffers_allowed,
|
|
130
|
-
napi_cannot_run_js,
|
|
131
|
-
} napi_status;
|
|
132
|
-
// Note: when adding a new enum value to `napi_status`, please also update
|
|
133
|
-
// * `const int last_status` in the definition of `napi_get_last_error_info()'
|
|
134
|
-
// in file js_native_api_v8.cc.
|
|
135
|
-
// * `const char* error_messages[]` in file js_native_api_v8.cc with a brief
|
|
136
|
-
// message explaining the error.
|
|
137
|
-
// * the definition of `napi_status` in doc/api/n-api.md to reflect the newly
|
|
138
|
-
// added value(s).
|
|
139
|
-
|
|
140
|
-
typedef napi_value(NAPI_CDECL* napi_callback)(napi_env env,
|
|
141
|
-
napi_callback_info info);
|
|
142
|
-
typedef void(NAPI_CDECL* napi_finalize)(napi_env env,
|
|
143
|
-
void* finalize_data,
|
|
144
|
-
void* finalize_hint);
|
|
145
|
-
|
|
146
|
-
typedef napi_finalize node_api_nogc_finalize;
|
|
147
|
-
typedef node_api_nogc_finalize node_api_basic_finalize;
|
|
148
|
-
|
|
149
|
-
typedef struct {
|
|
150
|
-
// One of utf8name or name should be NULL.
|
|
151
|
-
const char* utf8name;
|
|
152
|
-
napi_value name;
|
|
153
|
-
|
|
154
|
-
napi_callback method;
|
|
155
|
-
napi_callback getter;
|
|
156
|
-
napi_callback setter;
|
|
157
|
-
napi_value value;
|
|
158
|
-
|
|
159
|
-
napi_property_attributes attributes;
|
|
160
|
-
void* data;
|
|
161
|
-
} napi_property_descriptor;
|
|
162
|
-
|
|
163
|
-
typedef struct {
|
|
164
|
-
const char* error_message;
|
|
165
|
-
void* engine_reserved;
|
|
166
|
-
uint32_t engine_error_code;
|
|
167
|
-
napi_status error_code;
|
|
168
|
-
} napi_extended_error_info;
|
|
169
|
-
|
|
170
|
-
#if NAPI_VERSION >= 6
|
|
171
|
-
typedef enum {
|
|
172
|
-
napi_key_include_prototypes,
|
|
173
|
-
napi_key_own_only
|
|
174
|
-
} napi_key_collection_mode;
|
|
175
|
-
|
|
176
|
-
typedef enum {
|
|
177
|
-
napi_key_all_properties = 0,
|
|
178
|
-
napi_key_writable = 1,
|
|
179
|
-
napi_key_enumerable = 1 << 1,
|
|
180
|
-
napi_key_configurable = 1 << 2,
|
|
181
|
-
napi_key_skip_strings = 1 << 3,
|
|
182
|
-
napi_key_skip_symbols = 1 << 4
|
|
183
|
-
} napi_key_filter;
|
|
184
|
-
|
|
185
|
-
typedef enum {
|
|
186
|
-
napi_key_keep_numbers,
|
|
187
|
-
napi_key_numbers_to_strings
|
|
188
|
-
} napi_key_conversion;
|
|
189
|
-
#endif // NAPI_VERSION >= 6
|
|
190
|
-
|
|
191
|
-
#if NAPI_VERSION >= 8
|
|
192
|
-
typedef struct {
|
|
193
|
-
uint64_t lower;
|
|
194
|
-
uint64_t upper;
|
|
195
|
-
} napi_type_tag;
|
|
196
|
-
#endif // NAPI_VERSION >= 8
|
|
197
|
-
|
|
198
|
-
#endif // SRC_JS_NATIVE_API_TYPES_H_
|
|
199
|
-
|
|
200
|
-
#if defined(USE_WEAK_SUFFIX_NAPI) || defined(OS_HARMONY)
|
|
201
|
-
#include "weak_napi_undefs.h"
|
|
202
|
-
#endif
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2017 Node.js API collaborators. All Rights Reserved.
|
|
3
|
-
*
|
|
4
|
-
* Use of this source code is governed by a MIT license that can be
|
|
5
|
-
* found in the LICENSE file in the root of the source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
// Copyright 2025 The Lynx Authors. All rights reserved.
|
|
9
|
-
// Licensed under the Apache License Version 2.0 that can be found in the
|
|
10
|
-
// LICENSE file in the root directory of this source tree.
|
|
11
|
-
|
|
12
|
-
#ifndef BASE_INCLUDE_VALUE_LYNX_API_TYPES_H_
|
|
13
|
-
#define BASE_INCLUDE_VALUE_LYNX_API_TYPES_H_
|
|
14
|
-
|
|
15
|
-
#include <stddef.h>
|
|
16
|
-
#include <stdint.h>
|
|
17
|
-
|
|
18
|
-
#ifndef LYNX_VALUE_COMPILE_UNIT
|
|
19
|
-
#define LYNX_VALUE_COMPILE_UNIT
|
|
20
|
-
#endif
|
|
21
|
-
|
|
22
|
-
#define LYNX_VALUE_OPAQUE_STRUCT__2(name, unit) lynx_##name##__##unit
|
|
23
|
-
#define LYNX_VALUE_OPAQUE_STRUCT__1(name, unit) \
|
|
24
|
-
LYNX_VALUE_OPAQUE_STRUCT__2(name, unit)
|
|
25
|
-
#define LYNX_VALUE_OPAQUE_STRUCT(name) \
|
|
26
|
-
LYNX_VALUE_OPAQUE_STRUCT__1(name, LYNX_VALUE_COMPILE_UNIT)
|
|
27
|
-
|
|
28
|
-
typedef struct lynx_value_ptr__* lynx_value_ptr;
|
|
29
|
-
typedef struct lynx_api_env__* lynx_api_env;
|
|
30
|
-
|
|
31
|
-
typedef struct LYNX_VALUE_OPAQUE_STRUCT(api_context) * lynx_api_context;
|
|
32
|
-
typedef enum {
|
|
33
|
-
lynx_api_ok,
|
|
34
|
-
lynx_api_failed,
|
|
35
|
-
lynx_api_invalid_arg,
|
|
36
|
-
lynx_api_not_support,
|
|
37
|
-
lynx_api_bool_expected,
|
|
38
|
-
lynx_api_double_expected,
|
|
39
|
-
lynx_api_int32_expected,
|
|
40
|
-
lynx_api_uint32_expected,
|
|
41
|
-
lynx_api_int64_expected,
|
|
42
|
-
lynx_api_uint64_expected,
|
|
43
|
-
lynx_api_string_expected,
|
|
44
|
-
lynx_api_array_expected,
|
|
45
|
-
lynx_api_map_expected,
|
|
46
|
-
lynx_api_external_expected,
|
|
47
|
-
lynx_api_arraybuffer_expected,
|
|
48
|
-
lynx_api_function_expected,
|
|
49
|
-
lynx_api_index_out_of_range,
|
|
50
|
-
lynx_api_handle_scope_mismatch,
|
|
51
|
-
} lynx_api_status;
|
|
52
|
-
|
|
53
|
-
struct lynx_api_env__ {
|
|
54
|
-
lynx_api_context ctx;
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
#endif // BASE_INCLUDE_VALUE_LYNX_API_TYPES_H_
|
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
// Copyright 2025 The Lynx Authors. All rights reserved.
|
|
2
|
-
// Licensed under the Apache License Version 2.0 that can be found in the
|
|
3
|
-
// LICENSE file in the root directory of this source tree.
|
|
4
|
-
|
|
5
|
-
#ifndef BASE_INCLUDE_VALUE_LYNX_VALUE_API_H_
|
|
6
|
-
#define BASE_INCLUDE_VALUE_LYNX_VALUE_API_H_
|
|
7
|
-
|
|
8
|
-
#ifdef __cplusplus
|
|
9
|
-
extern "C" {
|
|
10
|
-
#endif
|
|
11
|
-
|
|
12
|
-
#include "base/include/value/lynx_value_types.h"
|
|
13
|
-
|
|
14
|
-
#ifdef _WIN32
|
|
15
|
-
#ifdef lynx_EXPORTS
|
|
16
|
-
#define LYNX_VALUE_EXPORT __declspec(dllexport)
|
|
17
|
-
#else
|
|
18
|
-
#define LYNX_VALUE_EXPORT __declspec(dllimport)
|
|
19
|
-
#endif // lynx_EXPORTS
|
|
20
|
-
#elif defined(__ANDROID__)
|
|
21
|
-
#define LYNX_VALUE_EXPORT
|
|
22
|
-
#else
|
|
23
|
-
#define LYNX_VALUE_EXPORT __attribute__((visibility("default")))
|
|
24
|
-
#endif // _WIN32
|
|
25
|
-
|
|
26
|
-
// Get the type of lynx_value.
|
|
27
|
-
// Returns lynx_api_ok if the API succeeded.
|
|
28
|
-
LYNX_VALUE_EXPORT lynx_api_status lynx_value_typeof(lynx_api_env env,
|
|
29
|
-
lynx_value value,
|
|
30
|
-
lynx_value_type* result);
|
|
31
|
-
// This API creates a lynx_value of type null.
|
|
32
|
-
// Returns lynx_api_ok if the API succeeded.
|
|
33
|
-
LYNX_VALUE_EXPORT lynx_api_status lynx_value_create_null(lynx_api_env env,
|
|
34
|
-
lynx_value* result);
|
|
35
|
-
// This API creates a lynx_value of type bool with given values.
|
|
36
|
-
// Returns lynx_api_ok if the API succeeded.
|
|
37
|
-
LYNX_VALUE_EXPORT lynx_api_status lynx_value_create_bool(lynx_api_env env,
|
|
38
|
-
bool value,
|
|
39
|
-
lynx_value* result);
|
|
40
|
-
// This API creates a lynx_value of type bool with given values.
|
|
41
|
-
// Returns lynx_api_ok if the API succeeded.
|
|
42
|
-
LYNX_VALUE_EXPORT lynx_api_status lynx_value_create_double(lynx_api_env env,
|
|
43
|
-
double value,
|
|
44
|
-
lynx_value* result);
|
|
45
|
-
// This API creates a lynx_value of type int32_t with given values.
|
|
46
|
-
// Returns lynx_api_ok if the API succeeded.
|
|
47
|
-
LYNX_VALUE_EXPORT lynx_api_status lynx_value_create_int32(lynx_api_env env,
|
|
48
|
-
int32_t value,
|
|
49
|
-
lynx_value* result);
|
|
50
|
-
// This API creates a lynx_value of type uint32_t with given values.
|
|
51
|
-
// Returns lynx_api_ok if the API succeeded.
|
|
52
|
-
LYNX_VALUE_EXPORT lynx_api_status lynx_value_create_uint32(lynx_api_env env,
|
|
53
|
-
uint32_t value,
|
|
54
|
-
lynx_value* result);
|
|
55
|
-
// This API creates a lynx_value of type int64_t with given values.
|
|
56
|
-
// Returns lynx_api_ok if the API succeeded.
|
|
57
|
-
LYNX_VALUE_EXPORT lynx_api_status lynx_value_create_int64(lynx_api_env env,
|
|
58
|
-
int64_t value,
|
|
59
|
-
lynx_value* result);
|
|
60
|
-
// This API creates a lynx_value of type uint64_t with given values.
|
|
61
|
-
// Returns lynx_api_ok if the API succeeded.
|
|
62
|
-
LYNX_VALUE_EXPORT lynx_api_status lynx_value_create_uint64(lynx_api_env env,
|
|
63
|
-
uint64_t value,
|
|
64
|
-
lynx_value* result);
|
|
65
|
-
// This API creates a string value from a UTF8-encoded C string. The native
|
|
66
|
-
// string is copied.
|
|
67
|
-
// This API allocates memory on the heap to store the string. After use,
|
|
68
|
-
// lynx_value_remove_reference must be called to free this portion of
|
|
69
|
-
// memory, otherwise it will result in a memory leak.
|
|
70
|
-
// Returns lynx_api_ok if the API succeeded.
|
|
71
|
-
LYNX_VALUE_EXPORT lynx_api_status lynx_value_create_string_utf8(
|
|
72
|
-
lynx_api_env env, const char* str, size_t length, lynx_value* result);
|
|
73
|
-
// This API creates a map container.
|
|
74
|
-
// This API allocates memory on the heap to store the container. After use,
|
|
75
|
-
// lynx_value_remove_reference must be called to free this portion of
|
|
76
|
-
// memory, otherwise it will result in a memory leak.
|
|
77
|
-
// Returns lynx_api_ok if the API succeeded.
|
|
78
|
-
LYNX_VALUE_EXPORT lynx_api_status lynx_value_create_map(lynx_api_env env,
|
|
79
|
-
lynx_value* result);
|
|
80
|
-
// This API creates a array container.
|
|
81
|
-
// This API allocates memory on the heap to store the container. After use,
|
|
82
|
-
// lynx_value_remove_reference must be called to free this portion of
|
|
83
|
-
// memory, otherwise it will result in a memory leak.
|
|
84
|
-
// Returns lynx_api_ok if the API succeeded.
|
|
85
|
-
LYNX_VALUE_EXPORT lynx_api_status lynx_value_create_array(lynx_api_env env,
|
|
86
|
-
lynx_value* result);
|
|
87
|
-
|
|
88
|
-
// Read the numberic value from lynx_value.
|
|
89
|
-
// Returns lynx_api_ok if the API succeeded.
|
|
90
|
-
LYNX_VALUE_EXPORT lynx_api_status lynx_value_get_number(lynx_api_env env,
|
|
91
|
-
lynx_value value,
|
|
92
|
-
double* result);
|
|
93
|
-
// Read the double value from lynx_value. lynx_api_double_expected is returned
|
|
94
|
-
// if the types do not match.
|
|
95
|
-
// Returns lynx_api_ok if the API succeeded.
|
|
96
|
-
LYNX_VALUE_EXPORT lynx_api_status lynx_value_get_double(lynx_api_env env,
|
|
97
|
-
lynx_value value,
|
|
98
|
-
double* result);
|
|
99
|
-
// Read the int32_t value from lynx_value. lynx_api_int32_expected is returned
|
|
100
|
-
// if the types do not match.
|
|
101
|
-
// Returns lynx_api_ok if the API succeeded.
|
|
102
|
-
LYNX_VALUE_EXPORT lynx_api_status lynx_value_get_int32(lynx_api_env env,
|
|
103
|
-
lynx_value value,
|
|
104
|
-
int32_t* result);
|
|
105
|
-
// Read the uint32_t value from lynx_value. lynx_api_uint32_expected is returned
|
|
106
|
-
// if the types do not match.
|
|
107
|
-
// Returns lynx_api_ok if the API succeeded.
|
|
108
|
-
LYNX_VALUE_EXPORT lynx_api_status lynx_value_get_uint32(lynx_api_env env,
|
|
109
|
-
lynx_value value,
|
|
110
|
-
uint32_t* result);
|
|
111
|
-
// Read the int64_t value from lynx_value. lynx_api_int64_expected is returned
|
|
112
|
-
// if the types do not match.
|
|
113
|
-
// Returns lynx_api_ok if the API succeeded.
|
|
114
|
-
LYNX_VALUE_EXPORT lynx_api_status lynx_value_get_int64(lynx_api_env env,
|
|
115
|
-
lynx_value value,
|
|
116
|
-
int64_t* result);
|
|
117
|
-
// Read the uint64_t value from lynx_value. lynx_api_uint64_expected is returned
|
|
118
|
-
// if the types do not match.
|
|
119
|
-
// Returns lynx_api_ok if the API succeeded.
|
|
120
|
-
LYNX_VALUE_EXPORT lynx_api_status lynx_value_get_uint64(lynx_api_env env,
|
|
121
|
-
lynx_value value,
|
|
122
|
-
uint64_t* result);
|
|
123
|
-
// Read the bool value from lynx_value. lynx_api_bool_expected is returned
|
|
124
|
-
// if the types do not match.
|
|
125
|
-
// Returns lynx_api_ok if the API succeeded.
|
|
126
|
-
LYNX_VALUE_EXPORT lynx_api_status lynx_value_get_bool(lynx_api_env env,
|
|
127
|
-
lynx_value value,
|
|
128
|
-
bool* result);
|
|
129
|
-
// Read the UTF8-encoded string value from lynx_value. lynx_api_string_expected
|
|
130
|
-
// is returned if the types do not match. If the buf argument is passed NULL,
|
|
131
|
-
// the length of the string in bytes and excluding the null terminator is
|
|
132
|
-
// returned in result
|
|
133
|
-
// Returns lynx_api_ok if the API succeeded.
|
|
134
|
-
LYNX_VALUE_EXPORT lynx_api_status lynx_value_get_string_utf8(lynx_api_env env,
|
|
135
|
-
lynx_value value,
|
|
136
|
-
char* buf,
|
|
137
|
-
size_t bufsize,
|
|
138
|
-
size_t* result);
|
|
139
|
-
// Read the length of array from lynx_value. lynx_api_array_expected is returned
|
|
140
|
-
// if the types do not match.
|
|
141
|
-
// Returns lynx_api_ok if the API succeeded.
|
|
142
|
-
LYNX_VALUE_EXPORT lynx_api_status lynx_value_get_array_length(lynx_api_env env,
|
|
143
|
-
lynx_value value,
|
|
144
|
-
uint32_t* result);
|
|
145
|
-
// Insert lynx_value element into array at the index specified.
|
|
146
|
-
// lynx_api_array_expected is returned if the types do not match.
|
|
147
|
-
// Returns lynx_api_ok if the API succeeded.
|
|
148
|
-
LYNX_VALUE_EXPORT lynx_api_status lynx_value_set_element(lynx_api_env env,
|
|
149
|
-
lynx_value object,
|
|
150
|
-
uint32_t index,
|
|
151
|
-
lynx_value value);
|
|
152
|
-
// Read the array element from lynx_value. lynx_api_array_expected is returned
|
|
153
|
-
// if the types do not match.
|
|
154
|
-
// The reference count of the lynx_value read out is automatically incremented
|
|
155
|
-
// by 1. After use, lynx_value_remove_reference needs to be called to free the
|
|
156
|
-
// memory Returns lynx_api_ok if the API succeeded.
|
|
157
|
-
LYNX_VALUE_EXPORT lynx_api_status lynx_value_get_element(lynx_api_env env,
|
|
158
|
-
lynx_value object,
|
|
159
|
-
uint32_t index,
|
|
160
|
-
lynx_value* result);
|
|
161
|
-
// This API checks if the object passed in has the named property.
|
|
162
|
-
// Returns lynx_api_ok if the API succeeded.
|
|
163
|
-
LYNX_VALUE_EXPORT lynx_api_status lynx_value_has_property(lynx_api_env env,
|
|
164
|
-
lynx_value object,
|
|
165
|
-
const char* utf8name,
|
|
166
|
-
bool* result);
|
|
167
|
-
// Read the map keys from lynx_value. lynx_api_map_expected is returned
|
|
168
|
-
// if the types do not match.
|
|
169
|
-
// Returns lynx_api_ok if the API succeeded.
|
|
170
|
-
LYNX_VALUE_EXPORT lynx_api_status lynx_value_get_property_names(
|
|
171
|
-
lynx_api_env env, lynx_value object, lynx_value* result);
|
|
172
|
-
// Set lynx_value property into map at the key specified.
|
|
173
|
-
// lynx_api_map_expected is returned if the types do not match.
|
|
174
|
-
// Returns lynx_api_ok if the API succeeded.
|
|
175
|
-
LYNX_VALUE_EXPORT lynx_api_status
|
|
176
|
-
lynx_value_set_named_property(lynx_api_env env, lynx_value object,
|
|
177
|
-
const char* utf8name, lynx_value value);
|
|
178
|
-
// Read the map property from lynx_value. lynx_api_map_expected is returned
|
|
179
|
-
// if the types do not match.
|
|
180
|
-
// The reference count of the lynx_value read out is automatically incremented
|
|
181
|
-
// by 1. After use, lynx_value_remove_reference needs to be called to free the
|
|
182
|
-
// memory. Returns lynx_api_ok if the API succeeded.
|
|
183
|
-
LYNX_VALUE_EXPORT lynx_api_status
|
|
184
|
-
lynx_value_get_named_property(lynx_api_env env, lynx_value object,
|
|
185
|
-
const char* utf8name, lynx_value* result);
|
|
186
|
-
// This API is used for iterating through array or map type lynx_value.
|
|
187
|
-
// Returns lynx_api_ok if the API succeeded.
|
|
188
|
-
LYNX_VALUE_EXPORT lynx_api_status lynx_value_iterate_value(
|
|
189
|
-
lynx_api_env env, lynx_value object, lynx_value_iterator_callback callback,
|
|
190
|
-
void* pfunc, void* raw_data);
|
|
191
|
-
// Increment the reference count by 1 for pointer data.
|
|
192
|
-
// Returns lynx_api_ok if the API succeeded.
|
|
193
|
-
LYNX_VALUE_EXPORT lynx_api_status lynx_value_add_reference(
|
|
194
|
-
lynx_api_env env, lynx_value value, lynx_value_ref* result);
|
|
195
|
-
// Decrement the reference count by 1 for pointer data.
|
|
196
|
-
// Returns lynx_api_ok if the API succeeded.
|
|
197
|
-
LYNX_VALUE_EXPORT lynx_api_status lynx_value_remove_reference(
|
|
198
|
-
lynx_api_env env, lynx_value value, lynx_value_ref ref);
|
|
199
|
-
|
|
200
|
-
#ifdef __cplusplus
|
|
201
|
-
}
|
|
202
|
-
#endif
|
|
203
|
-
|
|
204
|
-
#endif // BASE_INCLUDE_VALUE_LYNX_VALUE_API_H_
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2017 Node.js API collaborators. All Rights Reserved.
|
|
3
|
-
*
|
|
4
|
-
* Use of this source code is governed by a MIT license that can be
|
|
5
|
-
* found in the LICENSE file in the root of the source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
// Copyright 2025 The Lynx Authors. All rights reserved.
|
|
9
|
-
// Licensed under the Apache License Version 2.0 that can be found in the
|
|
10
|
-
// LICENSE file in the root directory of this source tree.
|
|
11
|
-
|
|
12
|
-
#ifndef BASE_INCLUDE_VALUE_LYNX_VALUE_TYPES_H_
|
|
13
|
-
#define BASE_INCLUDE_VALUE_LYNX_VALUE_TYPES_H_
|
|
14
|
-
|
|
15
|
-
#include <stddef.h>
|
|
16
|
-
#include <stdint.h>
|
|
17
|
-
|
|
18
|
-
#include "base/include/value/lynx_api_types.h"
|
|
19
|
-
|
|
20
|
-
typedef struct LYNX_VALUE_OPAQUE_STRUCT(value_ref) * lynx_value_ref;
|
|
21
|
-
|
|
22
|
-
typedef enum : uint8_t {
|
|
23
|
-
lynx_value_null,
|
|
24
|
-
lynx_value_undefined,
|
|
25
|
-
lynx_value_bool,
|
|
26
|
-
lynx_value_double,
|
|
27
|
-
lynx_value_int32,
|
|
28
|
-
lynx_value_uint32,
|
|
29
|
-
lynx_value_int64,
|
|
30
|
-
lynx_value_uint64,
|
|
31
|
-
lynx_value_nan,
|
|
32
|
-
lynx_value_string,
|
|
33
|
-
lynx_value_array,
|
|
34
|
-
lynx_value_map,
|
|
35
|
-
lynx_value_arraybuffer,
|
|
36
|
-
lynx_value_object,
|
|
37
|
-
lynx_value_function,
|
|
38
|
-
lynx_value_function_table,
|
|
39
|
-
lynx_value_external, // external raw pointer
|
|
40
|
-
lynx_value_extended,
|
|
41
|
-
} lynx_value_type;
|
|
42
|
-
|
|
43
|
-
#define LYNX_VALUE_BASE_STORAGE_DEFINITION \
|
|
44
|
-
union { \
|
|
45
|
-
bool val_bool; \
|
|
46
|
-
double val_double; \
|
|
47
|
-
int32_t val_int32; \
|
|
48
|
-
uint32_t val_uint32; \
|
|
49
|
-
int64_t val_int64; \
|
|
50
|
-
uint64_t val_uint64; \
|
|
51
|
-
lynx_value_ptr val_ptr; \
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
struct lynx_value {
|
|
55
|
-
LYNX_VALUE_BASE_STORAGE_DEFINITION
|
|
56
|
-
lynx_value_type type;
|
|
57
|
-
|
|
58
|
-
uint8_t __unnamed0__;
|
|
59
|
-
uint8_t __unnamed1__;
|
|
60
|
-
uint8_t __unnamed2__;
|
|
61
|
-
|
|
62
|
-
int32_t tag;
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
static_assert(sizeof(lynx_value) == 16,
|
|
66
|
-
"The lynx_value was precisely designed to be 16 bytes.");
|
|
67
|
-
|
|
68
|
-
typedef void (*lynx_value_iterator_callback)(lynx_api_env env, lynx_value key,
|
|
69
|
-
lynx_value val, void* pfunc,
|
|
70
|
-
void* raw_data);
|
|
71
|
-
typedef void (*lynx_value_print_ext_callback)(void* stream, const char* str);
|
|
72
|
-
|
|
73
|
-
#endif // BASE_INCLUDE_VALUE_LYNX_VALUE_TYPES_H_
|
package/include/lynx/extension.h
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
// Copyright 2025 The Lynx Authors. All rights reserved.
|
|
2
|
-
// Licensed under the Apache License Version 2.0 that can be found in the
|
|
3
|
-
// LICENSE file in the root directory of this source tree.
|
|
4
|
-
#ifndef PLATFORM_EMBEDDER_PUBLIC_CAPI_LYNX_ENV_CAPI_H_
|
|
5
|
-
#define PLATFORM_EMBEDDER_PUBLIC_CAPI_LYNX_ENV_CAPI_H_
|
|
6
|
-
|
|
7
|
-
#include "lynx_export.h"
|
|
8
|
-
#include "lynx_extension_module_types_capi.h"
|
|
9
|
-
#include "lynx_native_module_capi.h"
|
|
10
|
-
|
|
11
|
-
LYNX_EXTERN_C_BEGIN
|
|
12
|
-
|
|
13
|
-
// Retrieves the SDK version of Lynx sdk.
|
|
14
|
-
LYNX_CAPI_EXPORT const char* lynx_env_get_sdk_version();
|
|
15
|
-
|
|
16
|
-
// Sets the ICU data path for the LynxEnv.
|
|
17
|
-
LYNX_CAPI_EXPORT void lynx_env_set_icu_data_path(const char* icu_data_path);
|
|
18
|
-
|
|
19
|
-
// Retrieves the ICU data path for the LynxEnv.
|
|
20
|
-
LYNX_CAPI_EXPORT const char* lynx_env_get_icu_data_path();
|
|
21
|
-
|
|
22
|
-
// Lynx devtools
|
|
23
|
-
typedef void (*lynx_env_open_card_callback)(void* user_data, const char* url);
|
|
24
|
-
|
|
25
|
-
LYNX_CAPI_EXPORT void lynx_env_set_devtool_app_info(const char* name,
|
|
26
|
-
const char* value);
|
|
27
|
-
LYNX_CAPI_EXPORT void lynx_env_enable_devtool(int enable);
|
|
28
|
-
LYNX_CAPI_EXPORT int lynx_env_is_devtool_enabled();
|
|
29
|
-
LYNX_CAPI_EXPORT int lynx_env_connect_devtool(const char* url);
|
|
30
|
-
LYNX_CAPI_EXPORT void lynx_env_set_open_card_callback(
|
|
31
|
-
lynx_env_open_card_callback callback, void* user_data);
|
|
32
|
-
// logbox
|
|
33
|
-
LYNX_CAPI_EXPORT void lynx_env_enable_logbox(int enable);
|
|
34
|
-
LYNX_CAPI_EXPORT int lynx_env_is_logbox_enabled();
|
|
35
|
-
// Global native module
|
|
36
|
-
LYNX_CAPI_EXPORT void lynx_env_register_native_module(
|
|
37
|
-
const char* name, napi_module_creator creator, void* opaque);
|
|
38
|
-
// Global extension module
|
|
39
|
-
LYNX_CAPI_EXPORT void lynx_env_register_extension_module(
|
|
40
|
-
const char* name, extension_module_creator creator, bool is_lazy_create,
|
|
41
|
-
void* opaque);
|
|
42
|
-
|
|
43
|
-
LYNX_CAPI_EXPORT void lynx_env_set_node_platform(void* platform);
|
|
44
|
-
|
|
45
|
-
LYNX_EXTERN_C_END
|
|
46
|
-
|
|
47
|
-
#endif // PLATFORM_EMBEDDER_PUBLIC_CAPI_LYNX_ENV_CAPI_H_
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
// Copyright 2025 The Lynx Authors. All rights reserved.
|
|
2
|
-
// Licensed under the Apache License Version 2.0 that can be found in the
|
|
3
|
-
// LICENSE file in the root directory of this source tree.
|
|
4
|
-
#ifndef PLATFORM_EMBEDDER_PUBLIC_CAPI_LYNX_EVENT_REPORTER_SERVICE_CAPI_H_
|
|
5
|
-
#define PLATFORM_EMBEDDER_PUBLIC_CAPI_LYNX_EVENT_REPORTER_SERVICE_CAPI_H_
|
|
6
|
-
|
|
7
|
-
#include <stdint.h>
|
|
8
|
-
#include <stdlib.h>
|
|
9
|
-
|
|
10
|
-
#include "base/include/value/lynx_value_types.h"
|
|
11
|
-
#include "lynx_export.h"
|
|
12
|
-
|
|
13
|
-
LYNX_EXTERN_C_BEGIN
|
|
14
|
-
|
|
15
|
-
// Forward declaration of the lynx_event_reporter_service_t struct.
|
|
16
|
-
typedef struct lynx_event_reporter_service_t lynx_event_reporter_service_t;
|
|
17
|
-
|
|
18
|
-
// Define a function pointer type for event reporter handling.
|
|
19
|
-
typedef void (*lynx_event_report_func)(lynx_event_reporter_service_t*,
|
|
20
|
-
const char* event_name,
|
|
21
|
-
const lynx_value& params);
|
|
22
|
-
|
|
23
|
-
// Define a function pointer type for performance event reporter handling.
|
|
24
|
-
typedef void (*lynx_performance_event_report_func)(
|
|
25
|
-
lynx_event_reporter_service_t*, const lynx_value& params);
|
|
26
|
-
|
|
27
|
-
// Creates a new event reporter service instance.
|
|
28
|
-
LYNX_CAPI_EXPORT lynx_event_reporter_service_t*
|
|
29
|
-
lynx_event_reporter_service_create(void* user_data);
|
|
30
|
-
|
|
31
|
-
// Create a new event reporter service instance with a finalizer.
|
|
32
|
-
// The finalizer will be called when the service is released.
|
|
33
|
-
// The instance's lifecycle is based on reference count.
|
|
34
|
-
LYNX_CAPI_EXPORT lynx_event_reporter_service_t*
|
|
35
|
-
lynx_event_reporter_service_create_with_finalizer(
|
|
36
|
-
void* user_data, void (*finalizer)(lynx_event_reporter_service_t*, void*));
|
|
37
|
-
|
|
38
|
-
// Binds a report function to the event reporter service.
|
|
39
|
-
LYNX_CAPI_EXPORT void lynx_event_reporter_service_bind(
|
|
40
|
-
lynx_event_reporter_service_t*, lynx_event_report_func f);
|
|
41
|
-
|
|
42
|
-
// Binds a performance report function to the event reporter service.
|
|
43
|
-
LYNX_CAPI_EXPORT void lynx_event_reporter_service_bind_performance_report_func(
|
|
44
|
-
lynx_event_reporter_service_t*, lynx_performance_event_report_func f);
|
|
45
|
-
|
|
46
|
-
// Retrieves the user data associated with the event reporter service.
|
|
47
|
-
LYNX_CAPI_EXPORT void* lynx_event_reporter_service_get_user_data(
|
|
48
|
-
lynx_event_reporter_service_t* event_report_service);
|
|
49
|
-
|
|
50
|
-
// Releases the resources associated with the event reporter service.
|
|
51
|
-
LYNX_CAPI_EXPORT void lynx_event_reporter_service_release(
|
|
52
|
-
lynx_event_reporter_service_t*);
|
|
53
|
-
|
|
54
|
-
// Call the event reporter handler associated with the event reporter service.
|
|
55
|
-
LYNX_CAPI_EXPORT void lynx_event_reporter_service_on_event(
|
|
56
|
-
lynx_event_reporter_service_t* event_report_service, const char* event_name,
|
|
57
|
-
const lynx_value& params);
|
|
58
|
-
|
|
59
|
-
// Call the event reporter handler associated with the performance event
|
|
60
|
-
// reporter service.
|
|
61
|
-
LYNX_CAPI_EXPORT void lynx_event_reporter_service_on_performance_event(
|
|
62
|
-
lynx_event_reporter_service_t* event_report_service,
|
|
63
|
-
const lynx_value& params);
|
|
64
|
-
|
|
65
|
-
LYNX_EXTERN_C_END
|
|
66
|
-
|
|
67
|
-
#endif // PLATFORM_EMBEDDER_PUBLIC_CAPI_LYNX_EVENT_REPORTER_SERVICE_CAPI_H_
|