1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
/* -*- 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) 2016 Trimble Navigation Limited
* Copyright (C) 2014 Aleksander Morgado <aleksander@aleksander.es>
* Contributor: Matthew Stanger <matthew_stanger@trimble.com>
*/
#ifndef MM_MODEM_HELPERS_CINTERION_H
#define MM_MODEM_HELPERS_CINTERION_H
#include "glib.h"
/*****************************************************************************/
/* ^SCFG test parser */
gboolean mm_cinterion_parse_scfg_test (const gchar *response,
MMModemCharset charset,
GArray **supported_bands,
GError **error);
/*****************************************************************************/
/* ^SCFG response parser */
gboolean mm_cinterion_parse_scfg_response (const gchar *response,
MMModemCharset charset,
GArray **bands,
GError **error);
/*****************************************************************************/
/* +CNMI test parser */
gboolean mm_cinterion_parse_cnmi_test (const gchar *response,
GArray **supported_mode,
GArray **supported_mt,
GArray **supported_bm,
GArray **supported_ds,
GArray **supported_bfr,
GError **error);
/*****************************************************************************/
/* Build Cinterion-specific band value */
gboolean mm_cinterion_build_band (GArray *bands,
guint supported,
gboolean only_2g,
guint *out_band,
GError **error);
/*****************************************************************************/
/* Single ^SIND response parser */
gboolean mm_cinterion_parse_sind_response (const gchar *response,
gchar **description,
guint *mode,
guint *value,
GError **error);
/*****************************************************************************/
/* ^SWWAN response parser */
typedef enum {
MM_SWWAN_STATE_UNKNOWN = -1,
MM_SWWAN_STATE_DISCONNECTED = 0,
MM_SWWAN_STATE_CONNECTED = 1,
} MMSwwanState;
MMSwwanState mm_cinterion_parse_swwan_response (const gchar *response,
guint swwan_index,
GError **error);
#endif /* MM_MODEM_HELPERS_CINTERION_H */
|