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