• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2* Copyright (C) 2024 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 = "proto3";
18
19package com.android.adservices.service.proto;
20option java_multiple_files = true;
21
22// The list of apis/groups that deny the calling package
23// These are groups which apis are part of like Global, topics, measurement, pa or ux
24// Example measurement and topics apis want to deny app xyz
25message ApiGroups {
26  repeated string apiGroup = 1;
27}
28
29// The calling package's version range to deny for set of apis/groups
30// Example app xyz with version 1000 to 1004 should be denied for api groups measurement and topics
31message ApiDenyGroupsForPackageVersions {
32  optional int64 packageMinVersion = 1;
33  optional int64 packageMaxVersion = 2;
34  ApiGroups apiGroups = 3;
35}
36
37// The type of package whether an app or sdk
38enum PackageType {
39  UNKNOWN = 0;
40  APP = 1;
41  SDK = 2;
42}
43
44// The List of Apis groups to deny for a package based on different version range
45// And if the calling package is app or sdk
46// SDK name abc should be denied for api groups measurement and topics for version 1001 to 1005
47// and denied for api groups Global (all apis) for version less than 900
48message ApiDenyGroupsForPackage {
49  PackageType packageType = 1;
50  repeated ApiDenyGroupsForPackageVersions apiDenyGroupsForPackageVersions = 2;
51}
52
53// Map of package name as key and the value as List of Api deny groups based on
54// package version range and type of package as skd or app.
55// The package name should match the entire name of the package installed on device including the case
56message PackageToApiDenyGroupsMap {
57  map<string, ApiDenyGroupsForPackage> map = 1;
58}