
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
88 lines
2.6 KiB
C
88 lines
2.6 KiB
C
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
/*
|
|
* libmm -- Access modem status & information from glib applications
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with this library; if not, write to the
|
|
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
* Boston, MA 02110-1301 USA.
|
|
*
|
|
* Copyright (C) 2011 - 2012 Google, Inc.
|
|
*/
|
|
|
|
#ifndef _LIBMM_GLIB_H_
|
|
#define _LIBMM_GLIB_H_
|
|
|
|
#define __LIBMM_GLIB_H_INSIDE__
|
|
|
|
/* ModemManager generic headers */
|
|
#include <ModemManager.h>
|
|
|
|
/* libmm-glib headers */
|
|
|
|
#if !defined (_LIBMM_INSIDE_MM)
|
|
/* This headers are not exported within ModemManager */
|
|
# include <mm-manager.h>
|
|
# include <mm-object.h>
|
|
# include <mm-modem.h>
|
|
# include <mm-modem-3gpp.h>
|
|
# include <mm-modem-3gpp-ussd.h>
|
|
# include <mm-modem-cdma.h>
|
|
# include <mm-modem-simple.h>
|
|
# include <mm-modem-location.h>
|
|
# include <mm-modem-messaging.h>
|
|
# include <mm-modem-voice.h>
|
|
# include <mm-modem-time.h>
|
|
# include <mm-modem-firmware.h>
|
|
# include <mm-modem-signal.h>
|
|
# include <mm-modem-oma.h>
|
|
#endif
|
|
|
|
#if defined (_LIBMM_INSIDE_MM) || \
|
|
defined (_LIBMM_INSIDE_MMCLI) || \
|
|
defined (LIBMM_GLIB_COMPILATION)
|
|
/* This one is not even installed */
|
|
# include <mm-common-helpers.h>
|
|
#endif
|
|
|
|
#include <mm-helper-types.h>
|
|
#include <mm-simple-status.h>
|
|
#include <mm-simple-connect-properties.h>
|
|
#include <mm-sms-properties.h>
|
|
#include <mm-call-properties.h>
|
|
#include <mm-bearer-properties.h>
|
|
#include <mm-bearer-ip-config.h>
|
|
#include <mm-location-common.h>
|
|
#include <mm-location-3gpp.h>
|
|
#include <mm-location-gps-raw.h>
|
|
#include <mm-location-gps-nmea.h>
|
|
#include <mm-location-cdma-bs.h>
|
|
#include <mm-unlock-retries.h>
|
|
#include <mm-network-timezone.h>
|
|
#include <mm-firmware-properties.h>
|
|
#include <mm-cdma-manual-activation-properties.h>
|
|
#include <mm-signal.h>
|
|
#include <mm-kernel-event-properties.h>
|
|
|
|
/* generated */
|
|
#include <mm-errors-types.h>
|
|
#include <mm-enums-types.h>
|
|
#include <mm-gdbus-manager.h>
|
|
#include <mm-gdbus-modem.h>
|
|
#include <mm-gdbus-bearer.h>
|
|
#include <mm-gdbus-sim.h>
|
|
#include <mm-gdbus-sms.h>
|
|
#include <mm-gdbus-call.h>
|
|
|
|
#endif /* _LIBMM_GLIB_H_ */
|