blob: 55e7587c2591ceaf40e0a9c19f876b45bc7905cd [file] [log] [blame]
Andreas Huber1aec3972016-08-26 09:26:32 -07001/*
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
Andreas Huber295ad302016-08-16 11:35:00 -070017#ifndef GENERIC_BINDER_H_
18
19#define GENERIC_BINDER_H_
20
21#include "Type.h"
22
23namespace android {
24
25struct GenericBinder : public Type {
26 GenericBinder();
27
28 bool isBinder() const override;
29
Steven Moreland979e0992016-09-07 09:18:08 -070030 void addNamedTypesToSet(std::set<const FQName> &set) const override;
31
Andreas Huber4c865b72016-09-14 15:26:27 -070032 std::string getCppType(
33 StorageMode mode,
Andreas Huber4c865b72016-09-14 15:26:27 -070034 bool specifyNamespaces) const override;
35
Yifan Hong4ed13472016-11-02 10:44:11 -070036 std::string getJavaType(bool forInitializer) const override;
Andreas Huber295ad302016-08-16 11:35:00 -070037
38 void emitReaderWriter(
39 Formatter &out,
40 const std::string &name,
41 const std::string &parcelObj,
42 bool parcelObjIsPointer,
43 bool isReader,
44 ErrorMode mode) const override;
45
46 void emitJavaReaderWriter(
47 Formatter &out,
48 const std::string &parcelObj,
49 const std::string &argName,
50 bool isReader) const override;
51
Zhuoyao Zhang864c7712016-08-16 15:35:28 -070052 status_t emitVtsAttributeType(Formatter &out) const override;
Andreas Huber295ad302016-08-16 11:35:00 -070053};
54
55} // namespace android
56
57#endif // GENERIC_BINDER_H_