FreeRDP
Loading...
Searching...
No Matches
json-stub.c
1
20#include <math.h>
21#include <errno.h>
22
23#include <winpr/file.h>
24#include <winpr/json.h>
25#include <winpr/assert.h>
26
27int WINPR_JSON_version(char* buffer, size_t len)
28{
29 (void)_snprintf(buffer, len, "JSON support not available");
30 return -1;
31}
32
33WINPR_JSON* WINPR_JSON_Parse(const char* value)
34{
35 WINPR_UNUSED(value);
36 return nullptr;
37}
38
39WINPR_JSON* WINPR_JSON_ParseWithLength(const char* value, size_t buffer_length)
40{
41 WINPR_UNUSED(value);
42 WINPR_UNUSED(buffer_length);
43 return nullptr;
44}
45
46void WINPR_JSON_Delete(WINPR_JSON* item)
47{
48 WINPR_UNUSED(item);
49}
50
51WINPR_JSON* WINPR_JSON_GetArrayItem(const WINPR_JSON* array, size_t index)
52{
53 WINPR_UNUSED(array);
54 WINPR_UNUSED(index);
55 return nullptr;
56}
57
58size_t WINPR_JSON_GetArraySize(const WINPR_JSON* array)
59{
60 WINPR_UNUSED(array);
61 return 0;
62}
63
64WINPR_JSON* WINPR_JSON_GetObjectItem(const WINPR_JSON* object, const char* string)
65{
66 WINPR_UNUSED(object);
67 WINPR_UNUSED(string);
68 return nullptr;
69}
70
71WINPR_JSON* WINPR_JSON_GetObjectItemCaseSensitive(const WINPR_JSON* object, const char* string)
72{
73 WINPR_UNUSED(object);
74 WINPR_UNUSED(string);
75 return nullptr;
76}
77
78BOOL WINPR_JSON_HasObjectItem(const WINPR_JSON* object, const char* string)
79{
80 WINPR_UNUSED(object);
81 WINPR_UNUSED(string);
82 return FALSE;
83}
84
85const char* WINPR_JSON_GetErrorPtr(void)
86{
87 return nullptr;
88}
89
90const char* WINPR_JSON_GetStringValue(WINPR_JSON* item)
91{
92 WINPR_UNUSED(item);
93 return nullptr;
94}
95
96double WINPR_JSON_GetNumberValue(const WINPR_JSON* item)
97{
98 WINPR_UNUSED(item);
99 return nan("");
100}
101
102INT64 WINPR_JSON_GetIntegerValue(const WINPR_JSON* item)
103{
104 WINPR_UNUSED(item);
105 return 0;
106}
107
108UINT64 WINPR_JSON_GetUIntegerValue(const WINPR_JSON* item)
109{
110 WINPR_UNUSED(item);
111 return 0;
112}
113
114BOOL WINPR_JSON_IsInvalid(const WINPR_JSON* item)
115{
116 WINPR_UNUSED(item);
117 return TRUE;
118}
119
120BOOL WINPR_JSON_IsFalse(const WINPR_JSON* item)
121{
122 WINPR_UNUSED(item);
123 return FALSE;
124}
125
126BOOL WINPR_JSON_IsTrue(const WINPR_JSON* item)
127{
128 WINPR_UNUSED(item);
129 return FALSE;
130}
131
132BOOL WINPR_JSON_IsBool(const WINPR_JSON* item)
133{
134 WINPR_UNUSED(item);
135 return FALSE;
136}
137
138BOOL WINPR_JSON_IsNull(const WINPR_JSON* item)
139{
140 WINPR_UNUSED(item);
141 return FALSE;
142}
143
144BOOL WINPR_JSON_IsNumber(const WINPR_JSON* item)
145{
146 WINPR_UNUSED(item);
147 return FALSE;
148}
149
150BOOL WINPR_JSON_IsString(const WINPR_JSON* item)
151{
152 WINPR_UNUSED(item);
153 return FALSE;
154}
155
156BOOL WINPR_JSON_IsArray(const WINPR_JSON* item)
157{
158 WINPR_UNUSED(item);
159 return FALSE;
160}
161
162BOOL WINPR_JSON_IsObject(const WINPR_JSON* item)
163{
164 WINPR_UNUSED(item);
165 return FALSE;
166}
167
168WINPR_JSON* WINPR_JSON_CreateNull(void)
169{
170 return nullptr;
171}
172
173WINPR_JSON* WINPR_JSON_CreateTrue(void)
174{
175 return nullptr;
176}
177
178WINPR_JSON* WINPR_JSON_CreateFalse(void)
179{
180 return nullptr;
181}
182
183WINPR_JSON* WINPR_JSON_CreateBool(BOOL boolean)
184{
185 WINPR_UNUSED(boolean);
186 return nullptr;
187}
188
189WINPR_JSON* WINPR_JSON_CreateNumber(double num)
190{
191 WINPR_UNUSED(num);
192 return nullptr;
193}
194
195WINPR_JSON* WINPR_JSON_CreateString(const char* string)
196{
197 WINPR_UNUSED(string);
198 return nullptr;
199}
200
201WINPR_JSON* WINPR_JSON_CreateArray(void)
202{
203 return nullptr;
204}
205
206WINPR_JSON* WINPR_JSON_CreateObject(void)
207{
208 return nullptr;
209}
210
211WINPR_JSON* WINPR_JSON_AddNullToObject(WINPR_JSON* object, const char* name)
212{
213 WINPR_UNUSED(object);
214 WINPR_UNUSED(name);
215 return nullptr;
216}
217
218WINPR_JSON* WINPR_JSON_AddTrueToObject(WINPR_JSON* object, const char* name)
219{
220 WINPR_UNUSED(object);
221 WINPR_UNUSED(name);
222 return nullptr;
223}
224
225WINPR_JSON* WINPR_JSON_AddFalseToObject(WINPR_JSON* object, const char* name)
226{
227 WINPR_UNUSED(object);
228 WINPR_UNUSED(name);
229 return nullptr;
230}
231
232WINPR_JSON* WINPR_JSON_AddBoolToObject(WINPR_JSON* object, const char* name, BOOL boolean)
233{
234 WINPR_UNUSED(object);
235 WINPR_UNUSED(name);
236 WINPR_UNUSED(boolean);
237 return nullptr;
238}
239
240WINPR_JSON* WINPR_JSON_AddNumberToObject(WINPR_JSON* object, const char* name, double number)
241{
242 WINPR_UNUSED(object);
243 WINPR_UNUSED(name);
244 WINPR_UNUSED(number);
245 return nullptr;
246}
247
248WINPR_JSON* WINPR_JSON_AddIntegerToObject(WINPR_JSON* object, const char* name, int64_t number)
249{
250 WINPR_UNUSED(object);
251 WINPR_UNUSED(name);
252 WINPR_UNUSED(number);
253 return nullptr;
254}
255
256WINPR_JSON* WINPR_JSON_AddUIntegerToObject(WINPR_JSON* object, const char* name, uint64_t number)
257{
258 WINPR_UNUSED(object);
259 WINPR_UNUSED(name);
260 WINPR_UNUSED(number);
261 return nullptr;
262}
263
264WINPR_JSON* WINPR_JSON_AddStringToObject(WINPR_JSON* object, const char* name, const char* string)
265{
266 WINPR_UNUSED(object);
267 WINPR_UNUSED(name);
268 WINPR_UNUSED(string);
269 return nullptr;
270}
271
272WINPR_JSON* WINPR_JSON_AddObjectToObject(WINPR_JSON* object, const char* name)
273{
274 WINPR_UNUSED(object);
275 WINPR_UNUSED(name);
276 return nullptr;
277}
278
279BOOL WINPR_JSON_AddItemToArray(WINPR_JSON* array, WINPR_JSON* item)
280{
281 WINPR_UNUSED(array);
282 WINPR_UNUSED(item);
283 return FALSE;
284}
285
286WINPR_JSON* WINPR_JSON_AddArrayToObject(WINPR_JSON* object, const char* name)
287{
288 WINPR_UNUSED(object);
289 WINPR_UNUSED(name);
290 return nullptr;
291}
292
293char* WINPR_JSON_Print(WINPR_JSON* item)
294{
295 WINPR_UNUSED(item);
296 return nullptr;
297}
298
299char* WINPR_JSON_PrintUnformatted(WINPR_JSON* item)
300{
301 WINPR_UNUSED(item);
302 return nullptr;
303}
WINPR_JSON * WINPR_JSON_CreateString(const char *string)
WINPR_JSON_CreateString.
Definition json-stub.c:195
WINPR_JSON * WINPR_JSON_CreateNull(void)
WINPR_JSON_CreateNull.
Definition json-stub.c:168
BOOL WINPR_JSON_IsNull(const WINPR_JSON *item)
Check if JSON item is Null.
Definition json-stub.c:138
WINPR_JSON * WINPR_JSON_CreateTrue(void)
WINPR_JSON_CreateTrue.
Definition json-stub.c:173
WINPR_JSON * WINPR_JSON_CreateNumber(double num)
WINPR_JSON_CreateNumber.
Definition json-stub.c:189
WINPR_JSON * WINPR_JSON_AddObjectToObject(WINPR_JSON *object, const char *name)
WINPR_JSON_AddObjectToObject.
Definition json-stub.c:272
WINPR_JSON * WINPR_JSON_CreateObject(void)
WINPR_JSON_CreateObject.
Definition json-stub.c:206
BOOL WINPR_JSON_HasObjectItem(const WINPR_JSON *object, const char *string)
Check if JSON has an object matching the name.
Definition json-stub.c:78
BOOL WINPR_JSON_IsBool(const WINPR_JSON *item)
Check if JSON item is of type BOOL.
Definition json-stub.c:132
BOOL WINPR_JSON_AddItemToArray(WINPR_JSON *array, WINPR_JSON *item)
Add an item to an existing array.
Definition json-stub.c:279
UINT64 WINPR_JSON_GetUIntegerValue(const WINPR_JSON *item)
Return the unsigned Integer value of a JSON item.
Definition json-stub.c:108
BOOL WINPR_JSON_IsInvalid(const WINPR_JSON *item)
Check if JSON item is valid.
Definition json-stub.c:114
BOOL WINPR_JSON_IsNumber(const WINPR_JSON *item)
Check if JSON item is of type Number.
Definition json-stub.c:144
int WINPR_JSON_version(char *buffer, size_t len)
Get the library version string.
Definition json-stub.c:27
size_t WINPR_JSON_GetArraySize(const WINPR_JSON *array)
Get the number of arrayitems from an array.
Definition json-stub.c:58
WINPR_JSON * WINPR_JSON_CreateFalse(void)
WINPR_JSON_CreateFalse.
Definition json-stub.c:178
WINPR_JSON * WINPR_JSON_AddIntegerToObject(WINPR_JSON *object, const char *name, int64_t number)
WINPR_JSON_AddIntegerToObject.
Definition json-stub.c:248
WINPR_JSON * WINPR_JSON_AddFalseToObject(WINPR_JSON *object, const char *name)
WINPR_JSON_AddFalseToObject.
Definition json-stub.c:225
char * WINPR_JSON_Print(WINPR_JSON *item)
Serialize a JSON instance to string for minimal size without formatting see WINPR_JSON_PrintUnformatt...
Definition json-stub.c:293
BOOL WINPR_JSON_IsTrue(const WINPR_JSON *item)
Check if JSON item is BOOL value True.
Definition json-stub.c:126
WINPR_JSON * WINPR_JSON_AddTrueToObject(WINPR_JSON *object, const char *name)
WINPR_JSON_AddTrueToObject.
Definition json-stub.c:218
WINPR_JSON * WINPR_JSON_GetObjectItemCaseSensitive(const WINPR_JSON *object, const char *string)
Same as WINPR_JSON_GetObjectItem but with case sensitive matching.
Definition json-stub.c:71
WINPR_JSON * WINPR_JSON_AddNumberToObject(WINPR_JSON *object, const char *name, double number)
WINPR_JSON_AddNumberToObject.
Definition json-stub.c:240
WINPR_JSON * WINPR_JSON_GetObjectItem(const WINPR_JSON *object, const char *string)
Return a pointer to an JSON object item.
Definition json-stub.c:64
BOOL WINPR_JSON_IsFalse(const WINPR_JSON *item)
Check if JSON item is BOOL value False.
Definition json-stub.c:120
INT64 WINPR_JSON_GetIntegerValue(const WINPR_JSON *item)
Return the Integer value of a JSON item.
Definition json-stub.c:102
WINPR_JSON * WINPR_JSON_ParseWithLength(const char *value, size_t buffer_length)
Parse a JSON string.
Definition json-stub.c:39
WINPR_JSON * WINPR_JSON_AddUIntegerToObject(WINPR_JSON *object, const char *name, uint64_t number)
WINPR_JSON_AddUIntegerToObject.
Definition json-stub.c:256
const char * WINPR_JSON_GetErrorPtr(void)
Return an error string.
Definition json-stub.c:85
WINPR_JSON * WINPR_JSON_AddArrayToObject(WINPR_JSON *object, const char *name)
WINPR_JSON_AddArrayToObject.
Definition json-stub.c:286
BOOL WINPR_JSON_IsString(const WINPR_JSON *item)
Check if JSON item is of type String.
Definition json-stub.c:150
WINPR_JSON * WINPR_JSON_GetArrayItem(const WINPR_JSON *array, size_t index)
Return a pointer to an item in the array.
Definition json-stub.c:51
char * WINPR_JSON_PrintUnformatted(WINPR_JSON *item)
Serialize a JSON instance to string without formatting for human readable formatted output see WINPR_...
Definition json-stub.c:299
double WINPR_JSON_GetNumberValue(const WINPR_JSON *item)
Return the Number value of a JSON item.
Definition json-stub.c:96
WINPR_JSON * WINPR_JSON_CreateBool(BOOL boolean)
WINPR_JSON_CreateBool.
Definition json-stub.c:183
BOOL WINPR_JSON_IsArray(const WINPR_JSON *item)
Check if JSON item is of type Array.
Definition json-stub.c:156
BOOL WINPR_JSON_IsObject(const WINPR_JSON *item)
Check if JSON item is of type Object.
Definition json-stub.c:162
WINPR_JSON * WINPR_JSON_AddNullToObject(WINPR_JSON *object, const char *name)
WINPR_JSON_AddNullToObject.
Definition json-stub.c:211
WINPR_JSON * WINPR_JSON_AddStringToObject(WINPR_JSON *object, const char *name, const char *string)
WINPR_JSON_AddStringToObject.
Definition json-stub.c:264
void WINPR_JSON_Delete(WINPR_JSON *item)
Delete a WinPR JSON wrapper object.
Definition json-stub.c:46
WINPR_JSON * WINPR_JSON_CreateArray(void)
WINPR_JSON_CreateArray.
Definition json-stub.c:201
const char * WINPR_JSON_GetStringValue(WINPR_JSON *item)
Return the String value of a JSON item.
Definition json-stub.c:90
WINPR_JSON * WINPR_JSON_AddBoolToObject(WINPR_JSON *object, const char *name, BOOL boolean)
WINPR_JSON_AddBoolToObject.
Definition json-stub.c:232
WINPR_JSON * WINPR_JSON_Parse(const char *value)
Parse a '\0' terminated JSON string.
Definition json-stub.c:33