Merge "binder: add uint64 support to Parcel."

This commit is contained in:
Dan Stoza 2015-05-13 17:52:46 +00:00 committed by Gerrit Code Review
commit bbb010b79c
2 changed files with 18 additions and 0 deletions

View File

@ -96,6 +96,7 @@ public:
status_t writeInt32(int32_t val); status_t writeInt32(int32_t val);
status_t writeUint32(uint32_t val); status_t writeUint32(uint32_t val);
status_t writeInt64(int64_t val); status_t writeInt64(int64_t val);
status_t writeUint64(uint64_t val);
status_t writeFloat(float val); status_t writeFloat(float val);
status_t writeDouble(double val); status_t writeDouble(double val);
status_t writeCString(const char* str); status_t writeCString(const char* str);
@ -157,6 +158,8 @@ public:
status_t readUint32(uint32_t *pArg) const; status_t readUint32(uint32_t *pArg) const;
int64_t readInt64() const; int64_t readInt64() const;
status_t readInt64(int64_t *pArg) const; status_t readInt64(int64_t *pArg) const;
uint64_t readUint64() const;
status_t readUint64(uint64_t *pArg) const;
float readFloat() const; float readFloat() const;
status_t readFloat(float *pArg) const; status_t readFloat(float *pArg) const;
double readDouble() const; double readDouble() const;

View File

@ -677,6 +677,11 @@ status_t Parcel::writeInt64(int64_t val)
return writeAligned(val); return writeAligned(val);
} }
status_t Parcel::writeUint64(uint64_t val)
{
return writeAligned(val);
}
status_t Parcel::writePointer(uintptr_t val) status_t Parcel::writePointer(uintptr_t val)
{ {
return writeAligned<binder_uintptr_t>(val); return writeAligned<binder_uintptr_t>(val);
@ -1060,6 +1065,16 @@ int64_t Parcel::readInt64() const
return readAligned<int64_t>(); return readAligned<int64_t>();
} }
status_t Parcel::readUint64(uint64_t *pArg) const
{
return readAligned(pArg);
}
uint64_t Parcel::readUint64() const
{
return readAligned<uint64_t>();
}
status_t Parcel::readPointer(uintptr_t *pArg) const status_t Parcel::readPointer(uintptr_t *pArg) const
{ {
status_t ret; status_t ret;