2 This file is part of Jerboa.
4 Jerboa 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), version 3 of the license.
9 Jerboa is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with Jerboa. If not, see <http://www.gnu.org/licenses/>.
17 #ifndef _JERBOA_TYPES_H
18 #define _JERBOA_TYPES_H
24 /// All-containing namespace for Jerboa.
27 /// List of supported looping modes.
30 /// No looping at all.
32 /// Loop the current track.
34 /// Loop the entire playlist.
38 /// List of supported shuffle modes.
43 /// Shuffle next track.
46 * Plays continuously until the end of an album, then jumps to a random
47 * track in the playlist. The player then goes backwards until it gets
48 * to a track which is in a different album, then goes forwards one more.
53 /// Possible ReplayGain modes
55 /// Normalise volume across a whole album; relative volume differences are kept
57 /// Normalise each track separately - relative differences between tracks in the album are lost
61 /** List of component types.
62 * A plugin can provide zero or more components, each implementing
63 * one of these interfaces. These should be returned by
64 * Plugin::components()
66 enum ComponentInterface
69 * This should be qobject_cast'able to a PlayerInterface.
74 * This should be qobject_cast'able to a PlaylistInterface.
79 typedef QMap
<ComponentInterface
, QObject
*> ComponentMap
;
81 /** List of possible actions on the player.
82 * The values specified are compatible with MPRIS.
83 * All of these are supported at some time or another, in varying
86 * There is also a QFlags<Action> class, `Actions'.
92 /// Skip to next track.
93 SkipNextAction
= 1 << 0,
94 /// Skip previous track.
95 SkipPreviousAction
= 1 << 1,
98 /// Play/unpause track
100 /** Seek to a position in the current track.
101 * This is not used internally, and exists only because it's in
105 /** Get metadata for the current track.
106 * This is not used internally, and exists only because it's in
109 GetMetadataAction
= 1 << 5,
110 /** Get a list of tracks in the current playlist.
111 * This is not used internally, and exists only because it's in
114 GetTracklistAction
= 1 << 6,
115 /** Stop the current track.
116 * This is only used internally, and is *NOT* part of MPRIS.
121 Q_DECLARE_FLAGS(Actions
, Action
);
124 Q_DECLARE_OPERATORS_FOR_FLAGS(Jerboa::Actions
);