mmcli.c: In function ‘log_handler’:
mmcli.c:118:5: error: enumeration value ‘G_LOG_FLAG_RECURSION’ not handled in switch [-Werror=switch-enum]
118 | switch (log_level) {
| ^~~~~~
mmcli.c:118:5: error: enumeration value ‘G_LOG_LEVEL_MESSAGE’ not handled in switch [-Werror=switch-enum]
mmcli.c:118:5: error: enumeration value ‘G_LOG_LEVEL_INFO’ not handled in switch [-Werror=switch-enum]
mmcli.c:118:5: error: enumeration value ‘G_LOG_LEVEL_MASK’ not handled in switch [-Werror=switch-enum]
In addition to the standard human-friendly output, we now allow a
machine-friendly key-value pair output, much easier to parse and use
by programs that look at the mmcli output.
This new key-value pair output should be treated as API from now on, so
third-party programs can assume the output is compatible from one
release to another.
g_type_init() has been deprecated (and also marked with the attribute
'deprecated') since glib 2.36 as the type system is automatically
initialized. Since the minimum version of glib required by ModemManager
is 2.36, calling g_type_init() isn't necessarily in the ModemManager
code.
mmcli is GPLv2+; that's what --version has always said and that's what the
README in ModemManager sources specifies:
License.
The ModemManager and mmcli binaries are both GPLv2+.
The libmm-glib library is LGPLv2+.
Both the ModemManager daemon and the mmcli will now include `libmm-glib.h' only.
We also handle two new special `_LIBMM_INSIDE_MM' and `LIBMM_INSIDE_MMCLI'
symbols, which if included before the `libmm-glib.h' library allow us to:
* Don't include the libmm-glib high level API in the ModemManager daemon, as
the object names would clash with those in the core.
* Define some of the methods of helper objects to be included only if compiling
ModemManager daemon or the mmcli.
Actions on modems from specific interfaces, like 3GPP, will also need the modem
to be specified.
The new 'Common' option group will handle all options to specify objects.
Some operations are clearly asynchronous (e.g. monitoring modem state), while
others are clearly synchronous (e.g. printing modem info). So just allow option
groups to force the operation to be async or sync based on the detected action.
The original command line interface was written based on a hand-made libmm. This
commit ports the Manager interface handling to the new gdbus-codegen-based
libmm-glib.