44 #include <QtDBus/QtDBus> 45 #include <QtDBus/QDBusConnection> 46 #include <QtDBus/QDBusError> 47 #include <QtDBus/QDBusInterface> 48 #include <QtDBus/QDBusMessage> 49 #include <QtDBus/QDBusReply> 50 #include <QtDBus/QDBusPendingCallWatcher> 51 #include <QtDBus/QDBusObjectPath> 52 #include <QtDBus/QDBusPendingCall> 56 #ifndef QT_NO_BEARERMANAGEMENT 87 qDBusRegisterMetaType<ConnmanMap>();
88 qDBusRegisterMetaType<ConnmanMapList>();
89 qRegisterMetaType<ConnmanMapList>(
"ConnmanMapList");
104 qWarning() <<
"PropertyCHanged not connected";
114 qWarning() <<
"StateChanged not connected";
146 var = map.
value(property);
157 return reply.
value();
164 return reply.
value();
400 return reply.
value();
408 var = map.
value(property);
482 return reply.
value();
493 var = map.
value(property);
659 QMapIterator<QString,QVariant>
it(map);
660 while(it.hasNext()) {
662 if(it.key() ==
"Method") {
663 return it.value().toString();
674 QMapIterator<QString,QVariant>
it(map);
675 while(it.hasNext()) {
677 if(it.key() ==
"Interface") {
678 return it.value().toString();
690 QMapIterator<QString,QVariant>
it(map);
691 while(it.hasNext()) {
693 if(it.key() ==
"Address") {
694 return it.value().toString();
706 QMapIterator<QString,QVariant>
it(map);
707 while(it.hasNext()) {
709 if(it.key() ==
"MTU") {
710 return it.value().toUInt();
722 QMapIterator<QString,QVariant>
it(map);
723 while(it.hasNext()) {
725 if(it.key() ==
"Speed") {
726 return it.value().toUInt();
737 QMapIterator<QString,QVariant>
it(map);
738 while(it.hasNext()) {
740 if(it.key() ==
"Duplex") {
741 return it.value().toString();
808 return reply.
value();
816 var = map.
value(property);
938 #endif // QT_NO_BEARERMANAGEMENT The QVariant class acts like a union for the most common Qt data types.
QBool contains(QChar c, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
QConnmanManagerInterface(QObject *parent=0)
#define CONNMAN_MANAGER_PATH
~QConnmanManagerInterface()
void disconnectNotify(const char *signal)
Catch signal disconnections.
const QDBusMessage & message() const
Returns the message that generated this call.
#define QT_END_NAMESPACE
This macro expands to.
QString path() const
Returns the object path that this interface is associated with.
bool enableTechnology(const QString &type)
QDBusObjectPath connectService(QVariantMap &map)
void connectNotify(const char *signal)
Catch signal connections.
QConnmanDBusHelper(QObject *parent=0)
T qdbus_cast(const QDBusArgument &arg)
bool isNull() const
Returns true if this is a NULL variant, false otherwise.
#define it(className, varName)
The QDBusArgument class is used to marshall and demarshall D-Bus arguments.
bool isValid() const
Returns true if this is a valid reference to a remote object.
void disconnectNotify(const char *signal)
Catch signal disconnections.
QStringList getServices()
The QDBusReply class stores the reply for a method call to a remote object.
QDBusPendingCall asyncCall(const QString &method, const QVariant &arg1=QVariant(), const QVariant &arg2=QVariant(), const QVariant &arg3=QVariant(), const QVariant &arg4=QVariant(), const QVariant &arg5=QVariant(), const QVariant &arg6=QVariant(), const QVariant &arg7=QVariant(), const QVariant &arg8=QVariant())
Calls the method method on this interface and passes the parameters to this function to the method...
QDBusConnection connection() const
Returns the connection this interface is assocated with.
QVariantMap getIPv4Configuration()
void connectNotify(const char *signal)
Catch signal connections.
QStringList getTechnologies()
QVariantMap getProperties()
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
static QDBusConnection systemBus()
Returns a QDBusConnection object opened with the system bus.
QConnmanTechnologyInterface(const QString &dbusPathName, QObject *parent=0)
QVariant getProperty(const QString &)
quint8 getSignalStrength()
The QString class provides a Unicode character string.
QMap< QString, QVariant > QVariantMap
void registerAgent(QDBusObjectPath &path)
void disconnectNotify(const char *signal)
Catch signal disconnections.
The QObject class is the base class of all Qt objects.
void propertyChanged(const QString &, const QDBusVariant &value)
QString getDefaultTechnology()
void disconnectNotify(const char *signal)
Catch signal disconnections.
QStringList getServices()
ErrorType type() const
Returns this error's ErrorType.
void unregisterCounter(const QString &path)
QVariant getProperty(const QString &)
void propertyChanged(const QString &, const QDBusVariant &value)
Q_CORE_EXPORT void qDebug(const char *,...)
#define CONNMAN_PROFILE_INTERFACE
void propertyChanged(const QString &, const QDBusVariant &value)
The QDBusAbstractInterface class is the base class for all D-Bus interfaces in the QtDBus binding...
QVariantMap getProperties()
bool disableTechnology(const QString &type)
bool isValid() const
Returns true if no error occurred; otherwise, returns false.
#define QT_BEGIN_NAMESPACE
This macro expands to.
QString path() const
Returns the path of the object that this message is being sent to (in the case of a method call) or b...
QString getActiveProfile()
QVariantMap getEthernet()
quint32 getReceivedByteCount()
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
void propertyChanged(const QString &, const QDBusVariant &)
#define CONNMAN_AGENT_INTERFACE
const T value(const Key &key) const
Returns the value associated with the key key.
The QStringList class provides a list of strings.
void propertyChangedContext(const QString &, const QString &, const QDBusVariant &)
QVariantMap getProperties()
const QDBusError & error()
Returns the error code that was returned from the remote function call.
Q_CORE_EXPORT void qWarning(const char *,...)
QStringList getEnabledTechnologies()
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal...
QDBusObjectPath lookupService(const QString &)
#define CONNMAN_MANAGER_INTERFACE
QString path() const
Returns this object path.
static QVariant fromValue(const T &value)
Returns a QVariant containing a copy of value.
QVariant getProperty(const QString &)
~QConnmanTechnologyInterface()
QDBusObjectPath path() const
void disconnectNotify(const char *signal)
Catch signal disconnections.
bool isPassphraseRequired()
void stateChanged(const QString &)
static QDBusConnection dbusConnection
QConnmanProfileInterface(const QString &dbusPathName, QObject *parent=0)
bool setProperty(const QString &name, const QDBusVariant &value)
void connectNotify(const char *signal)
Catch signal connections.
bool connect(const QString &service, const QString &path, const QString &interface, const QString &name, QObject *receiver, const char *slot)
Connects the signal specified by the service, path, interface and name parameters to the slot slot in...
~QConnmanServiceInterface()
QConnmanAgentInterface(const QString &dbusPathName, QObject *parent=0)
bool requestScan(const QString &type)
~QConnmanAgentInterface()
#define CONNMAN_TECHNOLOGY_INTERFACE
QVariantMap getProperties()
bool removeProfile(QDBusObjectPath path)
The QDBusConnection class represents a connection to the D-Bus bus daemon.
void propertyChangedContext(const QString &, const QString &, const QDBusVariant &)
void unregisterAgent(QDBusObjectPath path)
void endStructure()
Closes a D-Bus structure opened with beginStructure().
QObject * parent() const
Returns a pointer to the parent object.
QVariant getProperty(const QString &)
void reportError(QDBusObjectPath &path, const QString &error)
The QDBusObjectPath class enables the programmer to identify the OBJECT_PATH type provided by the D-B...
quint32 getTransmittedByteCount()
bool contains(const Key &key) const
Returns true if the map contains an item with key key; otherwise returns false.
QStringList getServices()
QString service() const
Returns the name of the service this interface is associated with.
void connectNotify(const char *signal)
Catch signal connections.
QVariant property(const char *name) const
Returns the value of the object's name property.
void registerCounter(const QString &path, quint32 interval)
void beginStructure()
Opens a new D-Bus structure suitable for appending new arguments.
The QDBusMessage class represents one message sent or received over the D-Bus bus.
QStringList getProfiles()
#define Q_FOREACH(variable, container)
Same as foreach(variable, container).
QConnmanServiceInterface(const QString &dbusPathName, QObject *parent=0)
#define CONNMAN_SERVICE_INTERFACE
~QConnmanCounterInterface()
void propertyChanged(const QString &, const QDBusVariant &value)
QConnmanCounterInterface(const QString &dbusPathName, QObject *parent=0)
~QConnmanProfileInterface()
QDBusObjectPath createProfile(const QString &name)
QDBusObjectPath objectPath
void connectNotify(const char *signal)
Catch signal connections.
QStringList getNameservers()
QDataStream & operator<<(QDataStream &out, const QUrl &url)
Writes url url to the stream out and returns a reference to the stream.
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
void propertyChangedContext(const QString &, const QString &, const QDBusVariant &)
Type value() const
Returns the remote function's calls return value.
QStringList getConnectedTechnologies()
The QDBusVariant class enables the programmer to identify the variant type provided by the D-Bus type...
QStringList getAvailableTechnologies()
void propertyChangedContext(const QString &, const QString &, const QDBusVariant &)
QString requestSession(const QString &bearerName)
QDBusMessage call(const QString &method, const QVariant &arg1=QVariant(), const QVariant &arg2=QVariant(), const QVariant &arg3=QVariant(), const QVariant &arg4=QVariant(), const QVariant &arg5=QVariant(), const QVariant &arg6=QVariant(), const QVariant &arg7=QVariant(), const QVariant &arg8=QVariant())
Calls the method method on this interface and passes the parameters to this function to the method...
#define CONNMAN_COUNTER_INTERFACE
QDataStream & operator>>(QDataStream &in, QUrl &url)
Reads a url into url from the stream in and returns a reference to the stream.
QString getPathForTechnology(const QString &tech)
QString message() const
Returns the message that the callee associated with this error.