19066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project/* //device/libs/android_runtime/android_util_Binder.h
29066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project**
39066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project** Copyright 2006, The Android Open Source Project
49066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project**
5a3804cf77f0edd93f6247a055cdafb856b117eecElliott Hughes** Licensed under the Apache License, Version 2.0 (the "License");
6a3804cf77f0edd93f6247a055cdafb856b117eecElliott Hughes** you may not use this file except in compliance with the License.
7a3804cf77f0edd93f6247a055cdafb856b117eecElliott Hughes** You may obtain a copy of the License at
89066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project**
9a3804cf77f0edd93f6247a055cdafb856b117eecElliott Hughes**     http://www.apache.org/licenses/LICENSE-2.0
109066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project**
11a3804cf77f0edd93f6247a055cdafb856b117eecElliott Hughes** Unless required by applicable law or agreed to in writing, software
12a3804cf77f0edd93f6247a055cdafb856b117eecElliott Hughes** distributed under the License is distributed on an "AS IS" BASIS,
13a3804cf77f0edd93f6247a055cdafb856b117eecElliott Hughes** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14a3804cf77f0edd93f6247a055cdafb856b117eecElliott Hughes** See the License for the specific language governing permissions and
159066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project** limitations under the License.
169066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project*/
179066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
18d84e1ce0b535128f03416145554fb405f9fade3eJeff Sharkey#ifndef ANDROID_UTIL_BINDER_H
19d84e1ce0b535128f03416145554fb405f9fade3eJeff Sharkey#define ANDROID_UTIL_BINDER_H
20d84e1ce0b535128f03416145554fb405f9fade3eJeff Sharkey
210795272aa226f4e965968a03daddc53ce30b7cdaMathias Agopian#include <binder/IBinder.h>
229066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
239066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project#include "jni.h"
249066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
259066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectnamespace android {
269066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
279066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project// Converstion to/from Java IBinder Object and C++ IBinder instance.
289066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectextern jobject javaObjectForIBinder(JNIEnv* env, const sp<IBinder>& val);
299066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectextern sp<IBinder> ibinderForJavaObject(JNIEnv* env, jobject obj);
309066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
319066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectextern jobject newParcelFileDescriptor(JNIEnv* env, jobject fileDesc);
329066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
33d84e1ce0b535128f03416145554fb405f9fade3eJeff Sharkeyextern void set_dalvik_blockguard_policy(JNIEnv* env, jint strict_policy);
34d84e1ce0b535128f03416145554fb405f9fade3eJeff Sharkey
35d84e1ce0b535128f03416145554fb405f9fade3eJeff Sharkeyextern void signalExceptionForError(JNIEnv* env, jobject obj, status_t err,
36d84e1ce0b535128f03416145554fb405f9fade3eJeff Sharkey        bool canThrowRemoteException = false);
37d84e1ce0b535128f03416145554fb405f9fade3eJeff Sharkey
389066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project}
39d84e1ce0b535128f03416145554fb405f9fade3eJeff Sharkey
40d84e1ce0b535128f03416145554fb405f9fade3eJeff Sharkey#endif
41