aboutsummaryrefslogtreecommitdiff
path: root/src/mm-iface-modem-cdma.h
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2012-01-03 13:02:11 +0100
committerAleksander Morgado <aleksander@lanedo.com>2012-03-15 14:14:43 +0100
commitf5d894f5a2620565140fcfb92ff9790e509c2436 (patch)
treed916283a63ff4b6ae1601f539693153978e937a6 /src/mm-iface-modem-cdma.h
parentad9df4a5d1b848641903f283095f4117a62aa662 (diff)
iface-modem-cdma: new interface to handle CDMA specific actions
Diffstat (limited to 'src/mm-iface-modem-cdma.h')
-rw-r--r--src/mm-iface-modem-cdma.h109
1 files changed, 109 insertions, 0 deletions
diff --git a/src/mm-iface-modem-cdma.h b/src/mm-iface-modem-cdma.h
new file mode 100644
index 00000000..29b770d3
--- /dev/null
+++ b/src/mm-iface-modem-cdma.h
@@ -0,0 +1,109 @@
+/* -*- 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) 2011 Google, Inc.
+ */
+
+#ifndef MM_IFACE_MODEM_CDMA_H
+#define MM_IFACE_MODEM_CDMA_H
+
+#include <glib-object.h>
+#include <gio/gio.h>
+
+#include <libmm-common.h>
+
+#include "mm-at-serial-port.h"
+
+#define MM_TYPE_IFACE_MODEM_CDMA (mm_iface_modem_cdma_get_type ())
+#define MM_IFACE_MODEM_CDMA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MM_TYPE_IFACE_MODEM_CDMA, MMIfaceModemCdma))
+#define MM_IS_IFACE_MODEM_CDMA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MM_TYPE_IFACE_MODEM_CDMA))
+#define MM_IFACE_MODEM_CDMA_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), MM_TYPE_IFACE_MODEM_CDMA, MMIfaceModemCdma))
+
+#define MM_IFACE_MODEM_CDMA_DBUS_SKELETON "iface-modem-cdma-dbus-skeleton"
+
+typedef struct _MMIfaceModemCdma MMIfaceModemCdma;
+
+struct _MMIfaceModemCdma {
+ GTypeInterface g_iface;
+
+ /* OTA activation */
+ void (* activate) (MMIfaceModemCdma *self,
+ const gchar *carrier,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+ gboolean (* activate_finish) (MMIfaceModemCdma *self,
+ GAsyncResult *res,
+ GError **error);
+
+ /* Manual activation */
+ void (* activate_manual) (MMIfaceModemCdma *self,
+ GVariant *properties,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+ gboolean (* activate_manual_finish) (MMIfaceModemCdma *self,
+ GAsyncResult *res,
+ GError **error);
+};
+
+GType mm_iface_modem_cdma_get_type (void);
+
+/* Initialize CDMA interface (async) */
+void mm_iface_modem_cdma_initialize (MMIfaceModemCdma *self,
+ MMAtSerialPort *port,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+gboolean mm_iface_modem_cdma_initialize_finish (MMIfaceModemCdma *self,
+ GAsyncResult *res,
+ GError **error);
+
+/* Enable CDMA interface (async) */
+void mm_iface_modem_cdma_enable (MMIfaceModemCdma *self,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+gboolean mm_iface_modem_cdma_enable_finish (MMIfaceModemCdma *self,
+ GAsyncResult *res,
+ GError **error);
+
+/* Disable CDMA interface (async) */
+void mm_iface_modem_cdma_disable (MMIfaceModemCdma *self,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+gboolean mm_iface_modem_cdma_disable_finish (MMIfaceModemCdma *self,
+ GAsyncResult *res,
+ GError **error);
+
+/* Shutdown CDMA interface */
+void mm_iface_modem_cdma_shutdown (MMIfaceModemCdma *self);
+
+/* Allow OTA activation */
+gboolean mm_iface_modem_cdma_activate_finish (MMIfaceModemCdma *self,
+ GAsyncResult *res,
+ GError **error);
+void mm_iface_modem_cdma_activate (MMIfaceModemCdma *self,
+ const gchar *carrier,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+
+/* Allow manual activation */
+gboolean mm_iface_modem_cdma_activate_manual_finish (MMIfaceModemCdma *self,
+ GAsyncResult *res,
+ GError **error);
+void mm_iface_modem_cdma_activate_manual (MMIfaceModemCdma *self,
+ GVariant *properties,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+
+/* Bind properties for simple GetStatus() */
+void mm_iface_modem_cdma_bind_simple_status (MMIfaceModemCdma *self,
+ MMCommonSimpleProperties *status);
+
+#endif /* MM_IFACE_MODEM_CDMA_H */