Changeset View
Changeset View
Standalone View
Standalone View
mpris2/mprismediaplayer2.cpp
- 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 | #include "mprismediaplayer2.h" | ||||
11 | | ||||
12 | // Qt | ||||
13 | #include <QGuiApplication> | ||||
14 | | ||||
15 | namespace Okular | ||||
16 | { | ||||
17 | | ||||
18 | MprisMediaPlayer2::MprisMediaPlayer2(const QString &objectDBusPath, | ||||
19 | QObject *parent) | ||||
20 | : DBusAbstractAdaptor(objectDBusPath, parent) | ||||
21 | { | ||||
22 | } | ||||
23 | | ||||
24 | MprisMediaPlayer2::~MprisMediaPlayer2() | ||||
25 | { | ||||
26 | } | ||||
27 | | ||||
28 | bool MprisMediaPlayer2::canQuit() const | ||||
29 | { | ||||
30 | return true; | ||||
31 | } | ||||
32 | | ||||
33 | bool MprisMediaPlayer2::canRaise() const | ||||
34 | { | ||||
35 | return false; | ||||
36 | } | ||||
37 | | ||||
38 | bool MprisMediaPlayer2::canSetFullscreen() const | ||||
39 | { | ||||
40 | // Okular itself currently only does fullscreen slideshows, | ||||
41 | // so while in principle capable to support this by wrapping the fullscreen action, | ||||
42 | // normal Okular code does not expect a state with non-fullscreen slideshow running | ||||
43 | return false; | ||||
44 | } | ||||
45 | | ||||
46 | bool MprisMediaPlayer2::hasTrackList() const | ||||
47 | { | ||||
48 | return false; | ||||
49 | } | ||||
50 | | ||||
51 | void MprisMediaPlayer2::Quit() | ||||
52 | { | ||||
53 | QGuiApplication::quit(); | ||||
54 | } | ||||
55 | | ||||
56 | void MprisMediaPlayer2::Raise() | ||||
57 | { | ||||
58 | } | ||||
59 | | ||||
60 | QString MprisMediaPlayer2::identity() const | ||||
61 | { | ||||
62 | return QGuiApplication::applicationDisplayName(); | ||||
63 | } | ||||
64 | | ||||
65 | QString MprisMediaPlayer2::desktopEntry() const | ||||
66 | { | ||||
67 | return QGuiApplication::desktopFileName(); | ||||
68 | } | ||||
69 | | ||||
70 | QStringList MprisMediaPlayer2::supportedUriSchemes() const | ||||
71 | { | ||||
72 | return QStringList(); | ||||
73 | } | ||||
74 | | ||||
75 | QStringList MprisMediaPlayer2::supportedMimeTypes() const | ||||
76 | { | ||||
77 | return QStringList(); | ||||
78 | } | ||||
79 | | ||||
80 | } |