diff options
Diffstat (limited to 'steam-mobile/libsteam.h')
-rw-r--r-- | steam-mobile/libsteam.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/steam-mobile/libsteam.h b/steam-mobile/libsteam.h index d744765..df89ca1 100644 --- a/steam-mobile/libsteam.h +++ b/steam-mobile/libsteam.h @@ -39,6 +39,17 @@ #include <json-glib/json-glib.h> +#define json_object_get_int_member(JSON_OBJECT, MEMBER) \ + (json_object_has_member(JSON_OBJECT, MEMBER) ? json_object_get_int_member(JSON_OBJECT, MEMBER) : 0) +#define json_object_get_string_member(JSON_OBJECT, MEMBER) \ + (json_object_has_member(JSON_OBJECT, MEMBER) ? json_object_get_string_member(JSON_OBJECT, MEMBER) : NULL) +#define json_object_get_array_member(JSON_OBJECT, MEMBER) \ + (json_object_has_member(JSON_OBJECT, MEMBER) ? json_object_get_array_member(JSON_OBJECT, MEMBER) : NULL) +#define json_object_get_object_member(JSON_OBJECT, MEMBER) \ + (json_object_has_member(JSON_OBJECT, MEMBER) ? json_object_get_object_member(JSON_OBJECT, MEMBER) : NULL) +#define json_object_get_boolean_member(JSON_OBJECT, MEMBER) \ + (json_object_has_member(JSON_OBJECT, MEMBER) ? json_object_get_boolean_member(JSON_OBJECT, MEMBER) : FALSE) + #ifndef PURPLE_PLUGINS # define PURPLE_PLUGINS #endif |