package com.usky.sas.common.hik;

import com.sun.jna.Library;
import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;

public interface Sadp extends Library {
    boolean SADP_Start_V40(PDEVICE_FIND_CALLBACK_V40 var1);

    boolean SADP_Stop();

    int SADP_GetLastError();

    boolean SADP_ActivateDevice(String var1, String var2);

    boolean SADP_Clearup();

    boolean SADP_SetAutoRequestInterval(int var1);

    boolean SADP_ModifyDeviceNetParam(String var1, String var2, Sadp.SADP_DEV_NET_PARAM var3);

    boolean SADP_ModifyDeviceNetParam_V40(String var1, String var2, Sadp.SADP_DEV_NET_PARAM var3, Sadp.SADP_DEV_RET_NET_PARAM var4, int var5);

    boolean SADP_SetLogToFile(int var1, String var2, boolean var3);

    public static class SADP_DEV_RET_NET_PARAM extends Structure {
        public byte byRetryModifyTime;
        public byte bySurplusLockTime;
        public byte[] byRes = new byte[126];

        public SADP_DEV_RET_NET_PARAM() {
        }

        protected List<String> getFieldOrder() {
            return Arrays.asList("byRetryModifyTime", "bySurplusLockTime", "byRes");
        }
    }

    public static class SADP_DEV_NET_PARAM extends Structure {
        public byte[] szIPv4Address = new byte[16];
        public byte[] szIPv4SubNetMask = new byte[16];
        public byte[] szIPv4Gateway = new byte[16];
        public byte[] szIPv6Address = new byte[128];
        public byte[] szIPv6Gateway = new byte[128];
        public short wPort;
        public byte byIPv6MaskLen = 64;
        public byte byDhcpEnable = 0;
        public short wHttpPort = 0;
        public int dwSDKOverTLSPort = 0;
        public byte[] byRes = new byte[122];

        public SADP_DEV_NET_PARAM() {
        }

        protected List<String> getFieldOrder() {
            return Arrays.asList("szIPv4Address", "szIPv4SubNetMask", "szIPv4Gateway", "szIPv6Address", "szIPv6Gateway", "wPort", "byIPv6MaskLen", "byDhcpEnable", "wHttpPort", "dwSDKOverTLSPort", "byRes");
        }
    }
}

