import "steammessages_base.proto";

option optimize_for = SPEED;
option cc_generic_services = false;

message CMsgClientUCMAddScreenshot {
	message Tag {
		optional string tag_name = 1;
		optional string tag_value = 2;
	}

	optional uint32 appid = 1;
	optional string filename = 2;
	optional string thumbname = 3;
	optional string vr_filename = 14;
	optional fixed32 rtime32_created = 4;
	optional uint32 width = 5;
	optional uint32 height = 6;
	optional uint32 permissions = 7;
	optional string caption = 8;
	optional string shortcut_name = 9;
	repeated .CMsgClientUCMAddScreenshot.Tag tag = 10;
	repeated fixed64 tagged_steamid = 11;
	optional bool spoiler_tag = 12;
	repeated uint64 tagged_publishedfileid = 13;
}

message CMsgClientUCMAddScreenshotResponse {
	optional int32 eresult = 1 [default = 2];
	optional fixed64 screenshotid = 2 [default = 18446744073709551615];
	optional uint64 publishedfileid = 3;
}

message CMsgClientUCMDeleteScreenshot {
	optional fixed64 screenshotid = 1 [default = 18446744073709551615];
}

message CMsgClientUCMDeleteScreenshotResponse {
	optional int32 eresult = 1 [default = 2];
}

message CMsgClientUCMPublishFile {
	optional uint32 app_id = 1;
	optional string file_name = 2;
	optional string preview_file_name = 3;
	optional uint32 consumer_app_id = 4;
	optional string title = 5;
	optional string description = 6;
	repeated string tags = 8;
	optional bool workshop_file = 9;
	optional int32 visibility = 10;
	optional uint32 file_type = 11;
	optional string url = 12;
	optional uint32 video_provider = 13;
	optional string video_account_name = 14;
	optional string video_identifier = 15;
	optional bool in_progress = 16;
}

message CMsgClientUCMPublishFileResponse {
	optional int32 eresult = 1 [default = 2];
	optional fixed64 published_file_id = 2 [default = 18446744073709551615];
	optional bool needs_workshop_legal_agreement_acceptance = 3 [default = false];
}

message CMsgClientUCMUpdatePublishedFile {
	message KeyValueTag {
		optional string key = 1;
		optional string value = 2;
	}

	message AdditionalPreview {
		optional string original_file_name = 1;
		optional string internal_file_name = 2;
		optional string videoid = 3;
		optional uint32 preview_type = 4;
		optional int32 update_index = 5 [default = -1];
	}

	optional uint32 app_id = 1;
	optional fixed64 published_file_id = 2;
	optional string file_name = 3;
	optional string preview_file_name = 4;
	optional string title = 5;
	optional string description = 6;
	repeated string tags = 7;
	optional int32 visibility = 8;
	optional bool update_file = 9;
	optional bool update_preview_file = 10;
	optional bool update_title = 11;
	optional bool update_description = 12;
	optional bool update_tags = 13;
	optional bool update_visibility = 14;
	optional string change_description = 15;
	optional bool update_url = 16;
	optional string url = 17;
	optional bool update_content_manifest = 18;
	optional fixed64 content_manifest = 19;
	optional string metadata = 20;
	optional bool update_metadata = 21;
	optional int32 language = 22 [default = 0];
	repeated string removed_kvtags = 23;
	repeated .CMsgClientUCMUpdatePublishedFile.KeyValueTag kvtags = 24;
	repeated .CMsgClientUCMUpdatePublishedFile.AdditionalPreview previews = 25;
	repeated int32 previews_to_remove = 26;
	optional bool clear_in_progress = 27;
	optional bool remove_all_kvtags = 28;
	repeated int32 content_descriptors_to_add = 29;
	repeated int32 content_descriptors_to_remove = 30;
	optional bool allow_admin_tags = 31 [default = false];
	optional uint64 external_asset_id = 32;
	optional string game_branch_min = 33;
	optional string game_branch_max = 34;
}

message CMsgClientUCMUpdatePublishedFileResponse {
	optional int32 eresult = 1 [default = 2];
	optional bool needs_workshop_legal_agreement_acceptance = 2 [default = false];
}

message CMsgClientUCMDeletePublishedFile {
	optional fixed64 published_file_id = 1;
	optional uint32 app_id = 2;
}

message CMsgClientUCMDeletePublishedFileResponse {
	optional int32 eresult = 1 [default = 2];
}

message CMsgClientUCMEnumerateUserSubscribedFilesWithUpdates {
	optional uint32 app_id = 1;
	optional uint32 start_index = 2;
	optional fixed32 start_time = 3;
	optional uint32 desired_revision = 4 [default = 0];
}

message CMsgClientUCMEnumerateUserSubscribedFilesWithUpdatesResponse {
	message AuthorSnapshot {
		optional uint32 timestamp = 1;
		optional string game_branch_min = 2;
		optional string game_branch_max = 3;
		optional fixed64 manifestid = 4;
	}

	message PublishedFileId {
		optional fixed64 published_file_id = 1;
		optional fixed32 rtime32_subscribed = 2 [default = 0];
		optional uint32 appid = 3;
		optional fixed64 file_hcontent = 4;
		optional uint32 file_size = 5;
		optional fixed32 rtime32_last_updated = 6;
		optional bool is_depot_content = 7;
		repeated .CMsgClientUCMEnumerateUserSubscribedFilesWithUpdatesResponse.AuthorSnapshot author_snapshots = 8;
	}

	optional int32 eresult = 1 [default = 2];
	repeated .CMsgClientUCMEnumerateUserSubscribedFilesWithUpdatesResponse.PublishedFileId subscribed_files = 2;
	optional uint32 total_results = 3;
}

message CMsgClientUCMPublishedFileUpdated {
	optional fixed64 published_file_id = 1;
	optional uint32 app_id = 2;
	optional uint32 time_updated = 3;
	optional fixed64 hcontent = 4;
	optional fixed32 file_size = 5;
	optional bool is_depot_content = 6;
	optional uint32 revision = 7;
}

message CMsgClientWorkshopItemChangesRequest {
	optional uint32 app_id = 1;
	optional uint32 last_time_updated = 2;
	optional uint32 num_items_needed = 3;
}

message CMsgClientWorkshopItemChangesResponse {
	message WorkshopItemInfo {
		optional fixed64 published_file_id = 1;
		optional uint32 time_updated = 2;
		optional fixed64 manifest_id = 3;
	}

	optional int32 eresult = 1 [default = 2];
	optional uint32 update_time = 2;
	repeated .CMsgClientWorkshopItemChangesResponse.WorkshopItemInfo workshop_items = 5;
}

message CMsgClientUCMSetUserPublishedFileAction {
	optional fixed64 published_file_id = 1;
	optional uint32 app_id = 2;
	optional int32 action = 3;
}

message CMsgClientUCMSetUserPublishedFileActionResponse {
	optional int32 eresult = 1 [default = 2];
}

message CMsgClientUCMEnumeratePublishedFilesByUserAction {
	optional uint32 app_id = 1;
	optional uint32 start_index = 2;
	optional int32 action = 3;
}

message CMsgClientUCMEnumeratePublishedFilesByUserActionResponse {
	message PublishedFileId {
		optional fixed64 published_file_id = 1;
		optional fixed32 rtime_time_stamp = 2 [default = 0];
	}

	optional int32 eresult = 1 [default = 2];
	repeated .CMsgClientUCMEnumeratePublishedFilesByUserActionResponse.PublishedFileId published_files = 2;
	optional uint32 total_results = 3;
}

message CMsgClientScreenshotsChanged {
}
