librespot/protocol/proto/mercury.proto
Paul Liétar 1ad62e6f18 First working version of protocol handshake.
Key exchange and authentication is functional.
Protocol definition has been moved to separate crate to speed up build time.
Various cleanups. Take login info from command line, rather than hardcoded.
2015-05-09 11:16:43 +01:00

49 lines
1 KiB
Protocol Buffer

message MercuryRequest {
required string url = 0x01;
optional string mime = 0x02;
required string method = 0x03;
}
message MercuryReply {
required string url = 0x01;
required string mime = 0x02;
required sint32 code = 0x04;
repeated Header header = 0x06;
message Header {
required string key = 0x01;
required bytes value = 0x02;
}
}
message MercuryGetRequest {
required string url = 0x01;
optional string method = 0x03;
}
message MercuryMultiGetRequest {
repeated MercuryGetRequest request = 0x01;
}
message MercuryGetReply {
enum CachePolicy {
CACHE_NO = 1;
CACHE_PRIVATE = 2;
CACHE_PUBLIC = 3;
}
optional sint32 code = 0x01;
optional CachePolicy cache_policy = 0x03;
optional uint32 ttl = 0x04;
optional bytes etag = 0x05;
optional string mime = 0x06;
optional bytes body = 0x07;
}
message MercuryMultiGetReply {
repeated MercuryGetReply reply = 0x1;
}
message MercurySubscribed {
required string url = 0x1;
}