Lines Matching refs:val
114 status_t writeInt32(int32_t val);
115 status_t writeUint32(uint32_t val);
116 status_t writeInt64(int64_t val);
117 status_t writeUint64(uint64_t val);
118 status_t writeFloat(float val);
119 status_t writeDouble(double val);
126 status_t writeStrongBinder(const sp<IBinder>& val);
127 status_t writeInt32Array(size_t len, const int32_t *val);
128 status_t writeByteArray(size_t len, const uint8_t *val);
129 status_t writeBool(bool val);
130 status_t writeChar(char16_t val);
131 status_t writeByte(int8_t val);
137 status_t writeByteVector(const std::unique_ptr<std::vector<int8_t>>& val);
138 status_t writeByteVector(const std::vector<int8_t>& val);
139 status_t writeByteVector(const std::unique_ptr<std::vector<uint8_t>>& val);
140 status_t writeByteVector(const std::vector<uint8_t>& val);
141 status_t writeInt32Vector(const std::unique_ptr<std::vector<int32_t>>& val);
142 status_t writeInt32Vector(const std::vector<int32_t>& val);
143 status_t writeInt64Vector(const std::unique_ptr<std::vector<int64_t>>& val);
144 status_t writeInt64Vector(const std::vector<int64_t>& val);
145 status_t writeUint64Vector(const std::unique_ptr<std::vector<uint64_t>>& val);
146 status_t writeUint64Vector(const std::vector<uint64_t>& val);
147 status_t writeFloatVector(const std::unique_ptr<std::vector<float>>& val);
148 status_t writeFloatVector(const std::vector<float>& val);
149 status_t writeDoubleVector(const std::unique_ptr<std::vector<double>>& val);
150 status_t writeDoubleVector(const std::vector<double>& val);
151 status_t writeBoolVector(const std::unique_ptr<std::vector<bool>>& val);
152 status_t writeBoolVector(const std::vector<bool>& val);
153 status_t writeCharVector(const std::unique_ptr<std::vector<char16_t>>& val);
154 status_t writeCharVector(const std::vector<char16_t>& val);
156 const std::unique_ptr<std::vector<std::unique_ptr<String16>>>& val);
157 status_t writeString16Vector(const std::vector<String16>& val);
159 const std::unique_ptr<std::vector<std::unique_ptr<std::string>>>& val);
160 status_t writeUtf8VectorAsUtf16Vector(const std::vector<std::string>& val);
162 status_t writeStrongBinderVector(const std::unique_ptr<std::vector<sp<IBinder>>>& val);
163 status_t writeStrongBinderVector(const std::vector<sp<IBinder>>& val);
168 status_t writeEnumVector(const std::vector<T>& val);
170 status_t writeEnumVector(const std::unique_ptr<std::vector<T>>& val);
173 status_t writeEnumVector(const std::vector<T>& val);
175 status_t writeEnumVector(const std::unique_ptr<std::vector<T>>& val);
178 status_t writeParcelableVector(const std::unique_ptr<std::vector<std::unique_ptr<T>>>& val);
180 status_t writeParcelableVector(const std::shared_ptr<std::vector<std::unique_ptr<T>>>& val);
182 status_t writeParcelableVector(const std::vector<T>& val);
190 status_t write(const Flattenable<T>& val);
193 status_t write(const LightFlattenable<T>& val);
196 status_t writeVectorSize(const std::vector<T>& val);
198 status_t writeVectorSize(const std::unique_ptr<std::vector<T>>& val);
233 const std::unique_ptr<std::vector<base::unique_fd>>& val);
235 const std::vector<base::unique_fd>& val);
250 status_t writeObject(const flat_binder_object& val, bool nullMetaData);
293 status_t readStrongBinder(sp<IBinder>* val) const;
294 status_t readNullableStrongBinder(sp<IBinder>* val) const;
300 status_t readEnumVector(std::vector<T>* val) const;
302 status_t readEnumVector(std::unique_ptr<std::vector<T>>* val) const;
305 status_t readEnumVector(std::vector<T>* val) const;
307 status_t readEnumVector(std::unique_ptr<std::vector<T>>* val) const;
311 std::unique_ptr<std::vector<std::unique_ptr<T>>>* val) const;
313 status_t readParcelableVector(std::vector<T>* val) const;
321 status_t readStrongBinder(sp<T>* val) const;
324 status_t readNullableStrongBinder(sp<T>* val) const;
326 status_t readStrongBinderVector(std::unique_ptr<std::vector<sp<IBinder>>>* val) const;
327 status_t readStrongBinderVector(std::vector<sp<IBinder>>* val) const;
329 status_t readByteVector(std::unique_ptr<std::vector<int8_t>>* val) const;
330 status_t readByteVector(std::vector<int8_t>* val) const;
331 status_t readByteVector(std::unique_ptr<std::vector<uint8_t>>* val) const;
332 status_t readByteVector(std::vector<uint8_t>* val) const;
333 status_t readInt32Vector(std::unique_ptr<std::vector<int32_t>>* val) const;
334 status_t readInt32Vector(std::vector<int32_t>* val) const;
335 status_t readInt64Vector(std::unique_ptr<std::vector<int64_t>>* val) const;
336 status_t readInt64Vector(std::vector<int64_t>* val) const;
337 status_t readUint64Vector(std::unique_ptr<std::vector<uint64_t>>* val) const;
338 status_t readUint64Vector(std::vector<uint64_t>* val) const;
339 status_t readFloatVector(std::unique_ptr<std::vector<float>>* val) const;
340 status_t readFloatVector(std::vector<float>* val) const;
341 status_t readDoubleVector(std::unique_ptr<std::vector<double>>* val) const;
342 status_t readDoubleVector(std::vector<double>* val) const;
343 status_t readBoolVector(std::unique_ptr<std::vector<bool>>* val) const;
344 status_t readBoolVector(std::vector<bool>* val) const;
345 status_t readCharVector(std::unique_ptr<std::vector<char16_t>>* val) const;
346 status_t readCharVector(std::vector<char16_t>* val) const;
348 std::unique_ptr<std::vector<std::unique_ptr<String16>>>* val) const;
349 status_t readString16Vector(std::vector<String16>* val) const;
351 std::unique_ptr<std::vector<std::unique_ptr<std::string>>>* val) const;
352 status_t readUtf8VectorFromUtf16Vector(std::vector<std::string>* val) const;
355 status_t read(Flattenable<T>& val) const;
358 status_t read(LightFlattenable<T>& val) const;
361 status_t resizeOutVector(std::vector<T>* val) const;
363 status_t resizeOutVector(std::unique_ptr<std::vector<T>>* val) const;
365 status_t reserveOutVector(std::vector<T>* val, size_t* size) const;
367 status_t reserveOutVector(std::unique_ptr<std::vector<T>>* val,
394 base::unique_fd* val) const;
397 status_t readUniqueParcelFileDescriptor(base::unique_fd* val) const;
402 std::unique_ptr<std::vector<base::unique_fd>>* val) const;
404 std::vector<base::unique_fd>* val) const;
451 status_t writePointer(uintptr_t val);
472 status_t writeAligned(T val);
478 status_t writeEnum(const T& val);
480 status_t writeEnum(const T& val);
489 status_t readByteVectorInternal(std::vector<T>* val, size_t size) const;
492 status_t unsafeReadTypedVector(std::vector<T>* val,
495 status_t readNullableTypedVector(std::unique_ptr<std::vector<T>>* val,
498 status_t readTypedVector(std::vector<T>* val,
501 status_t unsafeWriteTypedVector(const std::vector<T>& val,
504 status_t writeNullableTypedVector(const std::unique_ptr<std::vector<T>>& val,
507 status_t writeNullableTypedVector(const std::unique_ptr<std::vector<T>>& val,
510 status_t writeTypedVector(const std::vector<T>& val,
513 status_t writeTypedVector(const std::vector<T>& val,
584 const Flattenable<T>& val;
585 explicit FlattenableHelper(const Flattenable<T>& _val) : val(_val) { }
591 return val.getFlattenedSize();
594 return val.getFdCount();
597 return val.flatten(buffer, size, fds, count);
600 return const_cast<Flattenable<T>&>(val).unflatten(buffer, size, fds, count);
603 status_t write(const FlattenableHelperInterface& val);
604 status_t read(FlattenableHelperInterface& val) const;
632 status_t Parcel::write(const Flattenable<T>& val) {
633 const FlattenableHelper<T> helper(val);
638 status_t Parcel::write(const LightFlattenable<T>& val) {
639 size_t size(val.getFlattenedSize());
640 if (!val.isFixedSize()) {
653 return val.flatten(buffer, size);
659 status_t Parcel::read(Flattenable<T>& val) const {
660 FlattenableHelper<T> helper(val);
665 status_t Parcel::read(LightFlattenable<T>& val) const {
667 if (val.isFixedSize()) {
668 size = val.getFlattenedSize();
680 val.unflatten(buffer, size);
686 status_t Parcel::writeVectorSize(const std::vector<T>& val) {
687 if (val.size() > INT32_MAX) {
690 return writeInt32(static_cast<int32_t>(val.size()));
694 status_t Parcel::writeVectorSize(const std::unique_ptr<std::vector<T>>& val) {
695 if (!val) {
699 return writeVectorSize(*val);
703 status_t Parcel::resizeOutVector(std::vector<T>* val) const {
713 val->resize(size_t(size));
718 status_t Parcel::resizeOutVector(std::unique_ptr<std::vector<T>>* val) const {
725 val->reset();
727 val->reset(new std::vector<T>(size_t(size)));
734 status_t Parcel::reserveOutVector(std::vector<T>* val, size_t* size) const {
745 val->reserve(*size);
750 status_t Parcel::reserveOutVector(std::unique_ptr<std::vector<T>>* val,
760 val->reset(new std::vector<T>());
761 (*val)->reserve(*size);
763 val->reset();
770 status_t Parcel::readStrongBinder(sp<T>* val) const {
775 *val = interface_cast<T>(tmp);
777 if (val->get() == nullptr) {
786 status_t Parcel::readNullableStrongBinder(sp<T>* val) const {
791 *val = interface_cast<T>(tmp);
793 if (val->get() == nullptr && tmp.get() != nullptr) {
803 std::vector<T>* val,
816 if (val->max_size() < static_cast<size_t>(size)) {
820 val->resize(static_cast<size_t>(size));
822 if (val->size() < static_cast<size_t>(size)) {
826 for (auto& v: *val) {
838 status_t Parcel::readTypedVector(std::vector<T>* val,
840 return unsafeReadTypedVector(val, read_func);
844 status_t Parcel::readNullableTypedVector(std::unique_ptr<std::vector<T>>* val,
849 val->reset();
856 val->reset(new std::vector<T>());
858 status = unsafeReadTypedVector(val->get(), read_func);
861 val->reset();
868 status_t Parcel::unsafeWriteTypedVector(const std::vector<T>& val,
870 if (val.size() > std::numeric_limits<int32_t>::max()) {
874 status_t status = this->writeInt32(static_cast<int32_t>(val.size()));
880 for (const auto& item : val) {
892 status_t Parcel::writeTypedVector(const std::vector<T>& val,
894 return unsafeWriteTypedVector(val, write_func);
898 status_t Parcel::writeTypedVector(const std::vector<T>& val,
900 return unsafeWriteTypedVector(val, write_func);
904 status_t Parcel::writeNullableTypedVector(const std::unique_ptr<std::vector<T>>& val,
906 if (val.get() == nullptr) {
910 return unsafeWriteTypedVector(*val, write_func);
914 status_t Parcel::writeNullableTypedVector(const std::unique_ptr<std::vector<T>>& val,
916 if (val.get() == nullptr) {
920 return unsafeWriteTypedVector(*val, write_func);
924 status_t Parcel::readParcelableVector(std::vector<T>* val) const {
925 return unsafeReadTypedVector<T, Parcelable>(val, &Parcel::readParcelable);
929 status_t Parcel::readParcelableVector(std::unique_ptr<std::vector<std::unique_ptr<T>>>* val) const {
933 val->reset();
940 val->reset(new std::vector<std::unique_ptr<T>>());
942 status = unsafeReadTypedVector(val->get(), &Parcel::readParcelable<T>);
945 val->reset();
980 status_t Parcel::writeParcelableVector(const std::vector<T>& val) {
981 return unsafeWriteTypedVector<T,const Parcelable&>(val, &Parcel::writeParcelable);
985 status_t Parcel::writeParcelableVector(const std::unique_ptr<std::vector<std::unique_ptr<T>>>& val) {
986 if (val.get() == nullptr) {
990 return unsafeWriteTypedVector(*val, &Parcel::writeNullableParcelable<T>);
994 status_t Parcel::writeParcelableVector(const std::shared_ptr<std::vector<std::unique_ptr<T>>>& val) {
995 if (val.get() == nullptr) {
999 return unsafeWriteTypedVector(*val, &Parcel::writeNullableParcelable<T>);
1003 status_t Parcel::writeEnum(const T& val) {
1004 return writeInt32(static_cast<int32_t>(val));
1007 status_t Parcel::writeEnum(const T& val) {
1008 return writeInt64(static_cast<int64_t>(val));
1012 status_t Parcel::writeEnumVector(const std::vector<T>& val) {
1013 return writeByteVectorInternal(reinterpret_cast<const int8_t*>(val.data()), val.size());
1016 status_t Parcel::writeEnumVector(const std::unique_ptr<std::vector<T>>& val) {
1017 if (!val) return writeInt32(-1);
1018 return writeByteVectorInternal(reinterpret_cast<const int8_t*>(val->data()), val->size());
1021 status_t Parcel::writeEnumVector(const std::vector<T>& val) {
1022 return writeTypedVector(val, &Parcel::writeEnum);
1025 status_t Parcel::writeEnumVector(const std::unique_ptr<std::vector<T>>& val) {
1026 return writeNullableTypedVector(val, &Parcel::writeEnum);
1039 inline status_t Parcel::readByteVectorInternal(std::vector<T>* val, size_t size) const {
1044 val->clear();
1045 val->insert(val->begin(), data, data+size);
1050 status_t Parcel::readEnumVector(std::vector<T>* val) const {
1052 if (status_t status = reserveOutVector(val, &size); status != OK) return status;
1053 return readByteVectorInternal(val, size);
1056 status_t Parcel::readEnumVector(std::unique_ptr<std::vector<T>>* val) const {
1058 if (status_t status = reserveOutVector(val, &size); status != OK) return status;
1059 if (val->get() == nullptr) {
1064 return readByteVectorInternal(val->get(), size);
1067 status_t Parcel::readEnumVector(std::vector<T>* val) const {
1068 return readTypedVector(val, &Parcel::readEnum);
1071 status_t Parcel::readEnumVector(std::unique_ptr<std::vector<T>>* val) const {
1072 return readNullableTypedVector(val, &Parcel::readEnum);