Spandan Das | 8159389 | 2022-09-06 17:31:48 +0000 | [diff] [blame] | 1 | // Copyright 2022 Google Inc. All rights reserved. |
| 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 | package android |
| 16 | |
Spandan Das | 1278c2c | 2022-08-19 18:17:28 +0000 | [diff] [blame] | 17 | type ApiSurface int |
| 18 | |
| 19 | // TODO(b/246656800): Reconcile with android.SdkKind |
| 20 | const ( |
Spandan Das | 627fc3e | 2023-01-26 23:02:00 +0000 | [diff] [blame] | 21 | // API surface provided by platform and mainline modules to other mainline modules |
| 22 | ModuleLibApi ApiSurface = iota |
| 23 | PublicApi // Aka NDK |
| 24 | VendorApi // Aka LLNDK |
Spandan Das | 1278c2c | 2022-08-19 18:17:28 +0000 | [diff] [blame] | 25 | ) |
| 26 | |
| 27 | func (a ApiSurface) String() string { |
| 28 | switch a { |
Spandan Das | 627fc3e | 2023-01-26 23:02:00 +0000 | [diff] [blame] | 29 | case ModuleLibApi: |
| 30 | return "module-libapi" |
Spandan Das | 1278c2c | 2022-08-19 18:17:28 +0000 | [diff] [blame] | 31 | case PublicApi: |
| 32 | return "publicapi" |
Spandan Das | 1278c2c | 2022-08-19 18:17:28 +0000 | [diff] [blame] | 33 | case VendorApi: |
| 34 | return "vendorapi" |
| 35 | default: |
| 36 | return "invalid" |
| 37 | } |
| 38 | } |