|
Packit |
d14447 |
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
Packit |
d14447 |
/*
|
|
Packit |
d14447 |
* libmm -- Access modem status & information from glib applications
|
|
Packit |
d14447 |
*
|
|
Packit |
d14447 |
* This library is free software; you can redistribute it and/or
|
|
Packit |
d14447 |
* modify it under the terms of the GNU Lesser General Public
|
|
Packit |
d14447 |
* License as published by the Free Software Foundation; either
|
|
Packit |
d14447 |
* version 2 of the License, or (at your option) any later version.
|
|
Packit |
d14447 |
*
|
|
Packit |
d14447 |
* This library is distributed in the hope that it will be useful,
|
|
Packit |
d14447 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
d14447 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
d14447 |
* Lesser General Public License for more details.
|
|
Packit |
d14447 |
*
|
|
Packit |
d14447 |
* You should have received a copy of the GNU Lesser General Public
|
|
Packit |
d14447 |
* License along with this library; if not, write to the
|
|
Packit |
d14447 |
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
Packit |
d14447 |
* Boston, MA 02110-1301 USA.
|
|
Packit |
d14447 |
*
|
|
Packit |
d14447 |
* Copyright (C) 2012 Google, Inc.
|
|
Packit |
d14447 |
* Copyright (C) 2012 Lanedo GmbH <aleksander@lanedo.com>
|
|
Packit |
d14447 |
*/
|
|
Packit |
d14447 |
|
|
Packit |
d14447 |
#ifndef _MM_MODEM_LOCATION_H_
|
|
Packit |
d14447 |
#define _MM_MODEM_LOCATION_H_
|
|
Packit |
d14447 |
|
|
Packit |
d14447 |
#if !defined (__LIBMM_GLIB_H_INSIDE__) && !defined (LIBMM_GLIB_COMPILATION)
|
|
Packit |
d14447 |
#error "Only <libmm-glib.h> can be included directly."
|
|
Packit |
d14447 |
#endif
|
|
Packit |
d14447 |
|
|
Packit |
d14447 |
#include <ModemManager.h>
|
|
Packit |
d14447 |
|
|
Packit |
d14447 |
#include "mm-gdbus-modem.h"
|
|
Packit |
d14447 |
#include "mm-location-3gpp.h"
|
|
Packit |
d14447 |
#include "mm-location-gps-nmea.h"
|
|
Packit |
d14447 |
#include "mm-location-gps-raw.h"
|
|
Packit |
d14447 |
#include "mm-location-cdma-bs.h"
|
|
Packit |
d14447 |
|
|
Packit |
d14447 |
G_BEGIN_DECLS
|
|
Packit |
d14447 |
|
|
Packit |
d14447 |
#define MM_TYPE_MODEM_LOCATION (mm_modem_location_get_type ())
|
|
Packit |
d14447 |
#define MM_MODEM_LOCATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MM_TYPE_MODEM_LOCATION, MMModemLocation))
|
|
Packit |
d14447 |
#define MM_MODEM_LOCATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MM_TYPE_MODEM_LOCATION, MMModemLocationClass))
|
|
Packit |
d14447 |
#define MM_IS_MODEM_LOCATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MM_TYPE_MODEM_LOCATION))
|
|
Packit |
d14447 |
#define MM_IS_MODEM_LOCATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), MM_TYPE_MODEM_LOCATION))
|
|
Packit |
d14447 |
#define MM_MODEM_LOCATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MM_TYPE_MODEM_LOCATION, MMModemLocationClass))
|
|
Packit |
d14447 |
|
|
Packit |
d14447 |
typedef struct _MMModemLocation MMModemLocation;
|
|
Packit |
d14447 |
typedef struct _MMModemLocationClass MMModemLocationClass;
|
|
Packit |
d14447 |
|
|
Packit |
d14447 |
/**
|
|
Packit |
d14447 |
* MMModemLocation:
|
|
Packit |
d14447 |
*
|
|
Packit |
d14447 |
* The #MMModemLocation structure contains private data and should only be accessed
|
|
Packit |
d14447 |
* using the provided API.
|
|
Packit |
d14447 |
*/
|
|
Packit |
d14447 |
struct _MMModemLocation {
|
|
Packit |
d14447 |
/*< private >*/
|
|
Packit |
d14447 |
MmGdbusModemLocationProxy parent;
|
|
Packit |
d14447 |
gpointer unused;
|
|
Packit |
d14447 |
};
|
|
Packit |
d14447 |
|
|
Packit |
d14447 |
struct _MMModemLocationClass {
|
|
Packit |
d14447 |
/*< private >*/
|
|
Packit |
d14447 |
MmGdbusModemLocationProxyClass parent;
|
|
Packit |
d14447 |
};
|
|
Packit |
d14447 |
|
|
Packit |
d14447 |
GType mm_modem_location_get_type (void);
|
|
Packit |
d14447 |
|
|
Packit |
d14447 |
#if GLIB_CHECK_VERSION(2, 44, 0)
|
|
Packit |
d14447 |
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMModemLocation, g_object_unref)
|
|
Packit |
d14447 |
#endif
|
|
Packit |
d14447 |
|
|
Packit |
d14447 |
const gchar *mm_modem_location_get_path (MMModemLocation *self);
|
|
Packit |
d14447 |
gchar *mm_modem_location_dup_path (MMModemLocation *self);
|
|
Packit |
d14447 |
|
|
Packit |
d14447 |
MMModemLocationSource mm_modem_location_get_capabilities (MMModemLocation *self);
|
|
Packit |
d14447 |
|
|
Packit |
d14447 |
MMModemLocationSource mm_modem_location_get_enabled (MMModemLocation *self);
|
|
Packit |
d14447 |
|
|
Packit |
d14447 |
gboolean mm_modem_location_signals_location (MMModemLocation *self);
|
|
Packit |
d14447 |
|
|
Packit |
d14447 |
MMModemLocationAssistanceDataType mm_modem_location_get_supported_assistance_data (MMModemLocation *self);
|
|
Packit |
d14447 |
|
|
Packit |
d14447 |
const gchar *mm_modem_location_get_supl_server (MMModemLocation *self);
|
|
Packit |
d14447 |
gchar *mm_modem_location_dup_supl_server (MMModemLocation *self);
|
|
Packit |
d14447 |
|
|
Packit |
d14447 |
const gchar **mm_modem_location_get_assistance_data_servers (MMModemLocation *self);
|
|
Packit |
d14447 |
gchar **mm_modem_location_dup_assistance_data_servers (MMModemLocation *self);
|
|
Packit |
d14447 |
|
|
Packit |
d14447 |
guint mm_modem_location_get_gps_refresh_rate (MMModemLocation *self);
|
|
Packit |
d14447 |
|
|
Packit |
d14447 |
void mm_modem_location_setup (MMModemLocation *self,
|
|
Packit |
d14447 |
MMModemLocationSource sources,
|
|
Packit |
d14447 |
gboolean signal_location,
|
|
Packit |
d14447 |
GCancellable *cancellable,
|
|
Packit |
d14447 |
GAsyncReadyCallback callback,
|
|
Packit |
d14447 |
gpointer user_data);
|
|
Packit |
d14447 |
gboolean mm_modem_location_setup_finish (MMModemLocation *self,
|
|
Packit |
d14447 |
GAsyncResult *res,
|
|
Packit |
d14447 |
GError **error);
|
|
Packit |
d14447 |
gboolean mm_modem_location_setup_sync (MMModemLocation *self,
|
|
Packit |
d14447 |
MMModemLocationSource sources,
|
|
Packit |
d14447 |
gboolean signal_location,
|
|
Packit |
d14447 |
GCancellable *cancellable,
|
|
Packit |
d14447 |
GError **error);
|
|
Packit |
d14447 |
|
|
Packit |
d14447 |
void mm_modem_location_set_supl_server (MMModemLocation *self,
|
|
Packit |
d14447 |
const gchar *supl,
|
|
Packit |
d14447 |
GCancellable *cancellable,
|
|
Packit |
d14447 |
GAsyncReadyCallback callback,
|
|
Packit |
d14447 |
gpointer user_data);
|
|
Packit |
d14447 |
gboolean mm_modem_location_set_supl_server_finish (MMModemLocation *self,
|
|
Packit |
d14447 |
GAsyncResult *res,
|
|
Packit |
d14447 |
GError **error);
|
|
Packit |
d14447 |
gboolean mm_modem_location_set_supl_server_sync (MMModemLocation *self,
|
|
Packit |
d14447 |
const gchar *supl,
|
|
Packit |
d14447 |
GCancellable *cancellable,
|
|
Packit |
d14447 |
GError **error);
|
|
Packit |
d14447 |
|
|
Packit |
d14447 |
void mm_modem_location_inject_assistance_data (MMModemLocation *self,
|
|
Packit |
d14447 |
const guint8 *data,
|
|
Packit |
d14447 |
gsize data_size,
|
|
Packit |
d14447 |
GCancellable *cancellable,
|
|
Packit |
d14447 |
GAsyncReadyCallback callback,
|
|
Packit |
d14447 |
gpointer user_data);
|
|
Packit |
d14447 |
gboolean mm_modem_location_inject_assistance_data_finish (MMModemLocation *self,
|
|
Packit |
d14447 |
GAsyncResult *res,
|
|
Packit |
d14447 |
GError **error);
|
|
Packit |
d14447 |
gboolean mm_modem_location_inject_assistance_data_sync (MMModemLocation *self,
|
|
Packit |
d14447 |
const guint8 *data,
|
|
Packit |
d14447 |
gsize data_size,
|
|
Packit |
d14447 |
GCancellable *cancellable,
|
|
Packit |
d14447 |
GError **error);
|
|
Packit |
d14447 |
|
|
Packit |
d14447 |
void mm_modem_location_set_gps_refresh_rate (MMModemLocation *self,
|
|
Packit |
d14447 |
guint rate,
|
|
Packit |
d14447 |
GCancellable *cancellable,
|
|
Packit |
d14447 |
GAsyncReadyCallback callback,
|
|
Packit |
d14447 |
gpointer user_data);
|
|
Packit |
d14447 |
gboolean mm_modem_location_set_gps_refresh_rate_finish (MMModemLocation *self,
|
|
Packit |
d14447 |
GAsyncResult *res,
|
|
Packit |
d14447 |
GError **error);
|
|
Packit |
d14447 |
gboolean mm_modem_location_set_gps_refresh_rate_sync (MMModemLocation *self,
|
|
Packit |
d14447 |
guint rate,
|
|
Packit |
d14447 |
GCancellable *cancellable,
|
|
Packit |
d14447 |
GError **error);
|
|
Packit |
d14447 |
|
|
Packit |
d14447 |
void mm_modem_location_get_3gpp (MMModemLocation *self,
|
|
Packit |
d14447 |
GCancellable *cancellable,
|
|
Packit |
d14447 |
GAsyncReadyCallback callback,
|
|
Packit |
d14447 |
gpointer user_data);
|
|
Packit |
d14447 |
MMLocation3gpp *mm_modem_location_get_3gpp_finish (MMModemLocation *self,
|
|
Packit |
d14447 |
GAsyncResult *res,
|
|
Packit |
d14447 |
GError **error);
|
|
Packit |
d14447 |
MMLocation3gpp *mm_modem_location_get_3gpp_sync (MMModemLocation *self,
|
|
Packit |
d14447 |
GCancellable *cancellable,
|
|
Packit |
d14447 |
GError **error);
|
|
Packit |
d14447 |
|
|
Packit |
d14447 |
void mm_modem_location_get_gps_nmea (MMModemLocation *self,
|
|
Packit |
d14447 |
GCancellable *cancellable,
|
|
Packit |
d14447 |
GAsyncReadyCallback callback,
|
|
Packit |
d14447 |
gpointer user_data);
|
|
Packit |
d14447 |
MMLocationGpsNmea *mm_modem_location_get_gps_nmea_finish (MMModemLocation *self,
|
|
Packit |
d14447 |
GAsyncResult *res,
|
|
Packit |
d14447 |
GError **error);
|
|
Packit |
d14447 |
MMLocationGpsNmea *mm_modem_location_get_gps_nmea_sync (MMModemLocation *self,
|
|
Packit |
d14447 |
GCancellable *cancellable,
|
|
Packit |
d14447 |
GError **error);
|
|
Packit |
d14447 |
|
|
Packit |
d14447 |
void mm_modem_location_get_gps_raw (MMModemLocation *self,
|
|
Packit |
d14447 |
GCancellable *cancellable,
|
|
Packit |
d14447 |
GAsyncReadyCallback callback,
|
|
Packit |
d14447 |
gpointer user_data);
|
|
Packit |
d14447 |
MMLocationGpsRaw *mm_modem_location_get_gps_raw_finish (MMModemLocation *self,
|
|
Packit |
d14447 |
GAsyncResult *res,
|
|
Packit |
d14447 |
GError **error);
|
|
Packit |
d14447 |
MMLocationGpsRaw *mm_modem_location_get_gps_raw_sync (MMModemLocation *self,
|
|
Packit |
d14447 |
GCancellable *cancellable,
|
|
Packit |
d14447 |
GError **error);
|
|
Packit |
d14447 |
|
|
Packit |
d14447 |
void mm_modem_location_get_cdma_bs (MMModemLocation *self,
|
|
Packit |
d14447 |
GCancellable *cancellable,
|
|
Packit |
d14447 |
GAsyncReadyCallback callback,
|
|
Packit |
d14447 |
gpointer user_data);
|
|
Packit |
d14447 |
MMLocationCdmaBs *mm_modem_location_get_cdma_bs_finish (MMModemLocation *self,
|
|
Packit |
d14447 |
GAsyncResult *res,
|
|
Packit |
d14447 |
GError **error);
|
|
Packit |
d14447 |
MMLocationCdmaBs *mm_modem_location_get_cdma_bs_sync (MMModemLocation *self,
|
|
Packit |
d14447 |
GCancellable *cancellable,
|
|
Packit |
d14447 |
GError **error);
|
|
Packit |
d14447 |
|
|
Packit |
d14447 |
void mm_modem_location_get_full (MMModemLocation *self,
|
|
Packit |
d14447 |
GCancellable *cancellable,
|
|
Packit |
d14447 |
GAsyncReadyCallback callback,
|
|
Packit |
d14447 |
gpointer user_data);
|
|
Packit |
d14447 |
gboolean mm_modem_location_get_full_finish (MMModemLocation *self,
|
|
Packit |
d14447 |
GAsyncResult *res,
|
|
Packit |
d14447 |
MMLocation3gpp **location_3gpp,
|
|
Packit |
d14447 |
MMLocationGpsNmea **location_gps_nmea,
|
|
Packit |
d14447 |
MMLocationGpsRaw **location_gps_raw,
|
|
Packit |
d14447 |
MMLocationCdmaBs **location_cdma_bs,
|
|
Packit |
d14447 |
GError **error);
|
|
Packit |
d14447 |
gboolean mm_modem_location_get_full_sync (MMModemLocation *self,
|
|
Packit |
d14447 |
MMLocation3gpp **location_3gpp,
|
|
Packit |
d14447 |
MMLocationGpsNmea **location_gps_nmea,
|
|
Packit |
d14447 |
MMLocationGpsRaw **location_gps_raw,
|
|
Packit |
d14447 |
MMLocationCdmaBs **location_cdma_bs,
|
|
Packit |
d14447 |
GCancellable *cancellable,
|
|
Packit |
d14447 |
GError **error);
|
|
Packit |
d14447 |
|
|
Packit |
d14447 |
G_END_DECLS
|
|
Packit |
d14447 |
|
|
Packit |
d14447 |
#endif /* _MM_MODEM_LOCATION_H_ */
|