New 'aleksander/disable-ifaces' branch ready for review

Aleksander Morgado aleksander at aleksander.es
Mon Oct 24 08:21:23 UTC 2016


Hey everyone,

I've pushed to git a new 'aleksander/disable-ifaces' branch, which
allows disabling the different modem feature interfaces one by one:

https://cgit.freedesktop.org/ModemManager/ModemManager/log/?h=aleksander/disable-ifaces

E.g. a custom build of ModemManager may be done with the following
configure options to disable everything except for the basic
connectivity and status support:

$ ./configure \
    --disable-gtk-doc \
    --without-interface-3gpp-ussd \
    --without-interface-location \
    --without-interface-messaging \
    --without-interface-time \
    --without-interface-voice \
    --without-interface-signal \
    --without-interface-oma \
    --without-interface-firmware

The only modem object interfaces that may not be disabled are the
Modem, Simple, 3GPP and CDMA interfaces.

Disabling interfaces requires gtk-doc to be disabled; I didn't want to
get into making the documentation depend on the configure options, as
that would be quite a mess.

The ModemManager API will expose in its headers symbols like
MM_INTERFACE_LOCATION_SUPPORTED that will be defined to either 0 or 1,
depending on whether the given interface is disabled or enabled. E.g.
an application wanting to use the Location API can use this symbol to
check whether the corresponding libmm-glib support is available or
not:

#if MM_INTERFACE_LOCATION_SUPPORTED
{
    MMModemLocation *location;

    location = mm_object_peek_modem_location (modem_obj);
    ....
}
#endif

This new feature is targeted for custom builds of ModemManager, e.g.
if only the connectivity support is needed, so that things like
messaging and any other extra stuff are totally skipped.

Comments welcome :)

Cheers!

-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list