Christopher Wiley | 3a9da17 | 2016-01-29 11:10:49 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2016, 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 | |
Steven Moreland | 9fccf58 | 2018-08-27 20:36:27 -0700 | [diff] [blame] | 17 | #pragma once |
Adam Lesinski | ffa1686 | 2014-01-23 18:17:42 -0800 | [diff] [blame] | 18 | |
Christopher Wiley | 038485e | 2015-09-12 11:14:14 -0700 | [diff] [blame] | 19 | #include "aidl_language.h" |
| 20 | #include "ast_java.h" |
Christopher Wiley | a30a45e | 2015-10-17 10:56:59 -0700 | [diff] [blame] | 21 | #include "io_delegate.h" |
Jiyong Park | 2c44f07 | 2018-07-30 21:52:21 +0900 | [diff] [blame] | 22 | #include "options.h" |
Jiyong Park | 2c44f07 | 2018-07-30 21:52:21 +0900 | [diff] [blame] | 23 | |
| 24 | #include <string> |
Christopher Wiley | 038485e | 2015-09-12 11:14:14 -0700 | [diff] [blame] | 25 | |
Christopher Wiley | fdeb0f4 | 2015-09-11 15:38:22 -0700 | [diff] [blame] | 26 | namespace android { |
| 27 | namespace aidl { |
Christopher Wiley | db154a5 | 2015-09-28 16:32:25 -0700 | [diff] [blame] | 28 | namespace java { |
| 29 | |
Jiyong Park | 54fa1e0 | 2019-02-08 10:03:20 +0900 | [diff] [blame] | 30 | bool generate_java(const std::string& filename, const AidlDefinedType* iface, |
Jeongik Cha | a2080bf | 2019-06-18 16:44:29 +0900 | [diff] [blame] | 31 | const AidlTypenames& typenames, const IoDelegate& io_delegate, |
Jiyong Park | 54fa1e0 | 2019-02-08 10:03:20 +0900 | [diff] [blame] | 32 | const Options& options); |
Adam Lesinski | ffa1686 | 2014-01-23 18:17:42 -0800 | [diff] [blame] | 33 | |
Steven Moreland | 48548e0 | 2019-09-18 15:10:22 -0700 | [diff] [blame] | 34 | std::unique_ptr<android::aidl::java::Class> generate_binder_interface_class( |
| 35 | const AidlInterface* iface, const AidlTypenames& typenames, const Options& options); |
Christopher Wiley | db154a5 | 2015-09-28 16:32:25 -0700 | [diff] [blame] | 36 | |
Steven Moreland | 48548e0 | 2019-09-18 15:10:22 -0700 | [diff] [blame] | 37 | std::unique_ptr<android::aidl::java::Class> generate_parcel_class( |
| 38 | const AidlStructuredParcelable* parcel, const AidlTypenames& typenames); |
Steven Moreland | 5557f1c | 2018-07-02 13:50:23 -0700 | [diff] [blame] | 39 | |
Daniel Norman | 716d311 | 2019-09-10 13:11:56 -0700 | [diff] [blame] | 40 | void generate_enum(const CodeWriterPtr& code_writer, const AidlEnumDeclaration* enum_decl, |
| 41 | const AidlTypenames& typenames); |
| 42 | |
Jiyong Park | a6605ab | 2018-11-11 14:30:21 +0900 | [diff] [blame] | 43 | std::vector<std::string> generate_java_annotations(const AidlAnnotatable& a); |
| 44 | |
Christopher Wiley | db154a5 | 2015-09-28 16:32:25 -0700 | [diff] [blame] | 45 | } // namespace java |
Christopher Wiley | fdeb0f4 | 2015-09-11 15:38:22 -0700 | [diff] [blame] | 46 | } // namespace aidl |
Steven Moreland | f4c64df | 2019-07-29 19:54:04 -0700 | [diff] [blame] | 47 | } // namespace android |