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{
25 Q_OBJECT
26public:
27 typedef QSharedPointer<ModemDevice> Ptr;
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
55Q_SIGNALS:
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
73

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