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 #pragma once 17 18 #include <string> 19 #include <vector> 20 21 #include "linkerconfig/apex.h" 22 #include "linkerconfig/namespace.h" 23 24 namespace android { 25 namespace linkerconfig { 26 namespace modules { 27 28 class BaseContext { 29 public: 30 BaseContext(); 31 virtual ~BaseContext() = default; 32 33 void AddApexModule(ApexInfo apex_module); 34 const std::vector<ApexInfo>& GetApexModules() const; 35 36 void SetStrictMode(bool strict); 37 bool IsStrictMode() const; 38 39 virtual Namespace BuildApexNamespace(const ApexInfo& apex_info, 40 bool visible) const; 41 42 private: 43 bool strict_; 44 45 // Available APEX Modules which contains binary and/or library 46 std::vector<ApexInfo> apex_modules_; 47 }; 48 49 } // namespace modules 50 } // namespace linkerconfig 51 } // namespace android 52