Commit Graph

11 Commits

Author SHA1 Message Date
Aleksander Morgado
1c4da332ee build: new option to build plugins within the daemon binary
Instead of creating libmm-plugin* and libmm-shared* libraries that are
dlopen()-ed on runtime, allow incorporating all plugins into the
daemon binary itself.

This makes the startup of the daemon much faster and also avoids
issues with builds that require linker namespace isolation.

Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/674
2023-01-03 13:56:25 +00:00
Aleksander Morgado
e14b904cbd build: move plugins directory to src/plugins
We are going to allow including the plugin sources built within the
ModemManager daemon binary; moving the sources within the daemon
sources directory makes it easier.
2023-01-03 13:56:25 +00:00
Aleksander Morgado
f419f56628 build: drop autotools 2022-11-07 14:26:02 +00:00
Aleksander Morgado
a7e579cd7b meson,data: generate test service file
The test service file is used in the test-plugin-generic unit tests,
which require the ModemManager daemon to be launched in a private test
DBus session.
2022-02-16 00:11:35 +01:00
Aleksander Morgado
c4a584416a core: allow disabling auto-scan and notifying ports one by one via API
This commit enables a new core ModemManager daemon option, so that automatic
detection of available modems is totally disabled: '--no-auto-scan'. Note that
this option also replaces the previously used '--test-no-auto-scan' option,
which was only used during tests.

Along with the new ModemManager option, a new ReportKernelEvent() method in
the API is defined, which allows notifying the daemon of which interfaces it
should be accessing, as well as the main details of each interface. The only
mandatory parameters in the new method are 'action' (add/remove), 'name' (the
name of the interface) and 'subsystem' (the subsystem of the interface).

The mmcli tool has support for using the new api method via several new options:

 * The '--report-kernel-event' option allows specifying device ports one by
   one, and is a direct mapping of the ReportKernelEvent() method:
     $ sudo mmcli --report-kernel-event="action=add,name=wwan0,subsystem=net"
     $ sudo mmcli --report-kernel-event="action=add,name=cdc-wdm0,subsystem=usbmisc"

 * The '--report-kernel-event-auto-scan' option uses udev monitoring to notify
   events automatically to the daemon. This allows to operate in a way
   equivalent to the default daemon operation (with implicit auto-scan).

Worth noting that the ReportKernelEvent() method is only usable when
'--no-auto-scan' is explicitly used in the daemon. An error will be reported if
the method is tried while standard udev monitoring is enabled (implicit if
auto scan isn't explicitly disabled in the daemon).

If mmcli is going to be used only to report 'real time' events, an optional
'--initial-kernel-events=[PATH]' may be given in the ModemManager call to
automatically process a set of port kernel events one by one on boot. The file
may e.g. contain:
  action=add,name=wwan0,subsystem=net
  action=add,name=cdc-wdm0,subsystem=usbmisc
2016-09-29 15:43:05 +02:00
Aleksander Morgado
247a945950 context: new '--test-plugin-dir' to allow specifying where the plugins are 2014-02-13 13:41:50 +01:00
Aleksander Morgado
ea362ce18e service,tests: run in MM in debug mode in service tests 2014-02-13 13:41:47 +01:00
Aleksander Morgado
65f87561c5 context: new '--test-enable' to enable the Test interface 2014-02-13 13:41:25 +01:00
Aleksander Morgado
243720414e context: new '--test-no-auto-scan' to avoid automatic scanning for devices 2014-02-13 13:41:23 +01:00
Aleksander Morgado
bf57da537d context: new '--test-session' allows launching the MM daemon in the session bus 2014-02-13 13:41:20 +01:00
Aleksander Morgado
46ff06ff80 service,tests: new DBus service file for tests 2014-02-13 13:41:17 +01:00