Andreas Huber | 1aec397 | 2016-08-26 09:26:32 -0700 | [diff] [blame] | 1 | /* |
| 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 Huber | 295ad30 | 2016-08-16 11:35:00 -0700 | [diff] [blame] | 17 | #ifndef GENERIC_BINDER_H_ |
| 18 | |
| 19 | #define GENERIC_BINDER_H_ |
| 20 | |
| 21 | #include "Type.h" |
| 22 | |
| 23 | namespace android { |
| 24 | |
| 25 | struct GenericBinder : public Type { |
| 26 | GenericBinder(); |
| 27 | |
| 28 | bool isBinder() const override; |
| 29 | |
Steven Moreland | 979e099 | 2016-09-07 09:18:08 -0700 | [diff] [blame] | 30 | void addNamedTypesToSet(std::set<const FQName> &set) const override; |
| 31 | |
Andreas Huber | 4c865b7 | 2016-09-14 15:26:27 -0700 | [diff] [blame] | 32 | 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 Huber | 295ad30 | 2016-08-16 11:35:00 -0700 | [diff] [blame] | 39 | |
| 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 Zhang | 864c771 | 2016-08-16 15:35:28 -0700 | [diff] [blame] | 54 | status_t emitVtsAttributeType(Formatter &out) const override; |
Andreas Huber | 295ad30 | 2016-08-16 11:35:00 -0700 | [diff] [blame] | 55 | }; |
| 56 | |
| 57 | } // namespace android |
| 58 | |
| 59 | #endif // GENERIC_BINDER_H_ |