1/*
2 * Copyright (c) 2022 Huawei Device Co., Ltd.
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 */
15
16syntax = "proto2";
17
18package browser_service;
19
20option optimize_for = LITE_RUNTIME;
21
22message WebDownload {
23  enum WebDownloadState {
24    IN_PROGRESS = 0;
25    COMPLETE = 1;
26    CANCELED = 2;
27    INTERRUPTED = 3;
28    PENDING = 4;
29    PAUSED = 5;
30    MAX_DOWNLOAD_STATE = 6;
31  }
32
33  required int64 web_download_id = 1;
34
35  optional int64 current_speed = 2;
36
37  optional int64 percent_complete = 3;
38
39  optional int64 total_bytes = 4;
40
41  optional int64 received_bytes = 5;
42
43  optional string full_path = 6;
44
45  optional string url = 7;
46
47  optional string etag = 8;
48
49  optional string original_url = 9;
50
51  optional string suggested_file_name = 10;
52
53  optional string content_disposition = 11;
54
55  optional string mime_type = 12;
56
57  optional string last_modified = 13;
58
59  optional WebDownloadState state = 14;
60
61  optional string method = 15;
62
63  optional int64 last_error_code = 16;
64
65  optional string received_slices = 17;
66
67  optional string download_path = 18;
68
69  optional string guid = 19;
70}
71