blob: d2c8a6dfbf3cd2362e30c080d126c0ed6d3fe7fa [file] [log] [blame]
Christopher Wiley3a9da172016-01-29 11:10:49 -08001/*
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 Moreland9fccf582018-08-27 20:36:27 -070017#pragma once
Adam Lesinskiffa16862014-01-23 18:17:42 -080018
Christopher Wiley038485e2015-09-12 11:14:14 -070019#include "aidl_language.h"
20#include "ast_java.h"
Christopher Wileya30a45e2015-10-17 10:56:59 -070021#include "io_delegate.h"
Jiyong Park2c44f072018-07-30 21:52:21 +090022#include "options.h"
Jiyong Park2c44f072018-07-30 21:52:21 +090023
24#include <string>
Christopher Wiley038485e2015-09-12 11:14:14 -070025
Christopher Wileyfdeb0f42015-09-11 15:38:22 -070026namespace android {
27namespace aidl {
Christopher Wileydb154a52015-09-28 16:32:25 -070028namespace java {
29
Jiyong Park54fa1e02019-02-08 10:03:20 +090030bool generate_java(const std::string& filename, const AidlDefinedType* iface,
Jeongik Chaa2080bf2019-06-18 16:44:29 +090031 const AidlTypenames& typenames, const IoDelegate& io_delegate,
Jiyong Park54fa1e02019-02-08 10:03:20 +090032 const Options& options);
Adam Lesinskiffa16862014-01-23 18:17:42 -080033
Steven Moreland48548e02019-09-18 15:10:22 -070034std::unique_ptr<android::aidl::java::Class> generate_binder_interface_class(
35 const AidlInterface* iface, const AidlTypenames& typenames, const Options& options);
Christopher Wileydb154a52015-09-28 16:32:25 -070036
Steven Moreland48548e02019-09-18 15:10:22 -070037std::unique_ptr<android::aidl::java::Class> generate_parcel_class(
38 const AidlStructuredParcelable* parcel, const AidlTypenames& typenames);
Steven Moreland5557f1c2018-07-02 13:50:23 -070039
Daniel Norman716d3112019-09-10 13:11:56 -070040void generate_enum(const CodeWriterPtr& code_writer, const AidlEnumDeclaration* enum_decl,
41 const AidlTypenames& typenames);
42
Jiyong Parka6605ab2018-11-11 14:30:21 +090043std::vector<std::string> generate_java_annotations(const AidlAnnotatable& a);
44
Christopher Wileydb154a52015-09-28 16:32:25 -070045} // namespace java
Christopher Wileyfdeb0f42015-09-11 15:38:22 -070046} // namespace aidl
Steven Morelandf4c64df2019-07-29 19:54:04 -070047} // namespace android