Qt 4.8
qconnmanservice_linux.cpp
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
5 **
6 ** This file is part of the plugins of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia. For licensing terms and
14 ** conditions see http://qt.digia.com/licensing. For further information
15 ** use the contact form at http://qt.digia.com/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** In addition, as a special exception, Digia gives you certain additional
26 ** rights. These rights are described in the Digia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** GNU General Public License Usage
30 ** Alternatively, this file may be used under the terms of the GNU
31 ** General Public License version 3.0 as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL included in the
33 ** packaging of this file. Please review the following information to
34 ** ensure the GNU General Public License version 3.0 requirements will be
35 ** met: http://www.gnu.org/copyleft/gpl.html.
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41 
42 #include <QObject>
43 #include <QList>
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>
53 
55 
56 #ifndef QT_NO_BEARERMANAGEMENT
57 #ifndef QT_NO_DBUS
58 
60 
61 
63 {
64  argument.beginStructure();
65  argument << map.objectPath << map.propertyMap;
66  argument.endStructure();
67  return argument;
68 }
69 
71 {
72  argument.beginStructure();
73  argument >> map.objectPath >> map.propertyMap;
74  argument.endStructure();
75  return argument;
76 }
77 
79 
80 
85  QDBusConnection::systemBus(), parent)
86 {
87  qDBusRegisterMetaType<ConnmanMap>();
88  qDBusRegisterMetaType<ConnmanMapList>();
89  qRegisterMetaType<ConnmanMapList>("ConnmanMapList");
90 }
91 
93 {
94 }
95 
97 {
102  QLatin1String("PropertyChanged"),
103  this,SIGNAL(propertyChanged(const QString &, const QDBusVariant & )))) {
104  qWarning() << "PropertyCHanged not connected";
105  }
106  }
107 
108  if (QLatin1String(signal) == SIGNAL(stateChanged(QString))) {
112  QLatin1String("StateChanged"),
113  this,SIGNAL(stateChanged(const QString&)))) {
114  qWarning() << "StateChanged not connected";
115 
116  }
117  }
119  QConnmanDBusHelper *helper;
120  helper = new QConnmanDBusHelper(this);
121 
122  dbusConnection.connect(QLatin1String(CONNMAN_SERVICE),
125  QLatin1String("PropertyChanged"),
127 
128 
131  }
132 }
133 
135 {
137 
138  }
139 }
140 
142 {
143  QVariant var;
145  if (map.contains(property)) {
146  var = map.value(property);
147  } else {
148  qDebug() << "does not contain" << property;
149  }
150  return var;
151 }
152 
154 {
155  if(this->isValid()) {
156  QDBusReply<QVariantMap > reply = this->call(QLatin1String("GetProperties"));
157  return reply.value();
158  } else return QVariantMap();
159 }
160 
162 {
163  QDBusReply<QString > reply = this->call("GetState");
164  return reply.value();
165 }
166 
168 {
169  Q_UNUSED(name);
170  Q_UNUSED(value);
171  return false;
172 }
173 
175 {
176  return QDBusObjectPath();
177 }
178 
180 {
181  return false;
182 }
183 
185 {
186  QDBusReply<QString> reply = this->call(QLatin1String("RequestScan"), QVariant::fromValue(type));
187 
188  bool ok = true;
189  if(reply.error().type() == QDBusError::InvalidArgs) {
190  qWarning() << reply.error().message();
191  ok = false;
192  }
193  return ok;
194 }
195 
197 {
198  QDBusReply<QList<QDBusObjectPath> > reply = this->call(QLatin1String("EnableTechnology"), QVariant::fromValue(type));
199  bool ok = true;
200  if(reply.error().type() == QDBusError::InvalidArgs) {
201  qWarning() << reply.error().message();
202  ok = false;
203  }
204  return ok;
205 }
206 
208 {
209  QDBusReply<QList<QDBusObjectPath> > reply = this->call(QLatin1String("DisableTechnology"), QVariant::fromValue(type));
210  bool ok = true;
211  if(reply.error().type() == QDBusError::InvalidArgs) {
212  qWarning() << reply.error().message();
213  ok = false;
214  }
215  return ok;
216 }
217 
219 {
220  QDBusReply<QDBusObjectPath > reply = this->call(QLatin1String("ConnectService"), QVariant::fromValue(map));
221  if(!reply.isValid()) {
222  qDebug() << reply.error().message();
223 
224  }
225  return reply;
226 }
227 
229 {
230 }
231 
233 {
234 }
235 
237 { QDBusReply<QList<QDBusObjectPath> > reply = this->call(QLatin1String("RegisterCounter"),
238  QVariant::fromValue(path),
239  QVariant::fromValue(interval));
240  if(reply.error().type() == QDBusError::InvalidArgs) {
241  qWarning() << reply.error().message();
242  }
243 }
244 
246 { QDBusReply<QList<QDBusObjectPath> > reply = this->call(QLatin1String("UnregisterCounter"),
247  QVariant::fromValue(path));
248  if(reply.error().type() == QDBusError::InvalidArgs) {
249  qWarning() << reply.error().message();
250  }
251 }
252 
254 {
255  QDBusReply<QList<QDBusObjectPath> > reply = this->call(QLatin1String("RequestSession"),
256  QVariant::fromValue(bearerName));
257  return QString();
258 }
259 
261 {
262  QDBusReply<QList<QDBusObjectPath> > reply = this->call(QLatin1String("ReleaseSession"));
263 }
264 
265 
267 {
268  QDBusReply<QDBusObjectPath > reply = this->call(QLatin1String("LookupService"), QVariant::fromValue(service));
269  if(!reply.isValid()) {
270  qDebug() << reply.error().message();
271  }
272  return reply;
273 }
274 
275 // properties
276 
278 {
279  QVariant var = getProperty("AvailableTechnologies");
280  return qdbus_cast<QStringList>(var);
281 }
282 
284 {
285  QVariant var = getProperty("EnabledTechnologies");
286  return qdbus_cast<QStringList>(var);
287 }
288 
290 {
291  QVariant var = getProperty("ConnectedTechnologies");
292  return qdbus_cast<QStringList>(var);
293 }
294 
296 {
297  QVariant var = getProperty("DefaultTechnology");
298  return qdbus_cast<QString>(var);
299 }
300 
302 {
303  QVariant var = getProperty("OfflineMode");
304  return qdbus_cast<bool>(var);
305 }
306 
308 {
309  QVariant var = getProperty("ActiveProfile");
310  return qdbus_cast<QString>(var);
311 }
312 
314 {
315  QVariant var = getProperty("Profiles");
316  return qdbus_cast<QStringList>(var);
317 }
318 
320 {
321  QStringList list;
322  QDBusReply<ConnmanMapList> replyList = this->call(QLatin1String("GetTechnologies"));
323  if (replyList.isValid()) {
324  Q_FOREACH (ConnmanMap map, replyList.value()) {
325  list << map.objectPath.path();
326  }
327  } else {
328  // try for older version
329  QVariant var = getProperty("Technologies");
330  if (!var.isNull()) {
331  list = qdbus_cast<QStringList>(var);
332  }
333  }
334  return list;
335 }
336 
338 {
339  QStringList list;
340  QDBusReply<ConnmanMapList> replyList = this->call(QLatin1String("GetServices"));
341  if (replyList.isValid()) {
342  Q_FOREACH (ConnmanMap map, replyList.value()) {
343  list << map.objectPath.path();
344  }
345  } else {
346  // try for older version
347  QVariant var = getProperty("Services");
348  if (!var.isNull()) {
349  list = qdbus_cast<QStringList>(var);
350  }
351  }
352  return list;
353 }
354 
356 {
357  foreach(const QString path, getTechnologies()) {
358  if(path.contains(name)) {
359  return path;
360  }
361  }
362  return "";
363 }
364 
365 
369  dbusPathName,
371  QDBusConnection::systemBus(), parent)
372 {
373 }
374 
376 {
377 }
378 
380 {
382  dbusConnection.connect(QLatin1String(CONNMAN_SERVICE),
383  this->path(),
385  QLatin1String("PropertyChanged"),
387  }
388 }
389 
391 {
393 
394  }
395 }
396 
398 {
399  QDBusReply<QVariantMap > reply = this->call(QLatin1String("GetProperties"));
400  return reply.value();
401 }
402 
404 {
405  QVariant var;
407  if (map.contains(property)) {
408  var = map.value(property);
409  }
410  return var;
411 }
412 
413 // properties
415 {
416 
417  QVariant var = getProperty("Name");
418  return qdbus_cast<QString>(var);
419 }
420 
422 {
423  QVariant var = getProperty("OfflineMode");
424  return qdbus_cast<bool>(var);
425 }
426 
428 {
429  QVariant var = getProperty("Services");
430  return qdbus_cast<QStringList>(var);
431 }
432 
433 
437  dbusPathName,
439  QDBusConnection::systemBus(), parent)
440 {
441 }
442 
444 {
445 }
446 
448 {
450  dbusConnection.connect(QLatin1String(CONNMAN_SERVICE),
451  this->path(),
453  QLatin1String("PropertyChanged"),
455  }
457  QConnmanDBusHelper *helper;
458  helper = new QConnmanDBusHelper(this);
459 
460  dbusConnection.connect(QLatin1String(CONNMAN_SERVICE),
461  this->path(),
463  QLatin1String("PropertyChanged"),
465 
468  }
469 }
470 
472 {
474 
475  }
476 }
477 
479 {
480  if(this->isValid()) {
481  QDBusReply<QVariantMap> reply = this->call(QLatin1String("GetProperties"));
482  return reply.value();
483  }
484  else
485  return QVariantMap();
486 }
487 
489 {
490  QVariant var;
492  if (map.contains(property)) {
493  var = map.value(property);
494  }
495  return var;
496 }
497 
499 {
500  this->asyncCall(QLatin1String("Connect"));
501 }
502 
504 {
505  QDBusReply<QVariantMap> reply = this->call(QLatin1String("Disconnect"));
506 }
507 
509 {
510  QDBusReply<QVariantMap> reply = this->call(QLatin1String("Remove"));
511 }
512 
513 // void moveBefore(QDBusObjectPath &service);
514 // void moveAfter(QDBusObjectPath &service);
515 
516 // properties
518 {
519  QVariant var = getProperty("State");
520  return qdbus_cast<QString>(var);
521 }
522 
524 {
525  QVariant var = getProperty("Error");
526  return qdbus_cast<QString>(var);
527 }
528 
530 {
531  QVariant var = getProperty("Name");
532  return qdbus_cast<QString>(var);
533 }
534 
536 {
537  QVariant var = getProperty("Type");
538  return qdbus_cast<QString>(var);
539 }
540 
542 {
543  QVariant var = getProperty("Mode");
544  return qdbus_cast<QString>(var);
545 }
546 
548 {
549  QVariant var = getProperty("Security");
550  return qdbus_cast<QString>(var);
551 }
552 
554 {
555  QVariant var = getProperty("Passphrase");
556  return qdbus_cast<QString>(var);
557 }
558 
560 {
561  QVariant var = getProperty("PassphraseRequired");
562  return qdbus_cast<bool>(var);
563 }
564 
566 {
567  QVariant var = getProperty("Strength");
568  return qdbus_cast<quint8>(var);
569 }
570 
572 {
573  QVariant var = getProperty("Favorite");
574  return qdbus_cast<bool>(var);
575 }
576 
578 {
579  QVariant var = getProperty("Immutable");
580  return qdbus_cast<bool>(var);
581 }
582 
584 {
585  QVariant var = getProperty("AutoConnect");
586  return qdbus_cast<bool>(var);
587 }
588 
590 {
591  QVariant var = getProperty("SetupRequired");
592  return qdbus_cast<bool>(var);
593 }
594 
596 {
597  QVariant var = getProperty("APN");
598  return qdbus_cast<QString>(var);
599 }
600 
602 {
603  QVariant var = getProperty("MCC");
604  return qdbus_cast<QString>(var);
605 }
606 
608 {
609  QVariant var = getProperty("MNC");
610  return qdbus_cast<QString>(var);
611 }
612 
614 {
615  QVariant var = getProperty("Roaming");
616  return qdbus_cast<bool>(var);
617 }
618 
620 {
621  QVariant var = getProperty("NameServers");
622  return qdbus_cast<QStringList>(var);
623 }
624 
626 {
627  QVariant var = getProperty("Domains");
628  return qdbus_cast<QStringList>(var);
629 }
630 
632 {
633  QVariant var = getProperty("IPv4");
634  return qdbus_cast<QVariantMap >(var);
635 }
636 
638 {
639  QVariant var = getProperty("IPv4.Configuration");
640  return qdbus_cast<QVariantMap >(var);
641 }
642 
644 {
645  QVariant var = getProperty("Proxy");
646  return qdbus_cast<QVariantMap >(var);
647 }
648 
650 {
651  QVariant var = getProperty("Ethernet");
652  return qdbus_cast<QVariantMap >(var);
653 }
654 
656 {
657  QVariant var;
659  QMapIterator<QString,QVariant> it(map);
660  while(it.hasNext()) {
661  it.next();
662  if(it.key() == "Method") {
663  return it.value().toString();
664  }
665  }
666  return QString();
667 }
668 
670 {
671  QVariant var;
673 
674  QMapIterator<QString,QVariant> it(map);
675  while(it.hasNext()) {
676  it.next();
677  if(it.key() == "Interface") {
678  return it.value().toString();
679  }
680  }
681 
682  return QString();
683 }
684 
686 {
687  QVariant var;
689 
690  QMapIterator<QString,QVariant> it(map);
691  while(it.hasNext()) {
692  it.next();
693  if(it.key() == "Address") {
694  return it.value().toString();
695  }
696  }
697  return QString();
698 }
699 
701 {
702  quint16 mtu=0;
703  QVariant var;
705 
706  QMapIterator<QString,QVariant> it(map);
707  while(it.hasNext()) {
708  it.next();
709  if(it.key() == "MTU") {
710  return it.value().toUInt();
711  }
712  }
713  return mtu;
714 }
715 
717 {
718  quint16 speed=0;
719  QVariant var;
721 
722  QMapIterator<QString,QVariant> it(map);
723  while(it.hasNext()) {
724  it.next();
725  if(it.key() == "Speed") {
726  return it.value().toUInt();
727  }
728  }
729  return speed;
730 }
731 
733 {
734  QVariant var;
736 
737  QMapIterator<QString,QVariant> it(map);
738  while(it.hasNext()) {
739  it.next();
740  if(it.key() == "Duplex") {
741  return it.value().toString();
742  }
743  }
744  return QString();
745 }
746 
747 
749 {
750  QVariant var = getProperty("OfflineMode");
751  return qdbus_cast<bool>(var);
752 }
753 
755 {
756  QVariant var = getProperty("Services");
757  return qdbus_cast<QStringList>(var);
758 }
759 
760 
764  dbusPathName,
766  QDBusConnection::systemBus(), parent)
767 {
768 }
769 
771 {
772 }
773 
775 {
777  dbusConnection.connect(QLatin1String(CONNMAN_SERVICE),
778  this->path(),
780  QLatin1String("PropertyChanged"),
782  }
784  QConnmanDBusHelper *helper;
785  helper = new QConnmanDBusHelper(this);
786 
787  dbusConnection.connect(QLatin1String(CONNMAN_SERVICE),
788  this->path(),
790  QLatin1String("PropertyChanged"),
792 
795  }
796 }
797 
799 {
801 
802  }
803 }
804 
806 {
807  QDBusReply<QVariantMap> reply = this->call(QLatin1String("GetProperties"));
808  return reply.value();
809 }
810 
812 {
813  QVariant var;
815  if (map.contains(property)) {
816  var = map.value(property);
817  }
818  return var;
819 }
820 
821 // properties
823 {
824  QVariant var = getProperty("State");
825  return qdbus_cast<QString>(var);
826 }
827 
829 {
830  QVariant var = getProperty("Name");
831  return qdbus_cast<QString>(var);
832 }
833 
835 {
836  QVariant var = getProperty("Type");
837  return qdbus_cast<QString>(var);
838 }
839 
840 
844  dbusPathName,
846  QDBusConnection::systemBus(), parent)
847 {
848 }
849 
851 {
852 }
853 
855 {
856  if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QDBusVariant))) {
857 // dbusConnection.connect(QLatin1String(CONNMAN_SERVICE),
858 // this->path(),
859 // QLatin1String(CONNMAN_NETWORK_INTERFACE),
860 // QLatin1String("PropertyChanged"),
861 // this,SIGNAL(propertyChanged(const QString &, QVariant &)));
862  }
863 }
864 
866 {
867  if (QLatin1String(signal) == SIGNAL(propertyChanged(QString, QDBusVariant))) {
868 
869  }
870 }
871 
872 
874 {
875 }
876 
878 {
879 }
880 
881 //dict QConnmanAgentInterface::requestInput(QDBusObjectPath &path, dict fields)
882 //{
883 //}
884 
886 {
887 }
888 
889 
893  dbusPathName,
895  QDBusConnection::systemBus(), parent)
896 {
897 }
898 
900 {
901 }
902 
904 {
905  return 0;
906 }
907 
909 {
910  return 0;
911 }
912 
914 {
915  return 0;
916 }
917 
920  : QObject(parent)
921 {
922 }
923 
925 {
926 }
927 
929 {
930  QDBusMessage msg = this->message();
931  Q_EMIT propertyChangedContext(msg.path() ,item, var);
932 }
933 
936 
937 #endif // QT_NO_DBUS
938 #endif // QT_NO_BEARERMANAGEMENT
939 
The QVariant class acts like a union for the most common Qt data types.
Definition: qvariant.h:92
QBool contains(QChar c, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Definition: qstring.h:904
QConnmanManagerInterface(QObject *parent=0)
#define CONNMAN_MANAGER_PATH
void disconnectNotify(const char *signal)
Catch signal disconnections.
int type
Definition: qmetatype.cpp:239
const QDBusMessage & message() const
Returns the message that generated this call.
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
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.
Definition: qvariant.cpp:3102
#define it(className, varName)
#define Q_EMIT
Definition: qobjectdefs.h:74
The QDBusArgument class is used to marshall and demarshall D-Bus arguments.
Definition: qdbusargument.h:69
bool isValid() const
Returns true if this is a valid reference to a remote object.
void disconnectNotify(const char *signal)
Catch signal disconnections.
The QDBusReply class stores the reply for a method call to a remote object.
Definition: qdbusreply.h:65
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.
#define SLOT(a)
Definition: qobjectdefs.h:226
void connectNotify(const char *signal)
Catch signal connections.
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)
unsigned char quint8
Definition: qglobal.h:934
QVariant getProperty(const QString &)
The QString class provides a Unicode character string.
Definition: qstring.h:83
QMap< QString, QVariant > QVariantMap
Definition: qvariant.h:444
void registerAgent(QDBusObjectPath &path)
void disconnectNotify(const char *signal)
Catch signal disconnections.
The QObject class is the base class of all Qt objects.
Definition: qobject.h:111
void propertyChanged(const QString &, const QDBusVariant &value)
void disconnectNotify(const char *signal)
Catch signal disconnections.
ErrorType type() const
Returns this error&#39;s ErrorType.
Definition: qdbuserror.cpp:323
void unregisterCounter(const QString &path)
QVariant getProperty(const QString &)
void propertyChanged(const QString &, const QDBusVariant &value)
Q_CORE_EXPORT void qDebug(const char *,...)
#define SIGNAL(a)
Definition: qobjectdefs.h:227
#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...
bool disableTechnology(const QString &type)
bool isValid() const
Returns true if no error occurred; otherwise, returns false.
Definition: qdbusreply.h:114
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
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...
#define CONNMAN_SERVICE
unsigned __int64 quint64
Definition: qglobal.h:943
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...
Definition: qobject.cpp:2580
void propertyChanged(const QString &, const QDBusVariant &)
#define CONNMAN_AGENT_INTERFACE
const char * name
const T value(const Key &key) const
Returns the value associated with the key key.
Definition: qmap.h:499
The QStringList class provides a list of strings.
Definition: qstringlist.h:66
void propertyChangedContext(const QString &, const QString &, const QDBusVariant &)
const QDBusError & error()
Returns the error code that was returned from the remote function call.
Definition: qdbusreply.h:116
unsigned short quint16
Definition: qglobal.h:936
Q_CORE_EXPORT void qWarning(const char *,...)
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal...
Definition: qstring.h:654
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.
Definition: qvariant.h:336
QVariant getProperty(const QString &)
QDBusObjectPath path() const
void disconnectNotify(const char *signal)
Catch signal disconnections.
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...
QConnmanAgentInterface(const QString &dbusPathName, QObject *parent=0)
bool requestScan(const QString &type)
#define CONNMAN_TECHNOLOGY_INTERFACE
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.
Definition: qobject.h:273
QVariant getProperty(const QString &)
void reportError(QDBusObjectPath &path, const QString &error)
unsigned int quint32
Definition: qglobal.h:938
The QDBusObjectPath class enables the programmer to identify the OBJECT_PATH type provided by the D-B...
bool contains(const Key &key) const
Returns true if the map contains an item with key key; otherwise returns false.
Definition: qmap.h:553
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&#39;s name property.
Definition: qobject.cpp:3807
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.
Definition: qdbusmessage.h:59
#define Q_FOREACH(variable, container)
Same as foreach(variable, container).
Definition: qglobal.h:2435
QConnmanServiceInterface(const QString &dbusPathName, QObject *parent=0)
#define CONNMAN_SERVICE_INTERFACE
void propertyChanged(const QString &, const QDBusVariant &value)
QConnmanCounterInterface(const QString &dbusPathName, QObject *parent=0)
QDBusObjectPath createProfile(const QString &name)
QDBusObjectPath objectPath
void connectNotify(const char *signal)
Catch signal connections.
QDataStream & operator<<(QDataStream &out, const QUrl &url)
Writes url url to the stream out and returns a reference to the stream.
Definition: qurl.cpp:6757
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729
void propertyChangedContext(const QString &, const QString &, const QDBusVariant &)
Type value() const
Returns the remote function&#39;s calls return value.
Definition: qdbusreply.h:118
The QDBusVariant class enables the programmer to identify the variant type provided by the D-Bus type...
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
QVariantMap propertyMap
QDataStream & operator>>(QDataStream &in, QUrl &url)
Reads a url into url from the stream in and returns a reference to the stream.
Definition: qurl.cpp:6774
QString getPathForTechnology(const QString &tech)
QString message() const
Returns the message that the callee associated with this error.
Definition: qdbuserror.cpp:346