package com.cvte.dss.ups.plugin;

import android.content.Context;
import f.a.y.a;
import g.h0.c.l;
import g.i;
import java.util.List;

/* JADX INFO: compiled from: IUpsPlugin.kt */
/* JADX INFO: loaded from: classes.dex */
public interface IUpsPlugin {

    /* JADX INFO: compiled from: IUpsPlugin.kt */
    @i
    public static final class DefaultImpls {
        public static List<FirmwareInfo> getFirmwareInfos(IUpsPlugin iUpsPlugin, Context context) {
            l.f(context, "context");
            FirmwareInfo firmwareInfo = iUpsPlugin.getFirmwareInfo(context);
            return firmwareInfo != null ? a.w0(firmwareInfo) : g.c0.l.f4067b;
        }

        public static boolean upgradeFirmware(IUpsPlugin iUpsPlugin, Context context, String str, String str2, boolean z, IUpgradeStatusListener iUpgradeStatusListener) {
            l.f(context, "context");
            l.f(str, "id");
            l.f(str2, "path");
            l.f(iUpgradeStatusListener, "listener");
            return iUpsPlugin.upgradeFirmware(context, str2, z, iUpgradeStatusListener);
        }
    }

    /* JADX INFO: compiled from: IUpsPlugin.kt */
    public static final class FirmwareInfo {
        private final String id;
        private final String module;
        private final boolean monopolize;
        private final String name;
        private final String otaKey;
        private final boolean reboot;
        private final String type;
        private final String version;

        public FirmwareInfo(String str, String str2, String str3, String str4, String str5, boolean z, boolean z2, String str6) {
            l.f(str, "name");
            l.f(str2, "module");
            l.f(str3, "type");
            l.f(str4, "version");
            l.f(str5, "otaKey");
            l.f(str6, "id");
            this.name = str;
            this.module = str2;
            this.type = str3;
            this.version = str4;
            this.otaKey = str5;
            this.reboot = z;
            this.monopolize = z2;
            this.id = str6;
        }

        public final String component1() {
            return this.name;
        }

        public final String component2() {
            return this.module;
        }

        public final String component3() {
            return this.type;
        }

        public final String component4() {
            return this.version;
        }

        public final String component5() {
            return this.otaKey;
        }

        public final boolean component6() {
            return this.reboot;
        }

        public final boolean component7() {
            return this.monopolize;
        }

        public final String component8() {
            return this.id;
        }

        public final FirmwareInfo copy(String str, String str2, String str3, String str4, String str5, boolean z, boolean z2, String str6) {
            l.f(str, "name");
            l.f(str2, "module");
            l.f(str3, "type");
            l.f(str4, "version");
            l.f(str5, "otaKey");
            l.f(str6, "id");
            return new FirmwareInfo(str, str2, str3, str4, str5, z, z2, str6);
        }

        public boolean equals(Object obj) {
            if (this == obj) {
                return true;
            }
            if (!(obj instanceof FirmwareInfo)) {
                return false;
            }
            FirmwareInfo firmwareInfo = (FirmwareInfo) obj;
            return l.a(this.name, firmwareInfo.name) && l.a(this.module, firmwareInfo.module) && l.a(this.type, firmwareInfo.type) && l.a(this.version, firmwareInfo.version) && l.a(this.otaKey, firmwareInfo.otaKey) && this.reboot == firmwareInfo.reboot && this.monopolize == firmwareInfo.monopolize && l.a(this.id, firmwareInfo.id);
        }

        public final String getId() {
            return this.id;
        }

        public final String getModule() {
            return this.module;
        }

        public final boolean getMonopolize() {
            return this.monopolize;
        }

        public final String getName() {
            return this.name;
        }

        public final String getOtaKey() {
            return this.otaKey;
        }

        public final boolean getReboot() {
            return this.reboot;
        }

        public final String getType() {
            return this.type;
        }

        public final String getVersion() {
            return this.version;
        }

        /* JADX WARN: Multi-variable type inference failed */
        /* JADX WARN: Type inference failed for: r2v13, types: [int] */
        /* JADX WARN: Type inference failed for: r2v16 */
        /* JADX WARN: Type inference failed for: r2v21 */
        /* JADX WARN: Type inference failed for: r3v0 */
        /* JADX WARN: Type inference failed for: r3v1, types: [int] */
        /* JADX WARN: Type inference failed for: r3v2 */
        public int hashCode() {
            String str = this.name;
            int iHashCode = (str != null ? str.hashCode() : 0) * 31;
            String str2 = this.module;
            int iHashCode2 = (iHashCode + (str2 != null ? str2.hashCode() : 0)) * 31;
            String str3 = this.type;
            int iHashCode3 = (iHashCode2 + (str3 != null ? str3.hashCode() : 0)) * 31;
            String str4 = this.version;
            int iHashCode4 = (iHashCode3 + (str4 != null ? str4.hashCode() : 0)) * 31;
            String str5 = this.otaKey;
            int iHashCode5 = (iHashCode4 + (str5 != null ? str5.hashCode() : 0)) * 31;
            boolean z = this.reboot;
            ?? r2 = z;
            if (z) {
                r2 = 1;
            }
            int i2 = (iHashCode5 + r2) * 31;
            boolean z2 = this.monopolize;
            int i3 = (i2 + (z2 ? 1 : z2)) * 31;
            String str6 = this.id;
            return i3 + (str6 != null ? str6.hashCode() : 0);
        }

        public String toString() {
            StringBuilder sbB = d.b.a.a.a.B("FirmwareInfo(name=");
            sbB.append(this.name);
            sbB.append(", module=");
            sbB.append(this.module);
            sbB.append(", type=");
            sbB.append(this.type);
            sbB.append(", version=");
            sbB.append(this.version);
            sbB.append(", otaKey=");
            sbB.append(this.otaKey);
            sbB.append(", reboot=");
            sbB.append(this.reboot);
            sbB.append(", monopolize=");
            sbB.append(this.monopolize);
            sbB.append(", id=");
            return d.b.a.a.a.v(sbB, this.id, ")");
        }

        /* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
        public FirmwareInfo(String str, String str2, String str3, String str4, String str5, boolean z, boolean z2) {
            this(str, str2, str3, str4, str5, z, z2, str5);
            l.f(str, "name");
            l.f(str2, "module");
            l.f(str3, "type");
            l.f(str4, "version");
            l.f(str5, "otaKey");
        }

        /* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
        public FirmwareInfo(String str, String str2, String str3, boolean z, boolean z2) {
            this(str, "", str, str2, str3, z, z2, str3);
            l.f(str, "name");
            l.f(str2, "version");
            l.f(str3, "otaKey");
        }
    }

    /* JADX INFO: compiled from: IUpsPlugin.kt */
    public interface IUpgradeStatusListener {
        void onComplete();

        void onFailed(String str);

        void onProcess(float f2);
    }

    FirmwareInfo getFirmwareInfo(Context context);

    List<FirmwareInfo> getFirmwareInfos(Context context);

    boolean upgradeFirmware(Context context, String str, String str2, boolean z, IUpgradeStatusListener iUpgradeStatusListener);

    boolean upgradeFirmware(Context context, String str, boolean z, IUpgradeStatusListener iUpgradeStatusListener);
}
