import "steammessages_base.proto";

option optimize_for = SPEED;
option cc_generic_services = false;

message CMsgClientAppInfoUpdate {
	optional uint32 last_changenumber = 1;
	optional bool send_changelist = 2;
}

message CMsgClientAppInfoChanges {
	optional uint32 current_change_number = 1;
	optional bool force_full_update = 2;
	repeated uint32 appIDs = 3;
}

message CMsgClientAppInfoRequest {
	message App {
		optional uint32 app_id = 1;
		optional uint32 section_flags = 2;
		repeated uint32 section_CRC = 3;
	}

	repeated .CMsgClientAppInfoRequest.App apps = 1;
	optional bool supports_batches = 2 [default = false];
}

message CMsgClientPICSChangesSinceRequest {
	optional uint32 since_change_number = 1;
	optional bool send_app_info_changes = 2;
	optional bool send_package_info_changes = 3;
	optional uint32 num_app_info_cached = 4;
	optional uint32 num_package_info_cached = 5;
}

message CMsgClientPICSChangesSinceResponse {
	message PackageChange {
		optional uint32 packageid = 1;
		optional uint32 change_number = 2;
		optional bool needs_token = 3;
	}

	message AppChange {
		optional uint32 appid = 1;
		optional uint32 change_number = 2;
		optional bool needs_token = 3;
	}

	optional uint32 current_change_number = 1;
	optional uint32 since_change_number = 2;
	optional bool force_full_update = 3;
	repeated .CMsgClientPICSChangesSinceResponse.PackageChange package_changes = 4;
	repeated .CMsgClientPICSChangesSinceResponse.AppChange app_changes = 5;
	optional bool force_full_app_update = 6;
	optional bool force_full_package_update = 7;
}

message CMsgClientPICSProductInfoRequest {
	message AppInfo {
		optional uint32 appid = 1;
		optional uint64 access_token = 2;
		optional bool only_public_obsolete = 3;
	}

	message PackageInfo {
		optional uint32 packageid = 1;
		optional uint64 access_token = 2;
	}

	repeated .CMsgClientPICSProductInfoRequest.PackageInfo packages = 1;
	repeated .CMsgClientPICSProductInfoRequest.AppInfo apps = 2;
	optional bool meta_data_only = 3;
	optional uint32 num_prev_failed = 4;
	optional uint32 OBSOLETE_supports_package_tokens = 5;
	optional uint32 sequence_number = 6;
	optional bool single_response = 7;
}

message CMsgClientPICSProductInfoResponse {
	option (msgpool_hard_limit) = 0;

	message AppInfo {
		optional uint32 appid = 1;
		optional uint32 change_number = 2;
		optional bool missing_token = 3;
		optional bytes sha = 4;
		optional bytes buffer = 5;
		optional bool only_public = 6;
		optional uint32 size = 7;
	}

	message PackageInfo {
		optional uint32 packageid = 1;
		optional uint32 change_number = 2;
		optional bool missing_token = 3;
		optional bytes sha = 4;
		optional bytes buffer = 5;
		optional uint32 size = 6;
	}

	repeated .CMsgClientPICSProductInfoResponse.AppInfo apps = 1;
	repeated uint32 unknown_appids = 2;
	repeated .CMsgClientPICSProductInfoResponse.PackageInfo packages = 3;
	repeated uint32 unknown_packageids = 4;
	optional bool meta_data_only = 5;
	optional bool response_pending = 6;
	optional uint32 http_min_size = 7;
	optional string http_host = 8;
}

message CMsgClientPICSAccessTokenRequest {
	repeated uint32 packageids = 1;
	repeated uint32 appids = 2;
}

message CMsgClientPICSAccessTokenResponse {
	message PackageToken {
		optional uint32 packageid = 1;
		optional uint64 access_token = 2;
	}

	message AppToken {
		optional uint32 appid = 1;
		optional uint64 access_token = 2;
	}

	repeated .CMsgClientPICSAccessTokenResponse.PackageToken package_access_tokens = 1;
	repeated uint32 package_denied_tokens = 2;
	repeated .CMsgClientPICSAccessTokenResponse.AppToken app_access_tokens = 3;
	repeated uint32 app_denied_tokens = 4;
}

message CMsgClientPICSPrivateBetaRequest {
	optional uint32 appid = 1;
	optional uint64 access_token = 2;
	optional string beta_name = 3;
	optional bytes password_hash = 4;
}

message CMsgClientPICSPrivateBetaResponse {
	optional int32 eresult = 1 [default = 2];
	optional bytes depot_section = 2;
}
