libmm-glib,location-3gpp: move deprecated methods to compat source

This commit is contained in:
Aleksander Morgado
2021-06-25 19:01:06 +02:00
parent 219700ba6d
commit 4bf7657086
4 changed files with 37 additions and 38 deletions
+15
View File
@@ -117,6 +117,21 @@ mm_location_gps_nmea_build_full (MMLocationGpsNmea *self)
/*****************************************************************************/
guint
mm_location_3gpp_get_mobile_network_code (MMLocation3gpp *self)
{
const gchar *operator_code;
g_return_val_if_fail (MM_IS_LOCATION_3GPP (self), 0);
operator_code = mm_location_3gpp_get_operator_code (self);
if (!operator_code)
return 0;
return strtol (operator_code + 3, NULL, 10);
}
/*****************************************************************************/
void
mm_pco_list_free (GList *pco_list)
{
+22
View File
@@ -33,6 +33,7 @@
#include "mm-bearer-properties.h"
#include "mm-call-properties.h"
#include "mm-location-gps-nmea.h"
#include "mm-location-3gpp.h"
#include "mm-pco.h"
#include "mm-simple-status.h"
#include "mm-modem-3gpp.h"
@@ -211,6 +212,27 @@ MMCallStateReason mm_call_properties_get_state_reason (MMCallProperties *self);
G_DEPRECATED
MMCallState mm_call_properties_get_state (MMCallProperties *self);
/*****************************************************************************/
/**
* mm_location_3gpp_get_mobile_network_code:
* @self: a #MMLocation3gpp.
*
* Gets the Mobile Network Code of the 3GPP network.
*
* Note that 0 may actually be a valid MNC. In general, the MNC should be
* considered valid just if the reported MCC is valid, as MCC should never
* be 0.
*
* Returns: the MNC, or 0 if unknown.
*
* Since: 1.0
* Deprecated: 1.18.0. This function can not separate between two-digit MNCs
* and three-digit MNCs with a leading zero. Use mm_location_3gpp_get_operator_code()
* instead.
*/
G_DEPRECATED
guint mm_location_3gpp_get_mobile_network_code (MMLocation3gpp *self);
/*****************************************************************************/
/**
-33
View File
@@ -142,39 +142,6 @@ mm_location_3gpp_get_mobile_country_code (MMLocation3gpp *self)
/*****************************************************************************/
#ifndef MM_DISABLE_DEPRECATED
/**
* mm_location_3gpp_get_mobile_network_code:
* @self: a #MMLocation3gpp.
*
* Gets the Mobile Network Code of the 3GPP network.
*
* Note that 0 may actually be a valid MNC. In general, the MNC should be
* considered valid just if the reported MCC is valid, as MCC should never
* be 0.
*
* Returns: the MNC, or 0 if unknown.
*
* Since: 1.0
* Deprecated: 1.18.0. This function can not separate between two-digit MNCs
* and three-digit MNCs with a leading zero. Use mm_location_3gpp_get_operator_code()
* instead.
*/
guint
mm_location_3gpp_get_mobile_network_code (MMLocation3gpp *self)
{
g_return_val_if_fail (MM_IS_LOCATION_3GPP (self), 0);
if (!self->priv->operator_code)
return 0;
return strtol (self->priv->operator_code + 3, NULL, 10);
}
#endif /* MM_DISABLE_DEPRECATED */
/*****************************************************************************/
/**
* mm_location_3gpp_get_location_area_code:
* @self: a #MMLocation3gpp.
-5
View File
@@ -62,11 +62,6 @@ gulong mm_location_3gpp_get_cell_id (MMLocation3gpp *self);
gulong mm_location_3gpp_get_tracking_area_code (MMLocation3gpp *self);
const gchar *mm_location_3gpp_get_operator_code (MMLocation3gpp *self);
#ifndef MM_DISABLE_DEPRECATED
G_DEPRECATED
guint mm_location_3gpp_get_mobile_network_code (MMLocation3gpp *self);
#endif
/*****************************************************************************/
/* ModemManager/libmm-glib/mmcli specific methods */