• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2018, 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 "options.h"
24 
25 namespace android {
26 namespace aidl {
27 namespace ndk {
28 
29 void GenerateNdk(const string& output_file, const Options& options, const AidlTypenames& types,
30                  const AidlDefinedType& defined_type, const IoDelegate& io_delegate);
31 
32 namespace internals {
33 void GenerateSource(CodeWriter& out, const AidlTypenames& types, const AidlInterface& defined_type,
34                     const Options& options);
35 void GenerateClassSource(CodeWriter& out, const AidlTypenames& types,
36                          const AidlInterface& defined_type, const Options& options);
37 void GenerateClientSource(CodeWriter& out, const AidlTypenames& types,
38                           const AidlInterface& defined_type, const Options& options);
39 void GenerateServerSource(CodeWriter& out, const AidlTypenames& types,
40                           const AidlInterface& defined_type, const Options& options);
41 void GenerateInterfaceSource(CodeWriter& out, const AidlTypenames& types,
42                              const AidlInterface& defined_type, const Options& options);
43 void GenerateClientHeader(CodeWriter& out, const AidlTypenames& types,
44                           const AidlInterface& defined_type, const Options& options);
45 void GenerateServerHeader(CodeWriter& out, const AidlTypenames& types,
46                           const AidlInterface& defined_type, const Options& options);
47 void GenerateInterfaceHeader(CodeWriter& out, const AidlTypenames& types,
48                              const AidlInterface& defined_type, const Options& options);
49 
50 void GenerateParcelHeader(CodeWriter& out, const AidlTypenames& types,
51                           const AidlStructuredParcelable& defined_type, const Options& options);
52 void GenerateParcelSource(CodeWriter& out, const AidlTypenames& types,
53                           const AidlStructuredParcelable& defined_type, const Options& options);
54 
55 }  // namespace internals
56 }  // namespace ndk
57 }  // namespace aidl
58 }  // namespace android
59