aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2018-12-17 15:18:07 +0100
committerDan Williams <dcbw@redhat.com>2019-01-03 16:40:47 +0000
commit5dc79ce6069a388db8c94a9fbe35cfee07445bb0 (patch)
tree4bbd28e401ba6f6f1f80a5ab8182f609433e038c
parent2b18af89b4b46bdf1dc8701ba96c48a76d706336 (diff)
libmm-glib: add autoptr cleanup functions for all types
https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/100
-rw-r--r--libmm-glib/mm-bearer-ip-config.h4
-rw-r--r--libmm-glib/mm-bearer-properties.h4
-rw-r--r--libmm-glib/mm-bearer-stats.h4
-rw-r--r--libmm-glib/mm-bearer.h4
-rw-r--r--libmm-glib/mm-call-audio-format.h4
-rw-r--r--libmm-glib/mm-call-properties.h4
-rw-r--r--libmm-glib/mm-call.h4
-rw-r--r--libmm-glib/mm-cdma-manual-activation-properties.h4
-rw-r--r--libmm-glib/mm-firmware-properties.h4
-rw-r--r--libmm-glib/mm-kernel-event-properties.h4
-rw-r--r--libmm-glib/mm-location-3gpp.h4
-rw-r--r--libmm-glib/mm-location-cdma-bs.h4
-rw-r--r--libmm-glib/mm-location-gps-nmea.h4
-rw-r--r--libmm-glib/mm-location-gps-raw.h4
-rw-r--r--libmm-glib/mm-manager.h4
-rw-r--r--libmm-glib/mm-modem-3gpp-ussd.h4
-rw-r--r--libmm-glib/mm-modem-3gpp.h4
-rw-r--r--libmm-glib/mm-modem-cdma.h4
-rw-r--r--libmm-glib/mm-modem-firmware.h4
-rw-r--r--libmm-glib/mm-modem-location.h4
-rw-r--r--libmm-glib/mm-modem-messaging.h4
-rw-r--r--libmm-glib/mm-modem-oma.h4
-rw-r--r--libmm-glib/mm-modem-signal.h4
-rw-r--r--libmm-glib/mm-modem-simple.h4
-rw-r--r--libmm-glib/mm-modem-time.h4
-rw-r--r--libmm-glib/mm-modem-voice.h4
-rw-r--r--libmm-glib/mm-modem.h4
-rw-r--r--libmm-glib/mm-network-timezone.h4
-rw-r--r--libmm-glib/mm-object.h4
-rw-r--r--libmm-glib/mm-pco.h3
-rw-r--r--libmm-glib/mm-signal.h4
-rw-r--r--libmm-glib/mm-sim.h4
-rw-r--r--libmm-glib/mm-simple-connect-properties.h4
-rw-r--r--libmm-glib/mm-simple-status.h3
-rw-r--r--libmm-glib/mm-sms-properties.h4
-rw-r--r--libmm-glib/mm-sms.h4
-rw-r--r--libmm-glib/mm-unlock-retries.h4
37 files changed, 146 insertions, 0 deletions
diff --git a/libmm-glib/mm-bearer-ip-config.h b/libmm-glib/mm-bearer-ip-config.h
index 898a405d..551ff705 100644
--- a/libmm-glib/mm-bearer-ip-config.h
+++ b/libmm-glib/mm-bearer-ip-config.h
@@ -55,6 +55,10 @@ struct _MMBearerIpConfigClass {
GType mm_bearer_ip_config_get_type (void);
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMBearerIpConfig, g_object_unref)
+#endif
+
MMBearerIpMethod mm_bearer_ip_config_get_method (MMBearerIpConfig *self);
const gchar *mm_bearer_ip_config_get_address (MMBearerIpConfig *self);
guint mm_bearer_ip_config_get_prefix (MMBearerIpConfig *self);
diff --git a/libmm-glib/mm-bearer-properties.h b/libmm-glib/mm-bearer-properties.h
index 361c8678..e1ddb995 100644
--- a/libmm-glib/mm-bearer-properties.h
+++ b/libmm-glib/mm-bearer-properties.h
@@ -55,6 +55,10 @@ struct _MMBearerPropertiesClass {
GType mm_bearer_properties_get_type (void);
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMBearerProperties, g_object_unref)
+#endif
+
MMBearerProperties *mm_bearer_properties_new (void);
void mm_bearer_properties_set_apn (MMBearerProperties *self,
diff --git a/libmm-glib/mm-bearer-stats.h b/libmm-glib/mm-bearer-stats.h
index 54b53280..0883b55b 100644
--- a/libmm-glib/mm-bearer-stats.h
+++ b/libmm-glib/mm-bearer-stats.h
@@ -57,6 +57,10 @@ struct _MMBearerStatsClass {
GType mm_bearer_stats_get_type (void);
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMBearerStats, g_object_unref)
+#endif
+
guint mm_bearer_stats_get_duration (MMBearerStats *self);
guint64 mm_bearer_stats_get_rx_bytes (MMBearerStats *self);
guint64 mm_bearer_stats_get_tx_bytes (MMBearerStats *self);
diff --git a/libmm-glib/mm-bearer.h b/libmm-glib/mm-bearer.h
index 900429c5..99bf363d 100644
--- a/libmm-glib/mm-bearer.h
+++ b/libmm-glib/mm-bearer.h
@@ -67,6 +67,10 @@ struct _MMBearerClass {
GType mm_bearer_get_type (void);
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMBearer, g_object_unref)
+#endif
+
const gchar *mm_bearer_get_path (MMBearer *self);
gchar *mm_bearer_dup_path (MMBearer *self);
diff --git a/libmm-glib/mm-call-audio-format.h b/libmm-glib/mm-call-audio-format.h
index f6da710a..bd931bc8 100644
--- a/libmm-glib/mm-call-audio-format.h
+++ b/libmm-glib/mm-call-audio-format.h
@@ -55,6 +55,10 @@ struct _MMCallAudioFormatClass {
GType mm_call_audio_format_get_type (void);
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMCallAudioFormat, g_object_unref)
+#endif
+
const gchar *mm_call_audio_format_get_encoding (MMCallAudioFormat *self);
const gchar *mm_call_audio_format_get_resolution (MMCallAudioFormat *self);
guint mm_call_audio_format_get_rate (MMCallAudioFormat *self);
diff --git a/libmm-glib/mm-call-properties.h b/libmm-glib/mm-call-properties.h
index be940dc7..62351937 100644
--- a/libmm-glib/mm-call-properties.h
+++ b/libmm-glib/mm-call-properties.h
@@ -55,6 +55,10 @@ struct _MMCallPropertiesClass {
GType mm_call_properties_get_type (void);
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMCallProperties, g_object_unref)
+#endif
+
MMCallProperties *mm_call_properties_new (void);
void mm_call_properties_set_number (MMCallProperties *self,
diff --git a/libmm-glib/mm-call.h b/libmm-glib/mm-call.h
index baf51cc4..e6d89574 100644
--- a/libmm-glib/mm-call.h
+++ b/libmm-glib/mm-call.h
@@ -60,6 +60,10 @@ struct _MMCallClass {
GType mm_call_get_type (void);
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMCall, g_object_unref)
+#endif
+
const gchar *mm_call_get_path (MMCall *self);
gchar *mm_call_dup_path (MMCall *self);
diff --git a/libmm-glib/mm-cdma-manual-activation-properties.h b/libmm-glib/mm-cdma-manual-activation-properties.h
index 062f7018..3e8c9a4f 100644
--- a/libmm-glib/mm-cdma-manual-activation-properties.h
+++ b/libmm-glib/mm-cdma-manual-activation-properties.h
@@ -55,6 +55,10 @@ struct _MMCdmaManualActivationPropertiesClass {
GType mm_cdma_manual_activation_properties_get_type (void);
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMCdmaManualActivationProperties, g_object_unref)
+#endif
+
MMCdmaManualActivationProperties *mm_cdma_manual_activation_properties_new (void);
gboolean mm_cdma_manual_activation_properties_set_spc (MMCdmaManualActivationProperties *self,
diff --git a/libmm-glib/mm-firmware-properties.h b/libmm-glib/mm-firmware-properties.h
index 33fffc3e..49195601 100644
--- a/libmm-glib/mm-firmware-properties.h
+++ b/libmm-glib/mm-firmware-properties.h
@@ -55,6 +55,10 @@ struct _MMFirmwarePropertiesClass {
GType mm_firmware_properties_get_type (void);
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMFirmwareProperties, g_object_unref)
+#endif
+
const gchar *mm_firmware_properties_get_unique_id (MMFirmwareProperties *self);
MMFirmwareImageType mm_firmware_properties_get_image_type (MMFirmwareProperties *self);
diff --git a/libmm-glib/mm-kernel-event-properties.h b/libmm-glib/mm-kernel-event-properties.h
index 576e356b..5f33ae80 100644
--- a/libmm-glib/mm-kernel-event-properties.h
+++ b/libmm-glib/mm-kernel-event-properties.h
@@ -55,6 +55,10 @@ struct _MMKernelEventPropertiesClass {
GType mm_kernel_event_properties_get_type (void);
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMKernelEventProperties, g_object_unref)
+#endif
+
MMKernelEventProperties *mm_kernel_event_properties_new (void);
void mm_kernel_event_properties_set_action (MMKernelEventProperties *self,
diff --git a/libmm-glib/mm-location-3gpp.h b/libmm-glib/mm-location-3gpp.h
index abcb4b84..a630974b 100644
--- a/libmm-glib/mm-location-3gpp.h
+++ b/libmm-glib/mm-location-3gpp.h
@@ -55,6 +55,10 @@ struct _MMLocation3gppClass {
GType mm_location_3gpp_get_type (void);
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMLocation3gpp, g_object_unref)
+#endif
+
guint mm_location_3gpp_get_mobile_country_code (MMLocation3gpp *self);
guint mm_location_3gpp_get_mobile_network_code (MMLocation3gpp *self);
gulong mm_location_3gpp_get_location_area_code (MMLocation3gpp *self);
diff --git a/libmm-glib/mm-location-cdma-bs.h b/libmm-glib/mm-location-cdma-bs.h
index ca34e2fc..02d5b3f8 100644
--- a/libmm-glib/mm-location-cdma-bs.h
+++ b/libmm-glib/mm-location-cdma-bs.h
@@ -57,6 +57,10 @@ struct _MMLocationCdmaBsClass {
GType mm_location_cdma_bs_get_type (void);
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMLocationCdmaBs, g_object_unref)
+#endif
+
gdouble mm_location_cdma_bs_get_longitude (MMLocationCdmaBs *self);
gdouble mm_location_cdma_bs_get_latitude (MMLocationCdmaBs *self);
diff --git a/libmm-glib/mm-location-gps-nmea.h b/libmm-glib/mm-location-gps-nmea.h
index 3317074b..6c31d984 100644
--- a/libmm-glib/mm-location-gps-nmea.h
+++ b/libmm-glib/mm-location-gps-nmea.h
@@ -55,6 +55,10 @@ struct _MMLocationGpsNmeaClass {
GType mm_location_gps_nmea_get_type (void);
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMLocationGpsNmea, g_object_unref)
+#endif
+
const gchar *mm_location_gps_nmea_get_trace (MMLocationGpsNmea *self,
const gchar *trace_type);
gchar *mm_location_gps_nmea_build_full (MMLocationGpsNmea *self);
diff --git a/libmm-glib/mm-location-gps-raw.h b/libmm-glib/mm-location-gps-raw.h
index 8ef3747d..97783774 100644
--- a/libmm-glib/mm-location-gps-raw.h
+++ b/libmm-glib/mm-location-gps-raw.h
@@ -57,6 +57,10 @@ struct _MMLocationGpsRawClass {
GType mm_location_gps_raw_get_type (void);
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMLocationGpsRaw, g_object_unref)
+#endif
+
const gchar *mm_location_gps_raw_get_utc_time (MMLocationGpsRaw *self);
gdouble mm_location_gps_raw_get_longitude (MMLocationGpsRaw *self);
gdouble mm_location_gps_raw_get_latitude (MMLocationGpsRaw *self);
diff --git a/libmm-glib/mm-manager.h b/libmm-glib/mm-manager.h
index fc79a984..f133c9f7 100644
--- a/libmm-glib/mm-manager.h
+++ b/libmm-glib/mm-manager.h
@@ -67,6 +67,10 @@ struct _MMManagerClass {
GType mm_manager_get_type (void);
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMManager, g_object_unref)
+#endif
+
void mm_manager_new (
GDBusConnection *connection,
GDBusObjectManagerClientFlags flags,
diff --git a/libmm-glib/mm-modem-3gpp-ussd.h b/libmm-glib/mm-modem-3gpp-ussd.h
index ee7522a8..0fda4e53 100644
--- a/libmm-glib/mm-modem-3gpp-ussd.h
+++ b/libmm-glib/mm-modem-3gpp-ussd.h
@@ -63,6 +63,10 @@ struct _MMModem3gppUssdClass {
GType mm_modem_3gpp_ussd_get_type (void);
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMModem3gppUssd, g_object_unref)
+#endif
+
const gchar *mm_modem_3gpp_ussd_get_path (MMModem3gppUssd *self);
gchar *mm_modem_3gpp_ussd_dup_path (MMModem3gppUssd *self);
diff --git a/libmm-glib/mm-modem-3gpp.h b/libmm-glib/mm-modem-3gpp.h
index 534bc77f..c3fc0c0b 100644
--- a/libmm-glib/mm-modem-3gpp.h
+++ b/libmm-glib/mm-modem-3gpp.h
@@ -65,6 +65,10 @@ struct _MMModem3gppClass {
GType mm_modem_3gpp_get_type (void);
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMModem3gpp, g_object_unref)
+#endif
+
const gchar *mm_modem_3gpp_get_path (MMModem3gpp *self);
gchar *mm_modem_3gpp_dup_path (MMModem3gpp *self);
diff --git a/libmm-glib/mm-modem-cdma.h b/libmm-glib/mm-modem-cdma.h
index 31e7824a..3a78a156 100644
--- a/libmm-glib/mm-modem-cdma.h
+++ b/libmm-glib/mm-modem-cdma.h
@@ -64,6 +64,10 @@ struct _MMModemCdmaClass {
GType mm_modem_cdma_get_type (void);
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMModemCdma, g_object_unref)
+#endif
+
const gchar *mm_modem_cdma_get_path (MMModemCdma *self);
gchar *mm_modem_cdma_dup_path (MMModemCdma *self);
diff --git a/libmm-glib/mm-modem-firmware.h b/libmm-glib/mm-modem-firmware.h
index b600ad8b..4d74bca8 100644
--- a/libmm-glib/mm-modem-firmware.h
+++ b/libmm-glib/mm-modem-firmware.h
@@ -63,6 +63,10 @@ struct _MMModemFirmwareClass {
GType mm_modem_firmware_get_type (void);
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMModemFirmware, g_object_unref)
+#endif
+
const gchar *mm_modem_firmware_get_path (MMModemFirmware *self);
gchar *mm_modem_firmware_dup_path (MMModemFirmware *self);
diff --git a/libmm-glib/mm-modem-location.h b/libmm-glib/mm-modem-location.h
index e9ab9ea0..5a1d675c 100644
--- a/libmm-glib/mm-modem-location.h
+++ b/libmm-glib/mm-modem-location.h
@@ -67,6 +67,10 @@ struct _MMModemLocationClass {
GType mm_modem_location_get_type (void);
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMModemLocation, g_object_unref)
+#endif
+
const gchar *mm_modem_location_get_path (MMModemLocation *self);
gchar *mm_modem_location_dup_path (MMModemLocation *self);
diff --git a/libmm-glib/mm-modem-messaging.h b/libmm-glib/mm-modem-messaging.h
index 0162a857..2f87c4f1 100644
--- a/libmm-glib/mm-modem-messaging.h
+++ b/libmm-glib/mm-modem-messaging.h
@@ -66,6 +66,10 @@ struct _MMModemMessagingClass {
GType mm_modem_messaging_get_type (void);
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMModemMessaging, g_object_unref)
+#endif
+
const gchar *mm_modem_messaging_get_path (MMModemMessaging *self);
gchar *mm_modem_messaging_dup_path (MMModemMessaging *self);
diff --git a/libmm-glib/mm-modem-oma.h b/libmm-glib/mm-modem-oma.h
index e6dc619e..f0289f08 100644
--- a/libmm-glib/mm-modem-oma.h
+++ b/libmm-glib/mm-modem-oma.h
@@ -64,6 +64,10 @@ struct _MMModemOmaClass {
GType mm_modem_oma_get_type (void);
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMModemOma, g_object_unref)
+#endif
+
const gchar *mm_modem_oma_get_path (MMModemOma *self);
gchar *mm_modem_oma_dup_path (MMModemOma *self);
diff --git a/libmm-glib/mm-modem-signal.h b/libmm-glib/mm-modem-signal.h
index ef2c8e1c..dd5fe2b6 100644
--- a/libmm-glib/mm-modem-signal.h
+++ b/libmm-glib/mm-modem-signal.h
@@ -64,6 +64,10 @@ struct _MMModemSignalClass {
GType mm_modem_signal_get_type (void);
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMModemSignal, g_object_unref)
+#endif
+
const gchar *mm_modem_signal_get_path (MMModemSignal *self);
gchar *mm_modem_signal_dup_path (MMModemSignal *self);
guint mm_modem_signal_get_rate (MMModemSignal *self);
diff --git a/libmm-glib/mm-modem-simple.h b/libmm-glib/mm-modem-simple.h
index 0503a87f..f5512407 100644
--- a/libmm-glib/mm-modem-simple.h
+++ b/libmm-glib/mm-modem-simple.h
@@ -66,6 +66,10 @@ struct _MMModemSimpleClass {
GType mm_modem_simple_get_type (void);
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMModemSimple, g_object_unref)
+#endif
+
const gchar *mm_modem_simple_get_path (MMModemSimple *self);
gchar *mm_modem_simple_dup_path (MMModemSimple *self);
diff --git a/libmm-glib/mm-modem-time.h b/libmm-glib/mm-modem-time.h
index c0211792..025d1a57 100644
--- a/libmm-glib/mm-modem-time.h
+++ b/libmm-glib/mm-modem-time.h
@@ -65,6 +65,10 @@ struct _MMModemTimeClass {
GType mm_modem_time_get_type (void);
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMModemTime, g_object_unref)
+#endif
+
const gchar *mm_modem_time_get_path (MMModemTime *self);
gchar *mm_modem_time_dup_path (MMModemTime *self);
diff --git a/libmm-glib/mm-modem-voice.h b/libmm-glib/mm-modem-voice.h
index 86548737..2f33447f 100644
--- a/libmm-glib/mm-modem-voice.h
+++ b/libmm-glib/mm-modem-voice.h
@@ -66,6 +66,10 @@ struct _MMModemVoiceClass {
GType mm_modem_voice_get_type (void);
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMModemVoice, g_object_unref)
+#endif
+
const gchar *mm_modem_voice_get_path (MMModemVoice *self);
gchar *mm_modem_voice_dup_path (MMModemVoice *self);
diff --git a/libmm-glib/mm-modem.h b/libmm-glib/mm-modem.h
index ee8af295..1b51b6c3 100644
--- a/libmm-glib/mm-modem.h
+++ b/libmm-glib/mm-modem.h
@@ -68,6 +68,10 @@ struct _MMModemClass {
GType mm_modem_get_type (void);
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMModem, g_object_unref)
+#endif
+
const gchar *mm_modem_get_path (MMModem *self);
gchar *mm_modem_dup_path (MMModem *self);
diff --git a/libmm-glib/mm-network-timezone.h b/libmm-glib/mm-network-timezone.h
index 2bbb3058..ca485a2b 100644
--- a/libmm-glib/mm-network-timezone.h
+++ b/libmm-glib/mm-network-timezone.h
@@ -69,6 +69,10 @@ struct _MMNetworkTimezoneClass {
GType mm_network_timezone_get_type (void);
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMNetworkTimezone, g_object_unref)
+#endif
+
gint32 mm_network_timezone_get_offset (MMNetworkTimezone *self);
gint32 mm_network_timezone_get_dst_offset (MMNetworkTimezone *self);
gint32 mm_network_timezone_get_leap_seconds (MMNetworkTimezone *self);
diff --git a/libmm-glib/mm-object.h b/libmm-glib/mm-object.h
index 676eeaa9..e342fadf 100644
--- a/libmm-glib/mm-object.h
+++ b/libmm-glib/mm-object.h
@@ -75,6 +75,10 @@ struct _MMObjectClass {
GType mm_object_get_type (void);
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMObject, g_object_unref)
+#endif
+
const gchar *mm_object_get_path (MMObject *self);
gchar *mm_object_dup_path (MMObject *self);
diff --git a/libmm-glib/mm-pco.h b/libmm-glib/mm-pco.h
index ee5c5b36..08f4694d 100644
--- a/libmm-glib/mm-pco.h
+++ b/libmm-glib/mm-pco.h
@@ -55,6 +55,9 @@ struct _MMPcoClass {
GType mm_pco_get_type (void);
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMPco, g_object_unref)
+#endif
guint32 mm_pco_get_session_id (MMPco *self);
gboolean mm_pco_is_complete (MMPco *self);
diff --git a/libmm-glib/mm-signal.h b/libmm-glib/mm-signal.h
index c94d9b2b..b672bca0 100644
--- a/libmm-glib/mm-signal.h
+++ b/libmm-glib/mm-signal.h
@@ -62,6 +62,10 @@ struct _MMSignalClass {
GType mm_signal_get_type (void);
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMSignal, g_object_unref)
+#endif
+
gdouble mm_signal_get_rssi (MMSignal *self);
gdouble mm_signal_get_rscp (MMSignal *self);
gdouble mm_signal_get_ecio (MMSignal *self);
diff --git a/libmm-glib/mm-sim.h b/libmm-glib/mm-sim.h
index 1998bf6e..0f162efd 100644
--- a/libmm-glib/mm-sim.h
+++ b/libmm-glib/mm-sim.h
@@ -63,6 +63,10 @@ struct _MMSimClass {
GType mm_sim_get_type (void);
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMSim, g_object_unref)
+#endif
+
const gchar *mm_sim_get_path (MMSim *self);
gchar *mm_sim_dup_path (MMSim *self);
diff --git a/libmm-glib/mm-simple-connect-properties.h b/libmm-glib/mm-simple-connect-properties.h
index 3167db0a..97153631 100644
--- a/libmm-glib/mm-simple-connect-properties.h
+++ b/libmm-glib/mm-simple-connect-properties.h
@@ -57,6 +57,10 @@ struct _MMSimpleConnectPropertiesClass {
GType mm_simple_connect_properties_get_type (void);
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMSimpleConnectProperties, g_object_unref)
+#endif
+
MMSimpleConnectProperties *mm_simple_connect_properties_new (void);
void mm_simple_connect_properties_set_pin (MMSimpleConnectProperties *self,
diff --git a/libmm-glib/mm-simple-status.h b/libmm-glib/mm-simple-status.h
index cbf93bcf..930e1f1b 100644
--- a/libmm-glib/mm-simple-status.h
+++ b/libmm-glib/mm-simple-status.h
@@ -55,6 +55,9 @@ struct _MMSimpleStatusClass {
GType mm_simple_status_get_type (void);
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMSimpleStatus, g_object_unref)
+#endif
MMModemState mm_simple_status_get_state (MMSimpleStatus *self);
guint32 mm_simple_status_get_signal_quality (MMSimpleStatus *self,
diff --git a/libmm-glib/mm-sms-properties.h b/libmm-glib/mm-sms-properties.h
index 4989d59e..f5864ee1 100644
--- a/libmm-glib/mm-sms-properties.h
+++ b/libmm-glib/mm-sms-properties.h
@@ -55,6 +55,10 @@ struct _MMSmsPropertiesClass {
GType mm_sms_properties_get_type (void);
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMSmsProperties, g_object_unref)
+#endif
+
MMSmsProperties *mm_sms_properties_new (void);
void mm_sms_properties_set_text (MMSmsProperties *self,
diff --git a/libmm-glib/mm-sms.h b/libmm-glib/mm-sms.h
index 4e4e935b..d0a09c25 100644
--- a/libmm-glib/mm-sms.h
+++ b/libmm-glib/mm-sms.h
@@ -63,6 +63,10 @@ struct _MMSmsClass {
GType mm_sms_get_type (void);
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMSms, g_object_unref)
+#endif
+
const gchar *mm_sms_get_path (MMSms *self);
gchar *mm_sms_dup_path (MMSms *self);
diff --git a/libmm-glib/mm-unlock-retries.h b/libmm-glib/mm-unlock-retries.h
index babdcbb3..e993821e 100644
--- a/libmm-glib/mm-unlock-retries.h
+++ b/libmm-glib/mm-unlock-retries.h
@@ -62,6 +62,10 @@ struct _MMUnlockRetriesClass {
GType mm_unlock_retries_get_type (void);
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMUnlockRetries, g_object_unref)
+#endif
+
guint mm_unlock_retries_get (MMUnlockRetries *self,
MMModemLock lock);