예제 #1
0
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();
    }
}
예제 #2
0
void GnomeMediaKeys::serviceOwnerChanged(const QString &name, const QString &, const QString &)
{
    if (name==constService) {
        releaseKeys();
        disconnectDaemon();
        if (daemonIsRunning()) {
            grabKeys();
        }
    }
}
예제 #3
0
void GnomeMediaKeys::setEnabled(bool en)
{
    if (en && !mk) {
        if (daemonIsRunning()) {
            grabKeys();
        }
    } else if (!en && mk) {
        releaseKeys();
        disconnectDaemon();
        if (watcher) {
            watcher->deleteLater();
            watcher=0;
        }
    }
}
예제 #4
0
void av::daemon::DeviceService::connectDaemon()
{
    disconnectDaemon();
    mStationSegment = new StationSegment;
    station_segment_list.push_back(mStationSegment);
}
예제 #5
0
/* virtual */
av::daemon::DeviceService::~DeviceService() { disconnectDaemon(); }