• 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
44message ThirdPartyMetaData {
45  repeated URL url = 1;
46  optional string version = 2;
47  optional LicenseType license_type = 4;
48  optional string license_note = 5;
49  optional Security security = 7;
50  optional Date last_upgrade_date = 10;
51}
52
53message URL {
54  enum Type {
55    UNKNOWN = 0;
56    HOMEPAGE = 1;
57    ARCHIVE = 2;
58    GIT = 3;
59    SVN = 7;
60    HG = 8;
61    DARCS = 9;
62    OTHER = 11;
63  }
64
65  optional Type type = 1;
66
67  optional string value = 2;
68}
69
70message Date {
71  optional int32 year = 1;
72  optional int32 month = 2;
73  optional int32 day = 3;
74}
75
76message Security {
77  enum Category {
78    SANDBOXED_ONLY = 1;
79    TRUSTED_DATA_ONLY = 2;
80    REVIEWED_AND_SECURE = 3;
81  }
82
83  optional Category category = 1;
84  optional string note = 2;
85  repeated string tag = 3;
86  repeated string mitigated_security_patch = 5;
87}
88