1/* 2 * Copyright (C) 2021 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16syntax = "proto2"; 17 18package clearkeydrm; 19 20// need this if we are using libprotobuf-cpp-2.3.0-lite 21option optimize_for = LITE_RUNTIME; 22 23message License { 24 enum LicenseState { 25 ACTIVE = 1; 26 RELEASING = 2; 27 } 28 29 optional LicenseState state = 1; 30 optional bytes license = 2; 31} 32 33message OfflineFile { 34 enum FileType { 35 LICENSE = 1; 36 } 37 38 enum FileVersion { 39 VERSION_1 = 1; 40 } 41 42 optional FileType type = 1; 43 optional FileVersion version = 2 [default = VERSION_1]; 44 optional License license = 3; 45 46} 47 48message HashedFile { 49 optional bytes file = 1; 50 // A raw (not hex-encoded) SHA256, taken over the bytes of 'file'. 51 optional bytes hash = 2; 52} 53