1
/* This file is part of the KDE project
2
Copyright 2010 Lamarque Souza <lamarque@gmail.com>
4
This program is free software; you can redistribute it and/or
5
modify it under the terms of the GNU General Public License as
6
published by the Free Software Foundation; either version 2 of
7
the License or (at your option) version 3 or any later version
8
accepted by the membership of KDE e.V. (or its successor approved
9
by the membership of KDE e.V.), which shall act as a proxy
10
defined in Section 14 of version 3 of the license.
12
This program is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
GNU General Public License for more details.
17
You should have received a copy of the GNU General Public License
18
along with this program. If not, see <http://www.gnu.org/licenses/>.
21
#ifndef MODEMMANAGER_TYPES_H
22
#define MODEMMANAGER_TYPES_H
25
#include <QDBusArgument>
26
#include <QtDBus/QtDBus>
28
#include <solid/control/modemmanager.h>
29
#include <solid/control/modemmanagerinterface.h>
30
#include <solid/control/modemlocationinterface.h>
31
#include <solid/control/modemcdmainterface.h>
32
#include <solid/control/modemgsmcontactsinterface.h>
33
#include <solid/control/modemgsmnetworkinterface.h>
34
#include <solid/control/networkipv4config.h>
36
typedef Solid::Control::ModemLocationInterface::LocationInformationMap LocationInformationMap;
37
typedef Solid::Control::ModemCdmaInterface::ServingSystemType ServingSystemType;
38
typedef Solid::Control::ModemCdmaInterface::RegistrationStateResult RegistrationStateResult;
39
typedef Solid::Control::ModemInterface::Ip4ConfigType Ip4ConfigType;
40
typedef Solid::Control::ModemInterface::InfoType InfoType;
41
typedef Solid::Control::ModemGsmContactsInterface::ContactType ContactType;
42
typedef Solid::Control::ModemGsmContactsInterface::ContactTypeList ContactTypeList;
43
typedef Solid::Control::ModemGsmNetworkInterface::ScanResultsType ScanResultsType;
44
typedef Solid::Control::ModemGsmNetworkInterface::RegistrationInfoType RegistrationInfoType;
45
typedef QList<QVariantMap> QVariantMapList;
47
Q_DECLARE_METATYPE(Solid::Control::ModemInterface::Ip4ConfigType)
48
Q_DECLARE_METATYPE(Solid::Control::ModemInterface::InfoType)
49
Q_DECLARE_METATYPE(Solid::Control::ModemLocationInterface::LocationInformationMap)
50
Q_DECLARE_METATYPE(Solid::Control::ModemCdmaInterface::ServingSystemType)
51
Q_DECLARE_METATYPE(Solid::Control::ModemCdmaInterface::RegistrationStateResult)
52
Q_DECLARE_METATYPE(Solid::Control::ModemGsmContactsInterface::ContactType)
53
Q_DECLARE_METATYPE(Solid::Control::ModemGsmContactsInterface::ContactTypeList)
54
Q_DECLARE_METATYPE(Solid::Control::ModemGsmNetworkInterface::ScanResultsType)
55
Q_DECLARE_METATYPE(Solid::Control::ModemGsmNetworkInterface::RegistrationInfoType)
56
Q_DECLARE_METATYPE(QList<QVariantMap>)
58
// Solid::Control::ModemManager::Modem::Ip4Configtype
59
QDBusArgument &operator << (QDBusArgument &arg,
60
const Solid::Control::ModemInterface::Ip4ConfigType &config);
62
const QDBusArgument &operator >> (const QDBusArgument &arg,
63
Solid::Control::ModemInterface::Ip4ConfigType &config);
65
// Solid::Control::ModemManager::Modem::InfoType
66
QDBusArgument &operator << (QDBusArgument &arg,
67
const Solid::Control::ModemInterface::InfoType &info);
69
const QDBusArgument &operator >> (const QDBusArgument &arg,
70
Solid::Control::ModemInterface::InfoType &info);
72
// Solid::Control::ModemCdmaInterface::ServingSystemType
73
QDBusArgument &operator << (QDBusArgument &arg,
74
const Solid::Control::ModemCdmaInterface::ServingSystemType &servingSystem);
76
const QDBusArgument &operator >> (const QDBusArgument &arg,
77
Solid::Control::ModemCdmaInterface::ServingSystemType &servingSystem);
79
// Solid::Control::ModemGsmContactsInterface::ContactType
80
QDBusArgument &operator << (QDBusArgument &arg,
81
const Solid::Control::ModemGsmContactsInterface::ContactType &contact);
83
const QDBusArgument &operator >> (const QDBusArgument &arg,
84
Solid::Control::ModemGsmContactsInterface::ContactType &contact);
86
// Solid::Control::ModemManager::Modem::Gsm::Network::RegistrationInfoType
87
QDBusArgument &operator << (QDBusArgument &arg,
88
const Solid::Control::ModemGsmNetworkInterface::RegistrationInfoType &info);
90
const QDBusArgument &operator >> (const QDBusArgument &arg,
91
Solid::Control::ModemGsmNetworkInterface::RegistrationInfoType &info);
93
inline void registerModemManagerTypes() {
94
qDBusRegisterMetaType<Solid::Control::ModemInterface::Ip4ConfigType>();
95
qDBusRegisterMetaType<Solid::Control::ModemInterface::InfoType>();
96
qDBusRegisterMetaType<Solid::Control::ModemCdmaInterface::ServingSystemType>();
97
qDBusRegisterMetaType<Solid::Control::ModemGsmContactsInterface::ContactType>();
98
qDBusRegisterMetaType<Solid::Control::ModemGsmNetworkInterface::RegistrationInfoType>();
101
#endif // MODEMMANAGER_TYPES_H