NetworkManagerQt

modemdevice.h
1/*
2 SPDX-FileCopyrightText: 2008, 2011 Will Stephenson <wstephenson@kde.org>
3 SPDX-FileCopyrightText: 2011-2013 Lamarque V. Souza <lamarque@kde.org>
4 SPDX-FileCopyrightText: 2013 Jan Grulich <jgrulich@redhat.com>
5
6 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7*/
8
9#ifndef NETWORKMANAGERQT_MODEMDEVICE_H
10#define NETWORKMANAGERQT_MODEMDEVICE_H
11
12#include "device.h"
13#include <networkmanagerqt/networkmanagerqt_export.h>
14
15namespace NetworkManager
16{
17class ModemDevicePrivate;
18
19/**
20 * Represents a generic modem device, generally defined by the modemCapabilities() it exposes and at
21 * the current point in time by the currentCapabilities().
22 */
23class NETWORKMANAGERQT_EXPORT ModemDevice : public Device
24{
26public:
28 typedef QList<Ptr> List;
29 enum Capability {
30 NoCapability = 0x0,
31 Pots = 0x1,
32 CdmaEvdo = 0x2,
33 GsmUmts = 0x4,
34 Lte = 0x8,
35 };
36 Q_DECLARE_FLAGS(Capabilities, Capability)
37 explicit ModemDevice(const QString &path, QObject *parent = nullptr);
38 ~ModemDevice() override;
39 /**
40 * Return the type
41 */
42 Type type() const override;
43 /**
44 * The generic family of access technologies the modem supports. Not all capabilities are
45 * available at the same time however; some modems require a firmware reload or other
46 * reinitialization to switch between eg CDMA/EVDO and GSM/UMTS.
47 */
48 Capabilities modemCapabilities() const;
49 /**
50 * The generic family of access technologies the modem currently supports without a firmware
51 * reload or reinitialization.
52 */
53 Capabilities currentCapabilities() const;
54
56 /**
57 * This signal is emitted when the capabilities of the device change
58 */
59 void currentCapabilitiesChanged(Capabilities);
60
61protected:
62 NETWORKMANAGERQT_NO_EXPORT explicit ModemDevice(ModemDevicePrivate &dd, QObject *parent = nullptr);
63
64private:
65 Q_DECLARE_PRIVATE(ModemDevice)
66};
67
68Q_DECLARE_OPERATORS_FOR_FLAGS(ModemDevice::Capabilities)
69
70} // namespace NetworkManager
71
72#endif
Type
Device type.
Definition device.h:191
Device(const QString &path, QObject *parent=nullptr)
Creates a new device object.
Definition device.cpp:226
Capabilities currentCapabilities() const
The generic family of access technologies the modem currently supports without a firmware reload or r...
Capabilities modemCapabilities() const
The generic family of access technologies the modem supports.
Type type() const override
Return the type.
void currentCapabilitiesChanged(Capabilities)
This signal is emitted when the capabilities of the device change.
This class allows querying the underlying system to discover the available network interfaces and rea...
Definition accesspoint.h:21
QObject(QObject *parent)
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:57:19 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.