Implemented directory browser
[someplayer] / src / player / player.h
index 562aad4..0a417b8 100644 (file)
@@ -27,7 +27,6 @@
 #include "../playlist.h"
 #include <phonon/MediaObject>
 #include <phonon/AudioOutput>
-#include <phonon/VolumeSlider>
 #include <phonon/Effect>
 #include <phonon/Path>
 #include <QStack>
@@ -44,6 +43,7 @@ namespace SomePlayer {
        namespace Playback {
 
                enum PlayerState { PLAYER_STOPPED, PLAYER_PLAYING, PLAYER_PAUSED, PLAYER_LOADING, PLAYER_DONE, PLAYER_ERROR };
+               enum RepeatRule {REPEAT_NO, REPEAT_ALL, REPEAT_ONE};
 
                class Randomizer {
                public:
@@ -63,8 +63,7 @@ namespace SomePlayer {
                        explicit Player(QObject *parent = 0);
 
                        bool random() {return _random;}
-                       bool repeat() {return _repeat;}
-                       int volume() {return (int)(_output->volume()*100 + 0.5);}
+                       RepeatRule repeat() {return _repeat;}
                        Phonon::MediaObject* mediaObject() {return _player;}
                        bool equalizerEnabled() {return _equalizer_enabled;}
                        bool equalizerAvailable() {return _equalizer != NULL;}
@@ -88,7 +87,6 @@ namespace SomePlayer {
                        void toggleRandom();
                        void toggleRepeat();
                        void seek(int);
-                       void setVolume(int);
                        void enableEqualizer();
                        void disableEqualizer();
                        void setEqualizerValue(int band, double value);
@@ -104,7 +102,7 @@ namespace SomePlayer {
                        int _current;
                        Track _track; // current track (workaround)
                        bool _random;
-                       bool _repeat;
+                       RepeatRule _repeat;
                        bool _equalizer_enabled;
                        QStack<int> _history;
                        QQueue<int> _queue;