2013-01-03 21:40:47 +01:00
|
|
|
#ifndef INCOMINGDATAPARSER_H
|
|
|
|
#define INCOMINGDATAPARSER_H
|
2012-12-31 23:37:39 +01:00
|
|
|
|
|
|
|
#include "core/player.h"
|
|
|
|
#include "core/application.h"
|
2013-01-03 21:40:47 +01:00
|
|
|
#include "remotecontrolmessages.pb.h"
|
2012-12-31 23:37:39 +01:00
|
|
|
|
2013-01-03 21:40:47 +01:00
|
|
|
class IncomingDataParser : public QObject {
|
2012-12-31 23:37:39 +01:00
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2013-01-03 21:40:47 +01:00
|
|
|
IncomingDataParser(Application* app);
|
|
|
|
~IncomingDataParser();
|
2012-12-31 23:37:39 +01:00
|
|
|
|
|
|
|
bool close_connection();
|
|
|
|
|
2013-01-10 21:21:55 +01:00
|
|
|
public slots:
|
2013-01-23 20:02:12 +01:00
|
|
|
void Parse(const pb::remote::Message& msg);
|
2013-01-10 21:21:55 +01:00
|
|
|
|
2012-12-31 23:37:39 +01:00
|
|
|
signals:
|
2013-01-15 13:05:43 +01:00
|
|
|
void SendClementineInfo();
|
2013-03-27 16:54:02 +01:00
|
|
|
void SendFirstData(bool send_playlist_songs);
|
2012-12-31 23:37:39 +01:00
|
|
|
void SendAllPlaylists();
|
|
|
|
void SendPlaylistSongs(int id);
|
|
|
|
|
|
|
|
void Play();
|
|
|
|
void PlayPause();
|
|
|
|
void Pause();
|
|
|
|
void Stop();
|
|
|
|
void Next();
|
|
|
|
void Previous();
|
|
|
|
void SetVolume(int volume);
|
|
|
|
void PlayAt(int i, Engine::TrackChangeFlags change, bool reshuffle);
|
|
|
|
void SetActivePlaylist(int id);
|
2013-01-09 20:07:28 +01:00
|
|
|
void ShuffleCurrent();
|
2013-01-15 14:43:02 +01:00
|
|
|
void SetRepeatMode(PlaylistSequence::RepeatMode mode);
|
|
|
|
void SetShuffleMode(PlaylistSequence::ShuffleMode mode);
|
2013-04-13 11:57:05 +02:00
|
|
|
void InsertUrls(const QList<QUrl>& urls, int pos, bool play_now, bool enqueue);
|
|
|
|
void RemoveSongs(const QList<int>& indices);
|
2013-01-23 20:02:12 +01:00
|
|
|
void SeekTo(int seconds);
|
2012-12-31 23:37:39 +01:00
|
|
|
|
|
|
|
private:
|
|
|
|
Application* app_;
|
|
|
|
bool close_connection_;
|
|
|
|
|
2013-01-15 13:05:43 +01:00
|
|
|
void GetPlaylistSongs(const pb::remote::Message& msg);
|
|
|
|
void ChangeSong(const pb::remote::Message& msg);
|
2013-01-15 14:43:02 +01:00
|
|
|
void SetRepeatMode(const pb::remote::Repeat& repeat);
|
|
|
|
void SetShuffleMode(const pb::remote::Shuffle& shuffle);
|
2013-04-13 11:57:05 +02:00
|
|
|
void InsertUrls(const pb::remote::Message& msg);
|
|
|
|
void RemoveSongs(const pb::remote::Message& msg);
|
2013-03-27 16:54:02 +01:00
|
|
|
void ClientConnect(const pb::remote::Message& msg);
|
2012-12-31 23:37:39 +01:00
|
|
|
};
|
|
|
|
|
2013-01-03 21:40:47 +01:00
|
|
|
#endif // INCOMINGDATAPARSER_H
|