/*
 * 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/IContextHubClientCallback.aidl
 */
package android.hardware.location;
An interface used by the Context Hub Service to invoke callbacks for lifecycle notifications of a Context Hub and nanoapps, as well as for nanoapp messaging.
@hide
/** * An interface used by the Context Hub Service to invoke callbacks for lifecycle notifications of a * Context Hub and nanoapps, as well as for nanoapp messaging. * * @hide */
public interface IContextHubClientCallback 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.IContextHubClientCallback { private static final java.lang.String DESCRIPTOR = "android.hardware.location.IContextHubClientCallback";
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.IContextHubClientCallback interface, generating a proxy if needed.
/** * Cast an IBinder object into an android.hardware.location.IContextHubClientCallback interface, * generating a proxy if needed. */
public static android.hardware.location.IContextHubClientCallback 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.IContextHubClientCallback))) { return ((android.hardware.location.IContextHubClientCallback)iin); } return new android.hardware.location.IContextHubClientCallback.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_onMessageFromNanoApp: { data.enforceInterface(descriptor); android.hardware.location.NanoAppMessage _arg0; if ((0!=data.readInt())) { _arg0 = android.hardware.location.NanoAppMessage.CREATOR.createFromParcel(data); } else { _arg0 = null; } this.onMessageFromNanoApp(_arg0); return true; } case TRANSACTION_onHubReset: { data.enforceInterface(descriptor); this.onHubReset(); return true; } case TRANSACTION_onNanoAppAborted: { data.enforceInterface(descriptor); long _arg0; _arg0 = data.readLong(); int _arg1; _arg1 = data.readInt(); this.onNanoAppAborted(_arg0, _arg1); return true; } case TRANSACTION_onNanoAppLoaded: { data.enforceInterface(descriptor); long _arg0; _arg0 = data.readLong(); this.onNanoAppLoaded(_arg0); return true; } case TRANSACTION_onNanoAppUnloaded: { data.enforceInterface(descriptor); long _arg0; _arg0 = data.readLong(); this.onNanoAppUnloaded(_arg0); return true; } case TRANSACTION_onNanoAppEnabled: { data.enforceInterface(descriptor); long _arg0; _arg0 = data.readLong(); this.onNanoAppEnabled(_arg0); return true; } case TRANSACTION_onNanoAppDisabled: { data.enforceInterface(descriptor); long _arg0; _arg0 = data.readLong(); this.onNanoAppDisabled(_arg0); return true; } default: { return super.onTransact(code, data, reply, flags); } } } private static class Proxy implements android.hardware.location.IContextHubClientCallback { 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; } // Callback invoked when receiving a message from a nanoapp. @Override public void onMessageFromNanoApp(android.hardware.location.NanoAppMessage message) throws android.os.RemoteException { android.os.Parcel _data = android.os.Parcel.obtain(); try { _data.writeInterfaceToken(DESCRIPTOR); if ((message!=null)) { _data.writeInt(1); message.writeToParcel(_data, 0); } else { _data.writeInt(0); } mRemote.transact(Stub.TRANSACTION_onMessageFromNanoApp, _data, null, android.os.IBinder.FLAG_ONEWAY); } finally { _data.recycle(); } } // Callback invoked when the attached Context Hub has reset. @Override public void onHubReset() throws android.os.RemoteException { android.os.Parcel _data = android.os.Parcel.obtain(); try { _data.writeInterfaceToken(DESCRIPTOR); mRemote.transact(Stub.TRANSACTION_onHubReset, _data, null, android.os.IBinder.FLAG_ONEWAY); } finally { _data.recycle(); } } // Callback invoked when a nanoapp aborts at the attached Context Hub. @Override public void onNanoAppAborted(long nanoAppId, int abortCode) throws android.os.RemoteException { android.os.Parcel _data = android.os.Parcel.obtain(); try { _data.writeInterfaceToken(DESCRIPTOR); _data.writeLong(nanoAppId); _data.writeInt(abortCode); mRemote.transact(Stub.TRANSACTION_onNanoAppAborted, _data, null, android.os.IBinder.FLAG_ONEWAY); } finally { _data.recycle(); } } // Callback invoked when a nanoapp is loaded at the attached Context Hub. @Override public void onNanoAppLoaded(long nanoAppId) throws android.os.RemoteException { android.os.Parcel _data = android.os.Parcel.obtain(); try { _data.writeInterfaceToken(DESCRIPTOR); _data.writeLong(nanoAppId); mRemote.transact(Stub.TRANSACTION_onNanoAppLoaded, _data, null, android.os.IBinder.FLAG_ONEWAY); } finally { _data.recycle(); } } // Callback invoked when a nanoapp is unloaded from the attached Context Hub. @Override public void onNanoAppUnloaded(long nanoAppId) throws android.os.RemoteException { android.os.Parcel _data = android.os.Parcel.obtain(); try { _data.writeInterfaceToken(DESCRIPTOR); _data.writeLong(nanoAppId); mRemote.transact(Stub.TRANSACTION_onNanoAppUnloaded, _data, null, android.os.IBinder.FLAG_ONEWAY); } finally { _data.recycle(); } } // Callback invoked when a nanoapp is enabled at the attached Context Hub. @Override public void onNanoAppEnabled(long nanoAppId) throws android.os.RemoteException { android.os.Parcel _data = android.os.Parcel.obtain(); try { _data.writeInterfaceToken(DESCRIPTOR); _data.writeLong(nanoAppId); mRemote.transact(Stub.TRANSACTION_onNanoAppEnabled, _data, null, android.os.IBinder.FLAG_ONEWAY); } finally { _data.recycle(); } } // Callback invoked when a nanoapp is disabled at the attached Context Hub. @Override public void onNanoAppDisabled(long nanoAppId) throws android.os.RemoteException { android.os.Parcel _data = android.os.Parcel.obtain(); try { _data.writeInterfaceToken(DESCRIPTOR); _data.writeLong(nanoAppId); mRemote.transact(Stub.TRANSACTION_onNanoAppDisabled, _data, null, android.os.IBinder.FLAG_ONEWAY); } finally { _data.recycle(); } } } static final int TRANSACTION_onMessageFromNanoApp = (android.os.IBinder.FIRST_CALL_TRANSACTION + 0); static final int TRANSACTION_onHubReset = (android.os.IBinder.FIRST_CALL_TRANSACTION + 1); static final int TRANSACTION_onNanoAppAborted = (android.os.IBinder.FIRST_CALL_TRANSACTION + 2); static final int TRANSACTION_onNanoAppLoaded = (android.os.IBinder.FIRST_CALL_TRANSACTION + 3); static final int TRANSACTION_onNanoAppUnloaded = (android.os.IBinder.FIRST_CALL_TRANSACTION + 4); static final int TRANSACTION_onNanoAppEnabled = (android.os.IBinder.FIRST_CALL_TRANSACTION + 5); static final int TRANSACTION_onNanoAppDisabled = (android.os.IBinder.FIRST_CALL_TRANSACTION + 6); } // Callback invoked when receiving a message from a nanoapp. public void onMessageFromNanoApp(android.hardware.location.NanoAppMessage message) throws android.os.RemoteException; // Callback invoked when the attached Context Hub has reset. public void onHubReset() throws android.os.RemoteException; // Callback invoked when a nanoapp aborts at the attached Context Hub. public void onNanoAppAborted(long nanoAppId, int abortCode) throws android.os.RemoteException; // Callback invoked when a nanoapp is loaded at the attached Context Hub. public void onNanoAppLoaded(long nanoAppId) throws android.os.RemoteException; // Callback invoked when a nanoapp is unloaded from the attached Context Hub. public void onNanoAppUnloaded(long nanoAppId) throws android.os.RemoteException; // Callback invoked when a nanoapp is enabled at the attached Context Hub. public void onNanoAppEnabled(long nanoAppId) throws android.os.RemoteException; // Callback invoked when a nanoapp is disabled at the attached Context Hub. public void onNanoAppDisabled(long nanoAppId) throws android.os.RemoteException; }