udev: define all generic tags as symbols

This prevents errors due to nasty typos in the strings.

We define all symbols in a single header file that is NOT considered
part of the API, as there is no need for MM clients to know about
these tags code-wise. These tags are only meaningful when associated
to devices in udev.

Information of each tag is included in the general API documentation.

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/88
This commit is contained in:
Aleksander Morgado
2018-09-13 11:47:10 +02:00
committed by Dan Williams
parent a2705abb24
commit 2a1a0b88fb
10 changed files with 273 additions and 24 deletions

View File

@@ -49,6 +49,7 @@
<year>2015</year>
<year>2016</year>
<year>2017</year>
<year>2018</year>
<holder>The ModemManager Authors</holder>
</copyright>
@@ -84,6 +85,11 @@
<xi:include href="xml/mm-errors.xml"/>
</part>
<part id="ref-udev">
<title>Common udev tag definitions</title>
<xi:include href="xml/mm-tags.xml"/>
</part>
<!-- Part 2, DBus reference -->
<xi:include href="xml/ModemManager-dbus-reference.xml"/>

View File

@@ -140,3 +140,22 @@ MM_MODEM_BAND_CDMA_BC19_US_LOWER_700
<SUBSECTION Private>
MMModemBandDeprecated
</SECTION>
<SECTION>
<FILE>mm-tags</FILE>
<TITLE>Common udev tags</TITLE>
ID_MM_CANDIDATE
ID_MM_PHYSDEV_UID
ID_MM_PORT_IGNORE
ID_MM_DEVICE_PROCESS
ID_MM_DEVICE_IGNORE
ID_MM_DEVICE_MANUAL_SCAN_ONLY
ID_MM_PLATFORM_DRIVER_PROBE
ID_MM_PORT_TYPE_AT_PPP
ID_MM_PORT_TYPE_AT_PRIMARY
ID_MM_PORT_TYPE_AT_SECONDARY
ID_MM_PORT_TYPE_GPS
ID_MM_PORT_TYPE_QCDM
ID_MM_TTY_BAUDRATE
ID_MM_TTY_FLOW_CONTROL
</SECTION>