• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (C) 2018 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
15// A proto definition used to parse METADATA file in third party projects.
16
17// This proto will only contain fields and values the updater cares about.
18// It is not intended to be the formal definition of METADATA file.
19
20// See google3/third_party/metadata.proto if you need to add more stuff to match
21// upstream.
22
23syntax = "proto2"; // As long as upstream is proto2...
24
25package external_updater;
26
27message MetaData {
28  optional string name = 1;
29  optional string description = 3;
30  optional ThirdPartyMetaData third_party = 13;
31}
32
33enum LicenseType {
34  UNKNOWN = 0;
35  BY_EXCEPTION_ONLY = 1;
36  NOTICE = 2;
37  PERMISSIVE = 3;
38  RECIPROCAL = 4;
39  RESTRICTED_IF_STATICALLY_LINKED = 5;
40  RESTRICTED = 6;
41  UNENCUMBERED = 7;
42}
43
44enum DirectoryType {
45  PACKAGE = 1;
46  GOOGLE_INTERNAL = 4;
47}
48
49message ThirdPartyMetaData {
50  repeated URL url = 1;
51  optional string version = 2;
52  optional LicenseType license_type = 4;
53  optional string license_note = 5;
54  optional string local_modifications = 6;
55  optional Security security = 7;
56  optional Date last_upgrade_date = 10;
57  optional DirectoryType type = 11 [default = PACKAGE];
58  optional string homepage = 14;
59  repeated Identifier identifier = 15;
60}
61
62message URL {
63  enum Type {
64    UNKNOWN = 0;
65    HOMEPAGE = 1;
66    ARCHIVE = 2;
67    GIT = 3;
68    PIPER = 4;
69    SVN = 7;
70    HG = 8;
71    DARCS = 9;
72    OTHER = 11;
73  }
74
75  optional Type type = 1;
76
77  optional string value = 2;
78}
79
80message Identifier {
81  optional string type = 1;
82  optional string value = 3;
83  optional string version = 4;
84  optional bool primary_source = 6;
85}
86
87message Date {
88  optional int32 year = 1;
89  optional int32 month = 2;
90  optional int32 day = 3;
91}
92
93message Security {
94  enum Category {
95    SANDBOXED_ONLY = 1;
96    TRUSTED_DATA_ONLY = 2;
97    REVIEWED_AND_SECURE = 3;
98  }
99
100  optional Category category = 1;
101  optional string note = 2;
102  repeated string tag = 3;
103  repeated string mitigated_security_patch = 5;
104}
105