| #pragma once |
| |
| #include <cstdint> |
| #include <memory> |
| #include <optional> |
| #include <string> |
| #include <vector> |
| #include <android/binder_interface_utils.h> |
| #include <android/binder_parcelable_utils.h> |
| #include <android/binder_to_string.h> |
| #ifdef BINDER_STABILITY_SUPPORT |
| #include <android/binder_stability.h> |
| #endif // BINDER_STABILITY_SUPPORT |
| |
| namespace aidl { |
| namespace android { |
| namespace aidl { |
| namespace tests { |
| namespace extension { |
| class MyExt { |
| public: |
| typedef std::false_type fixed_size; |
| static const char* descriptor; |
| |
| int32_t a = 0; |
| std::string b; |
| |
| binder_status_t readFromParcel(const AParcel* parcel); |
| binder_status_t writeToParcel(AParcel* parcel) const; |
| |
| inline bool operator!=(const MyExt& rhs) const { |
| return std::tie(a, b) != std::tie(rhs.a, rhs.b); |
| } |
| inline bool operator<(const MyExt& rhs) const { |
| return std::tie(a, b) < std::tie(rhs.a, rhs.b); |
| } |
| inline bool operator<=(const MyExt& rhs) const { |
| return std::tie(a, b) <= std::tie(rhs.a, rhs.b); |
| } |
| inline bool operator==(const MyExt& rhs) const { |
| return std::tie(a, b) == std::tie(rhs.a, rhs.b); |
| } |
| inline bool operator>(const MyExt& rhs) const { |
| return std::tie(a, b) > std::tie(rhs.a, rhs.b); |
| } |
| inline bool operator>=(const MyExt& rhs) const { |
| return std::tie(a, b) >= std::tie(rhs.a, rhs.b); |
| } |
| |
| static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_LOCAL; |
| inline std::string toString() const { |
| std::ostringstream os; |
| os << "MyExt{"; |
| os << "a: " << ::android::internal::ToString(a); |
| os << ", b: " << ::android::internal::ToString(b); |
| os << "}"; |
| return os.str(); |
| } |
| }; |
| } // namespace extension |
| } // namespace tests |
| } // namespace aidl |
| } // namespace android |
| } // namespace aidl |