package com.zxh.ipc;
public interface ITestManager extends android.os.IInterface
{
/**
Local-side IPC implementation stub class. */
public static abstract class Stub extends android.os.Binder implements com.zxh.ipc.ITestManager
{
private static final java.lang.String
DESCRIPTOR = "com.zxh.ipc.ITestManager" ;
/**
Construct the stub at attach it to the interface. */
public Stub()
{
this .attachInterface( this ,
DESCRIPTOR);
}
/**
*
Cast an IBinder object into an com.zxh.ipc.ITestManager interface, generating a proxy if needed.
*/
public static com.zxh.ipc.ITestManager
asInterface(android.os.IBinder obj)
{
if ((obj
== null ))
{
return null ;
}
android.os.IInterface
iin = obj.queryLocalInterface(DESCRIPTOR);
if (((iin
!= null )
&& (iin instanceof com.zxh.ipc.ITestManager)))
{
return ((com.zxh.ipc.ITestManager)
iin);
}
return new com.zxh.ipc.ITestManager.Stub.Proxy(obj);
}
@Override
public android.os.IBinder
asBinder()
{
return this ;
}
@Override
public boolean onTransact( int code,
android.os.Parcel data, android.os.Parcel reply, int flags)
throws android.os.RemoteException
{
switch (code)
{
case INTERFACE_TRANSACTION:
{
reply.writeString(DESCRIPTOR);
return true ;
}
case TRANSACTION_checkPermission:
{
data.enforceInterface(DESCRIPTOR);
java.lang.String
_arg0;
_arg0
= data.readString();
java.lang.String
_arg1;
_arg1
= data.readString();
int _result
= this .checkPermission(_arg0,
_arg1);
reply.writeNoException();
reply.writeInt(_result);
return true ;
}
case TRANSACTION_checkUidPermission:
{
data.enforceInterface(DESCRIPTOR);
java.lang.String
_arg0;
_arg0
= data.readString();
int _arg1;
_arg1
= data.readInt();
int _result
= this .checkUidPermission(_arg0,
_arg1);
reply.writeNoException();
reply.writeInt(_result);
return true ;
}
case TRANSACTION_addPermission:
{
data.enforceInterface(DESCRIPTOR);
com.zxh.ipc.PermissionInfo
_arg0;
if (( 0 !=
data.readInt())) {
_arg0
= com.zxh.ipc.PermissionInfo.CREATOR.createFromParcel(data);
}
else {
_arg0
= null ;
}
boolean _result
= this .addPermission(_arg0);
reply.writeNoException();
reply.writeInt(((_result)
? ( 1 )
: ( 0 )));
return true ;
}
case TRANSACTION_removePermission:
{
data.enforceInterface(DESCRIPTOR);
java.lang.String
_arg0;
_arg0
= data.readString();
this .removePermission(_arg0);
reply.writeNoException();
return true ;
}
case TRANSACTION_isProtectedBroadcast:
{
data.enforceInterface(DESCRIPTOR);
java.lang.String
_arg0;
_arg0
= data.readString();
boolean _result
= this .isProtectedBroadcast(_arg0);
reply.writeNoException();
reply.writeInt(((_result)
? ( 1 )
: ( 0 )));
return true ;
}
}
return super .onTransact(code,
data, reply, flags);
}
private static class Proxy implements com.zxh.ipc.ITestManager
{
private android.os.IBinder
mRemote;
Proxy(android.os.IBinder
remote)
{
mRemote
= remote;
}
@Override
public android.os.IBinder
asBinder()
{
return mRemote;
}
public java.lang.String
getInterfaceDescriptor()
{
return DESCRIPTOR;
}
@Override
public int checkPermission(java.lang.String
permName, java.lang.String pkgName)
throws android.os.RemoteException
{
android.os.Parcel
_data = android.os.Parcel.obtain();
android.os.Parcel
_reply = android.os.Parcel.obtain();
int _result;
try {
_data.writeInterfaceToken(DESCRIPTOR);
_data.writeString(permName);
_data.writeString(pkgName);
mRemote.transact(Stub.TRANSACTION_checkPermission,
_data, _reply, 0 );
_reply.readException();
_result
= _reply.readInt();
} finally {
_reply.recycle();
_data.recycle();
}
return _result;
}
@Override
public int checkUidPermission(java.lang.String
permName, int uid) throws android.os.RemoteException
{
android.os.Parcel
_data = android.os.Parcel.obtain();
android.os.Parcel
_reply = android.os.Parcel.obtain();
int _result;
try {
_data.writeInterfaceToken(DESCRIPTOR);
_data.writeString(permName);
_data.writeInt(uid);
mRemote.transact(Stub.TRANSACTION_checkUidPermission,
_data, _reply, 0 );
_reply.readException();
_result
= _reply.readInt();
} finally {
_reply.recycle();
_data.recycle();
}
return _result;
}
@Override
public boolean addPermission(com.zxh.ipc.PermissionInfo
info) throws android.os.RemoteException
{
android.os.Parcel
_data = android.os.Parcel.obtain();
android.os.Parcel
_reply = android.os.Parcel.obtain();
boolean _result;
try {
_data.writeInterfaceToken(DESCRIPTOR);
if ((info
!= null ))
{
_data.writeInt( 1 );
info.writeToParcel(_data, 0 );
}
else {
_data.writeInt( 0 );
}
mRemote.transact(Stub.TRANSACTION_addPermission,
_data, _reply, 0 );
_reply.readException();
_result
= ( 0 !=
_reply.readInt());
} finally {
_reply.recycle();
_data.recycle();
}
return _result;
}
@Override
public void removePermission(java.lang.String
name) throws android.os.RemoteException
{
android.os.Parcel
_data = android.os.Parcel.obtain();
android.os.Parcel
_reply = android.os.Parcel.obtain();
try {
_data.writeInterfaceToken(DESCRIPTOR);
_data.writeString(name);
mRemote.transact(Stub.TRANSACTION_removePermission,
_data, _reply, 0 );
_reply.readException();
} finally {
_reply.recycle();
_data.recycle();
}
}
@Override
public boolean isProtectedBroadcast(java.lang.String
actionName) throws android.os.RemoteException
{
android.os.Parcel
_data = android.os.Parcel.obtain();
android.os.Parcel
_reply = android.os.Parcel.obtain();
boolean _result;
try {
_data.writeInterfaceToken(DESCRIPTOR);
_data.writeString(actionName);
mRemote.transact(Stub.TRANSACTION_isProtectedBroadcast,
_data, _reply, 0 );
_reply.readException();
_result
= ( 0 !=
_reply.readInt());
} finally {
_reply.recycle();
_data.recycle();
}
return _result;
}
}
static final int TRANSACTION_checkPermission
= (android.os.IBinder.FIRST_CALL_TRANSACTION + 0 );
static final int TRANSACTION_checkUidPermission
= (android.os.IBinder.FIRST_CALL_TRANSACTION + 1 );
static final int TRANSACTION_addPermission
= (android.os.IBinder.FIRST_CALL_TRANSACTION + 2 );
static final int TRANSACTION_removePermission
= (android.os.IBinder.FIRST_CALL_TRANSACTION + 3 );
static final int TRANSACTION_isProtectedBroadcast
= (android.os.IBinder.FIRST_CALL_TRANSACTION + 4 );
}
public int checkPermission(java.lang.String
permName, java.lang.String pkgName) throws android.os.RemoteException;
public int checkUidPermission(java.lang.String
permName, int uid) throws android.os.RemoteException;
public boolean addPermission(com.zxh.ipc.PermissionInfo
info) throws android.os.RemoteException;
public void removePermission(java.lang.String
name) throws android.os.RemoteException;
public boolean isProtectedBroadcast(java.lang.String
actionName) throws android.os.RemoteException;
}
|