package com.cvte.dss.ups.plugin;

import android.content.Context;
import g.a.a.a.a;
import g.h.a.i;
import java.util.List;
import kotlin.Metadata;
import kotlin.collections.EmptyList;
import kotlin.jvm.internal.o;

/* JADX INFO: loaded from: classes.dex */
@Metadata(d1 = {"\u00004\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010 \n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0004\bf\u0018\u00002\u00020\u0001:\u0002\u0012\u0013J\u0012\u0010\u0002\u001a\u0004\u0018\u00010\u00032\u0006\u0010\u0004\u001a\u00020\u0005H&J\u0016\u0010\u0006\u001a\b\u0012\u0004\u0012\u00020\u00030\u00072\u0006\u0010\u0004\u001a\u00020\u0005H\u0016J\u001e\u0010\b\u001a\b\u0012\u0004\u0012\u00020\u00030\u00072\u0006\u0010\u0004\u001a\u00020\u00052\u0006\u0010\t\u001a\u00020\nH\u0016J(\u0010\u000b\u001a\u00020\f2\u0006\u0010\u0004\u001a\u00020\u00052\u0006\u0010\r\u001a\u00020\n2\u0006\u0010\u000e\u001a\u00020\f2\u0006\u0010\u000f\u001a\u00020\u0010H&J0\u0010\u000b\u001a\u00020\f2\u0006\u0010\u0004\u001a\u00020\u00052\u0006\u0010\u0011\u001a\u00020\n2\u0006\u0010\r\u001a\u00020\n2\u0006\u0010\u000e\u001a\u00020\f2\u0006\u0010\u000f\u001a\u00020\u0010H\u0016J8\u0010\u000b\u001a\u00020\f2\u0006\u0010\u0004\u001a\u00020\u00052\u0006\u0010\u0011\u001a\u00020\n2\u0006\u0010\r\u001a\u00020\n2\u0006\u0010\u000e\u001a\u00020\f2\u0006\u0010\t\u001a\u00020\n2\u0006\u0010\u000f\u001a\u00020\u0010H\u0016¨\u0006\u0014"}, d2 = {"Lcom/cvte/dss/ups/plugin/IUpsPlugin;", "", "getFirmwareInfo", "Lcom/cvte/dss/ups/plugin/IUpsPlugin$FirmwareInfo;", "context", "Landroid/content/Context;", "getFirmwareInfos", "", "getFirmwareInfosWithOptions", "options", "", "upgradeFirmware", "", "path", "force", "listener", "Lcom/cvte/dss/ups/plugin/IUpsPlugin$IUpgradeStatusListener;", "id", "FirmwareInfo", "IUpgradeStatusListener", "plugin_release"}, k = 1, mv = {1, 6, 0}, xi = 48)
public interface IUpsPlugin {

    @Metadata(k = 3, mv = {1, 6, 0}, xi = 48)
    public static final class DefaultImpls {
        public static List<FirmwareInfo> getFirmwareInfos(IUpsPlugin iUpsPlugin, Context context) {
            o.f(context, "context");
            FirmwareInfo firmwareInfo = iUpsPlugin.getFirmwareInfo(context);
            return firmwareInfo == null ? EmptyList.f9307f : i.H2(firmwareInfo);
        }

        public static List<FirmwareInfo> getFirmwareInfosWithOptions(IUpsPlugin iUpsPlugin, Context context, String str) {
            o.f(context, "context");
            o.f(str, "options");
            return iUpsPlugin.getFirmwareInfos(context);
        }

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

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

    @Metadata(d1 = {"\u0000\"\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0005\n\u0002\u0010\u000b\n\u0002\b\u001b\n\u0002\u0010\b\n\u0002\b\u0002\b\u0086\b\u0018\u00002\u00020\u0001B?\b\u0016\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0003\u0012\u0006\u0010\u0005\u001a\u00020\u0003\u0012\u0006\u0010\u0006\u001a\u00020\u0003\u0012\u0006\u0010\u0007\u001a\u00020\u0003\u0012\u0006\u0010\b\u001a\u00020\t\u0012\u0006\u0010\n\u001a\u00020\t¢\u0006\u0002\u0010\u000bB/\b\u0016\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0006\u001a\u00020\u0003\u0012\u0006\u0010\u0007\u001a\u00020\u0003\u0012\u0006\u0010\b\u001a\u00020\t\u0012\u0006\u0010\n\u001a\u00020\t¢\u0006\u0002\u0010\fBE\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0003\u0012\u0006\u0010\u0005\u001a\u00020\u0003\u0012\u0006\u0010\u0006\u001a\u00020\u0003\u0012\u0006\u0010\u0007\u001a\u00020\u0003\u0012\u0006\u0010\b\u001a\u00020\t\u0012\u0006\u0010\n\u001a\u00020\t\u0012\u0006\u0010\r\u001a\u00020\u0003¢\u0006\u0002\u0010\u000eJ\t\u0010\u0019\u001a\u00020\u0003HÆ\u0003J\t\u0010\u001a\u001a\u00020\u0003HÆ\u0003J\t\u0010\u001b\u001a\u00020\u0003HÆ\u0003J\t\u0010\u001c\u001a\u00020\u0003HÆ\u0003J\t\u0010\u001d\u001a\u00020\u0003HÆ\u0003J\t\u0010\u001e\u001a\u00020\tHÆ\u0003J\t\u0010\u001f\u001a\u00020\tHÆ\u0003J\t\u0010 \u001a\u00020\u0003HÆ\u0003JY\u0010!\u001a\u00020\u00002\b\b\u0002\u0010\u0002\u001a\u00020\u00032\b\b\u0002\u0010\u0004\u001a\u00020\u00032\b\b\u0002\u0010\u0005\u001a\u00020\u00032\b\b\u0002\u0010\u0006\u001a\u00020\u00032\b\b\u0002\u0010\u0007\u001a\u00020\u00032\b\b\u0002\u0010\b\u001a\u00020\t2\b\b\u0002\u0010\n\u001a\u00020\t2\b\b\u0002\u0010\r\u001a\u00020\u0003HÆ\u0001J\u0013\u0010\"\u001a\u00020\t2\b\u0010#\u001a\u0004\u0018\u00010\u0001HÖ\u0003J\t\u0010$\u001a\u00020%HÖ\u0001J\t\u0010&\u001a\u00020\u0003HÖ\u0001R\u0011\u0010\r\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u000f\u0010\u0010R\u0011\u0010\u0004\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u0011\u0010\u0010R\u0011\u0010\n\u001a\u00020\t¢\u0006\b\n\u0000\u001a\u0004\b\u0012\u0010\u0013R\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u0014\u0010\u0010R\u0011\u0010\u0007\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u0015\u0010\u0010R\u0011\u0010\b\u001a\u00020\t¢\u0006\b\n\u0000\u001a\u0004\b\u0016\u0010\u0013R\u0011\u0010\u0005\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u0017\u0010\u0010R\u0011\u0010\u0006\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u0018\u0010\u0010¨\u0006'"}, d2 = {"Lcom/cvte/dss/ups/plugin/IUpsPlugin$FirmwareInfo;", "", "name", "", "module", "type", "version", "otaKey", "reboot", "", "monopolize", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZ)V", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZ)V", "id", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZLjava/lang/String;)V", "getId", "()Ljava/lang/String;", "getModule", "getMonopolize", "()Z", "getName", "getOtaKey", "getReboot", "getType", "getVersion", "component1", "component2", "component3", "component4", "component5", "component6", "component7", "component8", "copy", "equals", "other", "hashCode", "", "toString", "plugin_release"}, k = 1, mv = {1, 6, 0}, xi = 48)
    public static final /* data */ 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;

        /* 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 z2, boolean z3) {
            this(str, str2, str3, str4, str5, z2, z3, str5);
            o.f(str, "name");
            o.f(str2, "module");
            o.f(str3, "type");
            o.f(str4, "version");
            o.f(str5, "otaKey");
        }

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

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

        /* JADX INFO: renamed from: component1, reason: from getter */
        public final String getName() {
            return this.name;
        }

        /* JADX INFO: renamed from: component2, reason: from getter */
        public final String getModule() {
            return this.module;
        }

        /* JADX INFO: renamed from: component3, reason: from getter */
        public final String getType() {
            return this.type;
        }

        /* JADX INFO: renamed from: component4, reason: from getter */
        public final String getVersion() {
            return this.version;
        }

        /* JADX INFO: renamed from: component5, reason: from getter */
        public final String getOtaKey() {
            return this.otaKey;
        }

        /* JADX INFO: renamed from: component6, reason: from getter */
        public final boolean getReboot() {
            return this.reboot;
        }

        /* JADX INFO: renamed from: component7, reason: from getter */
        public final boolean getMonopolize() {
            return this.monopolize;
        }

        /* JADX INFO: renamed from: component8, reason: from getter */
        public final String getId() {
            return this.id;
        }

        public final FirmwareInfo copy(String name, String module, String type, String version, String otaKey, boolean reboot, boolean monopolize, String id) {
            o.f(name, "name");
            o.f(module, "module");
            o.f(type, "type");
            o.f(version, "version");
            o.f(otaKey, "otaKey");
            o.f(id, "id");
            return new FirmwareInfo(name, module, type, version, otaKey, reboot, monopolize, id);
        }

        public boolean equals(Object other) {
            if (this == other) {
                return true;
            }
            if (!(other instanceof FirmwareInfo)) {
                return false;
            }
            FirmwareInfo firmwareInfo = (FirmwareInfo) other;
            return o.a(this.name, firmwareInfo.name) && o.a(this.module, firmwareInfo.module) && o.a(this.type, firmwareInfo.type) && o.a(this.version, firmwareInfo.version) && o.a(this.otaKey, firmwareInfo.otaKey) && this.reboot == firmwareInfo.reboot && this.monopolize == firmwareInfo.monopolize && o.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: r1v10 */
        /* JADX WARN: Type inference failed for: r1v11 */
        /* JADX WARN: Type inference failed for: r1v5, types: [int] */
        /* JADX WARN: Type inference failed for: r2v1 */
        /* JADX WARN: Type inference failed for: r2v2, types: [int] */
        /* JADX WARN: Type inference failed for: r2v3 */
        public int hashCode() {
            int iH = a.H(this.otaKey, a.H(this.version, a.H(this.type, a.H(this.module, this.name.hashCode() * 31, 31), 31), 31), 31);
            boolean z2 = this.reboot;
            ?? r1 = z2;
            if (z2) {
                r1 = 1;
            }
            int i2 = (iH + r1) * 31;
            boolean z3 = this.monopolize;
            return this.id.hashCode() + ((i2 + (z3 ? 1 : z3)) * 31);
        }

        public String toString() {
            StringBuilder sbF = a.F("FirmwareInfo(name=");
            sbF.append(this.name);
            sbF.append(", module=");
            sbF.append(this.module);
            sbF.append(", type=");
            sbF.append(this.type);
            sbF.append(", version=");
            sbF.append(this.version);
            sbF.append(", otaKey=");
            sbF.append(this.otaKey);
            sbF.append(", reboot=");
            sbF.append(this.reboot);
            sbF.append(", monopolize=");
            sbF.append(this.monopolize);
            sbF.append(", id=");
            return a.z(sbF, this.id, ')');
        }
    }

    @Metadata(d1 = {"\u0000 \n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0010\u0007\n\u0000\bf\u0018\u00002\u00020\u0001J\b\u0010\u0002\u001a\u00020\u0003H&J\u0010\u0010\u0004\u001a\u00020\u00032\u0006\u0010\u0005\u001a\u00020\u0006H&J\u0010\u0010\u0007\u001a\u00020\u00032\u0006\u0010\b\u001a\u00020\tH&¨\u0006\n"}, d2 = {"Lcom/cvte/dss/ups/plugin/IUpsPlugin$IUpgradeStatusListener;", "", "onComplete", "", "onFailed", "reason", "", "onProcess", "progress", "", "plugin_release"}, k = 1, mv = {1, 6, 0}, xi = 48)
    public interface IUpgradeStatusListener {
        void onComplete();

        void onFailed(String reason);

        void onProcess(float progress);
    }

    FirmwareInfo getFirmwareInfo(Context context);

    List<FirmwareInfo> getFirmwareInfos(Context context);

    List<FirmwareInfo> getFirmwareInfosWithOptions(Context context, String options);

    boolean upgradeFirmware(Context context, String id, String path, boolean force, IUpgradeStatusListener listener);

    boolean upgradeFirmware(Context context, String id, String path, boolean force, String options, IUpgradeStatusListener listener);

    boolean upgradeFirmware(Context context, String path, boolean force, IUpgradeStatusListener listener);
}
