libmm-glib,nmea: deprecate mm_location_gps_nmea_build_full()

The new mm_location_gps_nmea_get_traces() is a much more generic way
to retrieve the full list of traces and suits the libmm-glib API much
better.
This commit is contained in:
Aleksander Morgado
2020-01-01 09:22:41 +01:00
parent 6c1991e930
commit 70910a6713
2 changed files with 13 additions and 2 deletions

View File

@@ -188,6 +188,8 @@ mm_location_gps_nmea_get_traces (MMLocationGpsNmea *self)
/*****************************************************************************/ /*****************************************************************************/
#ifndef MM_DISABLE_DEPRECATED
static void static void
build_full_foreach (const gchar *trace_type, build_full_foreach (const gchar *trace_type,
const gchar *trace, const gchar *trace,
@@ -203,12 +205,15 @@ build_full_foreach (const gchar *trace_type,
* mm_location_gps_nmea_build_full: * mm_location_gps_nmea_build_full:
* @self: a #MMLocationGpsNmea. * @self: a #MMLocationGpsNmea.
* *
* Gets a compilation of all cached traces. * Gets a compilation of all cached traces, in a single string.
* Traces are separated by '\r\n'.
* *
* Returns: (transfer full): a string containing all traces, or #NULL if none * Returns: (transfer full): a string containing all traces, or #NULL if none
* available. The returned value should be freed with g_free(). * available. The returned value should be freed with g_free().
* *
* Since: 1.0 * Since: 1.0
* Deprecated: 1.14: user should use mm_location_gps_nmea_get_traces() instead,
* which provides a much more generic interface to the full list of traces.
*/ */
gchar * gchar *
mm_location_gps_nmea_build_full (MMLocationGpsNmea *self) mm_location_gps_nmea_build_full (MMLocationGpsNmea *self)
@@ -222,6 +227,8 @@ mm_location_gps_nmea_build_full (MMLocationGpsNmea *self)
return g_string_free (built, FALSE); return g_string_free (built, FALSE);
} }
#endif
/*****************************************************************************/ /*****************************************************************************/
/** /**

View File

@@ -62,7 +62,11 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMLocationGpsNmea, g_object_unref)
const gchar *mm_location_gps_nmea_get_trace (MMLocationGpsNmea *self, const gchar *mm_location_gps_nmea_get_trace (MMLocationGpsNmea *self,
const gchar *trace_type); const gchar *trace_type);
gchar **mm_location_gps_nmea_get_traces (MMLocationGpsNmea *self); gchar **mm_location_gps_nmea_get_traces (MMLocationGpsNmea *self);
gchar *mm_location_gps_nmea_build_full (MMLocationGpsNmea *self);
#ifndef MM_DISABLE_DEPRECATED
G_DEPRECATED_FOR(mm_location_gps_nmea_get_traces)
gchar *mm_location_gps_nmea_build_full (MMLocationGpsNmea *self);
#endif
/*****************************************************************************/ /*****************************************************************************/
/* ModemManager/libmm-glib/mmcli specific methods */ /* ModemManager/libmm-glib/mmcli specific methods */