DayZ 1.24
Loading...
Searching...
No Matches
JsonApi.c
Go to the documentation of this file.
1
4// -------------------------------------------------------------------------
5// error codes for handle processing
6// defined in C++
8{
9 ETJSON_UNKNOWN, // invalid code
10
11 ETJSON_OK, // all fine
12 ETJSON_COMMSEND, // error during send
13 ETJSON_COMMRECV, // error during receive
14 ETJSON_PARSERERROR, // error during parsing
15 ETJSON_PACKNOSTART, // error - cannot start packing (invalid state)
16 ETJSON_TIMEOUT, // failed to send/ store handle due to timeout
17 ETJSON_NOBUFFERS, // not enough buffers available
18 ETJSON_FAILFILELOAD, // failed to load file
19 ETJSON_FAILFILESAVE, // failed to save file
20 ETJSON_NOTARRAY, // object is not array (ie. attempt to provide different or none object as array)
21};
22
23
24// -------------------------------------------------------------------------
25// JsonApi Handle is container encapsulating real JSON data being sent or recieved via. RESTful/ other service
27{
28 private void JsonApiHandle() {}
29 private void ~JsonApiHandle() {}
30
35
40
45
46};
47
48
49// -------------------------------------------------------------------------
50// parent class for handling JsonApi Struct objects
51//
52//
54{
55 private void JsonApi() {}
56 private void ~JsonApi() {}
57
62
67
72
77
78};
79
80
81// -------------------------------------------------------------------------
82// JsonApi access methods
86
proto native JsonApi GetJsonApi()
EJsonApiError
Definition JsonApi.c:8
@ ETJSON_COMMRECV
Definition JsonApi.c:13
@ ETJSON_FAILFILELOAD
Definition JsonApi.c:18
@ ETJSON_FAILFILESAVE
Definition JsonApi.c:19
@ ETJSON_PACKNOSTART
Definition JsonApi.c:15
@ ETJSON_NOTARRAY
Definition JsonApi.c:20
@ ETJSON_PARSERERROR
Definition JsonApi.c:14
@ ETJSON_OK
Definition JsonApi.c:11
@ ETJSON_NOBUFFERS
Definition JsonApi.c:17
@ ETJSON_UNKNOWN
Definition JsonApi.c:9
@ ETJSON_COMMSEND
Definition JsonApi.c:12
@ ETJSON_TIMEOUT
Definition JsonApi.c:16
proto native void DestroyJsonApi()
proto native JsonApi CreateJsonApi()
proto native int Size()
Length of JSON.
void ~JsonApiHandle()
Definition JsonApi.c:29
proto native void Invalidate()
Invalidate handle and schedule removal.
void JsonApiHandle()
Definition JsonApi.c:28
proto native owned string AsString()
Return as string.
proto native int BufferCount()
Actual number of total buffers active + free.
proto native void SetBuffers(int iBufferCount)
Override number of concurrent buffers used (depending project requirements, DEFAULT = 16,...
void JsonApi()
Definition JsonApi.c:55
proto native void DebugList()
List of all currently active handles.
proto native int BufferMax()
Maximum number of buffers used at once!
void ~JsonApi()
Definition JsonApi.c:56