blob: db7c6cce9559ca5da74935142379b1c73d4b9719 [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,
34 std::string *extra,
35 bool specifyNamespaces) const override;
36
37 std::string getJavaType(
38 std::string *extra, bool forInitializer) const override;
Andreas Huber295ad302016-08-16 11:35:00 -070039
40 void emitReaderWriter(
41 Formatter &out,
42 const std::string &name,
43 const std::string &parcelObj,
44 bool parcelObjIsPointer,
45 bool isReader,
46 ErrorMode mode) const override;
47
48 void emitJavaReaderWriter(
49 Formatter &out,
50 const std::string &parcelObj,
51 const std::string &argName,
52 bool isReader) const override;
53
Zhuoyao Zhang864c7712016-08-16 15:35:28 -070054 status_t emitVtsAttributeType(Formatter &out) const override;
Andreas Huber295ad302016-08-16 11:35:00 -070055};
56
57} // namespace android
58
59#endif // GENERIC_BINDER_H_