Changeset 62021 in vbox for trunk/src/VBox/Runtime/common/misc/json.cpp
- Timestamp:
- Jul 5, 2016 9:34:17 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/misc/json.cpp
r61760 r62021 201 201 { 202 202 /** Number of elements in the array. */ 203 u int32_tcItems;203 unsigned cItems; 204 204 /** Pointer to the array of items. */ 205 205 PRTJSONVALINT *papItems; … … 209 209 { 210 210 /** Number of members. */ 211 u int32_tcMembers;211 unsigned cMembers; 212 212 /** Pointer to the array holding the member names. */ 213 213 char **papszNames; … … 1264 1264 } 1265 1265 1266 RTDECL(int) RTJsonValue GetStringEx(RTJSONVAL hJsonVal, const char **ppszStr)1266 RTDECL(int) RTJsonValueQueryString(RTJSONVAL hJsonVal, const char **ppszStr) 1267 1267 { 1268 1268 PRTJSONVALINT pThis = hJsonVal; … … 1275 1275 } 1276 1276 1277 RTDECL(int) RTJsonValue GetNumber(RTJSONVAL hJsonVal, int64_t *pi64Num)1277 RTDECL(int) RTJsonValueQueryInteger(RTJSONVAL hJsonVal, int64_t *pi64Num) 1278 1278 { 1279 1279 PRTJSONVALINT pThis = hJsonVal; … … 1286 1286 } 1287 1287 1288 RTDECL(int) RTJsonValue GetByName(RTJSONVAL hJsonVal, const char *pszName, PRTJSONVAL phJsonVal)1288 RTDECL(int) RTJsonValueQueryByName(RTJSONVAL hJsonVal, const char *pszName, PRTJSONVAL phJsonVal) 1289 1289 { 1290 1290 PRTJSONVALINT pThis = hJsonVal; … … 1309 1309 } 1310 1310 1311 RTDECL(int) RTJsonValue GetNumberByName(RTJSONVAL hJsonVal, const char *pszName, int64_t *pi64Num)1311 RTDECL(int) RTJsonValueQueryIntegerByName(RTJSONVAL hJsonVal, const char *pszName, int64_t *pi64Num) 1312 1312 { 1313 1313 RTJSONVAL hJsonValNum = NIL_RTJSONVAL; 1314 int rc = RTJsonValue GetByName(hJsonVal, pszName, &hJsonValNum);1314 int rc = RTJsonValueQueryByName(hJsonVal, pszName, &hJsonValNum); 1315 1315 if (RT_SUCCESS(rc)) 1316 1316 { 1317 rc = RTJsonValue GetNumber(hJsonValNum, pi64Num);1317 rc = RTJsonValueQueryInteger(hJsonValNum, pi64Num); 1318 1318 RTJsonValueRelease(hJsonValNum); 1319 1319 } … … 1322 1322 } 1323 1323 1324 RTDECL(int) RTJsonValue GetStringByName(RTJSONVAL hJsonVal, const char *pszName, char **ppszStr)1324 RTDECL(int) RTJsonValueQueryStringByName(RTJSONVAL hJsonVal, const char *pszName, char **ppszStr) 1325 1325 { 1326 1326 RTJSONVAL hJsonValStr = NIL_RTJSONVAL; 1327 int rc = RTJsonValue GetByName(hJsonVal, pszName, &hJsonValStr);1327 int rc = RTJsonValueQueryByName(hJsonVal, pszName, &hJsonValStr); 1328 1328 if (RT_SUCCESS(rc)) 1329 1329 { 1330 1330 const char *pszStr = NULL; 1331 rc = RTJsonValue GetStringEx(hJsonValStr, &pszStr);1331 rc = RTJsonValueQueryString(hJsonValStr, &pszStr); 1332 1332 if (RT_SUCCESS(rc)) 1333 1333 { … … 1342 1342 } 1343 1343 1344 RTDECL(int) RTJsonValue GetBooleanByName(RTJSONVAL hJsonVal, const char *pszName, bool *pfBoolean)1344 RTDECL(int) RTJsonValueQueryBooleanByName(RTJSONVAL hJsonVal, const char *pszName, bool *pfBoolean) 1345 1345 { 1346 1346 AssertPtrReturn(pfBoolean, VERR_INVALID_POINTER); 1347 1347 1348 1348 RTJSONVAL hJsonValBool = NIL_RTJSONVAL; 1349 int rc = RTJsonValue GetByName(hJsonVal, pszName, &hJsonValBool);1349 int rc = RTJsonValueQueryByName(hJsonVal, pszName, &hJsonValBool); 1350 1350 if (RT_SUCCESS(rc)) 1351 1351 { … … 1363 1363 } 1364 1364 1365 RTDECL(u int32_t) RTJsonValueGetArraySize(RTJSONVAL hJsonVal)1365 RTDECL(unsigned) RTJsonValueGetArraySize(RTJSONVAL hJsonVal) 1366 1366 { 1367 1367 PRTJSONVALINT pThis = hJsonVal; … … 1372 1372 } 1373 1373 1374 RTDECL(int) RTJsonValue GetArraySizeEx(RTJSONVAL hJsonVal, uint32_t*pcItems)1374 RTDECL(int) RTJsonValueQueryArraySize(RTJSONVAL hJsonVal, unsigned *pcItems) 1375 1375 { 1376 1376 PRTJSONVALINT pThis = hJsonVal; … … 1383 1383 } 1384 1384 1385 RTDECL(int) RTJsonValue GetByIndex(RTJSONVAL hJsonVal, uint32_tidx, PRTJSONVAL phJsonVal)1385 RTDECL(int) RTJsonValueQueryByIndex(RTJSONVAL hJsonVal, unsigned idx, PRTJSONVAL phJsonVal) 1386 1386 { 1387 1387 PRTJSONVALINT pThis = hJsonVal; … … 1416 1416 } 1417 1417 1418 RTDECL(int) RTJsonIterator GetValue(RTJSONIT hJsonIt, PRTJSONVAL phJsonVal, const char **ppszName)1418 RTDECL(int) RTJsonIteratorQueryValue(RTJSONIT hJsonIt, PRTJSONVAL phJsonVal, const char **ppszName) 1419 1419 { 1420 1420 PRTJSONITINT pIt = hJsonIt;
Note:
See TracChangeset
for help on using the changeset viewer.