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;
import com.share.connect.wifiap.WifiApObserver;

public interface IWifiAp extends IInterface {

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

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

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

        @Override // com.share.connect.wifiap.IWifiAp
        public void createSoftAp(int i, String str, String str2, boolean z, boolean z2) throws RemoteException {
        }

        @Override // com.share.connect.wifiap.IWifiAp
        public boolean isUserClose() throws RemoteException {
            return false;
        }

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

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

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

    public static abstract class b extends Binder implements IWifiAp {

        /* renamed from: a  reason: collision with root package name */
        private static final String f190a = "com.share.connect.wifiap.IWifiAp";
        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 IWifiAp {
            public static IWifiAp b;

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

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

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

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

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

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

            @Override // com.share.connect.wifiap.IWifiAp
            public void createSoftAp(int i, String str, String str2, boolean z, boolean z2) throws RemoteException {
                Parcel obtain = Parcel.obtain();
                Parcel obtain2 = Parcel.obtain();
                try {
                    obtain.writeInterfaceToken(b.f190a);
                    obtain.writeInt(i);
                    obtain.writeString(str);
                    obtain.writeString(str2);
                    obtain.writeInt(z ? 1 : 0);
                    obtain.writeInt(z2 ? 1 : 0);
                    if (this.f191a.transact(3, obtain, obtain2, 0) || b.a() == null) {
                        obtain2.readException();
                    } else {
                        b.a().createSoftAp(i, str, str2, z, z2);
                    }
                } finally {
                    obtain2.recycle();
                    obtain.recycle();
                }
            }

            @Override // com.share.connect.wifiap.IWifiAp
            public boolean isUserClose() throws RemoteException {
                Parcel obtain = Parcel.obtain();
                Parcel obtain2 = Parcel.obtain();
                try {
                    obtain.writeInterfaceToken(b.f190a);
                    boolean z = false;
                    if (!this.f191a.transact(5, obtain, obtain2, 0) && b.a() != null) {
                        return b.a().isUserClose();
                    }
                    obtain2.readException();
                    if (obtain2.readInt() != 0) {
                        z = true;
                    }
                    obtain2.recycle();
                    obtain.recycle();
                    return z;
                } finally {
                    obtain2.recycle();
                    obtain.recycle();
                }
            }

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

            @Override // com.share.connect.wifiap.IWifiAp
            public void registerWifiApObserver(WifiApObserver wifiApObserver) throws RemoteException {
                Parcel obtain = Parcel.obtain();
                Parcel obtain2 = Parcel.obtain();
                try {
                    obtain.writeInterfaceToken(b.f190a);
                    obtain.writeStrongBinder(wifiApObserver != null ? wifiApObserver.asBinder() : null);
                    if (this.f191a.transact(6, obtain, obtain2, 0) || b.a() == null) {
                        obtain2.readException();
                    } else {
                        b.a().registerWifiApObserver(wifiApObserver);
                    }
                } finally {
                    obtain2.recycle();
                    obtain.recycle();
                }
            }

            @Override // com.share.connect.wifiap.IWifiAp
            public void unregisterWifiApObserver(WifiApObserver wifiApObserver) throws RemoteException {
                Parcel obtain = Parcel.obtain();
                Parcel obtain2 = Parcel.obtain();
                try {
                    obtain.writeInterfaceToken(b.f190a);
                    obtain.writeStrongBinder(wifiApObserver != null ? wifiApObserver.asBinder() : null);
                    if (this.f191a.transact(7, obtain, obtain2, 0) || b.a() == null) {
                        obtain2.readException();
                    } else {
                        b.a().unregisterWifiApObserver(wifiApObserver);
                    }
                } finally {
                    obtain2.recycle();
                    obtain.recycle();
                }
            }
        }

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

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

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

        public static boolean a(IWifiAp iWifiAp) {
            if (a.b != null) {
                throw new IllegalStateException("setDefaultImpl() called twice");
            } else if (iWifiAp == null) {
                return false;
            } else {
                a.b = iWifiAp;
                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(f190a);
                        open();
                        parcel2.writeNoException();
                        return true;
                    case 2:
                        parcel.enforceInterface(f190a);
                        close();
                        parcel2.writeNoException();
                        return true;
                    case 3:
                        parcel.enforceInterface(f190a);
                        createSoftAp(parcel.readInt(), parcel.readString(), parcel.readString(), parcel.readInt() != 0, parcel.readInt() != 0);
                        parcel2.writeNoException();
                        return true;
                    case 4:
                        parcel.enforceInterface(f190a);
                        cancelConnect();
                        parcel2.writeNoException();
                        return true;
                    case 5:
                        parcel.enforceInterface(f190a);
                        boolean isUserClose = isUserClose();
                        parcel2.writeNoException();
                        parcel2.writeInt(isUserClose ? 1 : 0);
                        return true;
                    case 6:
                        parcel.enforceInterface(f190a);
                        registerWifiApObserver(WifiApObserver.b.a(parcel.readStrongBinder()));
                        parcel2.writeNoException();
                        return true;
                    case 7:
                        parcel.enforceInterface(f190a);
                        unregisterWifiApObserver(WifiApObserver.b.a(parcel.readStrongBinder()));
                        parcel2.writeNoException();
                        return true;
                    default:
                        return super.onTransact(i, parcel, parcel2, i2);
                }
            } else {
                parcel2.writeString(f190a);
                return true;
            }
        }
    }

    void cancelConnect() throws RemoteException;

    void close() throws RemoteException;

    void createSoftAp(int i, String str, String str2, boolean z, boolean z2) throws RemoteException;

    boolean isUserClose() throws RemoteException;

    void open() throws RemoteException;

    void registerWifiApObserver(WifiApObserver wifiApObserver) throws RemoteException;

    void unregisterWifiApObserver(WifiApObserver wifiApObserver) throws RemoteException;
}
