aboutsummaryrefslogtreecommitdiff
path: root/plugins/linktop/mm-modem-helpers-linktop.h
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2016-10-11 17:49:43 +0200
committerAleksander Morgado <aleksander@aleksander.es>2016-10-12 11:29:52 +0200
commitd7fdda224765e8ea9c1b4713dfa3708f2251b8c3 (patch)
tree974af01fff06af2cde17d0018d6cce14b112890f /plugins/linktop/mm-modem-helpers-linktop.h
parent74fd7da774c3a4c644106618499d68eb92a95baf (diff)
linktop: new Linktop specific +CFUN? response parser
We handle all known CFUN? response values in the new parser, and report an error if an unknown value is found.
Diffstat (limited to 'plugins/linktop/mm-modem-helpers-linktop.h')
-rw-r--r--plugins/linktop/mm-modem-helpers-linktop.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/plugins/linktop/mm-modem-helpers-linktop.h b/plugins/linktop/mm-modem-helpers-linktop.h
new file mode 100644
index 00000000..69fa7ee2
--- /dev/null
+++ b/plugins/linktop/mm-modem-helpers-linktop.h
@@ -0,0 +1,40 @@
+/* -*- 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) 2008 - 2009 Novell, Inc.
+ * Copyright (C) 2009 - 2016 Red Hat, Inc.
+ * Copyright (C) 2016 Aleksander Morgado <aleksander@aleksander.es>
+ */
+
+#ifndef MM_MODEM_HELPERS_LINKTOP_H
+#define MM_MODEM_HELPERS_LINKTOP_H
+
+#include <glib.h>
+
+#include <ModemManager.h>
+#define _LIBMM_INSIDE_MM
+#include <libmm-glib.h>
+
+typedef enum {
+ LINKTOP_MODE_OFFLINE = 0,
+ LINKTOP_MODE_ANY = 1,
+ LINKTOP_MODE_LOW_POWER = 4,
+ LINKTOP_MODE_2G = 5,
+ LINKTOP_MODE_3G = 6,
+} MMLinktopMode;
+
+/* AT+CFUN? response parsers */
+gboolean mm_linktop_parse_cfun_query_current_modes (const gchar *response,
+ MMModemMode *allowed,
+ GError **error);
+
+#endif /* MM_MODEM_HELPERS_LINKTOP_H */