summaryrefslogtreecommitdiff
path: root/src/qmi-firmware-update
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2020-01-15 11:34:25 +0100
committerAleksander Morgado <aleksander@aleksander.es>2020-01-15 11:34:44 +0100
commit82330aedfb2490197efaed22394720c6ab8caed0 (patch)
treee35c7424ba0c3f95aebbeb95012ffe3a4809d937 /src/qmi-firmware-update
parentcf95fcc7a45bb210338b22591b257351aac2be98 (diff)
downloadlibqmi-82330aedfb2490197efaed22394720c6ab8caed0.tar.gz
qmi-firmware-update: define autoptr cleanup functions for all types
Diffstat (limited to 'src/qmi-firmware-update')
-rw-r--r--src/qmi-firmware-update/qfu-at-device.h4
-rw-r--r--src/qmi-firmware-update/qfu-device-selection.h4
-rw-r--r--src/qmi-firmware-update/qfu-image-cwe.h4
-rw-r--r--src/qmi-firmware-update/qfu-image.h4
-rw-r--r--src/qmi-firmware-update/qfu-qdl-device.h4
-rw-r--r--src/qmi-firmware-update/qfu-reseter.h4
-rw-r--r--src/qmi-firmware-update/qfu-sahara-device.h4
-rw-r--r--src/qmi-firmware-update/qfu-updater.h3
8 files changed, 23 insertions, 8 deletions
diff --git a/src/qmi-firmware-update/qfu-at-device.h b/src/qmi-firmware-update/qfu-at-device.h
index 6c69bc11..d6d6f146 100644
--- a/src/qmi-firmware-update/qfu-at-device.h
+++ b/src/qmi-firmware-update/qfu-at-device.h
@@ -47,7 +47,9 @@ struct _QfuAtDeviceClass {
GObjectClass parent;
};
-GType qfu_at_device_get_type (void);
+GType qfu_at_device_get_type (void);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (QfuAtDevice, g_object_unref);
+
QfuAtDevice *qfu_at_device_new (GFile *file,
GCancellable *cancellable,
GError **error);
diff --git a/src/qmi-firmware-update/qfu-device-selection.h b/src/qmi-firmware-update/qfu-device-selection.h
index 5e9c0f9e..66b698e3 100644
--- a/src/qmi-firmware-update/qfu-device-selection.h
+++ b/src/qmi-firmware-update/qfu-device-selection.h
@@ -47,7 +47,9 @@ struct _QfuDeviceSelectionClass {
GObjectClass parent;
};
-GType qfu_device_selection_get_type (void);
+GType qfu_device_selection_get_type (void);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (QfuDeviceSelection, g_object_unref);
+
QfuDeviceSelection *qfu_device_selection_new (const gchar *preferred_cdc_wdm,
const gchar *preferred_tty,
guint16 preferred_vid,
diff --git a/src/qmi-firmware-update/qfu-image-cwe.h b/src/qmi-firmware-update/qfu-image-cwe.h
index 213e2aa8..10e8761d 100644
--- a/src/qmi-firmware-update/qfu-image-cwe.h
+++ b/src/qmi-firmware-update/qfu-image-cwe.h
@@ -50,7 +50,9 @@ struct _QfuImageCweClass {
QfuImageClass parent;
};
-GType qfu_image_cwe_get_type (void);
+GType qfu_image_cwe_get_type (void);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (QfuImageCwe, g_object_unref);
+
QfuImage *qfu_image_cwe_new (GFile *file,
GCancellable *cancellable,
GError **error);
diff --git a/src/qmi-firmware-update/qfu-image.h b/src/qmi-firmware-update/qfu-image.h
index 74b82195..77fdd660 100644
--- a/src/qmi-firmware-update/qfu-image.h
+++ b/src/qmi-firmware-update/qfu-image.h
@@ -80,7 +80,9 @@ struct _QfuImageClass {
goffset (* get_data_size) (QfuImage *self);
};
-GType qfu_image_get_type (void);
+GType qfu_image_get_type (void);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (QfuImage, g_object_unref);
+
QfuImage *qfu_image_new (GFile *file,
QfuImageType image_type,
GCancellable *cancellable,
diff --git a/src/qmi-firmware-update/qfu-qdl-device.h b/src/qmi-firmware-update/qfu-qdl-device.h
index 2e541509..67a8245a 100644
--- a/src/qmi-firmware-update/qfu-qdl-device.h
+++ b/src/qmi-firmware-update/qfu-qdl-device.h
@@ -48,7 +48,9 @@ struct _QfuQdlDeviceClass {
GObjectClass parent;
};
-GType qfu_qdl_device_get_type (void);
+GType qfu_qdl_device_get_type (void);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (QfuQdlDevice, g_object_unref);
+
QfuQdlDevice *qfu_qdl_device_new (GFile *file,
GCancellable *cancellable,
GError **error);
diff --git a/src/qmi-firmware-update/qfu-reseter.h b/src/qmi-firmware-update/qfu-reseter.h
index 0b0350ff..d820389f 100644
--- a/src/qmi-firmware-update/qfu-reseter.h
+++ b/src/qmi-firmware-update/qfu-reseter.h
@@ -50,7 +50,9 @@ struct _QfuReseterClass {
GObjectClass parent;
};
-GType qfu_reseter_get_type (void);
+GType qfu_reseter_get_type (void);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (QfuReseter, g_object_unref);
+
QfuReseter *qfu_reseter_new (QfuDeviceSelection *device_selection,
QmiClientDms *qmi_client,
QmiDeviceOpenFlags device_open_flags);
diff --git a/src/qmi-firmware-update/qfu-sahara-device.h b/src/qmi-firmware-update/qfu-sahara-device.h
index 5d74a69d..792a075a 100644
--- a/src/qmi-firmware-update/qfu-sahara-device.h
+++ b/src/qmi-firmware-update/qfu-sahara-device.h
@@ -47,7 +47,9 @@ struct _QfuSaharaDeviceClass {
GObjectClass parent;
};
-GType qfu_sahara_device_get_type (void);
+GType qfu_sahara_device_get_type (void);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (QfuSaharaDevice, g_object_unref);
+
QfuSaharaDevice *qfu_sahara_device_new (GFile *file,
GCancellable *cancellable,
GError **error);
diff --git a/src/qmi-firmware-update/qfu-updater.h b/src/qmi-firmware-update/qfu-updater.h
index d738d426..992193a0 100644
--- a/src/qmi-firmware-update/qfu-updater.h
+++ b/src/qmi-firmware-update/qfu-updater.h
@@ -49,7 +49,8 @@ struct _QfuUpdaterClass {
GObjectClass parent;
};
-GType qfu_updater_get_type (void);
+GType qfu_updater_get_type (void);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (QfuUpdater, g_object_unref);
#if defined WITH_UDEV
QfuUpdater *qfu_updater_new (QfuDeviceSelection *device_selection,