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

97 lines
3.0 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/application.h"
2018-06-13 22:37:13 +02:00
#include "core/player.h"
#include "remoteclient.h"
2018-06-13 22:37:13 +02:00
#include "remotecontrolmessages.pb.h"
#include "ui/mainwindow.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();
void SetRemoteRootFiles(const QString& files_root_folder) {
files_root_folder_ = files_root_folder;
}
public slots:
void Parse(const pb::remote::Message& msg);
void ReloadSettings();
2018-06-13 22:37:13 +02: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 New(const QString& new_playlist_name);
void Open(int id);
void Clear(int id);
void Close(int id);
void Rename(int id, const QString& new_playlist_name);
void Favorite(int id, bool favorite);
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 Enque(int id, int i);
2012-12-31 23:37:39 +01:00
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*);
void SendSavedRadios(RemoteClient* client);
void SendListFiles(QString, RemoteClient*);
void AddToPlaylistSignal(QMimeData* data);
void SetCurrentPlaylist(int id);
private:
2012-12-31 23:37:39 +01:00
Application* app_;
bool close_connection_;
MainWindow::PlaylistAddBehaviour doubleclick_playlist_addmode_;
QString files_root_folder_;
2012-12-31 23:37:39 +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);
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 UpdatePlaylist(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);
void AppendFilesToPlaylist(const pb::remote::Message& msg);
Song CreateSongFromProtobuf(const pb::remote::SongMetadata& pb);
2012-12-31 23:37:39 +01:00
};
#endif // INCOMINGDATAPARSER_H