summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@android.com>2010-07-13 15:55:05 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-07-13 15:55:05 -0700
commit706623ddb8314850c0551f0b66e24b5f0bd28620 (patch)
treea9e49309fb30bbee68e9cbc970604abcf47571e2 /include
parent7a72f84801c3ad74f00f5d3d0da7e2212d07a911 (diff)
parentc0a7e690bfd32dd897ceccd04dd0fa6bf6e9cee6 (diff)
downloadframeworks_base-706623ddb8314850c0551f0b66e24b5f0bd28620.zip
frameworks_base-706623ddb8314850c0551f0b66e24b5f0bd28620.tar.gz
frameworks_base-706623ddb8314850c0551f0b66e24b5f0bd28620.tar.bz2
am c0a7e690: Add Parcel::readExceptionCode() and Parcel::writeNoException()
Merge commit 'c0a7e690bfd32dd897ceccd04dd0fa6bf6e9cee6' into gingerbread-plus-aosp * commit 'c0a7e690bfd32dd897ceccd04dd0fa6bf6e9cee6': Add Parcel::readExceptionCode() and Parcel::writeNoException()
Diffstat (limited to 'include')
-rw-r--r--include/binder/Parcel.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/include/binder/Parcel.h b/include/binder/Parcel.h
index 2cc4db9..3aba5f6 100644
--- a/include/binder/Parcel.h
+++ b/include/binder/Parcel.h
@@ -103,6 +103,11 @@ public:
status_t writeObject(const flat_binder_object& val, bool nullMetaData);
+ // Like Parcel.java's writeNoException(). Just writes a zero int32.
+ // Currently the native implementation doesn't do any of the StrictMode
+ // stack gathering and serialization that the Java implementation does.
+ status_t writeNoException();
+
void remove(size_t start, size_t amt);
status_t read(void* outData, size_t len) const;
@@ -125,7 +130,14 @@ public:
sp<IBinder> readStrongBinder() const;
wp<IBinder> readWeakBinder() const;
status_t read(Flattenable& val) const;
-
+
+ // Like Parcel.java's readExceptionCode(). Reads the first int32
+ // off of a Parcel's header, returning 0 or the negative error
+ // code on exceptions, but also deals with skipping over rich
+ // response headers. Callers should use this to read & parse the
+ // response headers rather than doing it by hand.
+ int32_t readExceptionCode() const;
+
// Retrieve native_handle from the parcel. This returns a copy of the
// parcel's native_handle (the caller takes ownership). The caller
// must free the native_handle with native_handle_close() and