From 219700ba6d9df49427320eb2cbfd8eae850b8921 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Fri, 25 Jun 2021 18:37:28 +0200 Subject: [PATCH] libmm-glib,simple-status: move deprecated methods to compat source --- .../libmm-glib/libmm-glib-sections.txt | 3 ++- libmm-glib/mm-compat.c | 8 ++++++ libmm-glib/mm-compat.h | 18 +++++++++++++ libmm-glib/mm-simple-status.c | 25 ------------------- libmm-glib/mm-simple-status.h | 4 --- 5 files changed, 28 insertions(+), 30 deletions(-) diff --git a/docs/reference/libmm-glib/libmm-glib-sections.txt b/docs/reference/libmm-glib/libmm-glib-sections.txt index 1bbbd55e..2afc2232 100644 --- a/docs/reference/libmm-glib/libmm-glib-sections.txt +++ b/docs/reference/libmm-glib/libmm-glib-sections.txt @@ -911,7 +911,6 @@ mm_simple_status_get_current_bands mm_simple_status_get_3gpp_registration_state mm_simple_status_get_3gpp_operator_code mm_simple_status_get_3gpp_operator_name -mm_simple_status_get_3gpp_subscription_state mm_simple_status_get_cdma_cdma1x_registration_state mm_simple_status_get_cdma_evdo_registration_state mm_simple_status_get_cdma_nid @@ -1834,6 +1833,8 @@ mm_call_properties_set_state_reason mm_location_gps_nmea_build_full mm_pco_list_free + +mm_simple_status_get_3gpp_subscription_state mm_modem_3gpp_get_subscription_state diff --git a/libmm-glib/mm-compat.c b/libmm-glib/mm-compat.c index d7b5d40a..b878a6f8 100644 --- a/libmm-glib/mm-compat.c +++ b/libmm-glib/mm-compat.c @@ -125,6 +125,14 @@ mm_pco_list_free (GList *pco_list) /*****************************************************************************/ +MMModem3gppSubscriptionState +mm_simple_status_get_3gpp_subscription_state (MMSimpleStatus *self) +{ + return MM_MODEM_3GPP_SUBSCRIPTION_STATE_UNKNOWN; +} + +/*****************************************************************************/ + MMModem3gppSubscriptionState mm_modem_3gpp_get_subscription_state (MMModem3gpp *self) { diff --git a/libmm-glib/mm-compat.h b/libmm-glib/mm-compat.h index 143a0d43..99f31555 100644 --- a/libmm-glib/mm-compat.h +++ b/libmm-glib/mm-compat.h @@ -34,6 +34,7 @@ #include "mm-call-properties.h" #include "mm-location-gps-nmea.h" #include "mm-pco.h" +#include "mm-simple-status.h" #include "mm-modem-3gpp.h" #include "mm-modem-oma.h" @@ -247,6 +248,23 @@ void mm_pco_list_free (GList *pco_list); /*****************************************************************************/ +/** + * mm_simple_status_get_3gpp_subscription_state: + * @self: a #MMSimpleStatus. + * + * Gets the current subscription status of the account. + * + * Returns: a #MMModem3gppSubscriptionState. + * + * Since: 1.0 + * Deprecated: 1.12.0. The value of this property can only be obtained with + * operator specific logic (e.g. processing specific PCO info), and therefore + * it doesn't make sense to expose it in the ModemManager interface. + */ +MMModem3gppSubscriptionState mm_simple_status_get_3gpp_subscription_state (MMSimpleStatus *self); + +/*****************************************************************************/ + /** * mm_modem_3gpp_get_subscription_state: * @self: A #MMModem. diff --git a/libmm-glib/mm-simple-status.c b/libmm-glib/mm-simple-status.c index a296fd68..ff52ffe9 100644 --- a/libmm-glib/mm-simple-status.c +++ b/libmm-glib/mm-simple-status.c @@ -253,31 +253,6 @@ mm_simple_status_get_3gpp_operator_name (MMSimpleStatus *self) /*****************************************************************************/ -#ifndef MM_DISABLE_DEPRECATED - -/** - * mm_simple_status_get_3gpp_subscription_state: - * @self: a #MMSimpleStatus. - * - * Gets the current subscription status of the account. - * - * Returns: a #MMModem3gppSubscriptionState. - * - * Since: 1.0 - * Deprecated: 1.12.0. The value of this property can only be obtained with - * operator specific logic (e.g. processing specific PCO info), and therefore - * it doesn't make sense to expose it in the ModemManager interface. - */ -MMModem3gppSubscriptionState -mm_simple_status_get_3gpp_subscription_state (MMSimpleStatus *self) -{ - return MM_MODEM_3GPP_SUBSCRIPTION_STATE_UNKNOWN; -} - -#endif /* MM_DISABLE_DEPRECATED */ - -/*****************************************************************************/ - /** * mm_simple_status_get_cdma_cdma1x_registration_state: * @self: a #MMSimpleStatus. diff --git a/libmm-glib/mm-simple-status.h b/libmm-glib/mm-simple-status.h index 38587413..86c7ce4f 100644 --- a/libmm-glib/mm-simple-status.h +++ b/libmm-glib/mm-simple-status.h @@ -68,10 +68,6 @@ MMModem3gppRegistrationState mm_simple_status_get_3gpp_registration_state (MMSi const gchar *mm_simple_status_get_3gpp_operator_code (MMSimpleStatus *self); const gchar *mm_simple_status_get_3gpp_operator_name (MMSimpleStatus *self); -#ifndef MM_DISABLE_DEPRECATED -MMModem3gppSubscriptionState mm_simple_status_get_3gpp_subscription_state (MMSimpleStatus *self); -#endif - MMModemCdmaRegistrationState mm_simple_status_get_cdma_cdma1x_registration_state (MMSimpleStatus *self); MMModemCdmaRegistrationState mm_simple_status_get_cdma_evdo_registration_state (MMSimpleStatus *self); guint mm_simple_status_get_cdma_sid (MMSimpleStatus *self);