blob: 536e8c493b33c60d51e72f86dbbbbedffd75ea7f [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
32 std::string getCppType(StorageMode mode,
33 std::string *extra,
34 bool specifyNamespaces) const override;
Andreas Huber295ad302016-08-16 11:35:00 -070035 std::string getJavaType() const override;
36
37 void emitReaderWriter(
38 Formatter &out,
39 const std::string &name,
40 const std::string &parcelObj,
41 bool parcelObjIsPointer,
42 bool isReader,
43 ErrorMode mode) const override;
44
45 void emitJavaReaderWriter(
46 Formatter &out,
47 const std::string &parcelObj,
48 const std::string &argName,
49 bool isReader) const override;
50
Zhuoyao Zhang864c7712016-08-16 15:35:28 -070051 status_t emitVtsAttributeType(Formatter &out) const override;
Andreas Huber295ad302016-08-16 11:35:00 -070052};
53
54} // namespace android
55
56#endif // GENERIC_BINDER_H_