1 /* 2 * Copyright (C) 2015, 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 17 #pragma once 18 19 #include <memory> 20 #include <string> 21 22 #include "aidl_language.h" 23 #include "aidl_to_cpp.h" 24 #include "aidl_to_cpp_common.h" 25 #include "ast_cpp.h" 26 #include "options.h" 27 #include "type_cpp.h" 28 29 namespace android { 30 namespace aidl { 31 namespace cpp { 32 33 bool GenerateCpp(const string& output_file, const Options& options, const cpp::TypeNamespace& types, 34 const AidlDefinedType& parsed_doc, const IoDelegate& io_delegate); 35 36 namespace internals { 37 std::unique_ptr<Document> BuildClientSource(const TypeNamespace& types, 38 const AidlInterface& parsed_doc, 39 const Options& options); 40 std::unique_ptr<Document> BuildServerSource(const TypeNamespace& types, 41 const AidlInterface& parsed_doc, 42 const Options& options); 43 std::unique_ptr<Document> BuildInterfaceSource(const TypeNamespace& types, 44 const AidlInterface& parsed_doc, 45 const Options& options); 46 std::unique_ptr<Document> BuildClientHeader(const TypeNamespace& types, 47 const AidlInterface& parsed_doc, 48 const Options& options); 49 std::unique_ptr<Document> BuildServerHeader(const TypeNamespace& types, 50 const AidlInterface& parsed_doc, 51 const Options& options); 52 std::unique_ptr<Document> BuildInterfaceHeader(const TypeNamespace& types, 53 const AidlInterface& parsed_doc, 54 const Options& options); 55 56 std::unique_ptr<Document> BuildParcelHeader(const TypeNamespace& types, 57 const AidlStructuredParcelable& parsed_doc, 58 const Options& options); 59 std::unique_ptr<Document> BuildParcelSource(const TypeNamespace& types, 60 const AidlStructuredParcelable& parsed_doc, 61 const Options& options); 62 } 63 } // namespace cpp 64 } // namespace aidl 65 } // namespace android 66