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 * \class NetworkManager::ModemDevice
21 * \inheaderfile NetworkManagerQt/ModemDevice
22 * \inmodule NetworkManagerQt
23 *
24 * \brief Represents a generic modem device, generally defined by the modemCapabilities() it exposes and at
25 * the current point in time by the currentCapabilities().
26 */
27class NETWORKMANAGERQT_EXPORT ModemDevice : public Device
28{
29 Q_OBJECT
30public:
31 /*!
32 * \typedef NetworkManager::ModemDevice::Ptr
33 */
34 typedef QSharedPointer<ModemDevice> Ptr;
35 /*!
36 * \typedef NetworkManager::ModemDevice::List
37 */
38 typedef QList<Ptr> List;
39
40 /*!
41 *
42 * \value NoCapability
43 * \value Pots
44 * \value CdmaEvdo
45 * \value GsmUmts
46 * \value Lte
47 */
48 enum Capability {
49 NoCapability = 0x0,
50 Pots = 0x1,
51 CdmaEvdo = 0x2,
52 GsmUmts = 0x4,
53 Lte = 0x8,
54 };
55 Q_DECLARE_FLAGS(Capabilities, Capability)
56 /*!
57 */
58 explicit ModemDevice(const QString &path, QObject *parent = nullptr);
59 ~ModemDevice() override;
60 /*!
61 * Return the type
62 */
63 Type type() const override;
64 /*!
65 * The generic family of access technologies the modem supports. Not all capabilities are
66 * available at the same time however; some modems require a firmware reload or other
67 * reinitialization to switch between eg CDMA/EVDO and GSM/UMTS.
68 */
69 Capabilities modemCapabilities() const;
70 /*!
71 * The generic family of access technologies the modem currently supports without a firmware
72 * reload or reinitialization.
73 */
74 Capabilities currentCapabilities() const;
75
76Q_SIGNALS:
77 /*!
78 * This signal is emitted when the capabilities of the device change
79 */
80 void currentCapabilitiesChanged(Capabilities);
81
82protected:
83 /*!
84 */
85 NETWORKMANAGERQT_NO_EXPORT explicit ModemDevice(ModemDevicePrivate &dd, QObject *parent = nullptr);
86
87private:
88 Q_DECLARE_PRIVATE(ModemDevice)
89};
90
91Q_DECLARE_OPERATORS_FOR_FLAGS(ModemDevice::Capabilities)
92
93} // namespace NetworkManager
94
95#endif
96

source code of networkmanager-qt/src/modemdevice.h