/usr/include/solid/control/modeminterface.h is in kde-workspace-dev 4:4.8.4-6.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 | /* This file is part of the KDE project
Copyright (C) 2010 Lamarque Souza <lamarque@gmail.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License version 2 as published by the Free Software Foundation.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef SOLID_CONTROL_MODEMINTERFACE_H
#define SOLID_CONTROL_MODEMINTERFACE_H
#include <QtCore/QObject>
#include <QtCore/QVariant>
#include <QtDBus/QtDBus>
#include <solid/networking.h>
#include "solid_control_export.h"
#include "networkipv4config.h"
namespace Solid
{
namespace Control
{
class ModemInterfacePrivate;
class SOLIDCONTROL_EXPORT ModemInterface: public QObject
{
Q_OBJECT
Q_ENUMS(Type Method AllowedMode AccessTechnology Mode Band)
Q_DECLARE_PRIVATE(ModemInterface)
public:
enum Type {
UnknownType = 0, /* MM specification does not include this type though. */
GsmType = 1,
CdmaType = 2
};
enum Method {
Ppp = 0, /* Use PPP to get the address. */
Static = 1, /* Static configuration, the modem will provide IP information. */
Dhcp = 2, /*Use DHCP */
UnknownMethod = 0xff
};
/* Describes the device's current access mode preference;
* ie the specific technology preferences the device is allowed to use
* when connecting to a mobile network. */
enum AllowedMode {
AnyModeAllowed = 0x0, /* Any mode can be used */
Prefer2g, /* Prefer 2G (GPRS or EDGE) */
Prefer3g, /* Prefer 3G (UMTS or HSxPA) */
UseOnly2g, /* Use only 2G (GPRS or EDGE) */
UseOnly3g /* Use only 3G (UMTS or HSxPA) */
};
/* Describes various access technologies that a device uses when connected to a mobile network. */
enum AccessTechnology {
UnknownTechnology = 0x0, /* The access technology used is unknown */
Gsm, /* GSM */
GsmCompact, /* Compact GSM */
Gprs, /* GPRS */
Edge, /* EDGE (ETSI 27.007: "GSM w/EGPRS") */
Umts, /* UMTS (ETSI 27.007: "UTRAN") */
Hsdpa, /* HSDPA (ETSI 27.007: "UTRAN w/HSDPA") */
Hsupa, /* HSUPA (ETSI 27.007: "UTRAN w/HSUPA") */
Hspa /* HSPA (ETSI 27.007: "UTRAN w/HSDPA and HSUPA") */
};
/* A bitfield describing the specifc access modes and technologies supported by a device
* and the access technology in-use when connected to a mobile network. */
enum Mode {
UnknownMode = 0x0, /* Unknown or invalid mode. */
AnyMode = 0x1, /* For certain operations, allow the modem to pick any available mode. */
GprsMode = 0x2, /* GPRS */
EdgeMode = 0x4, /* EDGE */
UmtsMode = 0x8, /* UMTS (3G) */
HsdpaMode = 0x10, /* HSDPA (3G) */
Prefer2gMode = 0x20, /* Prefer 2G (GPRS or EDGE) */
Prefer3gMode = 0x40, /* Prefer 3G (UMTS/HSDPA/HSUPA/HSPA) */
UseOnly2gMode = 0x80, /* Use only 2G (GPRS or EDGE) */
UseOnly3gMode = 0x100, /* Use only 3G (UMTS/HSDPA/HSUPA/HSPA) */
HsupaMode = 0x200, /* HSUPA (3G) */
HspaMode = 0x400, /* HSPA (3G) */
GsmMode = 0x800, /* GSM */
GsmCompactMode = 0x1000 /* GSM Compact */
};
/* A bitfield describing the specific radio bands supported by the device
* and the radio bands the device is allowed to use when connecting to a mobile network. */
enum Band {
UnknownBand = 0x0, /* Unknown or invalid band */
AnyBand = 0x1, /* For certain operations allow the modem to select a band automatically. */
Egsm = 0x2, /* GSM/GPRS/EDGE 900 MHz */
Dcs = 0x4, /* GSM/GPRS/EDGE 1800 MHz */
Pcs = 0x8, /* GSM/GPRS/EDGE 1900 MHz */
G850 = 0x10, /* GSM/GPRS/EDGE 850 MHz */
U2100 = 0x20, /* WCDMA 2100 MHz (Class I) */
U1800 = 0x40, /* WCDMA 3GPP 1800 MHz (Class III) */
U17IV = 0x80, /* WCDMA 3GPP AWS 1700/2100 MHz (Class IV) */
U800 = 0x100, /* WCDMA 3GPP UMTS 800 MHz (Class VI) */
U850 = 0x200, /* WCDMA 3GPP UMTS 850 MHz (Class V) */
U900 = 0x400, /* WCDMA 3GPP UMTS 900 MHz (Class VIII) */
U17IX = 0x800, /* WCDMA 3GPP UMTS 1700 MHz (Class IX) */
U19IX = 0x1000 /* WCDMA 3GPP UMTS 1900 MHz (Class II) */
};
enum GsmInterfaceType {
NotGsm,
GsmCard,
GsmContacts,
GsmNetwork,
GsmSms,
GsmHso,
GsmUssd
};
class Ip4ConfigType
{
public:
QString ip4Address,
dns1,
dns2,
dns3;
};
class InfoType
{
public:
QString manufacturer,
model,
version;
};
/**
* Creates a new ModemInterface object.
*
* @param backendObject the modem object provided by the backend
*/
explicit ModemInterface(QObject *backendObject);
/**
* Constructs a copy of a modem.
*
* @param modem the modem to copy
*/
ModemInterface(const ModemInterface &modem);
/**
* Destroys a ModemInterface object.
*/
virtual ~ModemInterface();
QString udi() const;
void enable(const bool enable) const;
void connectModem(const QString & number) const;
void connectModem(const QVariantMap & properties) const;
void disconnectModem() const;
Ip4ConfigType getIp4Config() const;
InfoType getInfo() const;
QVariantMap getStatus() const;
/*
* Properties
*/
QString device() const;
QString masterDevice() const;
QString driver() const;
Type type() const;
bool enabled() const;
QString unlockRequired() const;
Method ipMethod() const;
static QString convertTypeToString(const Type type);
/**
* Return a description of the band id.
*
* @param band the band id
*/
static QString convertBandToString(const Band band);
static QString convertAllowedModeToString(const AllowedMode mode);
/**
* Return a description of the access technology used.
*
* @param tech the access technology.
*/
static QString convertAccessTechnologyToString(const AccessTechnology tech);
public Q_SLOTS:
void slotDeviceChanged(const QString & device);
void slotMasterDeviceChanged(const QString & masterDevice);
void slotDriverChanged(const QString & driver);
void slotUnlockRequiredChanged(const QString & codeRequired);
Q_SIGNALS:
void deviceChanged(const QString & device);
void masterDeviceChanged(const QString & masterDevice);
void driverChanged(const QString & driver);
void typeChanged(const Solid::Control::ModemInterface::Type type);
void enabledChanged(const bool enabled);
void unlockRequiredChanged(const QString & codeRequired);
void ipMethodChanged(const Solid::Control::ModemInterface::Method ipMethod);
protected:
/**
* @internal
*/
ModemInterface(ModemInterfacePrivate &dd, QObject *backendObject);
/**
* @internal
*/
ModemInterface(ModemInterfacePrivate &dd, const ModemInterface &modem);
ModemInterfacePrivate *d_ptr;
};
} // Control
} // Solid
#endif
|