Qt 4.8
qofonoservice_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 
54 #include "qofonoservice_linux_p.h"
55 
56 #ifndef QT_NO_BEARERMANAGEMENT
57 #ifndef QT_NO_DBUS
58 
60 {
61  argument.beginStructure();
62  argument << item.path << item.properties;
63  argument.endStructure();
64  return argument;
65 }
66 
68 {
69  argument.beginStructure();
70  argument >> item.path >> item.properties;
71  argument.endStructure();
72  return argument;
73 }
74 
77 
78 
83  QDBusConnection::systemBus(), parent)
84 {
85  qDBusRegisterMetaType<ObjectPathProperties>();
86  qDBusRegisterMetaType<PathPropertiesList>();
87 }
88 
90 {
91 }
92 
94 {
95  QList <QDBusObjectPath> modemList;
96  QList<QVariant> argumentList;
97  QDBusReply<PathPropertiesList > reply = this->asyncCallWithArgumentList(QLatin1String("GetModems"), argumentList);
98  if (reply.isValid()) {
99  foreach (ObjectPathProperties modem, reply.value()) {
100  modemList << modem.path;
101  }
102  }
103 
104  return modemList;
105 }
106 
108 {
110  foreach (const QDBusObjectPath modem, modems) {
111  QOfonoModemInterface device(modem.path());
112  if (device.isPowered() && device.isOnline())
113  return modem;;
114  }
115  return QDBusObjectPath();
116 }
117 
118 
120 {
125  QLatin1String("PropertyChanged"),
126  this,SIGNAL(propertyChanged(const QString &, const QDBusVariant & )))) {
127  qWarning() << "PropertyCHanged not connected";
128  }
129  }
130 
132  QOfonoDBusHelper *helper;
133  helper = new QOfonoDBusHelper(this);
134 
135  dbusConnection.connect(QLatin1String(OFONO_SERVICE),
138  QLatin1String("PropertyChanged"),
140 
141 
143  this,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &)));
144  }
145 }
146 
148 {
150 
151  }
152 }
153 
155 {
157  if (map.contains(property)) {
158  return map.value(property);
159  } else {
160  qDebug() << Q_FUNC_INFO << "does not contain" << property;
161  }
162  return QVariant();
163 }
164 
166 {
167  QDBusReply<QVariantMap > reply = this->call(QLatin1String("GetProperties"));
168  if (reply.isValid())
169  return reply.value();
170  else
171  return QVariantMap();
172 }
173 
175  : QObject(parent)
176 {
177 }
178 
180 {
181 }
182 
184 {
185  QDBusMessage msg = this->message();
186  Q_EMIT propertyChangedContext(msg.path() ,item, var);
187 }
188 
189 
192  dbusPathName,
194  QDBusConnection::systemBus(), parent)
195 {
196 }
197 
199 {
200 }
201 
203 {
204  QVariant var = getProperty("Powered");
205  return qdbus_cast<bool>(var);
206 }
207 
209 {
210  QVariant var = getProperty("Online");
211  return qdbus_cast<bool>(var);
212 }
213 
215 {
216  QVariant var = getProperty("Name");
217  return qdbus_cast<QString>(var);
218 }
219 
221 {
222  QVariant var = getProperty("Manufacturer");
223  return qdbus_cast<QString>(var);
224 
225 }
226 
228 {
229 
230  QVariant var = getProperty("Model");
231  return qdbus_cast<QString>(var);
232 }
233 
235 {
236  QVariant var = getProperty("Revision");
237  return qdbus_cast<QString>(var);
238 
239 }
241 {
242  QVariant var = getProperty("Serial");
243  return qdbus_cast<QString>(var);
244 
245 }
246 
248 {
249  //sms, sim
250  QVariant var = getProperty("Features");
251  return qdbus_cast<QStringList>(var);
252 }
253 
255 {
256  QVariant var = getProperty("Interfaces");
257  return qdbus_cast<QStringList>(var);
258 }
259 
261 {
262  foreach (const QString &modem,getInterfaces()) {
263  return modem;
264  }
265  return QString();
266 }
267 
268 
269 void QOfonoModemInterface::connectNotify(const char *signal)
270 {
273  this->path(),
275  QLatin1String("PropertyChanged"),
276  this,SIGNAL(propertyChanged(const QString &, const QDBusVariant & )))) {
277  qWarning() << "PropertyCHanged not connected";
278  }
279  }
280 
282  QOfonoDBusHelper *helper;
283  helper = new QOfonoDBusHelper(this);
284 
285  dbusConnection.connect(QLatin1String(OFONO_SERVICE),
286  this->path(),
288  QLatin1String("PropertyChanged"),
290 
291 
294  }}
295 
297 {
299 
300  }
301 }
302 
304 {
305  QDBusReply<QVariantMap > reply = this->call(QLatin1String("GetProperties"));
306  return reply.value();
307 }
308 
310 {
311  QVariant var;
313  if (map.contains(property)) {
314  var = map.value(property);
315  } else {
316  qDebug() << Q_FUNC_INFO << "does not contain" << property;
317  }
318  return var;
319 }
320 
321 
324  dbusPathName,
326  QDBusConnection::systemBus(), parent)
327 {
328 }
329 
331 {
332 }
333 
335 {
336  /*
337  "unregistered" Not registered to any network
338  "registered" Registered to home network
339  "searching" Not registered, but searching
340  "denied" Registration has been denied
341  "unknown" Status is unknown
342  "roaming" Registered, but roaming*/
343  QVariant var = getProperty("Status");
344  return qdbus_cast<QString>(var);
345 }
346 
348 {
349  QVariant var = getProperty("LocationAreaCode");
350  return var.value<quint16>();
351 }
352 
353 
355 {
356  QVariant var = getProperty("CellId");
357  return var.value<quint32>();
358 }
359 
361 {
362  // "gsm", "edge", "umts", "hspa","lte"
363  QVariant var = getProperty("Technology");
364  return qdbus_cast<QString>(var);
365 }
366 
368 {
369  QVariant var = getProperty("Name");
370  return qdbus_cast<QString>(var);
371 }
372 
374 {
375  QVariant var = getProperty("Strength");
376  return qdbus_cast<int>(var);
377 
378 }
379 
381 {
382  QVariant var = getProperty("BaseStation");
383  return qdbus_cast<QString>(var);
384 }
385 
387 {
388  QList <QDBusObjectPath> operatorList;
389  QList<QVariant> argumentList;
391  argumentList);
392  if (reply.isValid()) {
393  foreach (ObjectPathProperties netop, reply.value()) {
394  operatorList << netop.path;
395  }
396  }
397  return operatorList;
398 }
399 
401 {
404  this->path(),
406  QLatin1String("PropertyChanged"),
407  this,SIGNAL(propertyChanged(const QString &, const QDBusVariant & )))) {
408  qWarning() << "PropertyCHanged not connected";
409  }
410  }
411 
413  QOfonoDBusHelper *helper;
414  helper = new QOfonoDBusHelper(this);
415 
416  dbusConnection.connect(QLatin1String(OFONO_SERVICE),
417  this->path(),
419  QLatin1String("PropertyChanged"),
421 
422 
425  }
426 }
427 
429 {
431 
432  }
433 }
434 
436 {
437  QVariant var;
439  if (map.contains(property)) {
440  var = map.value(property);
441  } else {
442  qDebug() << Q_FUNC_INFO << "does not contain" << property;
443  }
444  return var;
445 }
446 
448 {
449  QDBusReply<QVariantMap > reply = this->call(QLatin1String("GetProperties"));
450  return reply.value();
451 }
452 
453 
454 
457  dbusPathName,
459  QDBusConnection::systemBus(), parent)
460 {
461 }
462 
464 {
465 }
466 
468 {
469  QVariant var = getProperty("Name");
470  return qdbus_cast<QString>(var);
471 }
472 
474 {
475  // "unknown", "available", "current" and "forbidden"
476  QVariant var = getProperty("Status");
477  return qdbus_cast<QString>(var);
478 }
479 
481 {
482  QVariant var = getProperty("MobileCountryCode");
483  return qdbus_cast<QString>(var);
484 }
485 
487 {
488  QVariant var = getProperty("MobileNetworkCode");
489  return qdbus_cast<QString>(var);
490 }
491 
493 {
494  QVariant var = getProperty("Technologies");
495  return qdbus_cast<QStringList>(var);
496 }
497 
499 {
500 if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QDBusVariant))) {
502  this->path(),
504  QLatin1String("PropertyChanged"),
505  this,SIGNAL(propertyChanged(const QString &, const QDBusVariant & )))) {
506  qWarning() << "PropertyCHanged not connected";
507  }
508  }
509 
510  if (QLatin1String(signal) == SIGNAL(propertyChangedContext(QString,QString,QDBusVariant))) {
511  QOfonoDBusHelper *helper;
512  helper = new QOfonoDBusHelper(this);
513 
514  dbusConnection.connect(QLatin1String(OFONO_SERVICE),
515  this->path(),
517  QLatin1String("PropertyChanged"),
518  helper,SLOT(propertyChanged(QString,QDBusVariant)));
519 
520 
521  QObject::connect(helper,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &)),
522  this,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &)), Qt::UniqueConnection);
523  }
524 }
525 
527 {
528  if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QVariant))) {
529 
530  }
531 }
532 
534 {
535  QVariant var;
537  if (map.contains(property)) {
538  var = map.value(property);
539  } else {
540  qDebug() << Q_FUNC_INFO << "does not contain" << property;
541  }
542  return var;
543 }
544 
546 {
547  QDBusReply<QVariantMap > reply = this->call(QLatin1String("GetProperties"));
548  return reply.value();
549 }
550 
553  dbusPathName,
555  QDBusConnection::systemBus(), parent)
556 {
557 }
558 
560 {
561 }
562 
564 {
565  QVariant var = getProperty("Present");
566  return qdbus_cast<bool>(var);
567 }
568 
570 {
571  QVariant var = getProperty("MobileCountryCode");
572  return qdbus_cast<QString>(var);
573 }
574 
576 {
577  QVariant var = getProperty("MobileNetworkCode");
578  return qdbus_cast<QString>(var);
579 }
580 
581 // QStringList subscriberNumbers();
582 // QMap<QString,QString> serviceNumbers();
584 {
585  QVariant var = getProperty("PinRequired");
586  return qdbus_cast<QString>(var);
587 }
588 
590 {
591  QVariant var = getProperty("LockedPins");
592  return qdbus_cast<QString>(var);
593 }
594 
596 {
597  QVariant var = getProperty("CardIdentifier");
598  return qdbus_cast<QString>(var);
599 }
600 
601 void QOfonoSimInterface::connectNotify(const char *signal)
602 {
603 if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QDBusVariant))) {
605  this->path(),
607  QLatin1String("PropertyChanged"),
608  this,SIGNAL(propertyChanged(const QString &, const QDBusVariant & )))) {
609  qWarning() << "PropertyCHanged not connected";
610  }
611  }
612 
613  if (QLatin1String(signal) == SIGNAL(propertyChangedContext(QString,QString,QDBusVariant))) {
614  QOfonoDBusHelper *helper;
615  helper = new QOfonoDBusHelper(this);
616 
617  dbusConnection.connect(QLatin1String(OFONO_SERVICE),
618  this->path(),
620  QLatin1String("PropertyChanged"),
621  helper,SLOT(propertyChanged(QString,QDBusVariant)));
622 
623 
624  QObject::connect(helper,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &)),
625  this,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &)), Qt::UniqueConnection);
626  }
627 }
628 
629 void QOfonoSimInterface::disconnectNotify(const char *signal)
630 {
631  if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QVariant))) {
632 
633  }
634 }
635 
637 {
638  QVariant var;
640  if (map.contains(property)) {
641  var = map.value(property);
642  } else {
643  qDebug() << Q_FUNC_INFO << "does not contain" << property;
644  }
645  return var;
646 }
647 
649 {
650  QDBusReply<QVariantMap > reply = this->call(QLatin1String("GetProperties"));
651  return reply.value();
652 }
653 
656  dbusPathName,
658  QDBusConnection::systemBus(), parent)
659 {
660 }
661 
663 {
664 }
665 
667 {
668  QList <QDBusObjectPath> contextList;
669  QList<QVariant> argumentList;
671  argumentList);
672  if (reply.isValid()) {
673  foreach (ObjectPathProperties context, reply.value()) {
674  contextList << context.path;
675  }
676  }
677  return contextList;
678 }
679 
681 {
682  QVariant var = getProperty("Attached");
683  return qdbus_cast<bool>(var);
684 }
685 
687 {
688  QVariant var = getProperty("RoamingAllowed");
689  return qdbus_cast<bool>(var);
690 }
691 
693 {
694  QVariant var = getProperty("Powered");
695  return qdbus_cast<bool>(var);
696 }
697 
699 {
700 if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QDBusVariant))) {
702  this->path(),
704  QLatin1String("PropertyChanged"),
705  this,SIGNAL(propertyChanged(const QString &, const QDBusVariant & )))) {
706  qWarning() << "PropertyCHanged not connected";
707  }
708  }
709 
710  if (QLatin1String(signal) == SIGNAL(propertyChangedContext(QString,QString,QDBusVariant))) {
711  QOfonoDBusHelper *helper;
712  helper = new QOfonoDBusHelper(this);
713 
714  dbusConnection.connect(QLatin1String(OFONO_SERVICE),
715  this->path(),
717  QLatin1String("PropertyChanged"),
718  helper,SLOT(propertyChanged(QString,QDBusVariant)));
719 
720 
721  QObject::connect(helper,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &)),
722  this,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &)), Qt::UniqueConnection);
723  }
724 }
725 
727 {
728  if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QVariant))) {
729 
730  }
731 }
732 
734 {
735  QVariant var;
737  if (map.contains(property)) {
738  var = map.value(property);
739  } else {
740  qDebug() << Q_FUNC_INFO << "does not contain" << property;
741  }
742  return var;
743 }
744 
746 {
747  QDBusReply<QVariantMap > reply = this->call(QLatin1String("GetProperties"));
748  return reply.value();
749 }
750 
753  dbusPathName,
755  QDBusConnection::systemBus(), parent)
756 {
757 }
758 
760 {
761 }
762 
764 {
765  QVariant var = getProperty("Active");
766  return qdbus_cast<bool>(var);
767 }
768 
770 {
771  QVariant var = getProperty("AccessPointName");
772  return qdbus_cast<QString>(var);
773 }
774 
776 {
777  QVariant var = getProperty("Type");
778  return qdbus_cast<QString>(var);
779 }
780 
782 {
783  QVariant var = getProperty("Name");
784  return qdbus_cast<QString>(var);
785 }
786 
788 {
789  QVariant var = getProperty("Settings");
790  return qdbus_cast<QVariantMap>(var);
791 }
792 
794 {
795  QVariant var = getProperty("Interface");
796  return qdbus_cast<QString>(var);
797 }
798 
800 {
801  QVariant var = getProperty("Address");
802  return qdbus_cast<QString>(var);
803 }
804 
806 {
807 // this->setProperty("Active", QVariant(on));
808 
809  return setProp("Active", qVariantFromValue(on));
810 }
811 
813 {
814  return setProp("AccessPointName", QVariant::fromValue(name));
815 }
816 
818 {
819 if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QDBusVariant))) {
821  this->path(),
823  QLatin1String("PropertyChanged"),
824  this,SIGNAL(propertyChanged(const QString &, const QDBusVariant & )))) {
825  qWarning() << "PropertyCHanged not connected";
826  }
827  }
828 
829  if (QLatin1String(signal) == SIGNAL(propertyChangedContext(QString,QString,QDBusVariant))) {
830  QOfonoDBusHelper *helper;
831  helper = new QOfonoDBusHelper(this);
832 
833  dbusConnection.connect(QLatin1String(OFONO_SERVICE),
834  this->path(),
836  QLatin1String("PropertyChanged"),
837  helper,SLOT(propertyChanged(QString,QDBusVariant)));
838 
839 
840  QObject::connect(helper,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &)),
841  this,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &)), Qt::UniqueConnection);
842  }
843 }
844 
846 {
847  if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QVariant))) {
848 
849  }
850 }
851 
853 {
854  QVariant var;
856  if (map.contains(property)) {
857  var = map.value(property);
858  } else {
859  qDebug() << Q_FUNC_INFO << "does not contain" << property;
860  }
861  return var;
862 }
863 
865 {
866  QDBusReply<QVariantMap > reply = this->call(QLatin1String("GetProperties"));
867  return reply.value();
868 }
869 
871 {
872  QList<QVariant> args;
873  args << qVariantFromValue(property) << qVariantFromValue(QDBusVariant(var));
874 
876  QLatin1String("SetProperty"),
877  args);
878  bool ok = true;
879  if (reply.type() != QDBusMessage::ReplyMessage) {
880  qWarning() << reply.errorMessage();
881  ok = false;
882  }
883  qWarning() << reply.errorMessage();
884  return ok;
885 }
886 
889  dbusPathName,
891  QDBusConnection::systemBus(), parent)
892 {
893 }
894 
896 {
897 }
898 
899 void QOfonoSmsInterface::connectNotify(const char *signal)
900 {
903  this->path(),
905  QLatin1String("PropertyChanged"),
906  this,SIGNAL(propertyChanged(const QString &, const QDBusVariant & )))) {
907  qWarning() << "PropertyCHanged not connected";
908  }
909  }
910 
912  QOfonoDBusHelper *helper;
913  helper = new QOfonoDBusHelper(this);
914 
915  dbusConnection.connect(QLatin1String(OFONO_SERVICE),
916  this->path(),
918  QLatin1String("PropertyChanged"),
920 
921 
923  this,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &)));
924  }
925 
928  this->path(),
930  QLatin1String("ImmediateMessage"),
932  qWarning() << "PropertyCHanged not connected";
933  }
934  }
935 
938  this->path(),
940  QLatin1String("IncomingMessage"),
942  qWarning() << "PropertyCHanged not connected";
943  }
944  }
945 }
946 
947 void QOfonoSmsInterface::disconnectNotify(const char *signal)
948 {
950 
951  }
952 }
953 
955 {
956  QVariant var;
958  if (map.contains(property)) {
959  var = map.value(property);
960  } else {
961  qDebug() << Q_FUNC_INFO << "does not contain" << property;
962  }
963  return var;
964 }
965 
967 {
968  QDBusReply<QVariantMap > reply = this->call(QLatin1String("GetProperties"));
969  return reply.value();
970 }
971 
972 void QOfonoSmsInterface::sendMessage(const QString &to, const QString &message)
973 {
974  QDBusReply<QString> reply = this->call(QLatin1String("SendMessage"),
976  QVariant::fromValue(message));
977  if (reply.error().type() == QDBusError::InvalidArgs)
978  qWarning() << reply.error().message();
979 }
980 
982 
983 #endif // QT_NO_DBUS
984 #endif // QT_NO_BEARERMANAGEMENT
The QVariant class acts like a union for the most common Qt data types.
Definition: qvariant.h:92
static QDBusConnection dbusConnection
#define OFONO_SIM_MANAGER_INTERFACE
QVariant getProperty(const QString &)
QOfonoNetworkOperatorInterface(const QString &dbusPathName, QObject *parent=0)
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.
QVariant qVariantFromValue(const T &)
Definition: qvariant.h:451
T qdbus_cast(const QDBusArgument &arg)
#define Q_EMIT
Definition: qobjectdefs.h:74
The QDBusArgument class is used to marshall and demarshall D-Bus arguments.
Definition: qdbusargument.h:69
void propertyChangedContext(const QString &, const QString &, const QDBusVariant &)
void propertyChangedContext(const QString &, const QString &, const QDBusVariant &)
QDBusObjectPath currentModem()
bool setProp(const QString &, const QVariant &var)
#define OFONO_DATA_CONTEXT_INTERFACE
void connectNotify(const char *signal)
Catch signal connections.
The QDBusReply class stores the reply for a method call to a remote object.
Definition: qdbusreply.h:65
QDBusConnection connection() const
Returns the connection this interface is assocated with.
#define SLOT(a)
Definition: qobjectdefs.h:226
QOfonoModemInterface(const QString &dbusModemPathName, QObject *parent=0)
void connectNotify(const char *signal)
Catch signal connections.
#define OFONO_NETWORK_OPERATOR_INTERFACE
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
static QDBusConnection systemBus()
Returns a QDBusConnection object opened with the system bus.
QOfonoSmsInterface(const QString &dbusModemPathName, QObject *parent=0)
The QString class provides a Unicode character string.
Definition: qstring.h:83
QMap< QString, QVariant > QVariantMap
Definition: qvariant.h:444
The QObject class is the base class of all Qt objects.
Definition: qobject.h:111
QOfonoPrimaryDataContextInterface(const QString &dbusPathName, QObject *parent=0)
#define OFONO_DATA_CONNECTION_MANAGER_INTERFACE
void propertyChanged(const QString &, const QDBusVariant &)
#define OFONO_SMS_MANAGER_INTERFACE
ErrorType type() const
Returns this error&#39;s ErrorType.
Definition: qdbuserror.cpp:323
void propertyChanged(const QString &, const QDBusVariant &value)
QVariant getProperty(const QString &)
QOfonoDBusHelper(QObject *parent=0)
Q_CORE_EXPORT void qDebug(const char *,...)
#define SIGNAL(a)
Definition: qobjectdefs.h:227
void disconnectNotify(const char *signal)
Catch signal disconnections.
The QDBusAbstractInterface class is the base class for all D-Bus interfaces in the QtDBus binding...
void connectNotify(const char *signal)
Catch signal connections.
bool isValid() const
Returns true if no error occurred; otherwise, returns false.
Definition: qdbusreply.h:114
void immediateMessage(const QString &message, const QVariantMap &info)
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
QString errorMessage() const
Returns the human-readable message associated with the error that was received.
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...
QList< QDBusObjectPath > getOperators()
#define OFONO_MANAGER_INTERFACE
QOfonoNetworkRegistrationInterface(const QString &dbusModemPathName, QObject *parent=0)
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
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
QDBusMessage callWithArgumentList(QDBus::CallMode mode, const QString &method, const QList< QVariant > &args)
Places a call to the remote method specified by method on this interface, using args as arguments...
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 *,...)
QOfonoSimInterface(const QString &dbusModemPathName, QObject *parent=0)
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal...
Definition: qstring.h:654
QString path() const
Returns this object path.
QVariant getProperty(const QString &)
void connectNotify(const char *signal)
Catch signal connections.
static QVariant fromValue(const T &value)
Returns a QVariant containing a copy of value.
Definition: qvariant.h:336
#define OFONO_MODEM_INTERFACE
void propertyChanged(const QString &, const QDBusVariant &value)
void disconnectNotify(const char *signal)
Catch signal disconnections.
void disconnectNotify(const char *signal)
Catch signal disconnections.
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...
QDBusPendingCall asyncCallWithArgumentList(const QString &method, const QList< QVariant > &args)
Places a call to the remote method specified by method on this interface, using args as arguments...
#define OFONO_SERVICE
void connectNotify(const char *signal)
Catch signal connections.
void propertyChangedContext(const QString &, const QString &, const QDBusVariant &)
QOfonoDataConnectionManagerInterface(const QString &dbusPathName, QObject *parent=0)
void propertyChangedContext(const QString &, const QString &, const QDBusVariant &)
#define OFONO_MANAGER_PATH
void connectNotify(const char *signal)
Catch signal connections.
void disconnectNotify(const char *signal)
Catch signal disconnections.
The QDBusConnection class represents a connection to the D-Bus bus daemon.
QVariant getProperty(const QString &)
void endStructure()
Closes a D-Bus structure opened with beginStructure().
QObject * parent() const
Returns a pointer to the parent object.
Definition: qobject.h:273
unsigned int quint32
Definition: qglobal.h:938
The QDBusObjectPath class enables the programmer to identify the OBJECT_PATH type provided by the D-B...
void sendMessage(const QString &to, const QString &message)
QList< QDBusObjectPath > getPrimaryContexts()
bool contains(const Key &key) const
Returns true if the map contains an item with key key; otherwise returns false.
Definition: qmap.h:553
QList< QDBusObjectPath > getModems()
void disconnectNotify(const char *signal)
Catch signal disconnections.
QVariant property(const char *name) const
Returns the value of the object&#39;s name property.
Definition: qobject.cpp:3807
void incomingMessage(const QString &message, const QVariantMap &info)
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
MessageType type() const
Returns the message type.
void propertyChanged(const QString &, const QDBusVariant &value)
QOfonoManagerInterface(QObject *parent=0)
QVariant getProperty(const QString &)
void disconnectNotify(const char *signal)
Catch signal disconnections.
void propertyChangedContext(const QString &, const QString &, const QDBusVariant &)
T value() const
Returns the stored value converted to the template type T.
Definition: qvariant.h:332
QVariant getProperty(const QString &)
void disconnectNotify(const char *signal)
Catch signal disconnections.
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
Type value() const
Returns the remote function&#39;s calls return value.
Definition: qdbusreply.h:118
void disconnectNotify(const char *signal)
Catch signal disconnections.
The QDBusVariant class enables the programmer to identify the variant type provided by the D-Bus type...
void propertyChanged(const QString &, const QDBusVariant &value)
The QList class is a template class that provides lists.
Definition: qdatastream.h:62
void connectNotify(const char *signal)
Catch signal connections.
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...
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
#define Q_FUNC_INFO
Definition: qglobal.h:1871
QString message() const
Returns the message that the callee associated with this error.
Definition: qdbuserror.cpp:346
#define OFONO_NETWORK_REGISTRATION_INTERFACE