1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-14 18:35:16 +01:00

- Added various playlist signals.

- Bump Proto version to 3, so that people update Clementine when using new Android App Version is released.
This commit is contained in:
Andreas 2013-02-07 21:34:04 +01:00
parent 3cb7a76656
commit 589816e82c
4 changed files with 29 additions and 1 deletions

View File

@ -169,7 +169,7 @@ message RequestSetTrackPosition {
// The message itself
message Message {
optional int32 version = 1 [default=2];
optional int32 version = 1 [default=3];
optional MsgType type = 2 [default=UNKNOWN]; // What data is in the message?
optional RequestConnect request_connect = 21;

View File

@ -128,6 +128,14 @@ void NetworkRemote::AcceptConnection() {
outgoing_data_creator_.get(), SLOT(ActiveChanged(Playlist*)));
connect(app_->playlist_manager(), SIGNAL(PlaylistChanged(Playlist*)),
outgoing_data_creator_.get(), SLOT(PlaylistChanged(Playlist*)));
connect(app_->playlist_manager(), SIGNAL(PlaylistAdded(int,QString)),
outgoing_data_creator_.get(), SLOT(PlaylistAdded(int,QString)));
connect(app_->playlist_manager(), SIGNAL(PlaylistRenamed(int,QString)),
outgoing_data_creator_.get(), SLOT(PlaylistRenamed(int,QString)));
connect(app_->playlist_manager(), SIGNAL(PlaylistClosed(int)),
outgoing_data_creator_.get(), SLOT(PlaylistClosed(int)));
connect(app_->playlist_manager(), SIGNAL(PlaylistDeleted(int)),
outgoing_data_creator_.get(), SLOT(PlaylistDeleted(int)));
connect(app_->player(), SIGNAL(VolumeChanged(int)), outgoing_data_creator_.get(),
SLOT(VolumeChanged(int)));

View File

@ -126,6 +126,22 @@ void OutgoingDataCreator::ActiveChanged(Playlist*) {
SendAllPlaylists();
}
void OutgoingDataCreator::PlaylistAdded(int id, const QString& name) {
SendAllPlaylists();
}
void OutgoingDataCreator::PlaylistDeleted(int id) {
SendAllPlaylists();
}
void OutgoingDataCreator::PlaylistClosed(int id) {
SendAllPlaylists();
}
void OutgoingDataCreator::PlaylistRenamed(int id, const QString& new_name) {
SendAllPlaylists();
}
void OutgoingDataCreator::SendFirstData() {
// First Send the current song
PlaylistItemPtr item = app_->player()->GetCurrentItem();

View File

@ -30,6 +30,10 @@ public slots:
void SendPlaylistSongs(int id);
void PlaylistChanged(Playlist*);
void VolumeChanged(int volume);
void PlaylistAdded(int id, const QString& name);
void PlaylistDeleted(int id);
void PlaylistClosed(int id);
void PlaylistRenamed(int id, const QString& new_name);
void ActiveChanged(Playlist*);
void CurrentSongChanged(const Song& song, const QString& uri, const QImage& img);
void StateChanged(Engine::State);