diff options
| author | Mathias Agopian <mathias@google.com> | 2009-05-20 14:33:23 -0700 | 
|---|---|---|
| committer | Mathias Agopian <mathias@google.com> | 2009-05-20 14:33:23 -0700 | 
| commit | 9890815e427c49192efd738a8ae07ce038da92be (patch) | |
| tree | 646c4fae7b60c45fe8b43a91397ab47749efe1ef /include/utils | |
| parent | 2d10ba33190c2ff1b24d6c48dd621c55a25bf2cc (diff) | |
| download | frameworks_base-9890815e427c49192efd738a8ae07ce038da92be.zip frameworks_base-9890815e427c49192efd738a8ae07ce038da92be.tar.gz frameworks_base-9890815e427c49192efd738a8ae07ce038da92be.tar.bz2 | |
bring the native_handle stuff back from master_gl
Diffstat (limited to 'include/utils')
| -rw-r--r-- | include/utils/Parcel.h | 18 | 
1 files changed, 10 insertions, 8 deletions
| diff --git a/include/utils/Parcel.h b/include/utils/Parcel.h index 9087c44..af1490a 100644 --- a/include/utils/Parcel.h +++ b/include/utils/Parcel.h @@ -80,8 +80,11 @@ public:      status_t            writeStrongBinder(const sp<IBinder>& val);      status_t            writeWeakBinder(const wp<IBinder>& val); -    // doesn't take ownership of the native_handle -    status_t            writeNativeHandle(const native_handle& handle); +    // 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_t            writeNativeHandle(const native_handle* handle);      // Place a file descriptor into the parcel.  The given fd must remain      // valid for the lifetime of the parcel. @@ -114,12 +117,11 @@ public:      wp<IBinder>         readWeakBinder() const; -    // if alloc is NULL, native_handle is allocated with malloc(), otherwise -    // alloc is used. If the function fails, the effects of alloc() must be -    // reverted by the caller. -    native_handle*     readNativeHandle( -            native_handle* (*alloc)(void* cookie, int numFds, int ints), -            void* cookie) 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  +    // native_handle_delete(). +    native_handle*     readNativeHandle() const;      // Retrieve a file descriptor from the parcel.  This returns the raw fd | 
