DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
JsonApi.c
См. документацию.
1
3
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
34 proto native int Size();
35
39 proto native owned string AsString();
40
44 proto native void Invalidate();
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
61 proto native void SetBuffers( int iBufferCount );
62
66 proto native int BufferCount();
67
71 proto native int BufferMax();
72
76 proto native void DebugList();
77
78};
79
80
81// -------------------------------------------------------------------------
82// JsonApi access methods
83proto native JsonApi CreateJsonApi();
84proto native void DestroyJsonApi();
85proto native JsonApi GetJsonApi();
86
proto native JsonApi GetJsonApi()
EJsonApiError
Определения JsonApi.c:8
@ ETJSON_COMMRECV
Определения JsonApi.c:13
@ ETJSON_FAILFILELOAD
Определения JsonApi.c:18
@ ETJSON_FAILFILESAVE
Определения JsonApi.c:19
@ ETJSON_PACKNOSTART
Определения JsonApi.c:15
@ ETJSON_NOTARRAY
Определения JsonApi.c:20
@ ETJSON_PARSERERROR
Определения JsonApi.c:14
@ ETJSON_OK
Определения JsonApi.c:11
@ ETJSON_NOBUFFERS
Определения JsonApi.c:17
@ ETJSON_UNKNOWN
Определения JsonApi.c:9
@ ETJSON_COMMSEND
Определения JsonApi.c:12
@ ETJSON_TIMEOUT
Определения JsonApi.c:16
proto native void DestroyJsonApi()
proto native JsonApi CreateJsonApi()
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()
Определения 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()
Определения JsonApi.c:56
proto native int Size()
Length of JSON.
void ~JsonApiHandle()
Определения JsonApi.c:29
proto native void Invalidate()
Invalidate handle and schedule removal.
void JsonApiHandle()
Определения JsonApi.c:28
proto native owned string AsString()
Return as string.
Определения JsonApi.c:54