/*
 * This file is auto-generated.  DO NOT MODIFY.
 * Original file: /var/tmp/code-browser-generator/android_android_9.0.0_r358833596918674107602/combined/android/hardware/location/IContextHubService.aidl
 */
package android.hardware.location;
@hide
/** * @hide */
public interface IContextHubService extends android.os.IInterface {
Local-side IPC implementation stub class.
/** Local-side IPC implementation stub class. */
public static abstract class Stub extends android.os.Binder implements android.hardware.location.IContextHubService { private static final java.lang.String DESCRIPTOR = "android.hardware.location.IContextHubService";
Construct the stub at attach it to the interface.
/** Construct the stub at attach it to the interface. */
public Stub() { this.attachInterface(this, DESCRIPTOR); }
Cast an IBinder object into an android.hardware.location.IContextHubService interface, generating a proxy if needed.
/** * Cast an IBinder object into an android.hardware.location.IContextHubService interface, * generating a proxy if needed. */
public static android.hardware.location.IContextHubService asInterface(android.os.IBinder obj) { if ((obj==null)) { return null; } android.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR); if (((iin!=null)&&(iin instanceof android.hardware.location.IContextHubService))) { return ((android.hardware.location.IContextHubService)iin); } return new android.hardware.location.IContextHubService.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 { java.lang.String descriptor = DESCRIPTOR; switch (code) { case INTERFACE_TRANSACTION: { reply.writeString(descriptor); return true; } case TRANSACTION_registerCallback: { data.enforceInterface(descriptor); android.hardware.location.IContextHubCallback _arg0; _arg0 = android.hardware.location.IContextHubCallback.Stub.asInterface(data.readStrongBinder()); int _result = this.registerCallback(_arg0); reply.writeNoException(); reply.writeInt(_result); return true; } case TRANSACTION_getContextHubHandles: { data.enforceInterface(descriptor); int[] _result = this.getContextHubHandles(); reply.writeNoException(); reply.writeIntArray(_result); return true; } case TRANSACTION_getContextHubInfo: { data.enforceInterface(descriptor); int _arg0; _arg0 = data.readInt(); android.hardware.location.ContextHubInfo _result = this.getContextHubInfo(_arg0); reply.writeNoException(); if ((_result!=null)) { reply.writeInt(1); _result.writeToParcel(reply, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE); } else { reply.writeInt(0); } return true; } case TRANSACTION_loadNanoApp: { data.enforceInterface(descriptor); int _arg0; _arg0 = data.readInt(); android.hardware.location.NanoApp _arg1; if ((0!=data.readInt())) { _arg1 = android.hardware.location.NanoApp.CREATOR.createFromParcel(data); } else { _arg1 = null; } int _result = this.loadNanoApp(_arg0, _arg1); reply.writeNoException(); reply.writeInt(_result); return true; } case TRANSACTION_unloadNanoApp: { data.enforceInterface(descriptor); int _arg0; _arg0 = data.readInt(); int _result = this.unloadNanoApp(_arg0); reply.writeNoException(); reply.writeInt(_result); return true; } case TRANSACTION_getNanoAppInstanceInfo: { data.enforceInterface(descriptor); int _arg0; _arg0 = data.readInt(); android.hardware.location.NanoAppInstanceInfo _result = this.getNanoAppInstanceInfo(_arg0); reply.writeNoException(); if ((_result!=null)) { reply.writeInt(1); _result.writeToParcel(reply, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE); } else { reply.writeInt(0); } return true; } case TRANSACTION_findNanoAppOnHub: { data.enforceInterface(descriptor); int _arg0; _arg0 = data.readInt(); android.hardware.location.NanoAppFilter _arg1; if ((0!=data.readInt())) { _arg1 = android.hardware.location.NanoAppFilter.CREATOR.createFromParcel(data); } else { _arg1 = null; } int[] _result = this.findNanoAppOnHub(_arg0, _arg1); reply.writeNoException(); reply.writeIntArray(_result); return true; } case TRANSACTION_sendMessage: { data.enforceInterface(descriptor); int _arg0; _arg0 = data.readInt(); int _arg1; _arg1 = data.readInt(); android.hardware.location.ContextHubMessage _arg2; if ((0!=data.readInt())) { _arg2 = android.hardware.location.ContextHubMessage.CREATOR.createFromParcel(data); } else { _arg2 = null; } int _result = this.sendMessage(_arg0, _arg1, _arg2); reply.writeNoException(); reply.writeInt(_result); return true; } case TRANSACTION_createClient: { data.enforceInterface(descriptor); android.hardware.location.IContextHubClientCallback _arg0; _arg0 = android.hardware.location.IContextHubClientCallback.Stub.asInterface(data.readStrongBinder()); int _arg1; _arg1 = data.readInt(); android.hardware.location.IContextHubClient _result = this.createClient(_arg0, _arg1); reply.writeNoException(); reply.writeStrongBinder((((_result!=null))?(_result.asBinder()):(null))); return true; } case TRANSACTION_getContextHubs: { data.enforceInterface(descriptor); java.util.List<android.hardware.location.ContextHubInfo> _result = this.getContextHubs(); reply.writeNoException(); reply.writeTypedList(_result); return true; } case TRANSACTION_loadNanoAppOnHub: { data.enforceInterface(descriptor); int _arg0; _arg0 = data.readInt(); android.hardware.location.IContextHubTransactionCallback _arg1; _arg1 = android.hardware.location.IContextHubTransactionCallback.Stub.asInterface(data.readStrongBinder()); android.hardware.location.NanoAppBinary _arg2; if ((0!=data.readInt())) { _arg2 = android.hardware.location.NanoAppBinary.CREATOR.createFromParcel(data); } else { _arg2 = null; } this.loadNanoAppOnHub(_arg0, _arg1, _arg2); reply.writeNoException(); return true; } case TRANSACTION_unloadNanoAppFromHub: { data.enforceInterface(descriptor); int _arg0; _arg0 = data.readInt(); android.hardware.location.IContextHubTransactionCallback _arg1; _arg1 = android.hardware.location.IContextHubTransactionCallback.Stub.asInterface(data.readStrongBinder()); long _arg2; _arg2 = data.readLong(); this.unloadNanoAppFromHub(_arg0, _arg1, _arg2); reply.writeNoException(); return true; } case TRANSACTION_enableNanoApp: { data.enforceInterface(descriptor); int _arg0; _arg0 = data.readInt(); android.hardware.location.IContextHubTransactionCallback _arg1; _arg1 = android.hardware.location.IContextHubTransactionCallback.Stub.asInterface(data.readStrongBinder()); long _arg2; _arg2 = data.readLong(); this.enableNanoApp(_arg0, _arg1, _arg2); reply.writeNoException(); return true; } case TRANSACTION_disableNanoApp: { data.enforceInterface(descriptor); int _arg0; _arg0 = data.readInt(); android.hardware.location.IContextHubTransactionCallback _arg1; _arg1 = android.hardware.location.IContextHubTransactionCallback.Stub.asInterface(data.readStrongBinder()); long _arg2; _arg2 = data.readLong(); this.disableNanoApp(_arg0, _arg1, _arg2); reply.writeNoException(); return true; } case TRANSACTION_queryNanoApps: { data.enforceInterface(descriptor); int _arg0; _arg0 = data.readInt(); android.hardware.location.IContextHubTransactionCallback _arg1; _arg1 = android.hardware.location.IContextHubTransactionCallback.Stub.asInterface(data.readStrongBinder()); this.queryNanoApps(_arg0, _arg1); reply.writeNoException(); return true; } default: { return super.onTransact(code, data, reply, flags); } } } private static class Proxy implements android.hardware.location.IContextHubService { 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 registerCallback(android.hardware.location.IContextHubCallback callback) 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.writeStrongBinder((((callback!=null))?(callback.asBinder()):(null))); mRemote.transact(Stub.TRANSACTION_registerCallback, _data, _reply, 0); _reply.readException(); _result = _reply.readInt(); } finally { _reply.recycle(); _data.recycle(); } return _result; } @Override public int[] getContextHubHandles() 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); mRemote.transact(Stub.TRANSACTION_getContextHubHandles, _data, _reply, 0); _reply.readException(); _result = _reply.createIntArray(); } finally { _reply.recycle(); _data.recycle(); } return _result; } // Gets the properties of a hub @Override public android.hardware.location.ContextHubInfo getContextHubInfo(int contextHubHandle) throws android.os.RemoteException { android.os.Parcel _data = android.os.Parcel.obtain(); android.os.Parcel _reply = android.os.Parcel.obtain(); android.hardware.location.ContextHubInfo _result; try { _data.writeInterfaceToken(DESCRIPTOR); _data.writeInt(contextHubHandle); mRemote.transact(Stub.TRANSACTION_getContextHubInfo, _data, _reply, 0); _reply.readException(); if ((0!=_reply.readInt())) { _result = android.hardware.location.ContextHubInfo.CREATOR.createFromParcel(_reply); } else { _result = null; } } finally { _reply.recycle(); _data.recycle(); } return _result; } @Override public int loadNanoApp(int contextHubHandle, android.hardware.location.NanoApp nanoApp) 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.writeInt(contextHubHandle); if ((nanoApp!=null)) { _data.writeInt(1); nanoApp.writeToParcel(_data, 0); } else { _data.writeInt(0); } mRemote.transact(Stub.TRANSACTION_loadNanoApp, _data, _reply, 0); _reply.readException(); _result = _reply.readInt(); } finally { _reply.recycle(); _data.recycle(); } return _result; } @Override public int unloadNanoApp(int nanoAppHandle) 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.writeInt(nanoAppHandle); mRemote.transact(Stub.TRANSACTION_unloadNanoApp, _data, _reply, 0); _reply.readException(); _result = _reply.readInt(); } finally { _reply.recycle(); _data.recycle(); } return _result; } // Gets the NanoAppInstanceInfo of a nanoapp give its instance ID @Override public android.hardware.location.NanoAppInstanceInfo getNanoAppInstanceInfo(int nanoAppHandle) throws android.os.RemoteException { android.os.Parcel _data = android.os.Parcel.obtain(); android.os.Parcel _reply = android.os.Parcel.obtain(); android.hardware.location.NanoAppInstanceInfo _result; try { _data.writeInterfaceToken(DESCRIPTOR); _data.writeInt(nanoAppHandle); mRemote.transact(Stub.TRANSACTION_getNanoAppInstanceInfo, _data, _reply, 0); _reply.readException(); if ((0!=_reply.readInt())) { _result = android.hardware.location.NanoAppInstanceInfo.CREATOR.createFromParcel(_reply); } else { _result = null; } } finally { _reply.recycle(); _data.recycle(); } return _result; } @Override public int[] findNanoAppOnHub(int contextHubHandle, android.hardware.location.NanoAppFilter filter) 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.writeInt(contextHubHandle); if ((filter!=null)) { _data.writeInt(1); filter.writeToParcel(_data, 0); } else { _data.writeInt(0); } mRemote.transact(Stub.TRANSACTION_findNanoAppOnHub, _data, _reply, 0); _reply.readException(); _result = _reply.createIntArray(); } finally { _reply.recycle(); _data.recycle(); } return _result; } @Override public int sendMessage(int contextHubHandle, int nanoAppHandle, android.hardware.location.ContextHubMessage msg) 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.writeInt(contextHubHandle); _data.writeInt(nanoAppHandle); if ((msg!=null)) { _data.writeInt(1); msg.writeToParcel(_data, 0); } else { _data.writeInt(0); } mRemote.transact(Stub.TRANSACTION_sendMessage, _data, _reply, 0); _reply.readException(); _result = _reply.readInt(); } finally { _reply.recycle(); _data.recycle(); } return _result; } // Creates a client to send and receive messages @Override public android.hardware.location.IContextHubClient createClient(android.hardware.location.IContextHubClientCallback client, int contextHubId) throws android.os.RemoteException { android.os.Parcel _data = android.os.Parcel.obtain(); android.os.Parcel _reply = android.os.Parcel.obtain(); android.hardware.location.IContextHubClient _result; try { _data.writeInterfaceToken(DESCRIPTOR); _data.writeStrongBinder((((client!=null))?(client.asBinder()):(null))); _data.writeInt(contextHubId); mRemote.transact(Stub.TRANSACTION_createClient, _data, _reply, 0); _reply.readException(); _result = android.hardware.location.IContextHubClient.Stub.asInterface(_reply.readStrongBinder()); } finally { _reply.recycle(); _data.recycle(); } return _result; } // Returns a list of ContextHub objects of available hubs @Override public java.util.List<android.hardware.location.ContextHubInfo> getContextHubs() throws android.os.RemoteException { android.os.Parcel _data = android.os.Parcel.obtain(); android.os.Parcel _reply = android.os.Parcel.obtain(); java.util.List<android.hardware.location.ContextHubInfo> _result; try { _data.writeInterfaceToken(DESCRIPTOR); mRemote.transact(Stub.TRANSACTION_getContextHubs, _data, _reply, 0); _reply.readException(); _result = _reply.createTypedArrayList(android.hardware.location.ContextHubInfo.CREATOR); } finally { _reply.recycle(); _data.recycle(); } return _result; } // Loads a nanoapp at the specified hub (new API) @Override public void loadNanoAppOnHub(int contextHubId, android.hardware.location.IContextHubTransactionCallback transactionCallback, android.hardware.location.NanoAppBinary nanoAppBinary) 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.writeInt(contextHubId); _data.writeStrongBinder((((transactionCallback!=null))?(transactionCallback.asBinder()):(null))); if ((nanoAppBinary!=null)) { _data.writeInt(1); nanoAppBinary.writeToParcel(_data, 0); } else { _data.writeInt(0); } mRemote.transact(Stub.TRANSACTION_loadNanoAppOnHub, _data, _reply, 0); _reply.readException(); } finally { _reply.recycle(); _data.recycle(); } } // Unloads a nanoapp on a specified context hub (new API) @Override public void unloadNanoAppFromHub(int contextHubId, android.hardware.location.IContextHubTransactionCallback transactionCallback, long nanoAppId) 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.writeInt(contextHubId); _data.writeStrongBinder((((transactionCallback!=null))?(transactionCallback.asBinder()):(null))); _data.writeLong(nanoAppId); mRemote.transact(Stub.TRANSACTION_unloadNanoAppFromHub, _data, _reply, 0); _reply.readException(); } finally { _reply.recycle(); _data.recycle(); } } // Enables a nanoapp at the specified hub @Override public void enableNanoApp(int contextHubId, android.hardware.location.IContextHubTransactionCallback transactionCallback, long nanoAppId) 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.writeInt(contextHubId); _data.writeStrongBinder((((transactionCallback!=null))?(transactionCallback.asBinder()):(null))); _data.writeLong(nanoAppId); mRemote.transact(Stub.TRANSACTION_enableNanoApp, _data, _reply, 0); _reply.readException(); } finally { _reply.recycle(); _data.recycle(); } } // Disables a nanoapp at the specified hub @Override public void disableNanoApp(int contextHubId, android.hardware.location.IContextHubTransactionCallback transactionCallback, long nanoAppId) 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.writeInt(contextHubId); _data.writeStrongBinder((((transactionCallback!=null))?(transactionCallback.asBinder()):(null))); _data.writeLong(nanoAppId); mRemote.transact(Stub.TRANSACTION_disableNanoApp, _data, _reply, 0); _reply.readException(); } finally { _reply.recycle(); _data.recycle(); } } // Queries for a list of nanoapps @Override public void queryNanoApps(int contextHubId, android.hardware.location.IContextHubTransactionCallback transactionCallback) 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.writeInt(contextHubId); _data.writeStrongBinder((((transactionCallback!=null))?(transactionCallback.asBinder()):(null))); mRemote.transact(Stub.TRANSACTION_queryNanoApps, _data, _reply, 0); _reply.readException(); } finally { _reply.recycle(); _data.recycle(); } } } static final int TRANSACTION_registerCallback = (android.os.IBinder.FIRST_CALL_TRANSACTION + 0); static final int TRANSACTION_getContextHubHandles = (android.os.IBinder.FIRST_CALL_TRANSACTION + 1); static final int TRANSACTION_getContextHubInfo = (android.os.IBinder.FIRST_CALL_TRANSACTION + 2); static final int TRANSACTION_loadNanoApp = (android.os.IBinder.FIRST_CALL_TRANSACTION + 3); static final int TRANSACTION_unloadNanoApp = (android.os.IBinder.FIRST_CALL_TRANSACTION + 4); static final int TRANSACTION_getNanoAppInstanceInfo = (android.os.IBinder.FIRST_CALL_TRANSACTION + 5); static final int TRANSACTION_findNanoAppOnHub = (android.os.IBinder.FIRST_CALL_TRANSACTION + 6); static final int TRANSACTION_sendMessage = (android.os.IBinder.FIRST_CALL_TRANSACTION + 7); static final int TRANSACTION_createClient = (android.os.IBinder.FIRST_CALL_TRANSACTION + 8); static final int TRANSACTION_getContextHubs = (android.os.IBinder.FIRST_CALL_TRANSACTION + 9); static final int TRANSACTION_loadNanoAppOnHub = (android.os.IBinder.FIRST_CALL_TRANSACTION + 10); static final int TRANSACTION_unloadNanoAppFromHub = (android.os.IBinder.FIRST_CALL_TRANSACTION + 11); static final int TRANSACTION_enableNanoApp = (android.os.IBinder.FIRST_CALL_TRANSACTION + 12); static final int TRANSACTION_disableNanoApp = (android.os.IBinder.FIRST_CALL_TRANSACTION + 13); static final int TRANSACTION_queryNanoApps = (android.os.IBinder.FIRST_CALL_TRANSACTION + 14); } public int registerCallback(android.hardware.location.IContextHubCallback callback) throws android.os.RemoteException; public int[] getContextHubHandles() throws android.os.RemoteException; // Gets the properties of a hub public android.hardware.location.ContextHubInfo getContextHubInfo(int contextHubHandle) throws android.os.RemoteException; public int loadNanoApp(int contextHubHandle, android.hardware.location.NanoApp nanoApp) throws android.os.RemoteException; public int unloadNanoApp(int nanoAppHandle) throws android.os.RemoteException; // Gets the NanoAppInstanceInfo of a nanoapp give its instance ID public android.hardware.location.NanoAppInstanceInfo getNanoAppInstanceInfo(int nanoAppHandle) throws android.os.RemoteException; public int[] findNanoAppOnHub(int contextHubHandle, android.hardware.location.NanoAppFilter filter) throws android.os.RemoteException; public int sendMessage(int contextHubHandle, int nanoAppHandle, android.hardware.location.ContextHubMessage msg) throws android.os.RemoteException; // Creates a client to send and receive messages public android.hardware.location.IContextHubClient createClient(android.hardware.location.IContextHubClientCallback client, int contextHubId) throws android.os.RemoteException; // Returns a list of ContextHub objects of available hubs public java.util.List<android.hardware.location.ContextHubInfo> getContextHubs() throws android.os.RemoteException; // Loads a nanoapp at the specified hub (new API) public void loadNanoAppOnHub(int contextHubId, android.hardware.location.IContextHubTransactionCallback transactionCallback, android.hardware.location.NanoAppBinary nanoAppBinary) throws android.os.RemoteException; // Unloads a nanoapp on a specified context hub (new API) public void unloadNanoAppFromHub(int contextHubId, android.hardware.location.IContextHubTransactionCallback transactionCallback, long nanoAppId) throws android.os.RemoteException; // Enables a nanoapp at the specified hub public void enableNanoApp(int contextHubId, android.hardware.location.IContextHubTransactionCallback transactionCallback, long nanoAppId) throws android.os.RemoteException; // Disables a nanoapp at the specified hub public void disableNanoApp(int contextHubId, android.hardware.location.IContextHubTransactionCallback transactionCallback, long nanoAppId) throws android.os.RemoteException; // Queries for a list of nanoapps public void queryNanoApps(int contextHubId, android.hardware.location.IContextHubTransactionCallback transactionCallback) throws android.os.RemoteException; }