Clementine-audio-player-Mac.../src/networkremote/incomingdataparser.h

77 lines
2.3 KiB
C
Raw Normal View History

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"
#include "remoteclient.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();
public slots:
void Parse(const pb::remote::Message& msg);
2012-12-31 23:37:39 +01:00
signals:
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 SendAllActivePlaylists();
2012-12-31 23:37:39 +01:00
void SendPlaylistSongs(int id);
void Open(int id);
void Close(int id);
void GetLyrics();
void Love();
void Ban();
2012-12-31 23:37:39 +01:00
void Play();
void PlayPause();
void Pause();
void Stop();
void StopAfterCurrent();
2012-12-31 23:37:39 +01:00
void Next();
void Previous();
void SetVolume(int volume);
void PlayAt(int i, Engine::TrackChangeFlags change, bool reshuffle);
void SetActivePlaylist(int id);
void ShuffleCurrent();
2013-01-15 14:43:02 +01:00
void SetRepeatMode(PlaylistSequence::RepeatMode mode);
void SetShuffleMode(PlaylistSequence::ShuffleMode mode);
void InsertUrls(int id, const QList<QUrl>& urls, int pos, bool play_now,
bool enqueue);
void InsertSongs(int id, const SongList& songs, int pos, bool play_now,
bool enqueue);
void RemoveSongs(int id, const QList<int>& indices);
void SeekTo(int seconds);
void SendLibrary(RemoteClient* client);
void RateCurrentSong(double);
2012-12-31 23:37:39 +01:00
2014-10-21 17:59:02 +02:00
void DoGlobalSearch(QString, RemoteClient*);
private:
2012-12-31 23:37:39 +01:00
Application* app_;
bool close_connection_;
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);
void InsertUrls(const pb::remote::Message& msg);
void RemoveSongs(const pb::remote::Message& msg);
void ClientConnect(const pb::remote::Message& msg, RemoteClient* client);
void SendPlaylists(const pb::remote::Message& msg);
void OpenPlaylist(const pb::remote::Message& msg);
void ClosePlaylist(const pb::remote::Message& msg);
void RateSong(const pb::remote::Message& msg);
2014-10-21 17:59:02 +02:00
void GlobalSearch(RemoteClient* client, const pb::remote::Message& msg);
Song CreateSongFromProtobuf(const pb::remote::SongMetadata& pb);
2012-12-31 23:37:39 +01:00
};
#endif // INCOMINGDATAPARSER_H