ModemManagerQt

modemdevice.h
1/*
2 SPDX-FileCopyrightText: 2013, 2014 Lukas Tinkl <ltinkl@redhat.com>
3 SPDX-FileCopyrightText: 2013-2015 Jan Grulich <jgrulich@redhat.com>
4
5 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
6*/
7
8#ifndef MODEMMANAGERQT_MODEMDEVICE_H
9#define MODEMMANAGERQT_MODEMDEVICE_H
10
11#include <ModemManager/ModemManager.h>
12
13#include <modemmanagerqt_export.h>
14
15#include <QObject>
16#include <QSharedPointer>
17
18#include "bearer.h"
19#include "generictypes.h"
20#include "interface.h"
21#include "modem.h"
22#include "modemmessaging.h"
23#include "sim.h"
24
25namespace ModemManager
26{
27class ModemDevicePrivate;
28
29class MODEMMANAGERQT_EXPORT ModemDevice : public QObject
30{
31 Q_OBJECT
32 Q_DECLARE_PRIVATE(ModemDevice)
33
34 Q_PROPERTY(QString uni READ uni)
35public:
37 typedef QList<Ptr> List;
38
39 enum InterfaceType {
40 ModemInterface,
41 SimpleInterface,
42 GsmInterface,
43 GsmUssdInterface,
44 CdmaInterface,
45 MessagingInterface,
46 LocationInterface,
47 TimeInterface,
48 FirmwareInterface,
49 OmaInterface,
50 SignalInterface,
51 VoiceInterface,
52 };
53
54 explicit ModemDevice(const QString &path, QObject *parent = nullptr);
55 ~ModemDevice() override;
56
57 QString uni() const;
58
59 bool hasInterface(InterfaceType type) const;
60 ModemManager::Interface::List interfaces() const;
61 ModemManager::Interface::Ptr interface(InterfaceType type) const;
62
63 ModemManager::ModemMessaging::Ptr messagingInterface();
64 ModemManager::Modem::Ptr modemInterface();
65
66 ModemManager::Bearer::Ptr findBearer(const QString &uni);
67 ModemManager::Bearer::List bearers() const;
68 ModemManager::Sim::Ptr sim() const;
69
70 bool isGsmModem() const;
71 bool isCdmaModem() const;
72
73Q_SIGNALS:
74 void simAdded(const QString &udi);
75 void simRemoved(const QString &udi);
76
77 void bearerAdded(const QString &udi); // TODO emit these signals in the next version
78 void bearerRemoved(const QString &udi);
79
80 void interfaceAdded(InterfaceType type);
81 void interfaceRemoved(InterfaceType type);
82
83protected:
84 MODEMMANAGERQT_NO_EXPORT explicit ModemDevice(ModemDevicePrivate &dd, QObject *parent = nullptr);
85
86private:
87 ModemDevicePrivate *const d_ptr;
88};
89} // namespace ModemManager
90
91#endif
This namespace allows to query the underlying system to discover the available modem interfaces respo...
Definition bearer.cpp:20
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:59:51 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.