NetworkManagerQt

modemdevice.h
1 /*
2  SPDX-FileCopyrightText: 2008, 2011 Will Stephenson <[email protected]>
3  SPDX-FileCopyrightText: 2011-2013 Lamarque V. Souza <[email protected]>
4  SPDX-FileCopyrightText: 2013 Jan Grulich <[email protected]>
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 
15 namespace NetworkManager
16 {
17 class 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  */
23 class NETWORKMANAGERQT_EXPORT ModemDevice : public Device
24 {
25  Q_OBJECT
26 public:
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 
55 Q_SIGNALS:
56  /**
57  * This signal is emitted when the capabilities of the device change
58  */
59  void currentCapabilitiesChanged(Capabilities);
60 
61 protected:
62  NETWORKMANAGERQT_NO_EXPORT explicit ModemDevice(ModemDevicePrivate &dd, QObject *parent = nullptr);
63 
64 private:
65  Q_DECLARE_PRIVATE(ModemDevice)
66 };
67 
68 Q_DECLARE_OPERATORS_FOR_FLAGS(ModemDevice::Capabilities)
69 
70 } // namespace NetworkManager
71 
72 #endif
This class represents a common device interface.
Definition: device.h:33
Represents a generic modem device, generally defined by the modemCapabilities() it exposes and at the...
Definition: modemdevice.h:23
Capability
Possible device capabilities.
Definition: device.h:166
This class allows querying the underlying system to discover the available network interfaces and rea...
Definition: accesspoint.h:20
Type
Device type.
Definition: device.h:177
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Oct 3 2023 03:57:05 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.