diff options
author | Richard Hughes <richard@hughsie.com> | 2022-08-14 17:30:58 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2022-09-05 16:03:23 +0100 |
commit | 88e7c32dea37a8db19256745a0b334ec2b1b80a6 (patch) | |
tree | 87ff3286dbd41bcb5c71092a8b01a449306f1a7b /gusb/gusb-interface-private.h | |
parent | 28c2e67e8f91e357c264f97c4cc4201e45fcb880 (diff) | |
download | gusb-88e7c32dea37a8db19256745a0b334ec2b1b80a6.tar.gz |
Serialize the GUsbDevice to and from JSON format
This allows us to write tests that mock up entire devices.
Diffstat (limited to 'gusb/gusb-interface-private.h')
-rw-r--r-- | gusb/gusb-interface-private.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gusb/gusb-interface-private.h b/gusb/gusb-interface-private.h index 7efd171..dcdfde1 100644 --- a/gusb/gusb-interface-private.h +++ b/gusb/gusb-interface-private.h @@ -8,6 +8,7 @@ #pragma once #include <gusb/gusb-interface.h> +#include <json-glib/json-glib.h> #include <libusb.h> G_BEGIN_DECLS @@ -15,4 +16,9 @@ G_BEGIN_DECLS GUsbInterface * _g_usb_interface_new(const struct libusb_interface_descriptor *iface); +gboolean +_g_usb_interface_load(GUsbInterface *self, JsonObject *json_object, GError **error); +gboolean +_g_usb_interface_save(GUsbInterface *self, JsonBuilder *json_builder, GError **error); + G_END_DECLS |