package com.dowse.base.param;

import android.content.Context;
import com.dowse.base.log.DSLog;
import com.dowse.base.util.ContextUtil;
import com.dowse.base.util.StaticIP;

/* loaded from: ds_base_2.0.9_23030112.aar:classes.jar:com/dowse/base/param/GB28181Param.class */
public class GB28181Param {
    private static final String TAG = "GB28181Param";
    private NetType net_type;
    private String net_name;
    private String net_local_ip;
    private int channel;
    private int stream_no;
    private String sip_server_ip;
    private int sip_server_port;
    private String sip_server_id;
    private String sip_server_area;
    private String user_id;
    private String password;
    private int heart_time;
    private int reg_alive_time;
    private int is_run;
    private String dev_name;
    private int camera_number = 1;

    public NetType getNet_type() {
        return this.net_type;
    }

    public String getNet_local_ip() {
        return this.net_local_ip;
    }

    public void setNet_local_ip(String net_local_ip) {
        this.net_local_ip = net_local_ip;
    }

    public void setNet_type(NetType net_type) {
        this.net_type = net_type;
    }

    public String getNet_name() {
        return this.net_name;
    }

    public void setNet_name(String net_name) {
        this.net_name = net_name;
    }

    public int getChannel() {
        return this.channel;
    }

    public void setChannel(int channel) {
        this.channel = channel;
    }

    public int getStream_no() {
        return this.stream_no;
    }

    public void setStream_no(int stream_no) {
        this.stream_no = stream_no;
    }

    public String getSip_server_ip() {
        return this.sip_server_ip;
    }

    public void setSip_server_ip(String sip_server_ip) {
        this.sip_server_ip = sip_server_ip;
    }

    public int getSip_server_port() {
        return this.sip_server_port;
    }

    public void setSip_server_port(int sip_server_port) {
        this.sip_server_port = sip_server_port;
    }

    public String getSip_server_id() {
        return this.sip_server_id;
    }

    public void setSip_server_id(String sip_server_id) {
        this.sip_server_id = sip_server_id;
    }

    public String getSip_server_area() {
        return this.sip_server_area;
    }

    public void setSip_server_area(String sip_server_area) {
        this.sip_server_area = sip_server_area;
    }

    public String getUser_id() {
        return this.user_id;
    }

    public void setUser_id(String user_id) {
        this.user_id = user_id;
    }

    public String getPassword() {
        return this.password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getHeart_time() {
        return this.heart_time;
    }

    public void setHeart_time(int heart_time) {
        this.heart_time = heart_time;
    }

    public int getIs_run() {
        return this.is_run;
    }

    public void setIs_run(int is_run) {
        this.is_run = is_run;
    }

    public int getReg_alive_time() {
        return this.reg_alive_time;
    }

    public void setReg_alive_time(int reg_alive_time) {
        this.reg_alive_time = reg_alive_time;
    }

    public String getDev_name() {
        return this.dev_name;
    }

    public void setDev_name(String dev_name) {
        this.dev_name = dev_name;
    }

    public int getCamera_number() {
        return this.camera_number;
    }

    public void setCamera_number(int camera_number) {
        this.camera_number = camera_number;
    }

    public void updateNetInfo() {
        Context context = ContextUtil.getApplication();
        /*
        if (this.net_type == NetType.SIM_1) {
            this.net_name = NetUtil.getInner4GEthName(context);
            this.net_local_ip = NetUtil.getInner4GIpAddress(context);
        } else if (this.net_type == NetType.SIM_2) {
            this.net_name = NetUtil.getOut4GEthName(context);
            this.net_local_ip = NetUtil.getEthIpAddress(context, this.net_name);
        } else if (this.net_type == NetType.WIFI) {
            this.net_name = NetUtil.getWiFiName();
            this.net_local_ip = NetUtil.getWiFiIP(context);
        } else if (this.net_type == NetType.VPN) {
            this.net_name = NetUtil.getVPNEthName(context);
            this.net_local_ip = NetUtil.getVPNIpAddress(context);
        } else if (this.net_type == NetType.ETH) {
            this.net_name = NetUtil.getStaticEthName(context);
            StaticIP staticIP = DS_NetWork.getStaticIP(context, this.net_name);
            this.net_local_ip = staticIP == null ? "" : staticIP.getIp();
        } else {
            this.net_name = "";
            String ethName = NetUtil.getStaticEthName(context);
            StaticIP staticIP2 = DS_NetWork.getStaticIP(context, ethName);
            this.net_local_ip = staticIP2 == null ? "" : staticIP2.getIp();
        }

         */
        DSLog.d(TAG, "updateNetInfo " + toString());
    }

    public static GB28181Param getDefaultParam(int index) {
        GB28181Param param = new GB28181Param();
        param.setUser_id("3402000000200001000" + index);
        param.setPassword("hhit@2021");
        param.setSip_server_port(15060);
        param.setSip_server_area("3402000000");
        param.setSip_server_id("34020000002000000001");
        param.setSip_server_ip("112.0.170.178");
        param.setStream_no(0);
        param.setChannel(0);
        if (index == 1) {
            param.setNet_type(NetType.SIM_1);
        } else {
            param.setNet_type(NetType.SIM_2);
        }
        param.setNet_name("");
        param.setIs_run(1);
        param.setHeart_time(30);
        param.setReg_alive_time(300);
        param.setDev_name("DowseBall");
        param.setNet_local_ip("192.168.18.129");
        return param;
    }

    public String toString() {
        return "GB28181Param{net_type=" + this.net_type + ", net_name='" + this.net_name + "', net_local_ip='" + this.net_local_ip + "', channel=" + this.channel + ", stream_no=" + this.stream_no + ", sip_server_ip='" + this.sip_server_ip + "', sip_server_port=" + this.sip_server_port + ", sip_server_id='" + this.sip_server_id + "', sip_server_area='" + this.sip_server_area + "', user_id='" + this.user_id + "', password='" + this.password + "', heart_time=" + this.heart_time + ", reg_alive_time=" + this.reg_alive_time + ", is_run=" + this.is_run + ", dev_name='" + this.dev_name + "', camera_number=" + this.camera_number + '}';
    }
}
