1// Copyright 2021 The Android Open Source Project 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15syntax = "proto2"; 16 17package android.downloader; 18 19option java_multiple_files = true; 20option java_package = "com.google.android.downloader"; 21option java_outer_classname = "DownloadMetadataProtoOuter"; 22 23// Message encoding download metadata. May be persisted by implementations of 24// DownloadDestination (e.g. ProtoFileDownloadDestination) so that interrupted 25// downloads can be safely resumed. 26message DownloadMetadataProto { 27 // The opaque content tag associated with the download. Commonly this 28 // is a checksum or hash of the actual data. However, the client should never 29 // attempt to infer any properties about this string, and should instead 30 // treat it as a token to be persisted and returned unaltered. This tag 31 // is used to ensure the underlying HTTP resource did not change across 32 // requests. 33 optional string content_tag = 1; 34 35 // The UNIX epoch timestamp, in seconds, for when the resource the download 36 // targets was last modified. This timestamp is used to determine if the 37 // underlying HTTP resource changed across requests. 38 optional int64 last_modified_time_seconds = 2; 39}