Changeset View
Changeset View
Standalone View
Standalone View
mpris2/mpris2service.h
- This file was added.
1 | /*************************************************************************** | ||||
---|---|---|---|---|---|
2 | * Copyright 2018 Friedrich W. H. Kossebau <kossebau@kde.org> * | ||||
3 | * * | ||||
4 | * This program is free software; you can redistribute it and/or modify * | ||||
5 | * it under the terms of the GNU General Public License as published by * | ||||
6 | * the Free Software Foundation; either version 2 of the License, or * | ||||
7 | * (at your option) any later version. * | ||||
8 | ***************************************************************************/ | ||||
9 | | ||||
10 | #ifndef MPRIS2SERVICE_H | ||||
11 | #define MPRIS2SERVICE_H | ||||
12 | | ||||
13 | // Qt | ||||
14 | #include <QObject> | ||||
15 | | ||||
16 | class PresentationWidget; | ||||
17 | | ||||
18 | class KActionCollection; | ||||
19 | | ||||
20 | namespace Okular | ||||
21 | { | ||||
22 | class Document; | ||||
23 | class MprisMediaPlayer2; | ||||
24 | class MprisMediaPlayer2Player; | ||||
25 | | ||||
26 | class Mpris2Service : public QObject | ||||
27 | { | ||||
28 | Q_OBJECT | ||||
29 | | ||||
30 | public: | ||||
31 | Mpris2Service(Document *document, | ||||
32 | KActionCollection *actionCollection, | ||||
33 | PresentationWidget *presentationWidget, | ||||
34 | QObject *parent); | ||||
35 | ~Mpris2Service() override; | ||||
36 | | ||||
37 | protected: | ||||
38 | bool eventFilter(QObject *object, QEvent *event) override; | ||||
39 | | ||||
40 | private: | ||||
41 | void registerOnDBus(); | ||||
42 | void unregisterOnDBus(); | ||||
43 | | ||||
44 | private: | ||||
45 | Document *mDocument; | ||||
46 | KActionCollection *mActionCollection; | ||||
47 | PresentationWidget *mPresentationWidget; | ||||
48 | | ||||
49 | QString mMpris2ServiceName; | ||||
50 | MprisMediaPlayer2 *mPlayer2; | ||||
51 | MprisMediaPlayer2Player *mPlayer2Player; | ||||
52 | }; | ||||
53 | | ||||
54 | } | ||||
55 | | ||||
56 | #endif |