diff options
Diffstat (limited to 'libs/binder/ndk/include_ndk/android/binder_parcel.h')
-rw-r--r-- | libs/binder/ndk/include_ndk/android/binder_parcel.h | 48 |
1 files changed, 46 insertions, 2 deletions
diff --git a/libs/binder/ndk/include_ndk/android/binder_parcel.h b/libs/binder/ndk/include_ndk/android/binder_parcel.h index 86b75b8c61..527b151457 100644 --- a/libs/binder/ndk/include_ndk/android/binder_parcel.h +++ b/libs/binder/ndk/include_ndk/android/binder_parcel.h @@ -26,6 +26,7 @@ #pragma once +#include <stdbool.h> #include <stddef.h> #include <sys/cdefs.h> @@ -35,7 +36,6 @@ struct AIBinder; typedef struct AIBinder AIBinder; __BEGIN_DECLS -#if __ANDROID_API__ >= 29 /** * This object represents a package of data that can be sent between processes. When transacting, an @@ -1118,7 +1118,51 @@ binder_status_t AParcel_readByteArray(const AParcel* parcel, void* arrayData, // @END-PRIMITIVE-READ-WRITE -#endif //__ANDROID_API__ >= 29 +/** + * Reset the parcel to the initial status. + * + * Available since API level 31. + * + * \param parcel The parcel of which to be reset. + * + * \return STATUS_OK on success. + */ +binder_status_t AParcel_reset(AParcel* parcel) __INTRODUCED_IN(31); + +/** + * Gets the size of the parcel. + * + * Available since API level 31. + * + * \param parcel The parcel of which to get the size. + * + * \return The size of the parcel. + */ +int32_t AParcel_getDataSize(const AParcel* parcel) __INTRODUCED_IN(31); + +/** + * Copy the data of a parcel to other parcel. + * + * Available since API level 31. + * + * \param from The source + * \param to The detination + * \param start The position where the copied data starts. + * \param size The amount of data which will be copied. + * + * \return STATUS_OK on success. + */ +binder_status_t AParcel_appendFrom(const AParcel* from, AParcel* to, int32_t start, int32_t size) + __INTRODUCED_IN(31); + +/** + * Creates a parcel. + * + * Available since API level 31. + * + * \return A parcel which is not related to any IBinder objects. + */ +AParcel* AParcel_create() __INTRODUCED_IN(31); __END_DECLS /** @} */ |