Home | History | Annotate | Download | only in binder

Lines Matching defs:Parcel

17 #define LOG_TAG "Parcel"
36 #include <binder/Parcel.h>
110 LOG_REFS("Parcel %p acquiring reference on local %p", who, obj.cookie);
121 LOG_REFS("Parcel %p acquiring reference on remote %p", who, b.get());
158 LOG_REFS("Parcel %p releasing reference on local %p", who, obj.cookie);
169 LOG_REFS("Parcel %p releasing reference on remote %p", who, b.get());
204 const sp<IBinder>& /*binder*/, const flat_binder_object& flat, Parcel* out)
210 const sp<IBinder>& binder, Parcel* out)
249 const wp<IBinder>& binder, Parcel* out)
299 const Parcel& /*in*/)
305 const Parcel& in, sp<IBinder>* out)
324 const Parcel& in, wp<IBinder>* out)
354 Parcel::Parcel()
356 LOG_ALLOC("Parcel %p: constructing", this);
360 Parcel::~Parcel()
363 LOG_ALLOC("Parcel %p: destroyed", this);
366 size_t Parcel::getGlobalAllocSize() {
373 size_t Parcel::getGlobalAllocCount() {
380 const uint8_t* Parcel::data() const
385 size_t Parcel::dataSize() const
390 size_t Parcel::dataAvail() const
399 size_t Parcel::dataPosition() const
404 size_t Parcel::dataCapacity() const
409 status_t Parcel::setDataSize(size_t size)
426 void Parcel::setDataPosition(size_t pos) const
439 status_t Parcel::setDataCapacity(size_t size)
451 status_t Parcel::setData(const uint8_t* buffer, size_t len)
468 status_t Parcel::appendFrom(const Parcel *parcel, size_t offset, size_t len)
472 const uint8_t *data = parcel->mData;
473 const binder_size_t *objects = parcel->mObjects;
474 size_t size = parcel->mObjectsSize;
488 // range checks against the source parcel size
489 if ((offset > parcel->mDataSize)
490 || (len > parcel->mDataSize)
491 || (offset + len > parcel->mDataSize)) {
549 // new Parcel now owns its own fd, and can declare that we
564 int Parcel::compareData(const Parcel& other) {
572 bool Parcel::allowFds() const
577 bool Parcel::pushAllowFds(bool allowFds)
586 void Parcel::restoreAllowFds(bool lastValue)
591 bool Parcel::hasFileDescriptors() const
600 status_t Parcel::writeInterfaceToken(const String16& interface)
608 bool Parcel::checkInterface(IBinder* binder) const
613 bool Parcel::enforceInterface(const String16& interface,
640 const binder_size_t* Parcel::objects() const
645 size_t Parcel::objectsCount() const
650 status_t Parcel::errorCheck() const
655 void Parcel::setError(status_t err)
660 status_t Parcel::finishWrite(size_t len)
679 status_t Parcel::writeUnpadded(const void* data, size_t len)
704 status_t Parcel::write(const void* data, size_t len)
720 void* Parcel::writeInplace(size_t len)
766 status_t Parcel::writeUtf8AsUtf16(const std::string& str) {
790 status_t Parcel::writeUtf8AsUtf16(const std::unique_ptr<std::string>& str) {
800 status_t writeByteVectorInternal(Parcel* parcel, const std::vector<T>& val)
808 status = parcel->writeInt32(val.size());
813 void* data = parcel->writeInplace(val.size());
824 status_t writeByteVectorInternalPtr(Parcel* parcel,
828 return parcel->writeInt32(-1);
831 return writeByteVectorInternal(parcel, *val);
836 status_t Parcel::writeByteVector(const std::vector<int8_t>& val) {
840 status_t Parcel::writeByteVector(const std::unique_ptr<std::vector<int8_t>>& val)
845 status_t Parcel::writeByteVector(const std::vector<uint8_t>& val) {
849 status_t Parcel::writeByteVector(const std::unique_ptr<std::vector<uint8_t>>& val)
854 status_t Parcel::writeInt32Vector(const std::vector<int32_t>& val)
856 return writeTypedVector(val, &Parcel::writeInt32);
859 status_t Parcel::writeInt32Vector(const std::unique_ptr<std::vector<int32_t>>& val)
861 return writeNullableTypedVector(val, &Parcel::writeInt32);
864 status_t Parcel::writeInt64Vector(const std::vector<int64_t>& val)
866 return writeTypedVector(val, &Parcel::writeInt64);
869 status_t Parcel::writeInt64Vector(const std::unique_ptr<std::vector<int64_t>>& val)
871 return writeNullableTypedVector(val, &Parcel::writeInt64);
874 status_t Parcel::writeFloatVector(const std::vector<float>& val)
876 return writeTypedVector(val, &Parcel::writeFloat);
879 status_t Parcel::writeFloatVector(const std::unique_ptr<std::vector<float>>& val)
881 return writeNullableTypedVector(val, &Parcel::writeFloat);
884 status_t Parcel::writeDoubleVector(const std::vector<double>& val)
886 return writeTypedVector(val, &Parcel::writeDouble);
889 status_t Parcel::writeDoubleVector(const std::unique_ptr<std::vector<double>>& val)
891 return writeNullableTypedVector(val, &Parcel::writeDouble);
894 status_t Parcel::writeBoolVector(const std::vector<bool>& val)
896 return writeTypedVector(val, &Parcel::writeBool);
899 status_t Parcel::writeBoolVector(const std::unique_ptr<std::vector<bool>>& val)
901 return writeNullableTypedVector(val, &Parcel::writeBool);
904 status_t Parcel::writeCharVector(const std::vector<char16_t>& val)
906 return writeTypedVector(val, &Parcel::writeChar);
909 status_t Parcel::writeCharVector(const std::unique_ptr<std::vector<char16_t>>& val)
911 return writeNullableTypedVector(val, &Parcel::writeChar);
914 status_t Parcel::writeString16Vector(const std::vector<String16>& val)
916 return writeTypedVector(val, &Parcel::writeString16);
919 status_t Parcel::writeString16Vector(
922 return writeNullableTypedVector(val, &Parcel::writeString16);
925 status_t Parcel::writeUtf8VectorAsUtf16Vector(
927 return writeNullableTypedVector(val, &Parcel::writeUtf8AsUtf16);
930 status_t Parcel::writeUtf8VectorAsUtf16Vector(const std::vector<std::string>& val) {
931 return writeTypedVector(val, &Parcel::writeUtf8AsUtf16);
934 status_t Parcel::writeInt32(int32_t val)
939 status_t Parcel::writeUint32(uint32_t val)
944 status_t Parcel::writeInt32Array(size_t len, const int32_t *val) {
960 status_t Parcel::writeByteArray(size_t len, const uint8_t *val) {
977 status_t Parcel::writeBool(bool val)
982 status_t Parcel::writeChar(char16_t val)
987 status_t Parcel::writeByte(int8_t val)
992 status_t Parcel::writeInt64(int64_t val)
997 status_t Parcel::writeUint64(uint64_t val)
1002 status_t Parcel::writePointer(uintptr_t val)
1007 status_t Parcel::writeFloat(float val)
1014 status_t Parcel::writeDouble(double val)
1026 status_t Parcel::writeDouble(double val)
1033 status_t Parcel::writeCString(const char* str)
1038 status_t Parcel::writeString8(const String8& str)
1050 status_t Parcel::writeString16(const std::unique_ptr<String16>& str)
1059 status_t Parcel::writeString16(const String16& str)
1064 status_t Parcel::writeString16(const char16_t* str, size_t len)
1082 status_t Parcel::writeStrongBinder(const sp<IBinder>& val)
1087 status_t Parcel::writeStrongBinderVector(const std::vector<sp<IBinder>>& val)
1089 return writeTypedVector(val, &Parcel::writeStrongBinder);
1092 status_t Parcel::writeStrongBinderVector(const std::unique_ptr<std::vector<sp<IBinder>>>& val)
1094 return writeNullableTypedVector(val, &Parcel::writeStrongBinder);
1097 status_t Parcel::readStrongBinderVector(std::unique_ptr<std::vector<sp<IBinder>>>* val) const {
1098 return readNullableTypedVector(val, &Parcel::readNullableStrongBinder);
1101 status_t Parcel::readStrongBinderVector(std::vector<sp<IBinder>>* val) const {
1102 return readTypedVector(val, &Parcel::readStrongBinder);
1105 status_t Parcel::writeWeakBinder(const wp<IBinder>& val)
1110 status_t Parcel::writeRawNullableParcelable(const Parcelable* parcelable) {
1118 status_t Parcel::writeParcelable(const Parcelable& parcelable) {
1126 status_t Parcel::writeValue(const binder::Value& value) {
1130 status_t Parcel::writeNativeHandle(const native_handle* handle)
1153 status_t Parcel::writeFileDescriptor(int fd, bool takeOwnership)
1164 status_t Parcel::writeDupFileDescriptor(int fd)
1177 status_t Parcel
1183 status_t Parcel::writeUniqueFileDescriptor(const base::unique_fd& fd) {
1187 status_t Parcel::writeUniqueFileDescriptorVector(const std::vector<base::unique_fd>& val) {
1188 return writeTypedVector(val, &Parcel::writeUniqueFileDescriptor);
1191 status_t Parcel::writeUniqueFileDescriptorVector(const std::unique_ptr<std::vector<base::unique_fd>>& val) {
1192 return writeNullableTypedVector(val, &Parcel::writeUniqueFileDescriptor);
1195 status_t Parcel::writeBlob(size_t len, bool mutableCopy, WritableBlob* outBlob)
1217 int fd = ashmem_create_region("Parcel Blob", len);
1250 status_t Parcel::writeDupImmutableBlobFileDescriptor(int fd)
1259 status_t Parcel::write(const FlattenableHelperInterface& val)
1305 status_t Parcel::writeObject(const flat_binder_object& val, bool nullMetaData)
1348 status_t Parcel::writeNoException()
1354 status_t Parcel::writeMap(const ::android::binder::Map& map_in)
1384 status_t Parcel::writeNullableMap(const std::unique_ptr<binder::Map>& map)
1393 status_t Parcel::readMap(::android::binder::Map* map_out)const
1443 status_t Parcel::readNullableMap(std::unique_ptr<binder::Map>* map) const
1468 void Parcel::remove(size_t /*start*/, size_t /*amt*/)
1470 LOG_ALWAYS_FATAL("Parcel::remove() not yet implemented!");
1473 status_t Parcel::validateReadData(size_t upperBound) const
1486 ALOGE("Attempt to read from protected data in Parcel %p", this);
1526 status_t Parcel::read(void* outData, size_t len) const
1553 const void* Parcel::readInplace(size_t len) const
1582 status_t Parcel::readAligned(T *pArg) const {
1605 T Parcel::readAligned() const {
1615 status_t Parcel::writeAligned(T val) {
1632 status_t readByteVectorInternal(const Parcel* parcel,
1637 status_t status = parcel->readInt32(&size);
1647 if (size_t(size) > parcel->dataAvail()) {
1652 T* data = const_cast<T*>(reinterpret_cast<const T*>(parcel->readInplace(size)));
1665 const Parcel* parcel,
1667 const int32_t start = parcel->dataPosition();
1669 status_t status = parcel->readInt32(&size);
1676 parcel->setDataPosition(start);
1679 status = readByteVectorInternal(parcel, val->get());
1690 status_t Parcel::readByteVector(std::vector<int8_t>* val) const {
1694 status_t Parcel::readByteVector(std::vector<uint8_t>* val) const {
1698 status_t Parcel::readByteVector(std::unique_ptr<std::vector<int8_t>>* val) const {
1702 status_t Parcel::readByteVector(std::unique_ptr<std::vector<uint8_t>>* val) const {
1706 status_t Parcel::readInt32Vector(std::unique_ptr<std::vector<int32_t>>* val) const {
1707 return readNullableTypedVector(val, &Parcel::readInt32);
1710 status_t Parcel::readInt32Vector(std::vector<int32_t>* val) const {
1711 return readTypedVector(val, &Parcel::readInt32);
1714 status_t Parcel::readInt64Vector(std::unique_ptr<std::vector<int64_t>>* val) const {
1715 return readNullableTypedVector(val, &Parcel::readInt64);
1718 status_t Parcel::readInt64Vector(std::vector<int64_t>* val) const {
1719 return readTypedVector(val, &Parcel::readInt64);
1722 status_t Parcel::readFloatVector(std::unique_ptr<std::vector<float>>* val) const {
1723 return readNullableTypedVector(val, &Parcel::readFloat);
1726 status_t Parcel::readFloatVector(std::vector<float>* val) const {
1727 return readTypedVector(val, &Parcel::readFloat);
1730 status_t Parcel::readDoubleVector(std::unique_ptr<std::vector<double>>* val) const {
1731 return readNullableTypedVector(val, &Parcel::readDouble);
1734 status_t Parcel::readDoubleVector(std::vector<double>* val) const {
1735 return readTypedVector(val, &Parcel::readDouble);
1738 status_t Parcel::readBoolVector(std::unique_ptr<std::vector<bool>>* val) const {
1760 status_t Parcel::readBoolVector(std::vector<bool>* val) const {
1790 status_t Parcel::readCharVector(std::unique_ptr<std::vector<char16_t>>* val) const {
1791 return readNullableTypedVector(val, &Parcel::readChar);
1794 status_t Parcel::readCharVector(std::vector<char16_t>* val) const {
1795 return readTypedVector(val, &Parcel::readChar);
1798 status_t Parcel::readString16Vector(
1800 return readNullableTypedVector(val, &Parcel::readString16);
1803 status_t Parcel::readString16Vector(std::vector<String16>* val) const {
1804 return readTypedVector(val, &Parcel::readString16);
1807 status_t Parcel::readUtf8VectorFromUtf16Vector(
1809 return readNullableTypedVector(val, &Parcel::readUtf8FromUtf16);
1812 status_t Parcel::readUtf8VectorFromUtf16Vector(std::vector<std::string>* val) const {
1813 return readTypedVector(val, &Parcel::readUtf8FromUtf16);
1816 status_t Parcel::readInt32(int32_t *pArg) const
1821 int32_t Parcel::readInt32() const
1826 status_t Parcel::readUint32(uint32_t *pArg) const
1831 uint32_t Parcel::readUint32() const
1836 status_t Parcel::readInt64(int64_t *pArg) const
1842 int64_t Parcel::readInt64() const
1847 status_t Parcel::readUint64(uint64_t *pArg) const
1852 uint64_t Parcel::readUint64() const
1857 status_t Parcel::readPointer(uintptr_t *pArg) const
1867 uintptr_t Parcel::readPointer() const
1873 status_t Parcel::readFloat(float *pArg) const
1879 float Parcel::readFloat() const
1886 status_t Parcel::readDouble(double *pArg) const
1899 double Parcel::readDouble() const
1911 status_t Parcel::readDouble(double *pArg) const
1916 double Parcel::readDouble() const
1923 status_t Parcel::readIntPtr(intptr_t *pArg) const
1929 intptr_t Parcel::readIntPtr() const
1934 status_t Parcel::readBool(bool *pArg) const
1942 bool Parcel::readBool() const
1947 status_t Parcel::readChar(char16_t *pArg) const
1955 char16_t Parcel::readChar() const
1960 status_t Parcel::readByte(int8_t *pArg) const
1968 int8_t Parcel::readByte() const
1973 status_t Parcel::readUtf8FromUtf16(std::string* str) const {
1999 status_t Parcel::readUtf8FromUtf16(std::unique_ptr<std::string>* str) const {
2014 const char* Parcel::readCString() const
2019 // is the string's trailing NUL within the parcel's valid bounds?
2031 String8 Parcel::readString8() const
2042 status_t Parcel::readString8(String8* pArg) const
2066 String16 Parcel::readString16() const
2075 status_t Parcel::readString16(std::unique_ptr<String16>* pArg) const
2098 status_t Parcel::readString16(String16* pArg) const
2111 const char16_t* Parcel::readString16Inplace(size_t* outLen) const
2126 status_t Parcel::readStrongBinder(sp<IBinder>* val) const
2135 status_t Parcel::readNullableStrongBinder(sp<IBinder>* val) const
2140 sp<IBinder> Parcel::readStrongBinder() const
2150 wp<IBinder> Parcel::readWeakBinder() const
2157 status_t Parcel::readParcelable(Parcelable* parcelable) const {
2169 status_t Parcel::readValue(binder::Value* value) const {
2173 int32_t Parcel::readExceptionCode() const
2180 native_handle* Parcel::readNativeHandle() const
2213 int Parcel::readFileDescriptor() const
2224 int Parcel::readParcelFileDescriptor() const
2235 status_t Parcel::readUniqueFileDescriptor(base::unique_fd* val) const
2253 status_t Parcel::readUniqueFileDescriptorVector(std::unique_ptr<std::vector<base::unique_fd>>* val) const {
2254 return readNullableTypedVector(val, &Parcel::readUniqueFileDescriptor);
2257 status_t Parcel::readUniqueFileDescriptorVector(std::vector<base::unique_fd>* val) const {
2258 return readTypedVector(val, &Parcel::readUniqueFileDescriptor);
2261 status_t Parcel::readBlob(size_t len, ReadableBlob* outBlob) const
2289 status_t Parcel::read(FlattenableHelperInterface& val) const
2320 ALOGE("fcntl(F_DUPFD_CLOEXEC) failed in Parcel::read, i is %zu, fds[i] is %d, fd_count is %zu, error: %s",
2339 const flat_binder_object* Parcel::readObject(bool nullMetaData) const
2360 ALOGV("Parcel %p looking for obj at %zu, hint=%zu",
2374 ALOGV("Parcel %p found obj %zu at index %zu with forward search",
2387 ALOGV("Parcel %p found obj %zu at index %zu with backward search",
2394 ALOGW("Attempt to read object from Parcel %p at offset %zu that is not in the object list",
2400 void Parcel::closeFileDescriptors()
2417 uintptr_t Parcel::ipcData() const
2422 size_t Parcel::ipcDataSize() const
2427 uintptr_t Parcel::ipcObjects() const
2432 size_t Parcel::ipcObjectsCount() const
2437 void Parcel::ipcSetDataReference(const uint8_t* data, size_t dataSize,
2467 void Parcel::print(TextOutput& to, uint32_t /*flags*/) const
2469 to << "Parcel(";
2493 void Parcel::releaseObjects()
2507 void Parcel::acquireObjects()
2521 void Parcel::freeData()
2527 void Parcel::freeDataNoInit()
2530 LOG_ALLOC("Parcel %p: freeing other owner data", this);
2534 LOG_ALLOC("Parcel %p: freeing allocated data", this);
2537 LOG_ALLOC("Parcel %p: freeing with %zu capacity", this, mDataCapacity);
2554 status_t Parcel::growData(size_t len)
2568 status_t Parcel::restartWrite(size_t desired)
2590 LOG_ALLOC("Parcel %p: restart from %zu to %zu capacity", this, mDataCapacity, desired);
2618 status_t Parcel::continueWrite(size_t desired)
2684 LOG_ALLOC("Parcel %p: taking ownership of %zu capacity", this, desired);
2726 LOG_ALLOC("Parcel %p: continue from %zu to %zu capacity", this, mDataCapacity,
2762 LOG_ALLOC("Parcel %p: allocating with %zu capacity", this, desired);
2778 void Parcel::initState()
2780 LOG_ALLOC("Parcel %p: initState", this);
2804 //ALOGI("parcel fd limit set to %zu", gMaxFds);
2812 void Parcel::scanForFds() const
2827 size_t Parcel::getBlobAshmemSize() const
2830 // the ashmem currently referenced by this Parcel, which should be equivalent.
2835 size_t Parcel::getOpenAshmemSize() const
2840 // --- Parcel::Blob ---
2842 Parcel::Blob::Blob() :
2846 Parcel::Blob::~Blob() {
2850 void Parcel::Blob::release() {
2857 void Parcel::Blob::init(int fd, void* data, size_t size, bool isMutable) {
2864 void Parcel::Blob::clear() {