Dayz Explorer
1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
jsonapi.c
Go to the documentation of this file.
1
4
// -------------------------------------------------------------------------
5
// error codes for handle processing
6
// defined in C++
7
enum
EJsonApiError
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
26
class
JsonApiHandle
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
//
53
class
JsonApi
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
83
proto native
JsonApi
CreateJsonApi
();
84
proto native
void
DestroyJsonApi
();
85
proto native
JsonApi
GetJsonApi
();
86
ETJSON_PACKNOSTART
@ ETJSON_PACKNOSTART
Definition:
jsonapi.c:15
ETJSON_OK
@ ETJSON_OK
Definition:
jsonapi.c:11
ETJSON_NOTARRAY
@ ETJSON_NOTARRAY
Definition:
jsonapi.c:20
JsonApiHandle
Definition:
jsonapi.c:26
DestroyJsonApi
proto native void DestroyJsonApi()
ETJSON_UNKNOWN
@ ETJSON_UNKNOWN
Definition:
jsonapi.c:9
ETJSON_PARSERERROR
@ ETJSON_PARSERERROR
Definition:
jsonapi.c:14
GetJsonApi
proto native JsonApi GetJsonApi()
JsonApi
Definition:
jsonapi.c:53
ETJSON_TIMEOUT
@ ETJSON_TIMEOUT
Definition:
jsonapi.c:16
ETJSON_COMMSEND
@ ETJSON_COMMSEND
Definition:
jsonapi.c:12
ETJSON_FAILFILELOAD
@ ETJSON_FAILFILELOAD
Definition:
jsonapi.c:18
ETJSON_NOBUFFERS
@ ETJSON_NOBUFFERS
Definition:
jsonapi.c:17
EJsonApiError
EJsonApiError
Definition:
jsonapi.c:7
CreateJsonApi
proto native JsonApi CreateJsonApi()
ETJSON_COMMRECV
@ ETJSON_COMMRECV
Definition:
jsonapi.c:13
ETJSON_FAILFILESAVE
@ ETJSON_FAILFILESAVE
Definition:
jsonapi.c:19
DAYZ
scripts_v1.24.157551
scripts
game
http
jsonapi.c
Generated by
1.8.17