diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2012-03-01 12:50:23 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-03-16 14:53:19 +0100 |
commit | bb352d5da30413e70a71d14acb952b7bedfe6f99 (patch) | |
tree | c854f548d55fa078fd6d4ec95b7e762601840f83 /libmm-glib | |
parent | 1385eb394f977ee3a7014bd0025fa65cd7e4a25a (diff) |
libmm-common: `MMLocation3gpp' won't be considered internal any more
Renamed `MMCommonLocation3gpp' to `MMLocation3gpp', and removed the
`MMModemLocation3gpp' provided in libmm-glib. We'll just use the original one
from libmm-common always.
Diffstat (limited to 'libmm-glib')
-rw-r--r-- | libmm-glib/Makefile.am | 2 | ||||
-rw-r--r-- | libmm-glib/mm-modem-location-3gpp.c | 48 | ||||
-rw-r--r-- | libmm-glib/mm-modem-location-3gpp.h | 45 | ||||
-rw-r--r-- | libmm-glib/mm-modem-location.c | 12 | ||||
-rw-r--r-- | libmm-glib/mm-modem-location.h | 24 |
5 files changed, 17 insertions, 114 deletions
diff --git a/libmm-glib/Makefile.am b/libmm-glib/Makefile.am index 7e8e1a3d..f9c18a4a 100644 --- a/libmm-glib/Makefile.am +++ b/libmm-glib/Makefile.am @@ -28,8 +28,6 @@ libmm_glib_la_SOURCES = \ mm-modem-simple-status-properties.c \ mm-modem-simple.h \ mm-modem-simple.c \ - mm-modem-location-3gpp.h \ - mm-modem-location-3gpp.c \ mm-modem-location.h \ mm-modem-location.c \ mm-sim.h \ diff --git a/libmm-glib/mm-modem-location-3gpp.c b/libmm-glib/mm-modem-location-3gpp.c deleted file mode 100644 index af090889..00000000 --- a/libmm-glib/mm-modem-location-3gpp.c +++ /dev/null @@ -1,48 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details: - * - * Copyright (C) 2012 Google, Inc. - */ - -#include "mm-modem-location-3gpp.h" - -guint -mm_modem_location_3gpp_get_mobile_country_code (MMModemLocation3gpp *self) -{ - g_return_val_if_fail (MM_IS_COMMON_LOCATION_3GPP (self), 0); - - return mm_common_location_3gpp_get_mobile_country_code (self); -} - -guint -mm_modem_location_3gpp_get_mobile_network_code (MMModemLocation3gpp *self) -{ - g_return_val_if_fail (MM_IS_COMMON_LOCATION_3GPP (self), 0); - - return mm_common_location_3gpp_get_mobile_network_code (self); -} - -gulong -mm_modem_location_3gpp_get_location_area_code (MMModemLocation3gpp *self) -{ - g_return_val_if_fail (MM_IS_COMMON_LOCATION_3GPP (self), 0); - - return mm_common_location_3gpp_get_location_area_code (self); -} - -gulong -mm_modem_location_3gpp_get_cell_id (MMModemLocation3gpp *self) -{ - g_return_val_if_fail (MM_IS_COMMON_LOCATION_3GPP (self), 0); - - return mm_common_location_3gpp_get_cell_id (self); -} diff --git a/libmm-glib/mm-modem-location-3gpp.h b/libmm-glib/mm-modem-location-3gpp.h deleted file mode 100644 index 869799cb..00000000 --- a/libmm-glib/mm-modem-location-3gpp.h +++ /dev/null @@ -1,45 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * libmm -- Access modem status & information from glib applications - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301 USA. - * - * Copyright (C) 2012 Google, Inc. - */ - -#ifndef _MM_MODEM_LOCATION_3GPP_H_ -#define _MM_MODEM_LOCATION_3GPP_H_ - -#include <ModemManager.h> -#include <glib-object.h> - -#include <libmm-common.h> - -G_BEGIN_DECLS - -typedef MMCommonLocation3gpp MMModemLocation3gpp; -#define MM_TYPE_MODEM_LOCATION_3GPP(o) MM_TYPE_LOCATION_3GPP (o) -#define MM_MODEM_LOCATION_3GPP(o) MM_LOCATION_3GPP(o) -#define MM_IS_MODEM_LOCATION_3GPP(o) MM_IS_LOCATION_3GPP(o) - -guint mm_modem_location_3gpp_get_mobile_country_code (MMModemLocation3gpp *self); -guint mm_modem_location_3gpp_get_mobile_network_code (MMModemLocation3gpp *self); -gulong mm_modem_location_3gpp_get_location_area_code (MMModemLocation3gpp *self); -gulong mm_modem_location_3gpp_get_cell_id (MMModemLocation3gpp *self); - -G_END_DECLS - -#endif /* _MM_MODEM_LOCATION_3GPP_H_ */ diff --git a/libmm-glib/mm-modem-location.c b/libmm-glib/mm-modem-location.c index 1f2bdbb7..c800fa3b 100644 --- a/libmm-glib/mm-modem-location.c +++ b/libmm-glib/mm-modem-location.c @@ -160,11 +160,11 @@ mm_modem_location_enable_sync (MMModemLocation *self, error); } -static MMModemLocation3gpp * +static MMLocation3gpp * build_3gpp_location (GVariant *dictionary, GError **error) { - MMCommonLocation3gpp *location = NULL; + MMLocation3gpp *location = NULL; GError *inner_error = NULL; GVariant *value; guint source; @@ -179,7 +179,7 @@ build_3gpp_location (GVariant *dictionary, g_variant_iter_next (&iter, "{uv}", &source, &value)) { /* If we have 3GPP LAC/CI location, build result */ if (source == MM_MODEM_LOCATION_SOURCE_3GPP_LAC_CI) - location = mm_common_location_3gpp_new_from_string_variant (value, &inner_error); + location = mm_location_3gpp_new_from_string_variant (value, &inner_error); g_variant_unref (value); } @@ -189,10 +189,10 @@ build_3gpp_location (GVariant *dictionary, if (inner_error) g_propagate_error (error, inner_error); - return (MMModemLocation3gpp *)location; + return (MMLocation3gpp *)location; } -MMModemLocation3gpp * +MMLocation3gpp * mm_modem_location_get_3gpp_finish (MMModemLocation *self, GAsyncResult *res, GError **error) @@ -222,7 +222,7 @@ mm_modem_location_get_3gpp (MMModemLocation *self, user_data); } -MMModemLocation3gpp * +MMLocation3gpp * mm_modem_location_get_3gpp_sync (MMModemLocation *self, GCancellable *cancellable, GError **error) diff --git a/libmm-glib/mm-modem-location.h b/libmm-glib/mm-modem-location.h index 2c93cb45..b92040db 100644 --- a/libmm-glib/mm-modem-location.h +++ b/libmm-glib/mm-modem-location.h @@ -24,9 +24,7 @@ #define _MM_MODEM_LOCATION_H_ #include <ModemManager.h> -#include <mm-gdbus-modem.h> - -#include "mm-modem-location-3gpp.h" +#include <libmm-common.h> G_BEGIN_DECLS @@ -63,16 +61,16 @@ gboolean mm_modem_location_disable_sync (MMModemLocation *self, GCancellable *cancellable, GError **error); -void mm_modem_location_get_3gpp (MMModemLocation *self, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); -MMModemLocation3gpp *mm_modem_location_get_3gpp_finish (MMModemLocation *self, - GAsyncResult *res, - GError **error); -MMModemLocation3gpp *mm_modem_location_get_3gpp_sync (MMModemLocation *self, - GCancellable *cancellable, - GError **error); +void mm_modem_location_get_3gpp (MMModemLocation *self, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +MMLocation3gpp *mm_modem_location_get_3gpp_finish (MMModemLocation *self, + GAsyncResult *res, + GError **error); +MMLocation3gpp *mm_modem_location_get_3gpp_sync (MMModemLocation *self, + GCancellable *cancellable, + GError **error); G_END_DECLS #endif /* _MM_MODEM_LOCATION_H_ */ |