syntax = "proto3";

package music.v1alpha1;

import "metadata/v1alpha1/track.proto";

message GetCurrentlyPlayingSongRequest {}

message GetCurrentlyPlayingSongResponse {
    metadata.v1alpha1.Track track = 1;
    uint32 index = 2;
    uint32 position_ms = 3;
    bool is_playing = 4;
}

message GetPlaybackStateRequest {}

message GetPlaybackStateResponse {}

message GetTimePositionRequest {}

message GetTimePositionResponse {}

message NextRequest {}

message NextResponse {}

message PauseRequest {}

message PauseResponse {}

message PlayRequest {}

message PlayResponse {}

message PreviousRequest {}

message PreviousResponse {}

message SeekRequest {}

message SeekResponse {}

message StopRequest {}

message StopResponse {}

service PlaybackService {
  rpc GetCurrentlyPlayingSong(GetCurrentlyPlayingSongRequest)
      returns (GetCurrentlyPlayingSongResponse) {}
  rpc GetPlaybackState(GetPlaybackStateRequest)
      returns (GetPlaybackStateResponse) {}
  rpc GetTimePosition(GetTimePositionRequest)
      returns (GetTimePositionResponse) {}
  rpc Next(NextRequest) returns (NextResponse) {}
  rpc Pause(PauseRequest) returns (PauseResponse) {}
  rpc Play(PlayRequest) returns (PlayResponse) {}
  rpc Previous(PreviousRequest) returns (PreviousResponse) {}
  rpc Seek(SeekRequest) returns (SeekResponse) {}
  rpc Stop(StopRequest) returns (StopResponse) {}
}
