| Line | Source | Count |
| 1 | | - |
| 2 | | - |
| 3 | | - |
| 4 | | - |
| 5 | | - |
| 6 | | - |
| 7 | const char *QDBusConnectionInterface::staticInterfaceName() | - |
| 8 | { return "org.freedesktop.DBus"; } | - |
| 9 | | - |
| 10 | | - |
| 11 | | - |
| 12 | | - |
| 13 | QDBusConnectionInterface::QDBusConnectionInterface(const QDBusConnection &connection, | - |
| 14 | QObject *parent) | - |
| 15 | : QDBusAbstractInterface(QDBusUtil::dbusService(), | - |
| 16 | QDBusUtil::dbusPath(), | - |
| 17 | "org.freedesktop.DBus", connection, parent) | - |
| 18 | { | - |
| 19 | connect(this, qFlagLocation("2""NameAcquired(QString)" "\0" __FILE__ ":" "161"),&QDBusConnectionInterface::NameAcquired, this, qFlagLocation("2""serviceRegistered(QString)" "\0" __FILE__ ":" "161"));&QDBusConnectionInterface::serviceRegistered); | - |
| 20 | connect(this, qFlagLocation("2""NameLost(QString)" "\0" __FILE__ ":" "162"),&QDBusConnectionInterface::NameLost, this, qFlagLocation("2""serviceUnregistered(QString)" "\0" __FILE__ ":" "162"));&QDBusConnectionInterface::serviceUnregistered); | - |
| 21 | connect(this, qFlagLocation("2""NameOwnerChanged(QString, QString&QDBusConnectionInterface::NameOwnerChanged, | - |
| 22 | QString)" "\0" __FILE__ ":" "163"),this, qFlagLocation("2""serviceOwnerChanged(QString,QString, QString)" "\0" __FILE__ ":" "164"));&QDBusConnectionInterface::serviceOwnerChanged); | - |
| 23 | }executed 326 times by 160 tests: end of blockExecuted by:- tst_Gestures
- tst_ModelTest
- tst_NetworkSelfTest
- tst_QAbstractButton
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSpinBox
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QApplication
- tst_QBackingStore
- tst_QBoxLayout
- tst_QButtonGroup
- tst_QCalendarWidget
- tst_QCheckBox
- tst_QColorDialog
- tst_QColumnView
- tst_QComboBox
- tst_QCommandLinkButton
- tst_QDataWidgetMapper
- tst_QDateTimeEdit
- tst_QDesktopWidget
- ...
| 326 |
| 24 | | - |
| 25 | | - |
| 26 | | - |
| 27 | | - |
| 28 | QDBusConnectionInterface::~QDBusConnectionInterface() | - |
| 29 | { | - |
| 30 | } | - |
| 31 | | - |
| 32 | | - |
| 33 | | - |
| 34 | | - |
| 35 | | - |
| 36 | | - |
| 37 | QDBusReply<QString> QDBusConnectionInterface::serviceOwner(const QString &name) const | - |
| 38 | { | - |
| 39 | return internalConstCall(QDBus::AutoDetect, QLatin1String("GetNameOwner"), QList<QVariant>() << name); | - |
| 40 | } | - |
| 41 | | - |
| 42 | | - |
| 43 | | - |
| 44 | | - |
| 45 | | - |
| 46 | | - |
| 47 | | - |
| 48 | QDBusReply<QStringList> QDBusConnectionInterface::registeredServiceNames() const | - |
| 49 | { | - |
| 50 | return internalConstCall(QDBus::AutoDetect, QLatin1String("ListNames")); | - |
| 51 | } | - |
| 52 | | - |
| 53 | | - |
| 54 | | - |
| 55 | | - |
| 56 | | - |
| 57 | QDBusReply<bool> QDBusConnectionInterface::isServiceRegistered(const QString &serviceName) const | - |
| 58 | { | - |
| 59 | return internalConstCall(QDBus::AutoDetect, QLatin1String("NameHasOwner"), | - |
| 60 | QList<QVariant>() << serviceName); | - |
| 61 | } | - |
| 62 | | - |
| 63 | | - |
| 64 | | - |
| 65 | | - |
| 66 | | - |
| 67 | QDBusReply<uint> QDBusConnectionInterface::servicePid(const QString &serviceName) const | - |
| 68 | { | - |
| 69 | return internalConstCall(QDBus::AutoDetect, QLatin1String("GetConnectionUnixProcessID"), | - |
| 70 | QList<QVariant>() << serviceName); | - |
| 71 | } | - |
| 72 | | - |
| 73 | | - |
| 74 | | - |
| 75 | | - |
| 76 | | - |
| 77 | QDBusReply<uint> QDBusConnectionInterface::serviceUid(const QString &serviceName) const | - |
| 78 | { | - |
| 79 | return internalConstCall(QDBus::AutoDetect, QLatin1String("GetConnectionUnixUser"), | - |
| 80 | QList<QVariant>() << serviceName); | - |
| 81 | } | - |
| 82 | | - |
| 83 | | - |
| 84 | | - |
| 85 | | - |
| 86 | QDBusReply<void> QDBusConnectionInterface::startService(const QString &name) | - |
| 87 | { | - |
| 88 | return call(QLatin1String("StartServiceByName"), name, uint(0)); | - |
| 89 | } | - |
| 90 | QDBusReply<QDBusConnectionInterface::RegisterServiceReply> | - |
| 91 | QDBusConnectionInterface::registerService(const QString &serviceName, | - |
| 92 | ServiceQueueOptions qoption, | - |
| 93 | ServiceReplacementOptions roption) | - |
| 94 | { | - |
| 95 | | - |
| 96 | uint flags = 0; | - |
| 97 | switch (qoption) { | - |
| 98 | case DontQueueService: | - |
| 99 | flags = 0x4; | - |
| 100 | break; | - |
| 101 | case QueueService: | - |
| 102 | flags = 0; | - |
| 103 | break; | - |
| 104 | case ReplaceExistingService: | - |
| 105 | flags = 0x4 | 0x2; | - |
| 106 | break; | - |
| 107 | } | - |
| 108 | | - |
| 109 | switch (roption) { | - |
| 110 | case DontAllowReplacement: | - |
| 111 | break; | - |
| 112 | case AllowReplacement: | - |
| 113 | flags |= 0x1; | - |
| 114 | break; | - |
| 115 | } | - |
| 116 | | - |
| 117 | QDBusMessage reply = call(QLatin1String("RequestName"), serviceName, flags); | - |
| 118 | | - |
| 119 | | - |
| 120 | | - |
| 121 | if (reply.type() == QDBusMessage::ReplyMessage) { | - |
| 122 | uint code = 0; | - |
| 123 | | - |
| 124 | switch (reply.arguments().at(0).toUInt()) { | - |
| 125 | case 1: | - |
| 126 | case 4: | - |
| 127 | code = uint(ServiceRegistered); | - |
| 128 | break; | - |
| 129 | | - |
| 130 | case 3: | - |
| 131 | code = uint(ServiceNotRegistered); | - |
| 132 | break; | - |
| 133 | | - |
| 134 | case 2: | - |
| 135 | code = uint(ServiceQueued); | - |
| 136 | break; | - |
| 137 | } | - |
| 138 | | - |
| 139 | reply.setArguments(QVariantList() << code); | - |
| 140 | } | - |
| 141 | | - |
| 142 | return reply; | - |
| 143 | } | - |
| 144 | QDBusReply<bool> | - |
| 145 | QDBusConnectionInterface::unregisterService(const QString &serviceName) | - |
| 146 | { | - |
| 147 | QDBusMessage reply = call(QLatin1String("ReleaseName"), serviceName); | - |
| 148 | if (reply.type() == QDBusMessage::ReplyMessage) { | - |
| 149 | bool success = reply.arguments().at(0).toUInt() == 1; | - |
| 150 | reply.setArguments(QVariantList() << success); | - |
| 151 | } | - |
| 152 | return reply; | - |
| 153 | } | - |
| 154 | | - |
| 155 | | - |
| 156 | | - |
| 157 | | - |
| 158 | void QDBusConnectionInterface::connectNotify(const QMetaMethod &signal) | - |
| 159 | { | - |
| 160 | | - |
| 161 | | - |
| 162 | static const QMetaMethod serviceRegisteredSignal = QMetaMethod::fromSignal(&QDBusConnectionInterface::serviceRegistered); | - |
| 163 | static const QMetaMethod serviceUnregisteredSignal = QMetaMethod::fromSignal(&QDBusConnectionInterface::serviceUnregistered); | - |
| 164 | static const QMetaMethod serviceOwnerChangedSignal = QMetaMethod::fromSignal(&QDBusConnectionInterface::serviceOwnerChanged); | - |
| 165 | static const QMetaMethod NameAcquiredSignal = QMetaMethod::fromSignal(&QDBusConnectionInterface::NameAcquired); | - |
| 166 | static const QMetaMethod NameLostSignal = QMetaMethod::fromSignal(&QDBusConnectionInterface::NameLost); | - |
| 167 | static const QMetaMethod NameOwnerChangedSignal = QMetaMethod::fromSignal(&QDBusConnectionInterface::NameOwnerChanged); | - |
| 168 | if (signal == serviceRegisteredSignal) | - |
| 169 | QDBusAbstractInterface::connectNotify(NameAcquiredSignal); | - |
| 170 | | - |
| 171 | else if (signal == serviceUnregisteredSignal) | - |
| 172 | QDBusAbstractInterface::connectNotify(NameLostSignal); | - |
| 173 | | - |
| 174 | else if (signal == serviceOwnerChangedSignal) { | - |
| 175 | static bool warningPrinted = false; | - |
| 176 | if (!warningPrinted) { | - |
| 177 | QMessageLogger(__FILE__, 343349, __PRETTY_FUNCTION__).warning("Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)"); | - |
| 178 | warningPrinted = true; | - |
| 179 | } | - |
| 180 | QDBusAbstractInterface::connectNotify(NameOwnerChangedSignal); | - |
| 181 | } | - |
| 182 | } | - |
| 183 | | - |
| 184 | | - |
| 185 | | - |
| 186 | | - |
| 187 | void QDBusConnectionInterface::disconnectNotify(const QMetaMethod &signal) | - |
| 188 | { | - |
| 189 | | - |
| 190 | | - |
| 191 | static const QMetaMethod serviceRegisteredSignal = QMetaMethod::fromSignal(&QDBusConnectionInterface::serviceRegistered); | - |
| 192 | static const QMetaMethod serviceUnregisteredSignal = QMetaMethod::fromSignal(&QDBusConnectionInterface::serviceUnregistered); | - |
| 193 | static const QMetaMethod serviceOwnerChangedSignal = QMetaMethod::fromSignal(&QDBusConnectionInterface::serviceOwnerChanged); | - |
| 194 | static const QMetaMethod NameAcquiredSignal = QMetaMethod::fromSignal(&QDBusConnectionInterface::NameAcquired); | - |
| 195 | static const QMetaMethod NameLostSignal = QMetaMethod::fromSignal(&QDBusConnectionInterface::NameLost); | - |
| 196 | static const QMetaMethod NameOwnerChangedSignal = QMetaMethod::fromSignal(&QDBusConnectionInterface::NameOwnerChanged); | - |
| 197 | if (signal == serviceRegisteredSignal) | - |
| 198 | QDBusAbstractInterface::disconnectNotify(NameAcquiredSignal); | - |
| 199 | | - |
| 200 | else if (signal == serviceUnregisteredSignal) | - |
| 201 | QDBusAbstractInterface::disconnectNotify(NameLostSignal); | - |
| 202 | | - |
| 203 | else if (signal == serviceOwnerChangedSignal) | - |
| 204 | QDBusAbstractInterface::disconnectNotify(NameOwnerChangedSignal); | - |
| 205 | } | - |
| 206 | | - |
| | |