Files
ModemManager/plugins/telit/mm-modem-helpers-telit.h
T
Aleksander Morgado be4fa661c1 plugins,telit: refactor #BND command support
And added support for several new things, including:
 * Setting "any" band now attempts to set all supported bands.
 * Added new 2G band value '5' (egsm+dcs+pcs+g850).
 * Setup support for two different 3G band combinations, a default one
   plus an alternate one applicable to the LM940/960 models only. The
   alternate combination is selected via udev tags.

During the refactor, the following Telit-specific helpers were also
removed and exchanged with more generic counterparts.
 * mm_telit_bands_contains() -> mm_common_bands_garray_lookup()
 * mm_telit_get_band_flags_from_string() -> mm_parse_uint_list()
2019-09-17 10:52:42 +02:00

64 lines
2.7 KiB
C

/* -*- 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) 2015-2019 Telit.
* Copyright (C) 2019 Aleksander Morgado <aleksander@aleksander.es>
*/
#ifndef MM_MODEM_HELPERS_TELIT_H
#define MM_MODEM_HELPERS_TELIT_H
#include <glib.h>
#include "ModemManager.h"
/* #BND response parsers and request builder */
GArray *mm_telit_parse_bnd_query_response (const gchar *response,
gboolean modem_is_2g,
gboolean modem_is_3g,
gboolean modem_is_4g,
gboolean modem_alternate_3g_bands,
GError **error);
GArray *mm_telit_parse_bnd_test_response (const gchar *response,
gboolean modem_is_2g,
gboolean modem_is_3g,
gboolean modem_is_4g,
gboolean modem_alternate_3g_bands,
GError **error);
gchar *mm_telit_build_bnd_request (GArray *bands_array,
gboolean modem_is_2g,
gboolean modem_is_3g,
gboolean modem_is_4g,
gboolean modem_alternate_3g_bands,
GError **error);
/* #QSS? response parser */
typedef enum { /*< underscore_name=mm_telit_qss_status >*/
QSS_STATUS_UNKNOWN = -1,
QSS_STATUS_SIM_REMOVED,
QSS_STATUS_SIM_INSERTED,
QSS_STATUS_SIM_INSERTED_AND_UNLOCKED,
QSS_STATUS_SIM_INSERTED_AND_READY,
} MMTelitQssStatus;
MMTelitQssStatus mm_telit_parse_qss_query (const gchar *response, GError **error);
/* CSIM lock state */
typedef enum { /*< underscore_name=mm_telit_csim_lock_state >*/
CSIM_LOCK_STATE_UNKNOWN,
CSIM_LOCK_STATE_UNLOCKED,
CSIM_LOCK_STATE_LOCK_REQUESTED,
CSIM_LOCK_STATE_LOCKED,
} MMTelitCsimLockState;
GArray *mm_telit_build_modes_list (void);
#endif /* MM_MODEM_HELPERS_TELIT_H */