blob: fc18c3e8162f6c488aecd3b3597f11cdd4d5b81a [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
30 std::string getCppType(StorageMode mode, std::string *extra) const override;
31 std::string getJavaType() const override;
32
33 void emitReaderWriter(
34 Formatter &out,
35 const std::string &name,
36 const std::string &parcelObj,
37 bool parcelObjIsPointer,
38 bool isReader,
39 ErrorMode mode) const override;
40
41 void emitJavaReaderWriter(
42 Formatter &out,
43 const std::string &parcelObj,
44 const std::string &argName,
45 bool isReader) const override;
46
Zhuoyao Zhang864c7712016-08-16 15:35:28 -070047 status_t emitVtsAttributeType(Formatter &out) const override;
Andreas Huber295ad302016-08-16 11:35:00 -070048};
49
50} // namespace android
51
52#endif // GENERIC_BINDER_H_