import "steammessages_base.proto";
import "steammessages_unified_base.steamclient.proto";

option cc_generic_services = true;

enum EBroadcastImageType {
	k_EBroadcastImageType_None = 0;
	k_EBroadcastImageType_Offline = 1;
	k_EBroadcastImageType_Standby = 2;
	k_EBroadcastImageType_Avatar = 3;
	k_EBroadcastImageType_Summary = 4;
	k_EBroadcastImageType_Background = 5;
	k_EBroadcastImageType_Emoticon = 6;
}

enum EGetGamesAlgorithm {
	k_EGetGamesAlgorithm_Default = 1;
	k_EGetGamesAlgorithm_MostPlayed = 2;
	k_EGetGamesAlgorithm_PopularNew = 3;
}

enum EGetChannelsAlgorithm {
	k_EGetChannelsAlgorithm_Default = 1;
	k_EGetChannelsAlgorithm_Friends = 2;
	k_EGetChannelsAlgorithm_Featured = 3;
	k_EGetChannelsAlgorithm_Developer = 4;
	k_EGetChannelsAlgorithm_Following = 5;
}

enum ESteamTVContentTemplate {
	k_ESteamTVContentTemplate_Invalid = 0;
	k_ESteamTVContentTemplate_Takeover = 1;
	k_ESteamTVContentTemplate_SingleGame = 2;
	k_ESteamTVContentTemplate_GameList = 3;
	k_ESteamTVContentTemplate_QuickExplore = 4;
	k_ESteamTVContentTemplate_ConveyorBelt = 5;
	k_ESteamTVContentTemplate_WatchParty = 6;
	k_ESteamTVContentTemplate_Developer = 7;
	k_ESteamTVContentTemplate_Event = 8;
}

message CSteamTV_CreateBroadcastChannel_Request {
	optional string unique_name = 1;
}

message CSteamTV_CreateBroadcastChannel_Response {
	optional fixed64 broadcast_channel_id = 1;
}

message CSteamTV_GetBroadcastChannelID_Request {
	optional string unique_name = 1;
}

message CSteamTV_GetBroadcastChannelID_Response {
	optional fixed64 broadcast_channel_id = 1;
	optional string unique_name = 2;
	optional fixed64 steamid = 3;
}

message CSteamTV_SetBroadcastChannelProfile_Request {
	optional fixed64 broadcast_channel_id = 1;
	optional string name = 2;
	optional string language = 3;
	optional string headline = 4;
	optional string summary = 5;
	optional string avatar_hash = 6;
	optional string schedule = 7;
	optional string rules = 8;
	optional string panels = 9;
}

message CSteamTV_SetBroadcastChannelProfile_Response {
}

message CSteamTV_GetBroadcastChannelProfile_Request {
	optional fixed64 broadcast_channel_id = 1;
}

message CSteamTV_GetBroadcastChannelProfile_Response {
	optional string unique_name = 1;
	optional fixed64 owner_steamid = 2;
	optional string name = 3;
	optional string language = 4;
	optional string headline = 5;
	optional string summary = 6;
	optional string schedule = 7;
	optional string rules = 8;
	optional string panels = 9;
	optional bool is_partnered = 10;
}

message CSteamTV_SetBroadcastChannelImage_Request {
	optional fixed64 broadcast_channel_id = 1;
	optional .EBroadcastImageType image_type = 2 [default = k_EBroadcastImageType_None];
	optional uint32 image_index = 3;
	optional uint32 image_width = 4;
	optional uint32 image_height = 5;
	optional uint32 file_size = 6;
	optional string file_extension = 7;
	optional string file_hash = 8;
	optional bool undo = 9;
}

message CSteamTV_SetBroadcastChannelImage_Response {
	optional string replace_image_hash = 1;
}

message CSteamTV_GetBroadcastChannelImages_Request {
	optional fixed64 broadcast_channel_id = 1;
	repeated .EBroadcastImageType image_types = 2;
}

message CSteamTV_GetBroadcastChannelImages_Response {
	message Images {
		optional .EBroadcastImageType image_type = 1 [default = k_EBroadcastImageType_None];
		optional string image_path = 2;
		optional uint32 image_index = 3;
	}

	repeated .CSteamTV_GetBroadcastChannelImages_Response.Images images = 1;
}

message CSteamTV_SetBroadcastChannelLinkRegions_Request {
	message Links {
		optional uint32 link_index = 1;
		optional string url = 2;
		optional string link_description = 3;
		optional uint32 left = 4;
		optional uint32 top = 5;
		optional uint32 width = 6;
		optional uint32 height = 7;
	}

	optional fixed64 broadcast_channel_id = 1;
	repeated .CSteamTV_SetBroadcastChannelLinkRegions_Request.Links links = 2;
}

message CSteamTV_SetBroadcastChannelLinkRegions_Response {
}

message CSteamTV_GetBroadcastChannelLinks_Request {
	optional fixed64 broadcast_channel_id = 1;
}

message CSteamTV_GetBroadcastChannelLinks_Response {
	message Links {
		optional uint32 link_index = 1;
		optional string url = 2;
		optional string link_description = 3;
		optional uint32 left = 4;
		optional uint32 top = 5;
		optional uint32 width = 6;
		optional uint32 height = 7;
	}

	repeated .CSteamTV_GetBroadcastChannelLinks_Response.Links links = 1;
}

message CSteamTV_GetBroadcastChannelBroadcasters_Request {
	optional fixed64 broadcast_channel_id = 1;
}

message CSteamTV_GetBroadcastChannelBroadcasters_Response {
	message Broadcaster {
		optional fixed64 steamid = 1;
		optional string name = 2;
		optional string rtmp_token = 3;
	}

	repeated .CSteamTV_GetBroadcastChannelBroadcasters_Response.Broadcaster broadcasters = 1;
}

message CSteamTV_GetFollowedChannels_Request {
}

message GetBroadcastChannelEntry {
	optional fixed64 broadcast_channel_id = 1;
	optional string unique_name = 2;
	optional string name = 3;
	optional uint32 appid = 4;
	optional uint64 viewers = 5;
	optional uint64 views = 6;
	optional string thumbnail_url = 7;
	optional uint64 followers = 8;
	optional string headline = 9;
	optional string avatar_url = 10;
	optional fixed64 broadcaster_steamid = 11;
	optional uint64 subscribers = 12;
	optional string background_url = 13;
	optional bool is_featured = 14;
	optional bool is_disabled = 15;
	optional bool is_live = 16;
	optional string language = 17;
	optional uint32 reports = 18;
	optional bool is_partnered = 19;
}

message CSteamTV_GetFollowedChannels_Response {
	repeated .GetBroadcastChannelEntry results = 1;
}

message CSteamTV_GetSubscribedChannels_Request {
}

message CSteamTV_GetSubscribedChannels_Response {
	repeated .GetBroadcastChannelEntry results = 1;
}

message CSteamTV_GetBroadcastChannelStatus_Request {
	optional fixed64 broadcast_channel_id = 1;
}

message CSteamTV_GetBroadcastChannelStatus_Response {
	optional bool is_live = 1;
	optional bool is_disabled = 2;
	optional uint32 appid = 3;
	optional uint64 viewers = 4;
	optional uint64 views = 5;
	optional fixed64 broadcaster_steamid = 6;
	optional string thumbnail_url = 7;
	optional uint64 followers = 8;
	optional uint64 subscribers = 9;
	optional string unique_name = 10;
	optional uint64 broadcast_session_id = 11;
}

message CSteamTV_FollowBroadcastChannel_Request {
	optional fixed64 broadcast_channel_id = 1;
	optional bool undo = 2;
}

message CSteamTV_FollowBroadcastChannel_Response {
	optional bool is_followed = 1;
}

message CSteamTV_SubscribeBroadcastChannel_Request {
	optional fixed64 broadcast_channel_id = 1;
}

message CSteamTV_SubscribeBroadcastChannel_Response {
	optional bool is_subscribed = 1;
}

message CSteamTV_GetBroadcastChannelClips_Request {
	optional fixed64 broadcast_channel_id = 1;
}

message CSteamTV_BroadcastClipInfo {
	optional uint64 broadcast_clip_id = 1;
	optional uint64 channel_id = 2;
	optional uint32 app_id = 3;
	optional fixed64 broadcaster_steamid = 4;
	optional fixed64 creator_steamid = 5;
	optional string video_description = 6;
	optional uint32 live_time = 7;
	optional uint32 length_ms = 8;
	optional string thumbnail_path = 9;
}

message CSteamTV_GetBroadcastChannelClips_Response {
	repeated .CSteamTV_BroadcastClipInfo clips = 1;
	optional string thumbnail_host = 2;
}

message CSteamTV_ReportBroadcastChannel_Request {
	optional fixed64 broadcast_channel_id = 1;
	optional string reason = 2;
}

message CSteamTV_ReportBroadcastChannel_Response {
}

message CSteamTV_GetBroadcastChannelInteraction_Request {
	optional fixed64 broadcast_channel_id = 1;
}

message CSteamTV_GetBroadcastChannelInteraction_Response {
	optional bool is_followed = 1;
	optional bool is_subscribed = 2;
}

message CSteamTV_GetGames_Request {
	optional uint32 appid = 1;
	optional .EGetGamesAlgorithm algorithm = 2 [default = k_EGetGamesAlgorithm_Default];
	optional uint32 count = 3;
}

message CSteamTV_Game {
	optional uint32 appid = 1;
	optional string name = 2;
	optional string image = 3;
	optional uint64 viewers = 4;
	repeated .GetBroadcastChannelEntry channels = 5;
	optional string release_date = 6;
	optional string developer = 7;
	optional string publisher = 8;
}

message CSteamTV_GetGames_Response {
	repeated .CSteamTV_Game results = 1;
}

message CSteamTV_GetChannels_Request {
	optional .EGetChannelsAlgorithm algorithm = 1 [default = k_EGetChannelsAlgorithm_Default];
	optional uint32 count = 2;
	optional uint32 appid = 3;
}

message CSteamTV_GetChannels_Response {
	repeated .GetBroadcastChannelEntry results = 1;
}

message CSteamTV_AddChatBan_Request {
	optional fixed64 broadcast_channel_id = 1;
	optional fixed64 chatter_steamid = 2;
	optional uint32 duration = 3;
	optional bool permanent = 4;
	optional bool undo = 5;
}

message CSteamTV_AddChatBan_Response {
}

message CSteamTV_GetChatBans_Request {
	optional fixed64 broadcast_channel_id = 1;
}

message CSteamTV_ChatBan {
	optional fixed64 issuer_steamid = 1;
	optional fixed64 chatter_steamid = 2;
	optional string time_expires = 3;
	optional bool permanent = 4;
	optional string name = 5;
}

message CSteamTV_GetChatBans_Response {
	repeated .CSteamTV_ChatBan results = 1;
}

message CSteamTV_AddChatModerator_Request {
	optional fixed64 broadcast_channel_id = 1;
	optional fixed64 moderator_steamid = 2;
	optional bool undo = 3;
}

message CSteamTV_AddChatModerator_Response {
}

message CSteamTV_GetChatModerators_Request {
	optional fixed64 broadcast_channel_id = 1;
}

message CSteamTV_ChatModerator {
	optional fixed64 steamid = 1;
	optional string name = 2;
}

message CSteamTV_GetChatModerators_Response {
	repeated .CSteamTV_ChatModerator results = 1;
}

message CSteamTV_AddWordBan_Request {
	optional fixed64 broadcast_channel_id = 1;
	optional string word = 2;
	optional bool undo = 3;
}

message CSteamTV_AddWordBan_Response {
}

message CSteamTV_GetWordBans_Request {
	optional fixed64 broadcast_channel_id = 1;
}

message CSteamTV_GetWordBans_Response {
	repeated string results = 1;
}

message CSteamTV_JoinChat_Request {
	optional fixed64 broadcast_channel_id = 1;
}

message CSteamTV_JoinChat_Response {
	optional fixed64 chat_id = 1;
	optional string view_url_template = 2;
	repeated uint64 flair_group_ids = 3;
}

message CSteamTV_Search_Request {
	optional string term = 1;
}

message CSteamTV_Search_Response {
	repeated .GetBroadcastChannelEntry results = 1;
}

message CSteamTV_GetSteamTVUserSettings_Request {
}

message CSteamTV_GetSteamTVUserSettings_Response {
	optional bool stream_live_email = 1;
	optional bool stream_live_notification = 2;
}

message CSteamTV_SetSteamTVUserSettings_Request {
	optional bool stream_live_email = 1;
	optional bool stream_live_notification = 2;
}

message CSteamTV_SetSteamTVUserSettings_Response {
}

message CSteamTV_GetMyBroadcastChannels_Request {
}

message CSteamTV_GetMyBroadcastChannels_Response {
	repeated .GetBroadcastChannelEntry results = 1;
}

message CSteamTV_GetHomePageContents_Request {
}

message CSteamTV_HomePageTemplate_Takeover {
	repeated .GetBroadcastChannelEntry broadcasts = 1;
}

message CSteamTV_HomePageTemplate_SingleGame {
	repeated .GetBroadcastChannelEntry broadcasts = 1;
	optional uint32 appid = 2;
	optional string title = 3;
}

message GameListEntry {
	optional uint32 appid = 1;
	optional string game_name = 2;
	optional .GetBroadcastChannelEntry broadcast = 3;
}

message CSteamTV_HomePageTemplate_GameList {
	repeated .GameListEntry entries = 1;
	optional string title = 2;
}

message CSteamTV_HomePageTemplate_QuickExplore {
	repeated .GetBroadcastChannelEntry broadcasts = 1;
	optional string title = 2;
}

message CSteamTV_HomePageTemplate_ConveyorBelt {
	repeated .GetBroadcastChannelEntry broadcasts = 1;
	optional string title = 2;
}

message CSteamTV_HomePageTemplate_WatchParty {
	optional .GetBroadcastChannelEntry broadcast = 1;
	optional string title = 2;
	optional uint64 chat_group_id = 3;
}

message CSteamTV_HomePageTemplate_Developer {
	optional .GetBroadcastChannelEntry broadcast = 1;
	optional string title = 2;
}

message CSteamTV_HomePageTemplate_Event {
	optional string title = 1;
}

message CSteamTV_HomePageContentRow {
	optional .ESteamTVContentTemplate template_type = 1 [default = k_ESteamTVContentTemplate_Invalid];
	optional .CSteamTV_HomePageTemplate_Takeover takeover = 2;
	optional .CSteamTV_HomePageTemplate_SingleGame single_game = 3;
	optional .CSteamTV_HomePageTemplate_GameList game_list = 4;
	optional .CSteamTV_HomePageTemplate_QuickExplore quick_explore = 5;
	optional .CSteamTV_HomePageTemplate_ConveyorBelt conveyor_belt = 6;
	optional .CSteamTV_HomePageTemplate_WatchParty watch_party = 7;
	optional .CSteamTV_HomePageTemplate_Developer developer = 8;
	optional .CSteamTV_HomePageTemplate_Event event = 9;
}

message CSteamTV_GetHomePageContents_Response {
	repeated .CSteamTV_HomePageContentRow rows = 1;
}

message CSteamTV_AppCheer_SingleCheerType {
	optional uint32 cheer_type = 1;
	optional uint32 cheer_amount = 2;
}

message CSteamTV_AppCheer_Request {
	optional uint32 app_id = 1;
	optional fixed64 cheer_target_id = 2;
	repeated .CSteamTV_AppCheer_SingleCheerType cheers = 3;
}

message CSteamTV_AppCheer_Response {
	optional uint32 aggregation_delay_ms = 1;
}

service SteamTV {
	rpc CreateBroadcastChannel (.CSteamTV_CreateBroadcastChannel_Request) returns (.CSteamTV_CreateBroadcastChannel_Response);
	rpc GetBroadcastChannelID (.CSteamTV_GetBroadcastChannelID_Request) returns (.CSteamTV_GetBroadcastChannelID_Response);
	rpc SetBroadcastChannelProfile (.CSteamTV_SetBroadcastChannelProfile_Request) returns (.CSteamTV_SetBroadcastChannelProfile_Response);
	rpc GetBroadcastChannelProfile (.CSteamTV_GetBroadcastChannelProfile_Request) returns (.CSteamTV_GetBroadcastChannelProfile_Response);
	rpc SetBroadcastChannelImage (.CSteamTV_SetBroadcastChannelImage_Request) returns (.CSteamTV_SetBroadcastChannelImage_Response);
	rpc GetBroadcastChannelImages (.CSteamTV_GetBroadcastChannelImages_Request) returns (.CSteamTV_GetBroadcastChannelImages_Response);
	rpc SetBroadcastChannelLinkRegions (.CSteamTV_SetBroadcastChannelLinkRegions_Request) returns (.CSteamTV_SetBroadcastChannelLinkRegions_Response);
	rpc GetBroadcastChannelLinks (.CSteamTV_GetBroadcastChannelLinks_Request) returns (.CSteamTV_GetBroadcastChannelLinks_Response);
	rpc GetBroadcastChannelBroadcasters (.CSteamTV_GetBroadcastChannelBroadcasters_Request) returns (.CSteamTV_GetBroadcastChannelBroadcasters_Response);
	rpc GetFollowedChannels (.CSteamTV_GetFollowedChannels_Request) returns (.CSteamTV_GetFollowedChannels_Response);
	rpc GetSubscribedChannels (.CSteamTV_GetSubscribedChannels_Request) returns (.CSteamTV_GetSubscribedChannels_Response);
	rpc GetBroadcastChannelStatus (.CSteamTV_GetBroadcastChannelStatus_Request) returns (.CSteamTV_GetBroadcastChannelStatus_Response);
	rpc FollowBroadcastChannel (.CSteamTV_FollowBroadcastChannel_Request) returns (.CSteamTV_FollowBroadcastChannel_Response);
	rpc SubscribeBroadcastChannel (.CSteamTV_SubscribeBroadcastChannel_Request) returns (.CSteamTV_SubscribeBroadcastChannel_Response);
	rpc GetBroadcastChannelClips (.CSteamTV_GetBroadcastChannelClips_Request) returns (.CSteamTV_GetBroadcastChannelClips_Response);
	rpc ReportBroadcastChannel (.CSteamTV_ReportBroadcastChannel_Request) returns (.CSteamTV_ReportBroadcastChannel_Response);
	rpc GetBroadcastChannelInteraction (.CSteamTV_GetBroadcastChannelInteraction_Request) returns (.CSteamTV_GetBroadcastChannelInteraction_Response);
	rpc GetGames (.CSteamTV_GetGames_Request) returns (.CSteamTV_GetGames_Response);
	rpc GetChannels (.CSteamTV_GetChannels_Request) returns (.CSteamTV_GetChannels_Response);
	rpc AddChatBan (.CSteamTV_AddChatBan_Request) returns (.CSteamTV_AddChatBan_Response);
	rpc GetChatBans (.CSteamTV_GetChatBans_Request) returns (.CSteamTV_GetChatBans_Response);
	rpc AddChatModerator (.CSteamTV_AddChatModerator_Request) returns (.CSteamTV_AddChatModerator_Response);
	rpc GetChatModerators (.CSteamTV_GetChatModerators_Request) returns (.CSteamTV_GetChatModerators_Response);
	rpc AddWordBan (.CSteamTV_AddWordBan_Request) returns (.CSteamTV_AddWordBan_Response);
	rpc GetWordBans (.CSteamTV_GetWordBans_Request) returns (.CSteamTV_GetWordBans_Response);
	rpc JoinChat (.CSteamTV_JoinChat_Request) returns (.CSteamTV_JoinChat_Response);
	rpc Search (.CSteamTV_Search_Request) returns (.CSteamTV_Search_Response);
	rpc GetSteamTVUserSettings (.CSteamTV_GetSteamTVUserSettings_Request) returns (.CSteamTV_GetSteamTVUserSettings_Response);
	rpc SetSteamTVUserSettings (.CSteamTV_SetSteamTVUserSettings_Request) returns (.CSteamTV_SetSteamTVUserSettings_Response);
	rpc GetMyBroadcastChannels (.CSteamTV_GetMyBroadcastChannels_Request) returns (.CSteamTV_GetMyBroadcastChannels_Response);
	rpc GetHomePageContents (.CSteamTV_GetHomePageContents_Request) returns (.CSteamTV_GetHomePageContents_Response);
	rpc AppCheer (.CSteamTV_AppCheer_Request) returns (.CSteamTV_AppCheer_Response);
}
