void GnomeMediaKeys::registerFinished(QDBusPendingCallWatcher *watcher) { QDBusMessage reply = watcher->reply(); watcher->deleteLater(); if (QDBusMessage::ErrorMessage!=reply.type()) { connect(mk, SIGNAL(MediaPlayerKeyPressed(QString, QString)), this, SLOT(keyPressed(QString,QString))); disconnectDaemon(); } }
void GnomeMediaKeys::serviceOwnerChanged(const QString &name, const QString &, const QString &) { if (name==constService) { releaseKeys(); disconnectDaemon(); if (daemonIsRunning()) { grabKeys(); } } }
void GnomeMediaKeys::setEnabled(bool en) { if (en && !mk) { if (daemonIsRunning()) { grabKeys(); } } else if (!en && mk) { releaseKeys(); disconnectDaemon(); if (watcher) { watcher->deleteLater(); watcher=0; } } }
void av::daemon::DeviceService::connectDaemon() { disconnectDaemon(); mStationSegment = new StationSegment; station_segment_list.push_back(mStationSegment); }
/* virtual */ av::daemon::DeviceService::~DeviceService() { disconnectDaemon(); }