libmm-glib: add autoptr cleanup functions for all types

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/100
This commit is contained in:
Aleksander Morgado
2018-12-17 15:18:07 +01:00
committed by Dan Williams
parent 2b18af89b4
commit 5dc79ce606
37 changed files with 146 additions and 0 deletions

View File

@@ -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);

View File

@@ -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,

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);

View File

@@ -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,

View File

@@ -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);

View File

@@ -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,

View File

@@ -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);

View File

@@ -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,

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);

View File

@@ -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,

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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);

View File

@@ -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);