[PATCH 5/5] api: consolidate CDMA frequency enumerations

Aleksander Morgado aleksander at aleksander.es
Sun Aug 20 16:37:13 UTC 2017


Define new symbols with easier names, just based on the Band Class.
---
 docs/reference/api/ModemManager-sections.txt |  20 +++
 include/ModemManager-compat.h                | 200 +++++++++++++++++++++++++++
 include/ModemManager-enums.h                 |  80 +++++------
 3 files changed, 260 insertions(+), 40 deletions(-)

diff --git a/docs/reference/api/ModemManager-sections.txt b/docs/reference/api/ModemManager-sections.txt
index 95a29375..7d0ff561 100644
--- a/docs/reference/api/ModemManager-sections.txt
+++ b/docs/reference/api/ModemManager-sections.txt
@@ -115,4 +115,24 @@ MM_MODEM_BAND_EUTRAN_XLI
 MM_MODEM_BAND_EUTRAN_XLII
 MM_MODEM_BAND_EUTRAN_XLIII
 MM_MODEM_BAND_EUTRAN_XLIV
+MM_MODEM_BAND_CDMA_BC0_CELLULAR_800
+MM_MODEM_BAND_CDMA_BC1_PCS_1900
+MM_MODEM_BAND_CDMA_BC2_TACS
+MM_MODEM_BAND_CDMA_BC3_JTACS
+MM_MODEM_BAND_CDMA_BC4_KOREAN_PCS
+MM_MODEM_BAND_CDMA_BC5_NMT450
+MM_MODEM_BAND_CDMA_BC6_IMT2000
+MM_MODEM_BAND_CDMA_BC7_CELLULAR_700
+MM_MODEM_BAND_CDMA_BC8_1800
+MM_MODEM_BAND_CDMA_BC9_900
+MM_MODEM_BAND_CDMA_BC10_SECONDARY_800
+MM_MODEM_BAND_CDMA_BC11_PAMR_400
+MM_MODEM_BAND_CDMA_BC12_PAMR_800
+MM_MODEM_BAND_CDMA_BC13_IMT2000_2500
+MM_MODEM_BAND_CDMA_BC14_PCS2_1900
+MM_MODEM_BAND_CDMA_BC15_AWS
+MM_MODEM_BAND_CDMA_BC16_US_2500
+MM_MODEM_BAND_CDMA_BC17_US_FLO_2500
+MM_MODEM_BAND_CDMA_BC18_US_PS_700
+MM_MODEM_BAND_CDMA_BC19_US_LOWER_700
 </SECTION>
diff --git a/include/ModemManager-compat.h b/include/ModemManager-compat.h
index c5772479..f0e1d938 100644
--- a/include/ModemManager-compat.h
+++ b/include/ModemManager-compat.h
@@ -487,4 +487,204 @@ typedef int MMModemBandDeprecated;
  */
 #define MM_MODEM_BAND_EUTRAN_XLIV ((MMModemBandDeprecated)MM_MODEM_BAND_EUTRAN_44)
 
+/**
+ * MM_MODEM_BAND_CDMA_BC0_CELLULAR_800:
+ *
+ * CDMA Band Class 0 (US Cellular 850MHz)
+ *
+ * Since: 1.0
+ * Deprecated: 1.8.0: Use #MM_MODEM_BAND_CDMA_BC0 instead.
+ */
+#define MM_MODEM_BAND_CDMA_BC0_CELLULAR_800 ((MMModemBandDeprecated)MM_MODEM_BAND_CDMA_BC0)
+
+/**
+ * MM_MODEM_BAND_CDMA_BC1_PCS_1900:
+ *
+ * CDMA Band Class 1 (US PCS 1900MHz).
+ *
+ * Since: 1.0
+ * Deprecated: 1.8.0: Use #MM_MODEM_BAND_CDMA_BC1 instead.
+ */
+#define MM_MODEM_BAND_CDMA_BC1_PCS_1900 ((MMModemBandDeprecated)MM_MODEM_BAND_CDMA_BC1)
+
+/**
+ * MM_MODEM_BAND_CDMA_BC2_TACS:
+ *
+ * CDMA Band Class 2 (UK TACS 900MHz).
+ *
+ * Since: 1.0
+ * Deprecated: 1.8.0: Use #MM_MODEM_BAND_CDMA_BC2 instead.
+ */
+#define MM_MODEM_BAND_CDMA_BC2_TACS ((MMModemBandDeprecated)MM_MODEM_BAND_CDMA_BC2)
+
+/**
+ * MM_MODEM_BAND_CDMA_BC3_JTACS:
+ *
+ * CDMA Band Class 3 (Japanese TACS).
+ *
+ * Since: 1.0
+ * Deprecated: 1.8.0: Use #MM_MODEM_BAND_CDMA_BC3 instead.
+ */
+#define MM_MODEM_BAND_CDMA_BC3_JTACS ((MMModemBandDeprecated)MM_MODEM_BAND_CDMA_BC3)
+
+/**
+ * MM_MODEM_BAND_CDMA_BC4_KOREAN_PCS:
+ *
+ * CDMA Band Class 4 (Korean PCS).
+ *
+ * Since: 1.0
+ * Deprecated: 1.8.0: Use #MM_MODEM_BAND_CDMA_BC4 instead.
+ */
+#define MM_MODEM_BAND_CDMA_BC4_KOREAN_PCS ((MMModemBandDeprecated)MM_MODEM_BAND_CDMA_BC4)
+
+/**
+ * MM_MODEM_BAND_CDMA_BC5_NMT450:
+ *
+ * CDMA Band Class 5 (NMT 450MHz).
+ *
+ * Since: 1.0
+ * Deprecated: 1.8.0: Use #MM_MODEM_BAND_CDMA_BC5 instead.
+ */
+#define MM_MODEM_BAND_CDMA_BC5_NMT450 ((MMModemBandDeprecated)MM_MODEM_BAND_CDMA_BC5)
+
+/**
+ * MM_MODEM_BAND_CDMA_BC6_IMT2000:
+ *
+ * CDMA Band Class 6 (IMT2000 2100MHz).
+ *
+ * Since: 1.0
+ * Deprecated: 1.8.0: Use #MM_MODEM_BAND_CDMA_BC6 instead.
+ */
+#define MM_MODEM_BAND_CDMA_BC6_IMT2000 ((MMModemBandDeprecated)MM_MODEM_BAND_CDMA_BC6)
+
+/**
+ * MM_MODEM_BAND_CDMA_BC7_CELLULAR_700:
+ *
+ * CDMA Band Class 7 (Cellular 700MHz).
+ *
+ * Since: 1.0
+ * Deprecated: 1.8.0: Use #MM_MODEM_BAND_CDMA_BC7 instead.
+ */
+#define MM_MODEM_BAND_CDMA_BC7_CELLULAR_700 ((MMModemBandDeprecated)MM_MODEM_BAND_CDMA_BC7)
+
+/**
+ * MM_MODEM_BAND_CDMA_BC8_1800:
+ *
+ * CDMA Band Class 8 (1800MHz).
+ *
+ * Since: 1.0
+ * Deprecated: 1.8.0: Use #MM_MODEM_BAND_CDMA_BC8 instead.
+ */
+#define MM_MODEM_BAND_CDMA_BC8_1800 ((MMModemBandDeprecated)MM_MODEM_BAND_CDMA_BC8)
+
+/**
+ * MM_MODEM_BAND_CDMA_BC9_900:
+ *
+ * CDMA Band Class 9 (900MHz).
+ *
+ * Since: 1.0
+ * Deprecated: 1.8.0: Use #MM_MODEM_BAND_CDMA_BC9 instead.
+ */
+#define MM_MODEM_BAND_CDMA_BC9_900 ((MMModemBandDeprecated)MM_MODEM_BAND_CDMA_BC9)
+
+/**
+ * MM_MODEM_BAND_CDMA_BC10_SECONDARY_800:
+ *
+ * CDMA Band Class 10 (US Secondary 800).
+ *
+ * Since: 1.0
+ * Deprecated: 1.8.0: Use #MM_MODEM_BAND_CDMA_BC10 instead.
+ */
+#define MM_MODEM_BAND_CDMA_BC10_SECONDARY_800 ((MMModemBandDeprecated)MM_MODEM_BAND_CDMA_BC10)
+
+/**
+ * MM_MODEM_BAND_CDMA_BC11_PAMR_400:
+ *
+ * CDMA Band Class 11 (European PAMR 400MHz).
+ *
+ * Since: 1.0
+ * Deprecated: 1.8.0: Use #MM_MODEM_BAND_CDMA_BC11 instead.
+ */
+#define MM_MODEM_BAND_CDMA_BC11_PAMR_400 ((MMModemBandDeprecated)MM_MODEM_BAND_CDMA_BC11)
+
+/**
+ * MM_MODEM_BAND_CDMA_BC12_PAMR_800:
+ *
+ * CDMA Band Class 12 (PAMR 800MHz).
+ *
+ * Since: 1.0
+ * Deprecated: 1.8.0: Use #MM_MODEM_BAND_CDMA_BC12 instead.
+ */
+#define MM_MODEM_BAND_CDMA_BC12_PAMR_800 ((MMModemBandDeprecated)MM_MODEM_BAND_CDMA_BC12)
+
+/**
+ * MM_MODEM_BAND_CDMA_BC13_IMT2000_2500:
+ *
+ * CDMA Band Class 13 (IMT2000 2500MHz Expansion).
+ *
+ * Since: 1.0
+ * Deprecated: 1.8.0: Use #MM_MODEM_BAND_CDMA_BC13 instead.
+ */
+#define MM_MODEM_BAND_CDMA_BC13_IMT2000_2500 ((MMModemBandDeprecated)MM_MODEM_BAND_CDMA_BC13)
+
+/**
+ * MM_MODEM_BAND_CDMA_BC14_PCS2_1900:
+ *
+ * CDMA Band Class 14 (More US PCS 1900MHz).
+ *
+ * Since: 1.0
+ * Deprecated: 1.8.0: Use #MM_MODEM_BAND_CDMA_BC14 instead.
+ */
+#define MM_MODEM_BAND_CDMA_BC14_PCS2_1900 ((MMModemBandDeprecated)MM_MODEM_BAND_CDMA_BC14)
+
+/**
+ * MM_MODEM_BAND_CDMA_BC15_AWS:
+ *
+ * CDMA Band Class 15 (AWS 1700MHz).
+ *
+ * Since: 1.0
+ * Deprecated: 1.8.0: Use #MM_MODEM_BAND_CDMA_BC15 instead.
+ */
+#define MM_MODEM_BAND_CDMA_BC15_AWS ((MMModemBandDeprecated)MM_MODEM_BAND_CDMA_BC15)
+
+/**
+ * MM_MODEM_BAND_CDMA_BC16_US_2500:
+ *
+ * CDMA Band Class 16 (US 2500MHz).
+ *
+ * Since: 1.0
+ * Deprecated: 1.8.0: Use #MM_MODEM_BAND_CDMA_BC16 instead.
+ */
+#define MM_MODEM_BAND_CDMA_BC16_US_2500 ((MMModemBandDeprecated)MM_MODEM_BAND_CDMA_BC16)
+
+/**
+ * MM_MODEM_BAND_CDMA_BC17_US_FLO_2500:
+ *
+ * CDMA Band Class 17 (US 2500MHz Forward Link Only).
+ *
+ * Since: 1.0
+ * Deprecated: 1.8.0: Use #MM_MODEM_BAND_CDMA_BC17 instead.
+ */
+#define MM_MODEM_BAND_CDMA_BC17_US_FLO_2500 ((MMModemBandDeprecated)MM_MODEM_BAND_CDMA_BC17)
+
+/**
+ * MM_MODEM_BAND_CDMA_BC18_US_PS_700:
+ *
+ * CDMA Band Class 18 (US 700MHz Public Safety).
+ *
+ * Since: 1.0
+ * Deprecated: 1.8.0: Use #MM_MODEM_BAND_CDMA_BC18 instead.
+ */
+#define MM_MODEM_BAND_CDMA_BC18_US_PS_700 ((MMModemBandDeprecated)MM_MODEM_BAND_CDMA_BC18)
+
+/**
+ * MM_MODEM_BAND_CDMA_BC19_US_LOWER_700:
+ *
+ * CDMA Band Class 19 (US Lower 700MHz).
+ *
+ * Since: 1.0
+ * Deprecated: 1.8.0: Use #MM_MODEM_BAND_CDMA_BC19 instead.
+ */
+#define MM_MODEM_BAND_CDMA_BC19_US_LOWER_700 ((MMModemBandDeprecated)MM_MODEM_BAND_CDMA_BC19)
+
 #endif /* _MODEMMANAGER_COMPAT_H_ */
diff --git a/include/ModemManager-enums.h b/include/ModemManager-enums.h
index 71b465c0..4c7e4690 100644
--- a/include/ModemManager-enums.h
+++ b/include/ModemManager-enums.h
@@ -313,26 +313,26 @@ typedef enum { /*< underscore_name=mm_modem_mode >*/
  * @MM_MODEM_BAND_EUTRAN_42: E-UTRAN band 42.
  * @MM_MODEM_BAND_EUTRAN_43: E-UTRAN band 43.
  * @MM_MODEM_BAND_EUTRAN_44: E-UTRAN band 44.
- * @MM_MODEM_BAND_CDMA_BC0_CELLULAR_800: CDMA Band Class 0 (US Cellular 850MHz).
- * @MM_MODEM_BAND_CDMA_BC1_PCS_1900: CDMA Band Class 1 (US PCS 1900MHz).
- * @MM_MODEM_BAND_CDMA_BC2_TACS: CDMA Band Class 2 (UK TACS 900MHz).
- * @MM_MODEM_BAND_CDMA_BC3_JTACS: CDMA Band Class 3 (Japanese TACS).
- * @MM_MODEM_BAND_CDMA_BC4_KOREAN_PCS: CDMA Band Class 4 (Korean PCS).
- * @MM_MODEM_BAND_CDMA_BC5_NMT450: CDMA Band Class 5 (NMT 450MHz).
- * @MM_MODEM_BAND_CDMA_BC6_IMT2000: CDMA Band Class 6 (IMT2000 2100MHz).
- * @MM_MODEM_BAND_CDMA_BC7_CELLULAR_700: CDMA Band Class 7 (Cellular 700MHz).
- * @MM_MODEM_BAND_CDMA_BC8_1800: CDMA Band Class 8 (1800MHz).
- * @MM_MODEM_BAND_CDMA_BC9_900: CDMA Band Class 9 (900MHz).
- * @MM_MODEM_BAND_CDMA_BC10_SECONDARY_800: CDMA Band Class 10 (US Secondary 800).
- * @MM_MODEM_BAND_CDMA_BC11_PAMR_400: CDMA Band Class 11 (European PAMR 400MHz).
- * @MM_MODEM_BAND_CDMA_BC12_PAMR_800: CDMA Band Class 12 (PAMR 800MHz).
- * @MM_MODEM_BAND_CDMA_BC13_IMT2000_2500: CDMA Band Class 13 (IMT2000 2500MHz Expansion).
- * @MM_MODEM_BAND_CDMA_BC14_PCS2_1900: CDMA Band Class 14 (More US PCS 1900MHz).
- * @MM_MODEM_BAND_CDMA_BC15_AWS: CDMA Band Class 15 (AWS 1700MHz).
- * @MM_MODEM_BAND_CDMA_BC16_US_2500: CDMA Band Class 16 (US 2500MHz).
- * @MM_MODEM_BAND_CDMA_BC17_US_FLO_2500: CDMA Band Class 17 (US 2500MHz Forward Link Only).
- * @MM_MODEM_BAND_CDMA_BC18_US_PS_700: CDMA Band Class 18 (US 700MHz Public Safety).
- * @MM_MODEM_BAND_CDMA_BC19_US_LOWER_700: CDMA Band Class 19 (US Lower 700MHz).
+ * @MM_MODEM_BAND_CDMA_BC0: CDMA Band Class 0 (US Cellular 850MHz).
+ * @MM_MODEM_BAND_CDMA_BC1: CDMA Band Class 1 (US PCS 1900MHz).
+ * @MM_MODEM_BAND_CDMA_BC2: CDMA Band Class 2 (UK TACS 900MHz).
+ * @MM_MODEM_BAND_CDMA_BC3: CDMA Band Class 3 (Japanese TACS).
+ * @MM_MODEM_BAND_CDMA_BC4: CDMA Band Class 4 (Korean PCS).
+ * @MM_MODEM_BAND_CDMA_BC5: CDMA Band Class 5 (NMT 450MHz).
+ * @MM_MODEM_BAND_CDMA_BC6: CDMA Band Class 6 (IMT2000 2100MHz).
+ * @MM_MODEM_BAND_CDMA_BC7: CDMA Band Class 7 (Cellular 700MHz).
+ * @MM_MODEM_BAND_CDMA_BC8: CDMA Band Class 8 (1800MHz).
+ * @MM_MODEM_BAND_CDMA_BC9: CDMA Band Class 9 (900MHz).
+ * @MM_MODEM_BAND_CDMA_BC10: CDMA Band Class 10 (US Secondary 800).
+ * @MM_MODEM_BAND_CDMA_BC11: CDMA Band Class 11 (European PAMR 400MHz).
+ * @MM_MODEM_BAND_CDMA_BC12: CDMA Band Class 12 (PAMR 800MHz).
+ * @MM_MODEM_BAND_CDMA_BC13: CDMA Band Class 13 (IMT2000 2500MHz Expansion).
+ * @MM_MODEM_BAND_CDMA_BC14: CDMA Band Class 14 (More US PCS 1900MHz).
+ * @MM_MODEM_BAND_CDMA_BC15: CDMA Band Class 15 (AWS 1700MHz).
+ * @MM_MODEM_BAND_CDMA_BC16: CDMA Band Class 16 (US 2500MHz).
+ * @MM_MODEM_BAND_CDMA_BC17: CDMA Band Class 17 (US 2500MHz Forward Link Only).
+ * @MM_MODEM_BAND_CDMA_BC18: CDMA Band Class 18 (US 700MHz Public Safety).
+ * @MM_MODEM_BAND_CDMA_BC19: CDMA Band Class 19 (US Lower 700MHz).
  * @MM_MODEM_BAND_ANY: For certain operations, allow the modem to select a band automatically.
  *
  * Radio bands supported by the device when connecting to a mobile network.
@@ -415,26 +415,26 @@ typedef enum { /*< underscore_name=mm_modem_band >*/
     MM_MODEM_BAND_UTRAN_26 = 110,
     MM_MODEM_BAND_UTRAN_32 = 111,
     /* CDMA Band Classes (see 3GPP2 C.S0057-C) */
-    MM_MODEM_BAND_CDMA_BC0_CELLULAR_800   = 128,
-    MM_MODEM_BAND_CDMA_BC1_PCS_1900       = 129,
-    MM_MODEM_BAND_CDMA_BC2_TACS           = 130,
-    MM_MODEM_BAND_CDMA_BC3_JTACS          = 131,
-    MM_MODEM_BAND_CDMA_BC4_KOREAN_PCS     = 132,
-    MM_MODEM_BAND_CDMA_BC5_NMT450         = 134,
-    MM_MODEM_BAND_CDMA_BC6_IMT2000        = 135,
-    MM_MODEM_BAND_CDMA_BC7_CELLULAR_700   = 136,
-    MM_MODEM_BAND_CDMA_BC8_1800           = 137,
-    MM_MODEM_BAND_CDMA_BC9_900            = 138,
-    MM_MODEM_BAND_CDMA_BC10_SECONDARY_800 = 139,
-    MM_MODEM_BAND_CDMA_BC11_PAMR_400      = 140,
-    MM_MODEM_BAND_CDMA_BC12_PAMR_800      = 141,
-    MM_MODEM_BAND_CDMA_BC13_IMT2000_2500  = 142,
-    MM_MODEM_BAND_CDMA_BC14_PCS2_1900     = 143,
-    MM_MODEM_BAND_CDMA_BC15_AWS           = 144,
-    MM_MODEM_BAND_CDMA_BC16_US_2500       = 145,
-    MM_MODEM_BAND_CDMA_BC17_US_FLO_2500   = 146,
-    MM_MODEM_BAND_CDMA_BC18_US_PS_700     = 147,
-    MM_MODEM_BAND_CDMA_BC19_US_LOWER_700  = 148,
+    MM_MODEM_BAND_CDMA_BC0  = 128,
+    MM_MODEM_BAND_CDMA_BC1  = 129,
+    MM_MODEM_BAND_CDMA_BC2  = 130,
+    MM_MODEM_BAND_CDMA_BC3  = 131,
+    MM_MODEM_BAND_CDMA_BC4  = 132,
+    MM_MODEM_BAND_CDMA_BC5  = 134,
+    MM_MODEM_BAND_CDMA_BC6  = 135,
+    MM_MODEM_BAND_CDMA_BC7  = 136,
+    MM_MODEM_BAND_CDMA_BC8  = 137,
+    MM_MODEM_BAND_CDMA_BC9  = 138,
+    MM_MODEM_BAND_CDMA_BC10 = 139,
+    MM_MODEM_BAND_CDMA_BC11 = 140,
+    MM_MODEM_BAND_CDMA_BC12 = 141,
+    MM_MODEM_BAND_CDMA_BC13 = 142,
+    MM_MODEM_BAND_CDMA_BC14 = 143,
+    MM_MODEM_BAND_CDMA_BC15 = 144,
+    MM_MODEM_BAND_CDMA_BC16 = 145,
+    MM_MODEM_BAND_CDMA_BC17 = 146,
+    MM_MODEM_BAND_CDMA_BC18 = 147,
+    MM_MODEM_BAND_CDMA_BC19 = 148,
     /* All/Any */
     MM_MODEM_BAND_ANY = 256
 } MMModemBand;
-- 
2.14.1



More information about the ModemManager-devel mailing list