| 1 |
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
| 2 |
/* |
| 3 |
* libqmi-glib -- GLib/GIO based library to control QMI devices |
| 4 |
* |
| 5 |
* This library is free software; you can redistribute it and/or |
| 6 |
* modify it under the terms of the GNU Lesser General Public |
| 7 |
* License as published by the Free Software Foundation; either |
| 8 |
* version 2 of the License, or (at your option) any later version. |
| 9 |
* |
| 10 |
* This library is distributed in the hope that it will be useful, |
| 11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 |
* Lesser General Public License for more details. |
| 14 |
* |
| 15 |
* You should have received a copy of the GNU Lesser General Public |
| 16 |
* License along with this library; if not, write to the |
| 17 |
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 18 |
* Boston, MA 02110-1301 USA. |
| 19 |
* |
| 20 |
* Copyright (C) 2017 Aleksander Morgado <[email protected]> |
| 21 |
*/ |
| 22 |
|
| 23 |
#include <glib.h> |
| 24 |
#include "qmi-enums-dms.h" |
| 25 |
|
| 26 |
/*****************************************************************************/ |
| 27 |
/* Helper for the 'QMI DMS Swi Get USB Composition' message */ |
| 28 |
|
| 29 |
static const gchar *usb_composition_description[] = { |
| 30 |
[QMI_DMS_SWI_USB_COMPOSITION_0] = "HIP, DM, NMEA, AT, MDM1, MDM2, MDM3, MS", |
| 31 |
[QMI_DMS_SWI_USB_COMPOSITION_1] = "HIP, DM, NMEA, AT, MDM1, MS", |
| 32 |
[QMI_DMS_SWI_USB_COMPOSITION_2] = "HIP, DM, NMEA, AT, NIC1, MS", |
| 33 |
[QMI_DMS_SWI_USB_COMPOSITION_3] = "HIP, DM, NMEA, AT, MDM1, NIC1, MS", |
| 34 |
[QMI_DMS_SWI_USB_COMPOSITION_4] = "HIP, DM, NMEA, AT, NIC1, NIC2, NIC3, MS", |
| 35 |
[QMI_DMS_SWI_USB_COMPOSITION_5] = "HIP, DM, NMEA, AT, ECM1, MS", |
| 36 |
[QMI_DMS_SWI_USB_COMPOSITION_6] = "DM, NMEA, AT, QMI", |
| 37 |
[QMI_DMS_SWI_USB_COMPOSITION_7] = "DM, NMEA, AT, RMNET1, RMNET2, RMNET3", |
| 38 |
[QMI_DMS_SWI_USB_COMPOSITION_8] = "DM, NMEA, AT, MBIM", |
| 39 |
[QMI_DMS_SWI_USB_COMPOSITION_9] = "MBIM", |
| 40 |
[QMI_DMS_SWI_USB_COMPOSITION_10] = "NMEA, MBIM", |
| 41 |
[QMI_DMS_SWI_USB_COMPOSITION_11] = "DM, MBIM", |
| 42 |
[QMI_DMS_SWI_USB_COMPOSITION_12] = "DM, NMEA, MBIM", |
| 43 |
[QMI_DMS_SWI_USB_COMPOSITION_13] = "Dual configuration: USB composition 6 and USB composition 8", |
| 44 |
[QMI_DMS_SWI_USB_COMPOSITION_14] = "Dual configuration: USB composition 6 and USB composition 9", |
| 45 |
[QMI_DMS_SWI_USB_COMPOSITION_15] = "Dual configuration: USB composition 6 and USB composition 10", |
| 46 |
[QMI_DMS_SWI_USB_COMPOSITION_16] = "Dual configuration: USB composition 6 and USB composition 11", |
| 47 |
[QMI_DMS_SWI_USB_COMPOSITION_17] = "Dual configuration: USB composition 6 and USB composition 12", |
| 48 |
[QMI_DMS_SWI_USB_COMPOSITION_18] = "Dual configuration: USB composition 7 and USB composition 8", |
| 49 |
[QMI_DMS_SWI_USB_COMPOSITION_19] = "Dual configuration: USB composition 7 and USB composition 9", |
| 50 |
[QMI_DMS_SWI_USB_COMPOSITION_20] = "Dual configuration: USB composition 7 and USB composition 10", |
| 51 |
[QMI_DMS_SWI_USB_COMPOSITION_21] = "Dual configuration: USB composition 7 and USB composition 11", |
| 52 |
[QMI_DMS_SWI_USB_COMPOSITION_22] = "Dual configuration: USB composition 7 and USB composition 12", |
| 53 |
}; |
| 54 |
|
| 55 |
const gchar * |
| 56 |
qmi_dms_swi_usb_composition_get_description (QmiDmsSwiUsbComposition value) |
| 57 |
{ |
| 58 |
return (((value > QMI_DMS_SWI_USB_COMPOSITION_UNKNOWN) && |
| 59 |
((guint)value < G_N_ELEMENTS (usb_composition_description))) ? |
| 60 |
usb_composition_description[value] : NULL); |
| 61 |
} |