1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-17 03:45:56 +01:00
Clementine-audio-player-Mac.../ext/libclementine-remote/remotecontrolmessages.proto
Andreas 04ccdbbf08 added version to protocol buffer message
changed client handling
only non public ips can connect (can change that in options)
2013-01-10 21:21:55 +01:00

76 lines
1.5 KiB
Protocol Buffer

package pb.remote;
enum MsgType {
// Messages generally send from client to server
CONNECT = 0;
DISCONNECT = 1;
REQUEST_PLAYLISTS = 2;
REQUEST_PLAYLIST_SONGS = 3;
CHANGE_SONG = 4;
SET_VOLUME = 5;
// Messages send by both
PLAY = 20;
PLAYPAUSE = 21;
PAUSE = 22;
STOP = 23;
NEXT = 24;
PREV = 25;
TOOGLE_SHUFFLE = 26;
// Messages send from server to client
INFOS = 40;
CURRENT_METAINFOS = 41;
PLAYLISTS = 42;
PLAYLIST_SONGS = 43;
KEEP_ALIVE = 44;
}
enum EngineState {
Empty = 0;
Idle = 1;
Playing = 2;
Paused = 3;
}
message Message {
required int32 version = 1;
required MsgType msgType = 2;
optional EngineState state = 3;
optional ClementineInfos infos = 4;
optional SongMetadata currentSong = 5;
optional int32 volume = 6;
repeated Playlist playlists = 7;
}
message ClementineInfos {
optional string version = 1;
}
message SongMetadata {
optional int32 id = 1;
optional int32 index = 2;
optional string title = 3;
optional string album = 4;
optional string artist = 5;
optional string albumartist = 6;
optional int32 track = 7;
optional int32 disc = 8;
optional string pretty_year = 9;
optional string genre = 10;
optional int32 playcount = 11;
optional string pretty_length = 12;
optional string art = 13;
}
message Playlist {
optional int32 id = 1;
optional string name = 2;
optional int32 item_count = 3;
optional bool active = 4;
repeated SongMetadata songs = 10;
}