librespot/protocol/proto/spirc.proto

134 lines
3.6 KiB
Protocol Buffer
Raw Permalink Normal View History

syntax = "proto2";
2015-07-01 17:49:03 +00:00
message Frame {
optional uint32 version = 0x1;
optional string ident = 0x2;
optional string protocol_version = 0x3;
optional uint32 seq_nr = 0x4;
optional MessageType typ = 0x5;
optional DeviceState device_state = 0x7;
optional Goodbye goodbye = 0xb;
optional State state = 0xc;
optional uint32 position = 0xd;
optional uint32 volume = 0xe;
optional int64 state_update_id = 0x11;
repeated string recipient = 0x12;
optional bytes context_player_state = 0x13;
2016-05-03 09:04:54 +00:00
optional string new_name = 0x14;
2017-04-13 12:33:28 +00:00
optional Metadata metadata = 0x19;
2015-07-01 17:49:03 +00:00
}
2015-04-25 20:32:07 +00:00
enum MessageType {
2015-07-01 17:49:03 +00:00
kMessageTypeHello = 0x1;
kMessageTypeGoodbye = 0x2;
kMessageTypeProbe = 0x3;
kMessageTypeNotify = 0xa;
kMessageTypeLoad = 0x14;
kMessageTypePlay = 0x15;
kMessageTypePause = 0x16;
kMessageTypePlayPause = 0x17;
kMessageTypeSeek = 0x18;
kMessageTypePrev = 0x19;
kMessageTypeNext = 0x1a;
kMessageTypeVolume = 0x1b;
kMessageTypeShuffle = 0x1c;
kMessageTypeRepeat = 0x1d;
kMessageTypeVolumeDown = 0x1f;
kMessageTypeVolumeUp = 0x20;
kMessageTypeReplace = 0x21;
kMessageTypeLogout = 0x22;
kMessageTypeAction = 0x23;
2016-05-03 09:04:54 +00:00
kMessageTypeRename = 0x24;
2017-04-13 12:33:28 +00:00
kMessageTypeUpdateMetadata = 0x80;
2015-04-25 20:32:07 +00:00
}
2015-07-01 17:49:03 +00:00
message DeviceState {
optional string sw_version = 0x1;
optional bool is_active = 0xa;
optional bool can_play = 0xb;
optional uint32 volume = 0xc;
optional string name = 0xd;
optional uint32 error_code = 0xe;
optional int64 became_active_at = 0xf;
optional string error_message = 0x10;
repeated Capability capabilities = 0x11;
2017-04-13 12:33:28 +00:00
optional string context_player_error = 0x14;
repeated Metadata metadata = 0x19;
2015-07-01 17:49:03 +00:00
}
message Capability {
optional CapabilityType typ = 0x1;
repeated int64 intValue = 0x2;
repeated string stringValue = 0x3;
2015-04-25 20:32:07 +00:00
}
2015-07-01 17:49:03 +00:00
enum CapabilityType {
kSupportedContexts = 0x1;
kCanBePlayer = 0x2;
kRestrictToLocal = 0x3;
kDeviceType = 0x4;
kGaiaEqConnectId = 0x5;
kSupportsLogout = 0x6;
kIsObservable = 0x7;
kVolumeSteps = 0x8;
kSupportedTypes = 0x9;
kCommandAcks = 0xa;
2016-05-03 09:04:54 +00:00
kSupportsRename = 0xb;
2017-04-13 12:33:28 +00:00
kHidden = 0xc;
2018-02-25 20:23:32 +00:00
kSupportsPlaylistV2 = 0xd;
2018-09-26 15:11:32 +00:00
kSupportsExternalEpisodes = 0xe;
2015-07-01 17:49:03 +00:00
}
2015-04-25 20:32:07 +00:00
message Goodbye {
2015-07-01 17:49:03 +00:00
optional string reason = 0x1;
2015-04-25 20:32:07 +00:00
}
2015-07-01 17:49:03 +00:00
2015-04-25 20:32:07 +00:00
message State {
2015-07-01 17:49:03 +00:00
optional string context_uri = 0x2;
2015-04-25 20:32:07 +00:00
optional uint32 index = 0x3;
2015-07-01 17:49:03 +00:00
optional uint32 position_ms = 0x4;
2015-04-25 20:32:07 +00:00
optional PlayStatus status = 0x5;
2015-07-01 17:49:03 +00:00
optional uint64 position_measured_at = 0x7;
optional string context_description = 0x8;
2015-04-25 20:32:07 +00:00
optional bool shuffle = 0xd;
optional bool repeat = 0xe;
2015-07-01 17:49:03 +00:00
optional string last_command_ident = 0x14;
optional uint32 last_command_msgid = 0x15;
optional bool playing_from_fallback = 0x18;
optional uint32 row = 0x19;
optional uint32 playing_track_index = 0x1a;
repeated TrackRef track = 0x1b;
optional Ad ad = 0x1c;
2015-04-25 20:32:07 +00:00
}
2015-07-01 17:49:03 +00:00
enum PlayStatus {
kPlayStatusStop = 0x0;
kPlayStatusPlay = 0x1;
kPlayStatusPause = 0x2;
kPlayStatusLoading = 0x3;
}
2015-04-25 20:32:07 +00:00
2015-07-01 17:49:03 +00:00
message TrackRef {
optional bytes gid = 0x1;
optional string uri = 0x2;
optional bool queued = 0x3;
optional string context = 0x4;
}
2015-04-25 20:32:07 +00:00
2015-07-01 17:49:03 +00:00
message Ad {
optional int32 next = 0x1;
optional bytes ogg_fid = 0x2;
optional bytes image_fid = 0x3;
optional int32 duration = 0x4;
optional string click_url = 0x5;
optional string impression_url = 0x6;
optional string product = 0x7;
optional string advertiser = 0x8;
optional bytes gid = 0x9;
2015-04-25 20:32:07 +00:00
}
2017-04-13 12:33:28 +00:00
message Metadata {
optional string type = 0x1;
optional string metadata = 0x2;
}