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 GROUP = 2; 47 GOOGLE_INTERNAL = 4; 48} 49 50message ThirdPartyMetaData { 51 repeated URL url = 1; 52 optional string version = 2; 53 optional LicenseType license_type = 4; 54 optional string license_note = 5; 55 optional string local_modifications = 6; 56 optional Security security = 7; 57 optional Date last_upgrade_date = 10; 58 optional DirectoryType type = 11 [default = PACKAGE]; 59 optional string homepage = 14; 60 repeated Identifier identifier = 15; 61} 62 63message URL { 64 enum Type { 65 UNKNOWN = 0; 66 HOMEPAGE = 1; 67 ARCHIVE = 2; 68 GIT = 3; 69 PIPER = 4; 70 SVN = 7; 71 HG = 8; 72 DARCS = 9; 73 OTHER = 11; 74 } 75 76 optional Type type = 1; 77 78 optional string value = 2; 79} 80 81message Identifier { 82 optional string type = 1; 83 optional string omission_reason = 2; 84 optional string value = 3; 85 optional string version = 4; 86 optional bool primary_source = 6; 87} 88 89message Date { 90 optional int32 year = 1; 91 optional int32 month = 2; 92 optional int32 day = 3; 93} 94 95message Security { 96 enum Category { 97 SANDBOXED_ONLY = 1; 98 TRUSTED_DATA_ONLY = 2; 99 REVIEWED_AND_SECURE = 3; 100 } 101 102 optional Category category = 1; 103 optional string note = 2; 104 repeated string tag = 3; 105 repeated string mitigated_security_patch = 5; 106} 107