aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/General/gnomehotkey/mediakeys.h
blob: 6fcada02e384076d475af36b75031754b41ff305 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef MEDIAKEYS_H
#define MEDIAKEYS_H

#include <QObject>
#include <QDBusPendingReply>

class QDBusInterface;

/**
    @author Ilya Kotov <forkotov02@hotmail.ru>
*/
class MediaKeys : public QObject
{
    Q_OBJECT
public:
    explicit MediaKeys(QObject *parent = 0);
    virtual ~MediaKeys();

private slots:
    QDBusPendingReply<> grabMediaPlayerKeys(const QString &application, uint time);
    QDBusPendingReply<> releaseMediaPlayerKeys(const QString &application);
    void onRegisterFinished(QDBusPendingCallWatcher *watcher);
    void onKeyPressed(const QString &in0, const QString &in1);

private:
    QDBusInterface *m_interface;
    bool m_isRegistered;


};

#endif // MEDIAKEYS_H