1/*
2 * Copyright (C) 2020 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 */
16
17syntax = "proto2";
18package com.android.server.blob;
19
20option java_multiple_files = true;
21
22// The nested messages are used for statsd logging and should be kept in sync with the messages
23// of the same name in frameworks/base/cmds/statsd/src/atoms.proto
24message BlobStatsEventProto {
25  // Blob Committer stats
26  // Keep in sync between:
27  //     frameworks/base/core/proto/android/server/blobstoremanagerservice.proto
28  //     frameworks/base/cmds/statsd/src/atoms.proto
29  message BlobCommitterProto {
30    // Committer app's uid
31    optional int32 uid = 1;
32
33    // Unix epoch timestamp of the commit in milliseconds
34    optional int64 commit_timestamp_millis = 2;
35
36    // Flags of what access types the committer has set for the Blob
37    optional int32 access_mode = 3;
38
39    // Number of packages that have been whitelisted for ACCESS_TYPE_WHITELIST
40    optional int32 num_whitelisted_package = 4;
41  }
42
43  // Blob Leasee stats
44  // Keep in sync between:
45  //     frameworks/base/core/proto/android/server/blobstoremanagerservice.proto
46  //     frameworks/base/cmds/statsd/src/atoms.proto
47  message BlobLeaseeProto {
48    // Leasee app's uid
49    optional int32 uid = 1;
50
51    // Unix epoch timestamp for lease expiration in milliseconds
52    optional int64 lease_expiry_timestamp_millis = 2;
53  }
54
55  // List of Blob Committers
56  // Keep in sync between:
57  //     frameworks/base/core/proto/android/server/blobstoremanagerservice.proto
58  //     frameworks/base/cmds/statsd/src/atoms.proto
59  message BlobCommitterListProto {
60    repeated BlobCommitterProto committer = 1;
61  }
62
63  // List of Blob Leasees
64  // Keep in sync between:
65  //     frameworks/base/core/proto/android/server/blobstoremanagerservice.proto
66  //     frameworks/base/cmds/statsd/src/atoms.proto
67  message BlobLeaseeListProto {
68    repeated BlobLeaseeProto leasee = 1;
69  }
70}