classParcel{
public:Parcel();~Parcel();constuint8_t*data()const;size_tdataSize()const;size_tdataAvail()const;size_tdataPosition()const;size_tdataCapacity()const;status_tsetDataSize(size_tsize);voidsetDataPosition(size_tpos)const;status_tsetDataCapacity(size_tsize);status_tsetData(constuint8_t*buffer,size_tlen);status_tappendFrom(Parcel*parcel,size_tstart,size_tlen);boolhasFileDescriptors()const;status_twriteInterfaceToken(constString16&interface);boolenforceInterface(constString16&interface)const;boolcheckInterface(IBinder*)const;voidfreeData();constsize_t*objects()const;size_tobjectsCount()const;status_terrorCheck()const;voidsetError(status_terr);status_twrite(constvoid*data,size_tlen);void*writeInplace(size_tlen);status_twriteUnpadded(constvoid*data,size_tlen);status_twriteInt32(int32_tval);status_twriteInt64(int64_tval);status_twriteFloat(floatval);status_twriteDouble(doubleval);status_twriteIntPtr(intptr_tval);status_twriteCString(constchar*str);status_twriteString8(constString8&str);status_twriteString16(constString16&str);status_twriteString16(constchar16_t*str,size_tlen);status_twriteStrongBinder(constsp<IBinder>&val);status_twriteWeakBinder(constwp<IBinder>&val);status_twrite(constFlattenable&val);// Place a native_handle into the parcel (the native_handle's file-// descriptors are dup'ed, so it is safe to delete the native_handle// when this function returns). // Doesn't take ownership of the native_handle.status_twriteNativeHandle(constnative_handle*handle);// Place a file descriptor into the parcel. The given fd must remain// valid for the lifetime of the parcel.status_twriteFileDescriptor(intfd);// Place a file descriptor into the parcel. A dup of the fd is made, which// will be closed once the parcel is destroyed.status_twriteDupFileDescriptor(intfd);status_twriteObject(constflat_binder_object&val,boolnullMetaData);voidremove(size_tstart,size_tamt