Home
last modified time | relevance | path

Searched refs:env (Results 1 - 25 of 83) sorted by relevance

1234

/napi_generator/examples/napitutorials/entry/src/main/cpp/ncpp/cjsoncase/
H A Dcjsoncommon.cpp22 void getErrMessage(napi_status &status, napi_env &env, const napi_extended_error_info *&extended_error_info, in getErrMessage() argument
25 status = napi_get_last_error_info(env, &extended_error_info); in getErrMessage()
35 napi_throw_error(env, NULL, res.c_str()); in getErrMessage()
50 * env: 当前环境的句柄,代表当前的Node.js环境
54 bool IsEmptyObject(napi_env env, napi_value obj, const char *tag) in IsEmptyObject() argument
61 status = napi_typeof(env, obj, &valuetype); in IsEmptyObject()
63 getErrMessage(status, env, extended_error_info, "IsEmptyObject: napi_typeof obj", tag); in IsEmptyObject()
70 status = napi_get_property_names(env, obj, &propertyNames); in IsEmptyObject()
72 getErrMessage(status, env, extended_error_info, "IsEmptyObject: napi_get_property_names obj", tag); in IsEmptyObject()
76 status = napi_get_array_length(env, propertyName in IsEmptyObject()
93 getNapiCjsonString(napi_env env, napi_value cjsonObj, const char *tag) getNapiCjsonString() argument
121 getNapiCjsonValuestring(napi_env env, napi_value cjsonObj, const char *tag) getNapiCjsonValuestring() argument
149 getNapiCjsonValuedouble(napi_env env, napi_value cjsonObj, const char *tag) getNapiCjsonValuedouble() argument
169 getNapiCjsonType(napi_env env, napi_value cjsonObj, const char *tag) getNapiCjsonType() argument
190 getNapiCjsonChild(napi_env env, napi_value cjsonObj, cJSON *jsonObj, char *objStr, const char *tag) getNapiCjsonChild() argument
214 getNapiCjsonNext(napi_env env, napi_value cjsonObj, cJSON *jsonObj, const char *tag) getNapiCjsonNext() argument
235 getNapiCjsonPrev(napi_env env, napi_value cjsonObj, cJSON *jsonObj, const char *tag) getNapiCjsonPrev() argument
256 getNapiCjsonChildArrObj(napi_env env, napi_value cjsonObj, cJSON *jsonObj, char *objStrIn, const char *tag) getNapiCjsonChildArrObj() argument
293 initCJSON_Object(napi_env env, napi_value cjsonObj, cJSON *jsonObj, const char *tag) initCJSON_Object() argument
324 getNapiCjsonArrayChild(napi_env env, napi_value cjsonObj, cJSON *jsonObj, const char *tag, bool flag) getNapiCjsonArrayChild() argument
349 getNapiCjsonArrayNext(napi_env env, napi_value cjsonObj, cJSON *jsonObj, const char *tag, bool flag) getNapiCjsonArrayNext() argument
374 getNapiCjsonArrayPrev(napi_env env, napi_value cjsonObj, cJSON *jsonObj, const char *tag, bool flag) getNapiCjsonArrayPrev() argument
407 initCJSON_Array(napi_env env, napi_value cjsonObj, cJSON *jsonObj, const char *tag, bool flag) initCJSON_Array() argument
436 initCJSON_ArrayObj(napi_env env, napi_value cjsonObj, cJSON *jsonObj, const char *tag, bool flag) initCJSON_ArrayObj() argument
479 isArrObject(napi_env env, napi_value cjsonObj, const char *tag) isArrObject() argument
[all...]
H A Dcjsonaddfalsetoobjectcase.cpp18 napi_value getAddfalsetoobjTypeOut(napi_env env, napi_value cJSON_AddFalseToObjectOut, cJSON *jsonOut) in getAddfalsetoobjTypeOut() argument
25 * env: 当前环境的句柄 in getAddfalsetoobjTypeOut()
29 status = napi_create_int32(env, jsonOut->type, &typeOut); in getAddfalsetoobjTypeOut()
31 getErrMessage(status, env, extended_error_info, "napi_create_int32", tag); in getAddfalsetoobjTypeOut()
35 * env: 当前环境的句柄 in getAddfalsetoobjTypeOut()
40 status = napi_set_named_property(env, cJSON_AddFalseToObjectOut, "type", typeOut); in getAddfalsetoobjTypeOut()
43 getErrMessage(status, env, extended_error_info, "napi_set_named_property", tag); in getAddfalsetoobjTypeOut()
49 napi_value getAddfalsetoobjValuesintOut(napi_env env, napi_value cJSON_AddFalseToObjectOut, cJSON *jsonOut) in getAddfalsetoobjValuesintOut() argument
57 * env: 当前环境的句柄 in getAddfalsetoobjValuesintOut()
61 status = napi_create_int32(env, jsonOu in getAddfalsetoobjValuesintOut()
82 getAddfalsetoobjValuesdoubleOut(napi_env env, napi_value cJSON_AddFalseToObjectOut, cJSON *jsonOut) getAddfalsetoobjValuesdoubleOut() argument
113 getAddfalsetoobjValuestringOut(napi_env env, napi_value cJSON_AddFalseToObjectOut, cJSON *jsonObj) getAddfalsetoobjValuestringOut() argument
149 getAddfalsetoobjStringOut(napi_env env, napi_value cJSON_AddFalseToObjectOut, cJSON *jsonOut) getAddfalsetoobjStringOut() argument
184 getAddfalsetoobjNextOut(napi_env env, napi_value cJSON_AddFalseToObjectOut, cJSON *jsonObj) getAddfalsetoobjNextOut() argument
233 getJsonobjfalseChildOut(napi_env env, napi_value childOut, cJSON *jsonObj) getJsonobjfalseChildOut() argument
251 getAddfalsetoobjChildOut(napi_env env, napi_value cJSON_AddFalseToObjectOut, cJSON *jsonObj) getAddfalsetoobjChildOut() argument
285 getAddfalsetoobjPrevOut(napi_env env, napi_value cJSON_AddFalseToObjectOut, cJSON *jsonObj) getAddfalsetoobjPrevOut() argument
315 getAddfalsetoobjInfo(napi_env env, napi_value paramIn) getAddfalsetoobjInfo() argument
363 KH545_cJSON_AddFalseToObject(napi_env env, napi_callback_info info) KH545_cJSON_AddFalseToObject() argument
[all...]
H A Dcjsoncreateobjectcase.cpp18 napi_value getSampleCreateObjNextOut(napi_env env, napi_value cJSON_CreateObjectOut) in getSampleCreateObjNextOut() argument
25 * env: 当前环境的句柄 in getSampleCreateObjNextOut()
28 status = napi_create_object(env, &nextOut); in getSampleCreateObjNextOut()
30 getErrMessage(status, env, extended_error_info, "napi_create_object", tag); in getSampleCreateObjNextOut()
34 * 返回值是对象时,将native侧的对象的属性和值依次塞入napi_create_object创建出的对象,最终将该对象返回js env: in getSampleCreateObjNextOut()
39 status = napi_set_named_property(env, cJSON_CreateObjectOut, "next", nextOut); in getSampleCreateObjNextOut()
42 getErrMessage(status, env, extended_error_info, "napi_set_named_property", tag); in getSampleCreateObjNextOut()
48 napi_value getSampleCreateObjPrevOut(napi_env env, napi_value cJSON_CreateObjectOut) in getSampleCreateObjPrevOut() argument
55 * env: 当前环境的句柄 in getSampleCreateObjPrevOut()
58 status = napi_create_object(env, in getSampleCreateObjPrevOut()
78 getSampleCreateObjChildOut(napi_env env, napi_value cJSON_CreateObjectOut) getSampleCreateObjChildOut() argument
108 getSampleCreateObjTypeOut(napi_env env, napi_value cJSON_CreateObjectOut, cJSON *jsonObject) getSampleCreateObjTypeOut() argument
139 getSampleCreateObjValuestringOut(napi_env env, napi_value cJSON_CreateObjectOut, cJSON *jsonObject) getSampleCreateObjValuestringOut() argument
177 getSampleCreateObjValueintOut(napi_env env, napi_value cJSON_CreateObjectOut, cJSON *jsonObject) getSampleCreateObjValueintOut() argument
208 getSampleCreateObjValuedoubleOut(napi_env env, napi_value cJSON_CreateObjectOut, cJSON *jsonObject) getSampleCreateObjValuedoubleOut() argument
239 getSampleCreateObjStringOut(napi_env env, napi_value cJSON_CreateObjectOut, cJSON *jsonObject) getSampleCreateObjStringOut() argument
279 KH361_cJSON_CreateObject(napi_env env, napi_callback_info info) KH361_cJSON_CreateObject() argument
[all...]
H A Dcjsoncreatearraycase.cpp18 napi_value getCreateArrayTypeOut(napi_env env, napi_value cJSON_CreateArrayOut, cJSON *jsonArray) in getCreateArrayTypeOut() argument
25 * env: 当前环境的句柄 in getCreateArrayTypeOut()
29 status = napi_create_int32(env, jsonArray->type, &typeOut); in getCreateArrayTypeOut()
31 getErrMessage(status, env, extended_error_info, "napi_create_int32", tag); in getCreateArrayTypeOut()
35 * env: 当前环境的句柄 in getCreateArrayTypeOut()
40 status = napi_set_named_property(env, cJSON_CreateArrayOut, "type", typeOut); in getCreateArrayTypeOut()
43 getErrMessage(status, env, extended_error_info, "napi_set_named_property", tag); in getCreateArrayTypeOut()
49 napi_value getCreateArrayValueintOut(napi_env env, napi_value cJSON_CreateArrayOut, cJSON *jsonArray) in getCreateArrayValueintOut() argument
56 * env: 当前环境的句柄 in getCreateArrayValueintOut()
60 status = napi_create_int32(env, jsonArra in getCreateArrayValueintOut()
80 getCreateArrayValuedoubleOut(napi_env env, napi_value cJSON_CreateArrayOut, cJSON *jsonArray) getCreateArrayValuedoubleOut() argument
111 getCreateArrayValuestringOut(napi_env env, napi_value cJSON_CreateArrayOut, cJSON *jsonArray) getCreateArrayValuestringOut() argument
148 getCreateArrayStringOut(napi_env env, napi_value cJSON_CreateArrayOut, cJSON *jsonArray) getCreateArrayStringOut() argument
184 getCreateArrayChildOut(napi_env env, napi_value cJSON_CreateArrayOut) getCreateArrayChildOut() argument
215 getCreateArrayPrevOut(napi_env env, napi_value cJSON_CreateArrayOut) getCreateArrayPrevOut() argument
245 getCreateArrayNextOut(napi_env env, napi_value cJSON_CreateArrayOut) getCreateArrayNextOut() argument
280 KH386_cJSON_CreateArray(napi_env env, napi_callback_info info) KH386_cJSON_CreateArray() argument
[all...]
H A Dcjsonparsecase.cpp18 napi_value getCjsonChildOut2(napi_env env, napi_value childOut, cJSON *jsonChild) in getCjsonChildOut2() argument
24 status = napi_create_int32(env, jsonChild->type, &childTypeOut); in getCjsonChildOut2()
26 getErrMessage(status, env, extended_error_info, "napi_create_int32 jsonChild->type", tag); in getCjsonChildOut2()
29 status = napi_set_named_property(env, childOut, "type", childTypeOut); in getCjsonChildOut2()
31 getErrMessage(status, env, extended_error_info, "napi_set_named_property jsonChild->type", tag); in getCjsonChildOut2()
35 status = napi_create_int32(env, jsonChild->valueint, &childValueintOut); in getCjsonChildOut2()
37 getErrMessage(status, env, extended_error_info, "napi_create_int32 jsonChild->valueint", tag); in getCjsonChildOut2()
40 status = napi_set_named_property(env, childOut, "valueint", childValueintOut); in getCjsonChildOut2()
42 getErrMessage(status, env, extended_error_info, "napi_set_named_property jsonChild->valueint", tag); in getCjsonChildOut2()
46 status = napi_create_double(env, jsonChil in getCjsonChildOut2()
59 getCjsonChildOut(napi_env env, napi_value childOut, cJSON *jsonChild) getCjsonChildOut() argument
95 getCjsonNextOut2(napi_env env, napi_value nextOut, cJSON *jsonNext) getCjsonNextOut2() argument
136 getCjsonNextOut(napi_env env, napi_value nextOut, cJSON *jsonNext) getCjsonNextOut() argument
172 getCjsonparseInfo(napi_env env, napi_value objIn) getCjsonparseInfo() argument
214 getCjsonparseOut1(napi_env env, cJSON *jsonNext, napi_value cJSON_ParseOut) getCjsonparseOut1() argument
267 getCjsonparseOut2(napi_env env, cJSON *json, cJSON *jsonChild, napi_value cJSON_ParseOut) getCjsonparseOut2() argument
321 getCjsonparseOut3(napi_env env, cJSON *json, napi_value cJSON_ParseOut) getCjsonparseOut3() argument
381 getCjsonparseOut4(napi_env env, cJSON *json, napi_value cJSON_ParseOut) getCjsonparseOut4() argument
444 KH418_CJSON_Parse(napi_env env, napi_callback_info info) KH418_CJSON_Parse() argument
[all...]
H A Dcjsoncreatestringcase.cpp18 napi_value getCreateStringNextOut(napi_env env, napi_value cJSON_CreateStringOut) in getCreateStringNextOut() argument
25 * env: 当前环境的句柄 in getCreateStringNextOut()
28 status = napi_create_object(env, &nextOut); in getCreateStringNextOut()
30 getErrMessage(status, env, extended_error_info, "napi_create_object", tag); in getCreateStringNextOut()
34 * env: 当前环境的句柄 in getCreateStringNextOut()
39 status = napi_set_named_property(env, cJSON_CreateStringOut, "next", nextOut); in getCreateStringNextOut()
42 getErrMessage(status, env, extended_error_info, "napi_set_named_property", tag); in getCreateStringNextOut()
48 napi_value getCreateStringPrevOut(napi_env env, napi_value cJSON_CreateStringOut) in getCreateStringPrevOut() argument
55 * env: 当前环境的句柄 in getCreateStringPrevOut()
58 status = napi_create_object(env, in getCreateStringPrevOut()
78 getCreateStringChildOut(napi_env env, napi_value cJSON_CreateStringOut) getCreateStringChildOut() argument
108 getCreateStringTypeOut(napi_env env, cJSON *jsonObject, napi_value cJSON_CreateStringOut) getCreateStringTypeOut() argument
139 getCreateStringValuestringOut(napi_env env, cJSON *jsonObject, napi_value cJSON_CreateStringOut) getCreateStringValuestringOut() argument
174 getCreateStringValueintOut(napi_env env, cJSON *jsonObject, napi_value cJSON_CreateStringOut) getCreateStringValueintOut() argument
205 getCreateStringValuedoubleOut(napi_env env, cJSON *jsonObject, napi_value cJSON_CreateStringOut) getCreateStringValuedoubleOut() argument
236 getCreateStringStringOut(napi_env env, napi_value cJSON_CreateStringOut) getCreateStringStringOut() argument
271 getCreateStringParamIn(napi_env env, napi_value paramIn) getCreateStringParamIn() argument
317 KH515_cJSON_CreateString(napi_env env, napi_callback_info info) KH515_cJSON_CreateString() argument
[all...]
H A Dcjsonadditemtoobjectcase.cpp18 napi_value getAdditemtoobjTypeOut(napi_env env, napi_value cJSON_AddItemToObjectOut, cJSON *jsonObj) in getAdditemtoobjTypeOut() argument
25 * env: 当前环境的句柄 in getAdditemtoobjTypeOut()
29 status = napi_create_int32(env, jsonObj == NULL ? 0 : jsonObj->type, &typeOut); in getAdditemtoobjTypeOut()
31 getErrMessage(status, env, extended_error_info, "napi_create_int32", tag); in getAdditemtoobjTypeOut()
35 * env: 当前环境的句柄 in getAdditemtoobjTypeOut()
40 status = napi_set_named_property(env, cJSON_AddItemToObjectOut, "type", typeOut); in getAdditemtoobjTypeOut()
43 getErrMessage(status, env, extended_error_info, "napi_set_named_property", tag); in getAdditemtoobjTypeOut()
49 napi_value getAdditemtoobjValuesintOut(napi_env env, napi_value cJSON_AddItemToObjectOut, cJSON *jsonObj) in getAdditemtoobjValuesintOut() argument
56 * env: 当前环境的句柄 in getAdditemtoobjValuesintOut()
60 status = napi_create_int32(env, jsonOb in getAdditemtoobjValuesintOut()
80 getAdditemtoobjValuesdoubleOut(napi_env env, napi_value cJSON_AddItemToObjectOut, cJSON *jsonObj) getAdditemtoobjValuesdoubleOut() argument
111 getAdditemtoobjValuestringOut(napi_env env, napi_value cJSON_AddItemToObjectOut, cJSON *jsonOut) getAdditemtoobjValuestringOut() argument
147 getAdditemtoobjStringOut(napi_env env, napi_value cJSON_AddItemToObjectOut, cJSON *jsonOut) getAdditemtoobjStringOut() argument
188 getAdditemtoobjNextOut(napi_env env, napi_value cJSON_AddItemToObjectOut, cJSON *jsonObj) getAdditemtoobjNextOut() argument
235 getJsonarritemChildOut(napi_env env, napi_value childOut, cJSON *jsonObj) getJsonarritemChildOut() argument
262 getAdditemtoobjChildOut(napi_env env, napi_value cJSON_AddItemToObjectOut, cJSON *jsonObj) getAdditemtoobjChildOut() argument
296 getAdditemtoobjPrevOut(napi_env env, napi_value cJSON_AddItemToObjectOut, cJSON *jsonObj) getAdditemtoobjPrevOut() argument
326 getAdditemtoobjInfoParam1(napi_env env, napi_value propName) getAdditemtoobjInfoParam1() argument
367 getAdditemtoobjInfoParam2(napi_env env, napi_value objItem) getAdditemtoobjInfoParam2() argument
404 getCjsonAddItemToObjRes(napi_env env, napi_value cjsonObj, napi_value propName, napi_value objItem) getCjsonAddItemToObjRes() argument
456 KH180_cJSON_AddItemToObject(napi_env env, napi_callback_info info) KH180_cJSON_AddItemToObject() argument
[all...]
H A Dcjsoncreateintarraycase.cpp19 napi_value getCreateintarrTypeOut(napi_env env, napi_value cJSON_CreateIntArrayOut, cJSON *jsonObj) in getCreateintarrTypeOut() argument
26 * env: 当前环境的句柄 in getCreateintarrTypeOut()
30 status = napi_create_int32(env, jsonObj == NULL ? 0 : jsonObj->type, &typeOut); in getCreateintarrTypeOut()
32 getErrMessage(status, env, extended_error_info, "napi_create_int32", tag); in getCreateintarrTypeOut()
36 * env: 当前环境的句柄 in getCreateintarrTypeOut()
41 status = napi_set_named_property(env, cJSON_CreateIntArrayOut, "type", typeOut); in getCreateintarrTypeOut()
44 getErrMessage(status, env, extended_error_info, "napi_set_named_property", tag); in getCreateintarrTypeOut()
50 napi_value getCreateintarrValuesintOut(napi_env env, napi_value cJSON_CreateIntArrayOut, cJSON *jsonObj) in getCreateintarrValuesintOut() argument
57 * env: 当前环境的句柄 in getCreateintarrValuesintOut()
61 status = napi_create_int32(env, jsonOb in getCreateintarrValuesintOut()
81 getCreateintarrValuesdoubleOut(napi_env env, napi_value cJSON_CreateIntArrayOut, cJSON *jsonObj) getCreateintarrValuesdoubleOut() argument
112 getCreateintarrValuestringOut(napi_env env, napi_value cJSON_CreateIntArrayOut, cJSON *jsonOut) getCreateintarrValuestringOut() argument
148 getCreateintarrStringOut(napi_env env, napi_value cJSON_CreateIntArrayOut, cJSON *jsonOut) getCreateintarrStringOut() argument
184 getCreateintarrNextOut(napi_env env, napi_value cJSON_CreateIntArrayOut, cJSON *jsonObj) getCreateintarrNextOut() argument
231 getJsonobjitemChildOut(napi_env env, napi_value childOut, cJSON *jsonObj) getJsonobjitemChildOut() argument
249 getCreateintarrChildOut(napi_env env, napi_value cJSON_CreateIntArrayOut, cJSON *jsonObj) getCreateintarrChildOut() argument
283 getCreateintarrPrevOut(napi_env env, napi_value cJSON_CreateIntArrayOut, cJSON *jsonObj) getCreateintarrPrevOut() argument
313 getCjsonObjArrayLen(napi_env env, napi_value param) getCjsonObjArrayLen() argument
338 GetCjsonCreateArrayParams1(napi_env env, napi_value param, int **outArrayNumbers, uint32_t *outLen) GetCjsonCreateArrayParams1() argument
393 GetCjsonCreateArrayParams2(napi_env env, napi_value param) GetCjsonCreateArrayParams2() argument
429 KH203_cJSON_CreateIntArray(napi_env env, napi_callback_info info) KH203_cJSON_CreateIntArray() argument
[all...]
H A Dcjsonadditemtoarraycase.cpp18 double getAdditemtoarrInfoNum(napi_env env, napi_value itemObj) in getAdditemtoarrInfoNum() argument
24 status = napi_get_named_property(env, itemObj, "valuedouble", &paramValuedoubleIn); // 读取属性值 in getAdditemtoarrInfoNum()
26 getErrMessage(status, env, extended_error_info, "get named property", tag); in getAdditemtoarrInfoNum()
32 status = napi_get_value_double(env, paramValuedoubleIn, &arrayItemValuedoubleIn); in getAdditemtoarrInfoNum()
34 getErrMessage(status, env, extended_error_info, "napi_get_value_double", tag); in getAdditemtoarrInfoNum()
41 char *getAdditemtoarrInfoStr(napi_env env, napi_value itemObj) in getAdditemtoarrInfoStr() argument
47 status = napi_get_named_property(env, itemObj, "valuestring", &paramValuestringIn); // 读取属性值 in getAdditemtoarrInfoStr()
49 getErrMessage(status, env, extended_error_info, "get named property", tag); in getAdditemtoarrInfoStr()
54 * env: N-API环境的句柄,表示当前的上下文 in getAdditemtoarrInfoStr()
61 status = napi_get_value_string_utf8(env, paramValuestringI in getAdditemtoarrInfoStr()
132 getAdditemtoarrTypeOut(napi_env env, napi_value cJSON_AddItemToArrayOut, cJSON *jsonObj) getAdditemtoarrTypeOut() argument
163 getAdditemtoarrValuesintOut(napi_env env, napi_value cJSON_AddItemToArrayOut, cJSON *jsonObj) getAdditemtoarrValuesintOut() argument
194 getAdditemtoarrValuesdoubleOut(napi_env env, napi_value cJSON_AddItemToArrayOut, cJSON *jsonObj) getAdditemtoarrValuesdoubleOut() argument
225 getAdditemtoarrValuestringOut(napi_env env, napi_value cJSON_AddItemToArrayOut, cJSON *jsonOut) getAdditemtoarrValuestringOut() argument
261 getAdditemtoarrStringOut(napi_env env, napi_value cJSON_AddItemToArrayOut, cJSON *jsonOut) getAdditemtoarrStringOut() argument
297 getAdditemtoarrNextOut(napi_env env, napi_value cJSON_AddItemToArrayOut, cJSON *jsonObj) getAdditemtoarrNextOut() argument
350 getJsonarrayitemChildOut(napi_env env, napi_value childOut, cJSON *jsonObj) getJsonarrayitemChildOut() argument
378 getAdditemtoarrChildOut(napi_env env, napi_value cJSON_AddItemToArrayOut, cJSON *jsonObj) getAdditemtoarrChildOut() argument
412 getAdditemtoarrPrevOut(napi_env env, napi_value cJSON_AddItemToArrayOut, cJSON *jsonObj) getAdditemtoarrPrevOut() argument
442 getCjsonAddItemToArrRes(napi_env env, napi_value cjsonObj, napi_value cjsonArrobj) getCjsonAddItemToArrRes() argument
498 KH802_cJSON_AddItemToArray(napi_env env, napi_callback_info info) KH802_cJSON_AddItemToArray() argument
[all...]
H A Dcjsonaddstringtoobjectcase.cpp18 napi_value getAddstrtoobjTypeOut(napi_env env, napi_value cJSON_AddStringToObjectOut, cJSON *jsonObj) in getAddstrtoobjTypeOut() argument
25 * env: 当前环境的句柄 in getAddstrtoobjTypeOut()
29 status = napi_create_int32(env, jsonObj == NULL ? 0 : jsonObj->type, &typeOut); in getAddstrtoobjTypeOut()
31 getErrMessage(status, env, extended_error_info, "napi_create_int32", tag); in getAddstrtoobjTypeOut()
35 * env: 当前环境的句柄 in getAddstrtoobjTypeOut()
40 status = napi_set_named_property(env, cJSON_AddStringToObjectOut, "type", typeOut); in getAddstrtoobjTypeOut()
43 getErrMessage(status, env, extended_error_info, "napi_set_named_property", tag); in getAddstrtoobjTypeOut()
49 napi_value getAddstrtoobjValuesintOut(napi_env env, napi_value cJSON_AddStringToObjectOut, cJSON *jsonObj) in getAddstrtoobjValuesintOut() argument
56 * env: 当前环境的句柄 in getAddstrtoobjValuesintOut()
60 status = napi_create_int32(env, jsonOb in getAddstrtoobjValuesintOut()
80 getAddstrtoobjValuesdoubleOut(napi_env env, napi_value cJSON_AddStringToObjectOut, cJSON *jsonObj) getAddstrtoobjValuesdoubleOut() argument
111 getAddstrtoobjValuestringOut(napi_env env, napi_value cJSON_AddStringToObjectOut, cJSON *jsonOut) getAddstrtoobjValuestringOut() argument
147 getAddstrtoobjStringOut(napi_env env, napi_value cJSON_AddStringToObjectOut, cJSON *jsonOut) getAddstrtoobjStringOut() argument
183 getAddstrtoobjNextOut(napi_env env, napi_value cJSON_AddStringToObjectOut, cJSON *jsonObj) getAddstrtoobjNextOut() argument
230 getJsonobjstrChildOut(napi_env env, napi_value childOut, cJSON *jsonObj) getJsonobjstrChildOut() argument
248 getAddstrtoobjChildOut(napi_env env, napi_value cJSON_AddStringToObjectOut, cJSON *jsonObj) getAddstrtoobjChildOut() argument
282 getAddstrtoobjPrevOut(napi_env env, napi_value cJSON_AddStringToObjectOut, cJSON *jsonObj) getAddstrtoobjPrevOut() argument
312 getAddstrtoobjInfoNameIn(napi_env env, napi_value propNameIn) getAddstrtoobjInfoNameIn() argument
353 getAddstrtoobjInfoValueIn(napi_env env, napi_value propValueIn) getAddstrtoobjInfoValueIn() argument
399 KH526_cJSON_AddStringToObject(napi_env env, napi_callback_info info) KH526_cJSON_AddStringToObject() argument
[all...]
H A Dcjsonaddnumbertoobjectcase.cpp18 napi_value getAddnumbertoobjTypeOut(napi_env env, napi_value cJSON_AddNumberToObjectOut, cJSON *jsonObj) in getAddnumbertoobjTypeOut() argument
25 * env: 当前环境的句柄 in getAddnumbertoobjTypeOut()
29 status = napi_create_int32(env, jsonObj == NULL ? 0 : jsonObj->type, &typeOut); in getAddnumbertoobjTypeOut()
31 getErrMessage(status, env, extended_error_info, "napi_create_int32", tag); in getAddnumbertoobjTypeOut()
35 * env: 当前环境的句柄 in getAddnumbertoobjTypeOut()
40 status = napi_set_named_property(env, cJSON_AddNumberToObjectOut, "type", typeOut); in getAddnumbertoobjTypeOut()
43 getErrMessage(status, env, extended_error_info, "napi_set_named_property", tag); in getAddnumbertoobjTypeOut()
49 napi_value getAddnumbertoobjValuesintOut(napi_env env, napi_value cJSON_AddNumberToObjectOut, cJSON *jsonObj) in getAddnumbertoobjValuesintOut() argument
56 * env: 当前环境的句柄 in getAddnumbertoobjValuesintOut()
60 status = napi_create_int32(env, jsonOb in getAddnumbertoobjValuesintOut()
80 getAddnumbertoobjValuesdoubleOut(napi_env env, napi_value cJSON_AddNumberToObjectOut, cJSON *jsonObj) getAddnumbertoobjValuesdoubleOut() argument
111 getAddnumbertoobjValuestringOut(napi_env env, napi_value cJSON_AddNumberToObjectOut, cJSON *jsonOut) getAddnumbertoobjValuestringOut() argument
147 getAddnumbertoobjStringOut(napi_env env, napi_value cJSON_AddNumberToObjectOut, cJSON *jsonOut) getAddnumbertoobjStringOut() argument
183 getAddnumbertoobjNextOut(napi_env env, napi_value cJSON_AddNumberToObjectOut, cJSON *jsonObj) getAddnumbertoobjNextOut() argument
230 getJsonobjnumChildout(napi_env env, napi_value childOut, cJSON *jsonObj) getJsonobjnumChildout() argument
249 getAddnumbertoobjChildOut(napi_env env, napi_value cJSON_AddNumberToObjectOut, cJSON *jsonObj) getAddnumbertoobjChildOut() argument
283 getAddnumbertoobjPrevOut(napi_env env, napi_value cJSON_AddNumberToObjectOut, cJSON *jsonObj) getAddnumbertoobjPrevOut() argument
314 getAddnumbertoobjInfoStr(napi_env env, napi_value propStrValue) getAddnumbertoobjInfoStr() argument
355 getAddnumbertoobjInfoNum(napi_env env, napi_value propNumValue) getAddnumbertoobjInfoNum() argument
390 KH206_cJSON_AddNumberToObject(napi_env env, napi_callback_info info) KH206_cJSON_AddNumberToObject() argument
[all...]
/napi_generator/examples/napitutorials/entry/src/main/cpp/include/
H A Djavascriptapi.h28 napi_value jsPropertyInit(napi_env env, napi_value exports);
29 napi_value testNapiGetPropertyNames(napi_env env, napi_callback_info info);
30 napi_value testNapiSetProperty(napi_env env, napi_callback_info info);
31 napi_value testNapiGetProperty(napi_env env, napi_callback_info info);
32 napi_value testNapiHasProperty(napi_env env, napi_callback_info info);
33 napi_value testNapiDeleteProperty(napi_env env, napi_callback_info info);
34 bool validateObjectProperty(napi_env &env, napi_value &obj, napi_value &propName, const char *tag);
35 napi_value testNapiSetNamedProperty(napi_env env, napi_callback_info info);
36 napi_value testNapiGetNamedProperty(napi_env env, napi_callback_info info);
37 napi_value testNapiHasNamedProperty(napi_env env, napi_callback_inf
[all...]
H A Dnodeapi.h25 napi_value setInstancedata(napi_env env, napi_value exports);
26 napi_value testNapiStatus(napi_env env, napi_callback_info info);
27 napi_value testNapiExterrinfo(napi_env env, napi_callback_info info);
28 napi_value testNapiEnv(napi_env env, napi_callback_info info);
29 napi_value testNapiValue(napi_env env, napi_callback_info info);
30 napi_value setThreadsafefunc(napi_env env, napi_callback_info info);
31 napi_value setThreadsafefuncrel(napi_env env, napi_callback_info info);
32 napi_value setThreadsafefuncall(napi_env env, napi_callback_info info);
34 napi_value cJSONVersion(napi_env env, napi_callback_info info);
/napi_generator/examples/napitutorials/entry/src/main/cpp/include/cJsonNapiH/
H A Dcjsonnapi.h25 napi_value KH418_CJSON_Parse(napi_env env, napi_callback_info info);
31 napi_value KH373_cJSON_GetArraySize(napi_env env, napi_callback_info info);
37 napi_value KH735_cJSON_Print(napi_env env, napi_callback_info info);
43 napi_value KH361_cJSON_CreateObject(napi_env env, napi_callback_info info);
49 napi_value KH515_cJSON_CreateString(napi_env env, napi_callback_info info);
55 napi_value KH526_cJSON_AddStringToObject(napi_env env, napi_callback_info info);
60 napi_value KH206_cJSON_AddNumberToObject(napi_env env, napi_callback_info info);
65 napi_value KH545_cJSON_AddFalseToObject(napi_env env, napi_callback_info info);
71 napi_value getAdditemtoobjChildOut(napi_env env, napi_value cJSON_AddItemToObjectOut, cJSON *jsonObj);
77 napi_value KH180_cJSON_AddItemToObject(napi_env env, napi_callback_inf
[all...]
/napi_generator/examples/napitutorials/entry/src/main/cpp/basesample/
H A Dbasesample.cpp18 static napi_value Add(napi_env env, napi_callback_info info) in Add() argument
26 napi_get_cb_info(env, info, &argc, args, nullptr, nullptr); in Add()
29 napi_typeof(env, args[0], &valuetype0); in Add()
32 napi_typeof(env, args[1], &valuetype1); in Add()
35 napi_get_value_double(env, args[0], &value0); in Add()
38 napi_get_value_double(env, args[1], &value1); in Add()
41 napi_create_double(env, value0 + value1, &sum); in Add()
46 napi_value createTctBaseInstance(napi_env env) in createTctBaseInstance() argument
53 status = napi_create_object(env, &instance); in createTctBaseInstance()
55 napi_throw_error(env, nullpt in createTctBaseInstance()
[all...]
/napi_generator/examples/napitutorials/entry/src/main/cpp/javascriptapi/jsobjectwrap/
H A Dnapiunwrap.cpp27 MyNode(napi_env env, napi_value val) in MyNode() argument
30 status = napi_typeof(env, val, &result); in MyNode()
32 getErrMsg(status, env, extended_error_info, "call napi_typeof()", TAG); in MyNode()
36 status = napiValueType2Str(env, result, &resultStr); in MyNode()
39 napi_throw_error(env, NULL, errMsg.c_str()); in MyNode()
42 napi_value GetResult(napi_env env) in GetResult() argument
48 napi_value testNapiUnwrap(napi_env env, napi_callback_info info) in testNapiUnwrap() argument
58 status = napi_get_cb_info(env, info, &argc, argv, &thisObj, &data); in testNapiUnwrap()
60 getErrMsg(status, env, extended_error_info, "Failed to get callback info", TAG); in testNapiUnwrap()
63 auto instance = new MyNode(env, arg in testNapiUnwrap()
[all...]
/napi_generator/examples/napitutorials/entry/src/main/cpp/javascriptapi/jsproperty/
H A Dnapigetproperty.cpp20 napi_value callFunctionIfTypeIsFunction(napi_env &env, napi_value &obj, napi_value &propValue) in callFunctionIfTypeIsFunction() argument
26 status = napi_typeof(env, propValue, &valuetype); in callFunctionIfTypeIsFunction()
28 getErrMsg(status, env, extended_error_info, "get type", TAG); in callFunctionIfTypeIsFunction()
35 status = napi_call_function(env, obj, propValue, 0, NULL, &result); in callFunctionIfTypeIsFunction()
37 getErrMsg(status, env, extended_error_info, "call function", TAG); in callFunctionIfTypeIsFunction()
47 napi_value testNapiGetProperty(napi_env env, napi_callback_info info) in testNapiGetProperty() argument
58 status = napi_get_cb_info(env, info, &argc, argv, NULL, NULL); in testNapiGetProperty()
60 getErrMsg(status, env, extended_error_info, "get cb info", TAG); in testNapiGetProperty()
66 napi_throw_error(env, NULL, "Expected 2 arguments"); in testNapiGetProperty()
75 status = napi_typeof(env, ob in testNapiGetProperty()
[all...]
H A Dnapihasnamedproperty.cpp20 char *getSecondParamStr(napi_env &env, napi_value &propName) in getSecondParamStr() argument
25 status = napi_get_value_string_utf8(env, propName, NULL, 0, &str_size); in getSecondParamStr()
27 getErrMsg(status, env, extended_error_info, "get value string", TAG); in getSecondParamStr()
32 status = napi_get_value_string_utf8(env, propName, propertyName, str_size + 1, &str_size); in getSecondParamStr()
34 getErrMsg(status, env, extended_error_info, "get value string", TAG); in getSecondParamStr()
41 napi_value testNapiHasNamedProperty(napi_env env, napi_callback_info info) in testNapiHasNamedProperty() argument
51 status = napi_get_cb_info(env, info, &argc, argv, NULL, NULL); in testNapiHasNamedProperty()
53 getErrMsg(status, env, extended_error_info, "get cb info", TAG); in testNapiHasNamedProperty()
58 napi_throw_error(env, NULL, "Expected 2 arguments"); in testNapiHasNamedProperty()
64 bool resValid = validateObjectProperty(env, ob in testNapiHasNamedProperty()
[all...]
H A Dnapihaselement.cpp20 napi_value testNapiHasElement(napi_env env, napi_callback_info info) in testNapiHasElement() argument
30 status = napi_get_cb_info(env, info, &argc, argv, NULL, NULL); in testNapiHasElement()
32 getErrMsg(status, env, extended_error_info, "get cb info", TAG); in testNapiHasElement()
37 napi_throw_error(env, NULL, "Expected 2 arguments"); in testNapiHasElement()
43 bool resValid = validateArrayObjProperty(env, arrayObj, elementIndex, TAG); in testNapiHasElement()
49 status = napi_get_value_uint32(env, elementIndex, &index); in testNapiHasElement()
51 getErrMsg(status, env, extended_error_info, "get value uint32", TAG); in testNapiHasElement()
56 status = napi_has_element(env, arrayObj, index, &hasElement); in testNapiHasElement()
58 getErrMsg(status, env, extended_error_info, "has element", TAG); in testNapiHasElement()
63 status = napi_get_boolean(env, hasElemen in testNapiHasElement()
[all...]
H A Dnapihasproperty.cpp20 napi_value testNapiHasProperty(napi_env env, napi_callback_info info) in testNapiHasProperty() argument
31 status = napi_get_cb_info(env, info, &argc, argv, NULL, NULL); in testNapiHasProperty()
33 getErrMsg(status, env, extended_error_info, "get cb info", TAG); in testNapiHasProperty()
39 napi_throw_error(env, NULL, "Expected 2 arguments"); in testNapiHasProperty()
48 status = napi_typeof(env, obj, &valuetype0); in testNapiHasProperty()
50 getErrMsg(status, env, extended_error_info, "get obj type", TAG); in testNapiHasProperty()
54 napi_throw_type_error(env, NULL, "Wrong argument type, expected an object"); in testNapiHasProperty()
60 status = napi_has_property(env, obj, propName, &hasProperty); in testNapiHasProperty()
62 getErrMsg(status, env, extended_error_info, "has property", TAG); in testNapiHasProperty()
68 status = napi_get_boolean(env, hasPropert in testNapiHasProperty()
[all...]
H A Dnapisetnamedproperty.cpp20 napi_value testNapiSetNamedProperty(napi_env env, napi_callback_info info) in testNapiSetNamedProperty() argument
30 status = napi_get_cb_info(env, info, &argc, argv, NULL, NULL); // 解析传入的参数 in testNapiSetNamedProperty()
32 getErrMsg(status, env, extended_error_info, "get cb info", TAG); in testNapiSetNamedProperty()
36 napi_throw_error(env, NULL, "Expected 2 arguments"); in testNapiSetNamedProperty()
43 bool resValid = validateObjectProperty(env, obj, propName, TAG); in testNapiSetNamedProperty()
49 status = napi_get_value_string_utf8(env, propName, NULL, 0, &str_size); in testNapiSetNamedProperty()
51 getErrMsg(status, env, extended_error_info, "get value string", TAG); in testNapiSetNamedProperty()
55 status = napi_get_value_string_utf8(env, propName, propertyName, str_size + 1, &str_size); in testNapiSetNamedProperty()
57 getErrMsg(status, env, extended_error_info, "get value string", TAG); in testNapiSetNamedProperty()
62 status = napi_set_named_property(env, ob in testNapiSetNamedProperty()
[all...]
/napi_generator/examples/napitutorials/entry/src/main/cpp/
H A Dinit.cpp28 static napi_value Add(napi_env env, napi_callback_info info) in Add() argument
34 napi_get_cb_info(env, info, &argc, args, nullptr, nullptr); in Add()
37 napi_typeof(env, args[0], &valuetype0); in Add()
40 napi_typeof(env, args[1], &valuetype1); in Add()
43 napi_get_value_double(env, args[0], &value0); in Add()
46 napi_get_value_double(env, args[1], &value1); in Add()
49 napi_create_double(env, value0 + value1, &sum); in Add()
54 static napi_value getTestCase(napi_env env, napi_callback_info info) in getTestCase() argument
62 napi_get_cb_info(env, info, &argc, args, nullptr, nullptr); in getTestCase()
65 napi_typeof(env, arg in getTestCase()
106 Init(napi_env env, napi_value exports) Init() argument
[all...]
/napi_generator/examples/napitutorials/entry/src/main/cpp/javascriptapi/
H A Dcommon.cpp19 void getErrMsg(napi_status &status, napi_env &env, const napi_extended_error_info *&extended_error_info, in getErrMsg() argument
22 status = napi_get_last_error_info(env, &extended_error_info); in getErrMsg()
32 napi_throw_error(env, NULL, res.c_str()); in getErrMsg()
36 bool validateObjectProperty(napi_env &env, napi_value &obj, napi_value &propName, const char *tag) in validateObjectProperty() argument
44 status = napi_typeof(env, obj, &valuetype0); in validateObjectProperty()
46 getErrMsg(status, env, extended_error_info, "get obj type", tag); in validateObjectProperty()
50 napi_throw_type_error(env, NULL, "Wrong argument type, expected an object"); in validateObjectProperty()
55 status = napi_typeof(env, propName, &valuetype1); in validateObjectProperty()
57 getErrMsg(status, env, extended_error_info, "get propName type", tag); in validateObjectProperty()
61 napi_throw_type_error(env, NUL in validateObjectProperty()
67 validateArrayObjProperty(napi_env &env, napi_value &obj, napi_value &propName, const char *tag) validateArrayObjProperty() argument
98 napiValueType2Str(const napi_env &env, const napi_valuetype type, napi_value *result) napiValueType2Str() argument
[all...]
/napi_generator/examples/napitutorials/entry/src/main/cpp/nodeapi/datatypes/
H A Dnapithreadsafefuncall.cpp25 static void CallbackFunction(napi_env env, napi_value jsCallback, void *context, void *data) in CallbackFunction() argument
30 napi_create_string_utf8(env, "test_threadsafe_func", NAPI_AUTO_LENGTH, &argv[0]); in CallbackFunction()
31 napi_call_function(env, nullptr, jsCallback, argc, argv, nullptr); in CallbackFunction()
41 napi_value setThreadsafefuncall(napi_env env, napi_callback_info info) in setThreadsafefuncall() argument
53 status = napi_get_cb_info(env, info, &argc, argv, NULL, NULL); in setThreadsafefuncall()
55 napi_throw_error(env, NULL, "Failed to parse arguments"); in setThreadsafefuncall()
61 napi_throw_error(env, NULL, "Expected 1 arguments"); in setThreadsafefuncall()
65 napi_create_string_utf8(env, "testThreadsafefunc", NAPI_AUTO_LENGTH, &name); in setThreadsafefuncall()
66 status = napi_create_threadsafe_function(env, argv[0], nullptr, name, 0, 1, in setThreadsafefuncall()
69 status = napi_get_last_error_info(env, in setThreadsafefuncall()
[all...]
H A Dnapithreadsafefunc.cpp25 static void CallbackFunction(napi_env env, napi_value jsCallback, void *context, void *data) in CallbackFunction() argument
30 napi_create_string_utf8(env, "test_threadsafe_func", NAPI_AUTO_LENGTH, &argv[0]); in CallbackFunction()
31 napi_call_function(env, nullptr, jsCallback, argc, argv, nullptr); in CallbackFunction()
41 napi_value setThreadsafefunc(napi_env env, napi_callback_info info) in setThreadsafefunc() argument
53 status = napi_get_cb_info(env, info, &argc, argv, NULL, NULL); in setThreadsafefunc()
55 napi_throw_error(env, NULL, "Failed to parse arguments"); in setThreadsafefunc()
61 napi_throw_error(env, NULL, "Expected 1 arguments"); in setThreadsafefunc()
65 napi_create_string_utf8(env, "testThreadsafefunc", NAPI_AUTO_LENGTH, &name); in setThreadsafefunc()
66 status = napi_create_threadsafe_function(env, argv[0], nullptr, name, 0, 1, in setThreadsafefunc()
69 status = napi_get_last_error_info(env, in setThreadsafefunc()
[all...]

Completed in 10 milliseconds

1234