mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-19 13:01:32 +01:00
79 lines
2.0 KiB
Protocol Buffer
79 lines
2.0 KiB
Protocol Buffer
/* This file is part of Clementine.
|
|
Copyright 2011, David Sansome <me@davidsansome.com>
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
*/
|
|
|
|
// Note: this file is licensed under the Apache License instead of GPL because
|
|
// it is used by the Spotify blob which links against libspotify and is not GPL
|
|
// compatible.
|
|
|
|
|
|
package protobuf;
|
|
|
|
message LoginRequest {
|
|
required string username = 1;
|
|
required string password = 2;
|
|
}
|
|
|
|
message LoginResponse {
|
|
required bool success = 1;
|
|
required string error = 2;
|
|
}
|
|
|
|
message Playlists {
|
|
message Playlist {
|
|
required int32 index = 1;
|
|
required string name = 2;
|
|
}
|
|
|
|
repeated Playlist playlist = 1;
|
|
}
|
|
|
|
message Track {
|
|
required bool starred = 1;
|
|
required string title = 2;
|
|
repeated string artist = 3;
|
|
required string album = 4;
|
|
required int32 duration_msec = 5;
|
|
required int32 popularity = 6;
|
|
required int32 disc = 7;
|
|
required int32 track = 8;
|
|
required int32 year = 9;
|
|
required string uri = 10;
|
|
}
|
|
|
|
message LoadPlaylistRequest {
|
|
enum Type {
|
|
Starred = 1;
|
|
Inbox = 2;
|
|
UserPlaylist = 3;
|
|
}
|
|
|
|
required Type type = 1;
|
|
optional int32 user_playlist_index = 2;
|
|
}
|
|
|
|
message LoadPlaylistResponse {
|
|
required LoadPlaylistRequest request = 1;
|
|
repeated Track track = 2;
|
|
}
|
|
|
|
message SpotifyMessage {
|
|
optional LoginRequest login_request = 1;
|
|
optional LoginResponse login_response = 2;
|
|
optional Playlists playlists_updated = 3;
|
|
optional LoadPlaylistRequest load_playlist_request = 4;
|
|
optional LoadPlaylistResponse load_playlist_response = 5;
|
|
}
|