ModemManagerQt

manager.h
1/*
2 SPDX-FileCopyrightText: 2008, 2011 Will Stephenson <wstephenson@kde.org>
3 SPDX-FileCopyrightText: 2010 Lamarque Souza <lamarque@kde.org>
4 SPDX-FileCopyrightText: 2013 Daniel Nicoletti <dantti12@gmail.com>
5 SPDX-FileCopyrightText: 2013 Lukas Tinkl <ltinkl@redhat.com>
6 SPDX-FileCopyrightText: 2013 Jan Grulich <jgrulich@redhat.com>
7
8 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
9*/
10
11#ifndef MODEMMANAGERQT_MANAGER_H
12#define MODEMMANAGERQT_MANAGER_H
13
14#include <modemmanagerqt_export.h>
15
16#include <QObject>
17#include <QSharedPointer>
18
19#include "modemdevice.h"
20
21/**
22 * This namespace allows to query the underlying system to discover the available
23 * modem interfaces
24 * responsibility to notify when a modem interface or a modem appears or disappears.
25 *
26 * Note that it's implemented as a singleton and encapsulates the backend logic.
27 */
28namespace ModemManager
29{
30class Modem;
31
32class MODEMMANAGERQT_EXPORT Notifier : public QObject
33{
34 Q_OBJECT
35Q_SIGNALS:
36 /**
37 * This signal is emitted when a new modem interface is available.
38 *
39 * @param udi the network interface identifier
40 */
41 void modemAdded(const QString &udi);
42 /**
43 * This signal is emitted when a network interface is not available anymore.
44 *
45 * @param udi the network interface identifier
46 */
47 void modemRemoved(const QString &udi);
48
49 /**
50 * This signal is emitted when the ModemManager DBus service goes away
51 */
52 void serviceDisappeared();
53 /**
54 * This signal is emitted when the ModemManager DBus service appears
55 */
56 void serviceAppeared();
57};
58
59/**
60 * Retrieves the list of all modem interfaces Unique Device Identifiers (UDIs)
61 * in the system. This method is the equivalent of enumerateDevices described
62 * in Modem Manager specification.
63 *
64 * Note: only HW modems are returned (Gsm or Cdma)
65 *
66 * @return the list of modem interfaces available in this system
67 */
68MODEMMANAGERQT_EXPORT ModemDevice::List modemDevices();
69
70/**
71 * Find a new ModemManagerInterface object given its UDI.
72 *
73 * Note: only Modem-inherited objects are returned (not SMS, SIM or Bearer objects)
74 *
75 * @param uni the identifier of the modem interface to find
76 * @returns a valid Modem object if there's a device having the given UDI, an invalid one otherwise
77 */
78MODEMMANAGERQT_EXPORT ModemDevice::Ptr findModemDevice(const QString &uni);
79
80/**
81 * Start a new scan for connected modem devices.
82 */
83MODEMMANAGERQT_EXPORT void scanDevices();
84
85MODEMMANAGERQT_EXPORT Notifier *notifier();
86}
87
88#endif
This namespace allows to query the underlying system to discover the available modem interfaces respo...
Definition bearer.cpp:20
MODEMMANAGERQT_EXPORT void scanDevices()
Start a new scan for connected modem devices.
Definition manager.cpp:143
MODEMMANAGERQT_EXPORT ModemDevice::List modemDevices()
Retrieves the list of all modem interfaces Unique Device Identifiers (UDIs) in the system.
Definition manager.cpp:126
MODEMMANAGERQT_EXPORT ModemDevice::Ptr findModemDevice(const QString &uni)
Find a new ModemManagerInterface object given its UDI.
Definition manager.cpp:112
PHONON_EXPORT Notifier * notifier()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:15:10 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.