json-gvariant.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /* json-gvariant.h - JSON GVariant integration
  2. *
  3. * This file is part of JSON-GLib
  4. * Copyright (C) 2007 OpenedHand Ltd.
  5. * Copyright (C) 2009 Intel Corp.
  6. *
  7. * This library is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU Lesser General Public
  9. * License as published by the Free Software Foundation; either
  10. * version 2.1 of the License, or (at your option) any later version.
  11. *
  12. * This library is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * Lesser General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Lesser General Public
  18. * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  19. *
  20. * Author:
  21. * Eduardo Lima Mitev <elima@igalia.com>
  22. */
  23. #ifndef __JSON_GVARIANT_H__
  24. #define __JSON_GVARIANT_H__
  25. #if !defined(__JSON_GLIB_INSIDE__) && !defined(JSON_COMPILATION)
  26. #error "Only <json-glib/json-glib.h> can be included directly."
  27. #endif
  28. #include <json-glib/json-types.h>
  29. G_BEGIN_DECLS
  30. JSON_AVAILABLE_IN_1_0
  31. JsonNode * json_gvariant_serialize (GVariant *variant);
  32. JSON_AVAILABLE_IN_1_0
  33. gchar * json_gvariant_serialize_data (GVariant *variant,
  34. gsize *length);
  35. JSON_AVAILABLE_IN_1_0
  36. GVariant * json_gvariant_deserialize (JsonNode *json_node,
  37. const gchar *signature,
  38. GError **error);
  39. JSON_AVAILABLE_IN_1_0
  40. GVariant * json_gvariant_deserialize_data (const gchar *json,
  41. gssize length,
  42. const gchar *signature,
  43. GError **error);
  44. G_END_DECLS
  45. #endif /* __JSON_GVARIANT_H__ */