package com.share.connect.wifiap;

import android.os.Binder;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
import android.os.RemoteException;

public interface WifiApObserver extends IInterface {

    public static class a implements WifiApObserver {
        public IBinder asBinder() {
            return null;
        }

        @Override // com.share.connect.wifiap.WifiApObserver
        public void onAcceptFailed() throws RemoteException {
        }

        @Override // com.share.connect.wifiap.WifiApObserver
        public void onApCreateFailed() throws RemoteException {
        }

        @Override // com.share.connect.wifiap.WifiApObserver
        public void onApCreated(String str, String str2, String str3, String str4, int i) throws RemoteException {
        }

        @Override // com.share.connect.wifiap.WifiApObserver
        public void onConnected() throws RemoteException {
        }

        @Override // com.share.connect.wifiap.WifiApObserver
        public void onDisconnected(boolean z) throws RemoteException {
        }

        @Override // com.share.connect.wifiap.WifiApObserver
        public void onOpenFailed() throws RemoteException {
        }

        @Override // com.share.connect.wifiap.WifiApObserver
        public void onOpenSuccess() throws RemoteException {
        }
    }

    public static abstract class b extends Binder implements WifiApObserver {

        /* renamed from: a  reason: collision with root package name */
        private static final String f192a = "com.share.connect.wifiap.WifiApObserver";
        public static final int b = 1;
        public static final int c = 2;
        public static final int d = 3;
        public static final int e = 4;
        public static final int f = 5;
        public static final int g = 6;
        public static final int h = 7;

        public static class a implements WifiApObserver {
            public static WifiApObserver b;

            /* renamed from: a  reason: collision with root package name */
            private IBinder f193a;

            public a(IBinder iBinder) {
                this.f193a = iBinder;
            }

            public String a() {
                return b.f192a;
            }

            public IBinder asBinder() {
                return this.f193a;
            }

            @Override // com.share.connect.wifiap.WifiApObserver
            public void onAcceptFailed() throws RemoteException {
                Parcel obtain = Parcel.obtain();
                Parcel obtain2 = Parcel.obtain();
                try {
                    obtain.writeInterfaceToken(b.f192a);
                    if (this.f193a.transact(7, obtain, obtain2, 0) || b.a() == null) {
                        obtain2.readException();
                    } else {
                        b.a().onAcceptFailed();
                    }
                } finally {
                    obtain2.recycle();
                    obtain.recycle();
                }
            }

            @Override // com.share.connect.wifiap.WifiApObserver
            public void onApCreateFailed() throws RemoteException {
                Parcel obtain = Parcel.obtain();
                Parcel obtain2 = Parcel.obtain();
                try {
                    obtain.writeInterfaceToken(b.f192a);
                    if (this.f193a.transact(4, obtain, obtain2, 0) || b.a() == null) {
                        obtain2.readException();
                    } else {
                        b.a().onApCreateFailed();
                    }
                } finally {
                    obtain2.recycle();
                    obtain.recycle();
                }
            }

            @Override // com.share.connect.wifiap.WifiApObserver
            public void onApCreated(String str, String str2, String str3, String str4, int i) throws RemoteException {
                Parcel obtain = Parcel.obtain();
                Parcel obtain2 = Parcel.obtain();
                try {
                    obtain.writeInterfaceToken(b.f192a);
                    obtain.writeString(str);
                    obtain.writeString(str2);
                    obtain.writeString(str3);
                    obtain.writeString(str4);
                    obtain.writeInt(i);
                    if (this.f193a.transact(3, obtain, obtain2, 0) || b.a() == null) {
                        obtain2.readException();
                    } else {
                        b.a().onApCreated(str, str2, str3, str4, i);
                    }
                } finally {
                    obtain2.recycle();
                    obtain.recycle();
                }
            }

            @Override // com.share.connect.wifiap.WifiApObserver
            public void onConnected() throws RemoteException {
                Parcel obtain = Parcel.obtain();
                Parcel obtain2 = Parcel.obtain();
                try {
                    obtain.writeInterfaceToken(b.f192a);
                    if (this.f193a.transact(5, obtain, obtain2, 0) || b.a() == null) {
                        obtain2.readException();
                    } else {
                        b.a().onConnected();
                    }
                } finally {
                    obtain2.recycle();
                    obtain.recycle();
                }
            }

            @Override // com.share.connect.wifiap.WifiApObserver
            public void onDisconnected(boolean z) throws RemoteException {
                Parcel obtain = Parcel.obtain();
                Parcel obtain2 = Parcel.obtain();
                try {
                    obtain.writeInterfaceToken(b.f192a);
                    obtain.writeInt(z ? 1 : 0);
                    if (this.f193a.transact(6, obtain, obtain2, 0) || b.a() == null) {
                        obtain2.readException();
                    } else {
                        b.a().onDisconnected(z);
                    }
                } finally {
                    obtain2.recycle();
                    obtain.recycle();
                }
            }

            @Override // com.share.connect.wifiap.WifiApObserver
            public void onOpenFailed() throws RemoteException {
                Parcel obtain = Parcel.obtain();
                Parcel obtain2 = Parcel.obtain();
                try {
                    obtain.writeInterfaceToken(b.f192a);
                    if (this.f193a.transact(2, obtain, obtain2, 0) || b.a() == null) {
                        obtain2.readException();
                    } else {
                        b.a().onOpenFailed();
                    }
                } finally {
                    obtain2.recycle();
                    obtain.recycle();
                }
            }

            @Override // com.share.connect.wifiap.WifiApObserver
            public void onOpenSuccess() throws RemoteException {
                Parcel obtain = Parcel.obtain();
                Parcel obtain2 = Parcel.obtain();
                try {
                    obtain.writeInterfaceToken(b.f192a);
                    if (this.f193a.transact(1, obtain, obtain2, 0) || b.a() == null) {
                        obtain2.readException();
                    } else {
                        b.a().onOpenSuccess();
                    }
                } finally {
                    obtain2.recycle();
                    obtain.recycle();
                }
            }
        }

        public b() {
            attachInterface(this, f192a);
        }

        public static WifiApObserver a() {
            return a.b;
        }

        public static WifiApObserver a(IBinder iBinder) {
            if (iBinder == null) {
                return null;
            }
            IInterface queryLocalInterface = iBinder.queryLocalInterface(f192a);
            return (queryLocalInterface == null || !(queryLocalInterface instanceof WifiApObserver)) ? new a(iBinder) : (WifiApObserver) queryLocalInterface;
        }

        public static boolean a(WifiApObserver wifiApObserver) {
            if (a.b != null) {
                throw new IllegalStateException("setDefaultImpl() called twice");
            } else if (wifiApObserver == null) {
                return false;
            } else {
                a.b = wifiApObserver;
                return true;
            }
        }

        public IBinder asBinder() {
            return this;
        }

        @Override // android.os.Binder
        public boolean onTransact(int i, Parcel parcel, Parcel parcel2, int i2) throws RemoteException {
            if (i != 1598968902) {
                switch (i) {
                    case 1:
                        parcel.enforceInterface(f192a);
                        onOpenSuccess();
                        break;
                    case 2:
                        parcel.enforceInterface(f192a);
                        onOpenFailed();
                        break;
                    case 3:
                        parcel.enforceInterface(f192a);
                        onApCreated(parcel.readString(), parcel.readString(), parcel.readString(), parcel.readString(), parcel.readInt());
                        break;
                    case 4:
                        parcel.enforceInterface(f192a);
                        onApCreateFailed();
                        break;
                    case 5:
                        parcel.enforceInterface(f192a);
                        onConnected();
                        break;
                    case 6:
                        parcel.enforceInterface(f192a);
                        onDisconnected(parcel.readInt() != 0);
                        break;
                    case 7:
                        parcel.enforceInterface(f192a);
                        onAcceptFailed();
                        break;
                    default:
                        return super.onTransact(i, parcel, parcel2, i2);
                }
                parcel2.writeNoException();
                return true;
            }
            parcel2.writeString(f192a);
            return true;
        }
    }

    void onAcceptFailed() throws RemoteException;

    void onApCreateFailed() throws RemoteException;

    void onApCreated(String str, String str2, String str3, String str4, int i) throws RemoteException;

    void onConnected() throws RemoteException;

    void onDisconnected(boolean z) throws RemoteException;

    void onOpenFailed() throws RemoteException;

    void onOpenSuccess() throws RemoteException;
}
