HiChipDefines.java 源代码


package com.hichip.content;

import android.text.TextUtils;
import android.util.Base64;
import com.hichip.base.HiLog;
import com.hichip.base.LogUtils;
import com.hichip.tools.Packet;
import com.qq.e.comm.adevent.AdEventType;
import com.xiaomi.mipush.sdk.Constants;
import java.io.PrintStream;
import java.io.UnsupportedEncodingException;
import java.lang.reflect.Array;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
import java.util.Locale;
import java.util.TimeZone;
import org.apache.poi.hssf.record.BOFRecord;
import org.apache.poi.hssf.usermodel.HSSFShapeTypes;
import org.apache.xmlbeans.impl.common.NameUtil;
import utils.TimeUtil;

public class HiChipDefines {
    public static final int HIP2P_SYSDAYA_FLAG = 1398167624;
    public static final int HI_FAILURE = -1;
    public static final int HI_LIVE_VIDEO_GET = -2113929214;
    public static final int HI_NET_DEV_AUDIO_COMBINE_FLAG = 1126258296;
    public static final int HI_P2P_ALARM_EVENT = 61444;
    public static final int HI_P2P_ALARM_REC_LEN_GET = 16686;
    public static final int HI_P2P_ALARM_REC_LEN_SET = 16687;
    public static final int HI_P2P_AUDIO_FRAME_FLAG = 1178687560;
    public static final int HI_P2P_AUDIO_START = 12547;
    public static final int HI_P2P_AUDIO_STOP = 12548;
    public static final int HI_P2P_AUTH_LEN = 64;
    public static final int HI_P2P_AUTH_LEN_EXT = 342;
    public static final int HI_P2P_CAPTURE_DOWNLOADREQ = 16819;
    public static final int HI_P2P_DEF_DISPLAY_PARAM = 12807;
    public static final int HI_P2P_DEV_AUDIO_FRAME_FLAG = 1178687560;
    public static final int HI_P2P_DEV_AUDIO_TYPE_AAC = 3;
    public static final int HI_P2P_DEV_AUDIO_TYPE_AMR = 2;
    public static final int HI_P2P_DEV_AUDIO_TYPE_G711 = 0;
    public static final int HI_P2P_DEV_AUDIO_TYPE_G726 = 1;
    public static final int HI_P2P_DEV_GET_STREAMPARAM_GUNBALL = 65617;
    public static final int HI_P2P_DEV_PB_PLAYBACKFAST_POS = 65613;
    public static final int HI_P2P_DEV_PB_PLAY_CTRL_UNITE_GUNBALL = 65619;
    public static final int HI_P2P_DEV_PB_PLAY_CTRL_UNITE_IGUNBALL = 65619;
    public static final int HI_P2P_DEV_PLAYBACK_END_FLAG = 1174405120;
    public static final int HI_P2P_DEV_PLAYBACK_FAST = 65612;
    public static final int HI_P2P_DEV_PLAYBACK_POS_FLAG = 1174405122;
    public static final int HI_P2P_DEV_PLAYBACK_START_FLAG = 1174405123;
    public static final int HI_P2P_DEV_RECORD_END_FLAG = 1191182336;
    public static final int HI_P2P_DEV_RECORD_START_FLAG = 1191182337;
    public static final int HI_P2P_DEV_SET_STREAMPARAM_GUNBAL = 65618;
    public static final int HI_P2P_DEV_UNITE_GUNBALL = 65616;
    public static final int HI_P2P_DEV_UPLOAD_END_FLAG = 1174405121;
    public static final int HI_P2P_DEV_VIDEO_FRAME_FLAG = 1180063816;
    public static final int HI_P2P_ENCRIPT_LOGIN = 4096;
    public static final int HI_P2P_END_FRAME_FLAG = 1229346888;
    public static final int HI_P2P_ERROR_CMD = -2999;
    public static final int HI_P2P_ERR_BUF_FULL = -1004;
    public static final int HI_P2P_ERR_BUF_NULL = -1009;
    public static final int HI_P2P_ERR_CHANNEL_ERROR = -1011;
    public static final int HI_P2P_ERR_CHANNEL_OFF = -1014;
    public static final int HI_P2P_ERR_CONNECT_ERROR = -1013;
    public static final int HI_P2P_ERR_DEVICE_ERROR = -1008;
    public static final int HI_P2P_ERR_INIT = -1000;
    public static final int HI_P2P_ERR_MAX_SESSION = -1003;
    public static final int HI_P2P_ERR_OVER_LENGTH = -1010;
    public static final int HI_P2P_ERR_PARAM_ERROR = -1001;
    public static final int HI_P2P_ERR_READ_ERROR = -1007;
    public static final int HI_P2P_ERR_SESSION_ERROR = -1006;
    public static final int HI_P2P_ERR_TIME_OUT = -1005;
    public static final int HI_P2P_ERR_UNINIT = -1002;
    public static final int HI_P2P_ERR_WRITE_ERROR = -1012;
    public static final byte HI_P2P_EVENT_ALARM = 2;
    public static final byte HI_P2P_EVENT_ALL = 0;
    public static final byte HI_P2P_EVENT_MANUAL = 1;
    public static final byte HI_P2P_EVEN_PLAN = 3;
    public static final int HI_P2P_FUNCTION_PUSH = 16673;
    public static final int HI_P2P_GET_485 = 16785;
    public static final int HI_P2P_GET_4GPARAM = 16803;
    public static final int HI_P2P_GET_ABSOLUTE_LIGHT_TYPE = 16766;
    public static final int HI_P2P_GET_ACCOUNTS_PARAM = 16826;
    public static final int HI_P2P_GET_ALARMTOSOUND = 16773;
    public static final int HI_P2P_GET_ALARM_LOG_EXT = 16756;
    public static final int HI_P2P_GET_ALARM_LOG_NAME = 16757;
    public static final int HI_P2P_GET_ALARM_PARAM = 20743;
    public static final int HI_P2P_GET_ALARM_SCHEDULE = 20745;
    public static final int HI_P2P_GET_AUDIBLE_VISUAL_ALARM_TYPE = 16790;
    public static final int HI_P2P_GET_AUDIO_ALM_PARAM = 20741;
    public static final int HI_P2P_GET_AUDIO_ATTR = 12561;
    public static final int HI_P2P_GET_CAPACITY = 37126;
    public static final int HI_P2P_GET_CHAR = 16765;
    public static final int HI_P2P_GET_CONFIGCAPIFO_KEYNAME_PARAM = 16792;
    public static final int HI_P2P_GET_DEVICE_FISH_PARAM = 16761;
    public static final int HI_P2P_GET_DEVICE_MOLD_PARAM = 16760;
    public static final int HI_P2P_GET_DEV_INFO = 28945;
    public static final int HI_P2P_GET_DEV_INFO_EXT = 16663;
    public static final int HI_P2P_GET_DISPLAY_PARAM = 12549;
    public static final int HI_P2P_GET_EAMIL_PARAM_NEW = 16788;
    public static final int HI_P2P_GET_EAMIL_PARAM_NEW_NO_CHAR = 16789;
    public static final int HI_P2P_GET_EMAIL_PARAM = 28931;
    public static final int HI_P2P_GET_EMAIL_PARAM_NEWPWD255_EXT = 16744;
    public static final int HI_P2P_GET_FTP_PARAM = 28929;
    public static final int HI_P2P_GET_FTP_PARAM_EXT = 16654;
    public static final int HI_P2P_GET_FTP_PARAM_EXT_NEWPWD255_EXT = 16746;
    public static final int HI_P2P_GET_FUNCTION = 61445;
    public static final int HI_P2P_GET_INFRARED = 37127;
    public static final int HI_P2P_GET_INTELLIGENTAUDIO_PARAM = 16793;
    public static final int HI_P2P_GET_LANGUAGE = 16771;
    public static final int HI_P2P_GET_MD_PARAM = 20737;
    public static final int HI_P2P_GET_NETSTATUS = 16787;
    public static final int HI_P2P_GET_NET_PARAM = 16641;
    public static final int HI_P2P_GET_PRI_CLOUD_PARAM = 16798;
    public static final int HI_P2P_GET_RECORD_ALLDAY = 16777;
    public static final int HI_P2P_GET_RECORD_ALLFILE_ONEDAY = 16779;
    public static final int HI_P2P_GET_REC_AUTO_PARAM = 24837;
    public static final int HI_P2P_GET_REC_AUTO_SCHEDULE = 24839;
    public static final int HI_P2P_GET_RESOLUTION = 16668;
    public static final int HI_P2P_GET_RING = 16759;
    public static final int HI_P2P_GET_SDSTATE = 16775;
    public static final int HI_P2P_GET_SD_INFO = 28946;
    public static final int HI_P2P_GET_SMART_HSR_PARAM = 16795;
    public static final int HI_P2P_GET_SMART_MOTO = 16752;
    public static final int HI_P2P_GET_SNAP = 37125;
    public static final int HI_P2P_GET_SNAP_ALARM_PARAM = 16656;
    public static final int HI_P2P_GET_SNAP_AUTO_PARAM = 24833;
    public static final int HI_P2P_GET_SNAP_AUTO_SCHEDULE = 24835;
    public static final int HI_P2P_GET_SP_IMAGE_PARAM_EXT = 16738;
    public static final int HI_P2P_GET_STREAM_CTRL = 61441;
    public static final int HI_P2P_GET_TIMER_REBOOT = 16754;
    public static final int HI_P2P_GET_TIME_PARAM = 28935;
    public static final int HI_P2P_GET_TIME_ZONE = 28951;
    public static final int HI_P2P_GET_TIME_ZONE_EXT = 16740;
    public static final int HI_P2P_GET_TRANSFER_AUDIOFILE = 16781;
    public static final int HI_P2P_GET_UNITE_IPC_IMAGETYPE = 16873;
    public static final int HI_P2P_GET_USER_PARAM = 28933;
    public static final int HI_P2P_GET_USER_PARAM_EXT = 16743;
    public static final int HI_P2P_GET_UTC_TIME_PARAM = 16719;
    public static final int HI_P2P_GET_UUID_CRCKEY = 16700;
    public static final int HI_P2P_GET_VENDOR_INFO = 28948;
    public static final int HI_P2P_GET_VIDEO_CODE = 16650;
    public static final int HI_P2P_GET_VIDEO_IMAGE_PARAM_SCOPE = 16783;
    public static final int HI_P2P_GET_VIDEO_PARAM = 12545;
    public static final int HI_P2P_GET_WIFI_LIST = 16645;
    public static final int HI_P2P_GET_WIFI_LIST_EXT256 = 16764;
    public static final int HI_P2P_GET_WIFI_PARAM = 16643;
    public static final int HI_P2P_GET_WIFI_PARAM_NEWPWD255_EXT = 16748;
    public static final int HI_P2P_GET_WIFI_PARAM_NEWPWD255_EXT1 = 16762;
    public static final int HI_P2P_HEADER_FLAG = -1717986919;
    public static final int HI_P2P_HUMIDITY_ALARM_GET = 16727;
    public static final int HI_P2P_HUMIDITY_ALARM_SET = 16728;
    public static final int HI_P2P_INFRARED_AUTO = 0;
    public static final int HI_P2P_INFRARED_OFF = 2;
    public static final int HI_P2P_INFRARED_ON = 1;
    public static final int HI_P2P_INPUT_ALARM_GET = 16680;
    public static final int HI_P2P_INPUT_ALARM_SET = 16681;
    public static final int HI_P2P_IPCRF_ALARM_GET = 16719;
    public static final int HI_P2P_IPCRF_ALARM_SET = 16720;
    public static final int HI_P2P_IPCRF_ALL_INFO_GET = 16723;
    public static final int HI_P2P_IPCRF_CAPTURE = 16724;
    public static final int HI_P2P_IPCRF_MAXNUM = 16;
    public static final String HI_P2P_IPCRF_SENSOR_TYPE_BEEP = "beep";
    public static final String HI_P2P_IPCRF_SENSOR_TYPE_DOOR = "door";
    public static final String HI_P2P_IPCRF_SENSOR_TYPE_FIRE = "fire";
    public static final String HI_P2P_IPCRF_SENSOR_TYPE_GAS = "gas";
    public static final String HI_P2P_IPCRF_SENSOR_TYPE_HUMI = "humi";
    public static final String HI_P2P_IPCRF_SENSOR_TYPE_INFRA = "infra";
    public static final String HI_P2P_IPCRF_SENSOR_TYPE_KEY_0 = "key0";
    public static final String HI_P2P_IPCRF_SENSOR_TYPE_KEY_1 = "key1";
    public static final String HI_P2P_IPCRF_SENSOR_TYPE_KEY_2 = "key2";
    public static final String HI_P2P_IPCRF_SENSOR_TYPE_KEY_3 = "key3";
    public static final String HI_P2P_IPCRF_SENSOR_TYPE_SOCKET = "socket";
    public static final String HI_P2P_IPCRF_SENSOR_TYPE_TEMP = "temp";
    public static final int HI_P2P_IPCRF_SINGLE_INFO_GET = 16721;
    public static final int HI_P2P_IPCRF_SINGLE_INFO_SET = 16722;
    public static final int HI_P2P_LIVE_TYPE_ALL = 3;
    public static final int HI_P2P_LIVE_TYPE_AUDIO = 2;
    public static final int HI_P2P_LIVE_TYPE_VIDEO = 1;
    public static final int HI_P2P_LOGIN = 4096;
    public static final int HI_P2P_LOG_REC_PLAY = 18461;
    public static final int HI_P2P_MAX_CMD_BUF_LEN = 1000;
    public static final int HI_P2P_MAX_STRINGLENGTH = 40;
    public static final int HI_P2P_MAX_VERLENGTH = 64;
    public static final int HI_P2P_MOTION_AREA_1 = 1;
    public static final int HI_P2P_MOTION_AREA_2 = 2;
    public static final int HI_P2P_MOTION_AREA_3 = 3;
    public static final int HI_P2P_MOTION_AREA_4 = 4;
    public static final int HI_P2P_MOTION_AREA_MAX = 4;
    public static final int HI_P2P_NET_LEN = 64;
    public static final int HI_P2P_NET_TYPE_CABLE = 0;
    public static final int HI_P2P_NET_TYPE_WIFI = 1;
    public static final int HI_P2P_NEWEN = 16807;
    public static final int HI_P2P_OS_GET_ACCOUNTS_PARAM = 65595;
    public static final int HI_P2P_OS_SET_ACCOUNTS_PARAM = 65594;
    public static final short HI_P2P_PB_GETPOS = 5;
    public static final int HI_P2P_PB_MAX_FILE_NUM = 40;
    public static final short HI_P2P_PB_PAUSE = 3;
    public static final short HI_P2P_PB_PLAY = 1;
    public static final int HI_P2P_PB_PLAYBACKFAST_POS = 16872;
    public static final int HI_P2P_PB_PLAY_CONTROL = 8195;
    public static final int HI_P2P_PB_PLAY_CONTROL_ALARM = 16755;
    public static final int HI_P2P_PB_PLAY_CONTROL_EXT = 16733;
    public static final int HI_P2P_PB_PLAY_CONTROL_NEW = 16768;
    public static final int HI_P2P_PB_PLAY_CONTROL_UNITE_IPC = 16846;
    public static final int HI_P2P_PB_POS_SET = 16677;
    public static final int HI_P2P_PB_POS_SET_NEW = 16769;
    public static final int HI_P2P_PB_QUERY_MONTH = 8192;
    public static final int HI_P2P_PB_QUERY_START = 8193;
    public static final int HI_P2P_PB_QUERY_START_EXT = 16685;
    public static final int HI_P2P_PB_QUERY_START_FILE = 16718;
    public static final int HI_P2P_PB_QUERY_START_FILE_NODST = 16730;
    public static final int HI_P2P_PB_QUERY_START_NEW = 16701;
    public static final int HI_P2P_PB_QUERY_START_NODST = 16729;
    public static final int HI_P2P_PB_QUERY_STOP = 8194;
    public static final short HI_P2P_PB_SETPOS = 4;
    public static final short HI_P2P_PB_STOP = 2;
    public static final int HI_P2P_PLAYBACKDATA = 1717986913;
    public static final int HI_P2P_PLAYBACKEND = 1717986914;
    public static final int HI_P2P_PLAYBACKI = 1717986916;
    public static final int HI_P2P_PLAYBACKMOVE = 1717986915;
    public static final int HI_P2P_PLAYBACKNOI = 1717986917;
    public static final int HI_P2P_PLAYBACK_FAST = 16871;
    public static final int HI_P2P_PRESET_STATUS_GET = 16688;
    public static final int HI_P2P_PTZ_CTRL_ARIN = 13;
    public static final int HI_P2P_PTZ_CTRL_AROUT = 14;
    public static final int HI_P2P_PTZ_CTRL_CRUISE_PAN = 21;
    public static final int HI_P2P_PTZ_CTRL_CRUISE_TITL = 22;
    public static final int HI_P2P_PTZ_CTRL_DOWN = 4;
    public static final int HI_P2P_PTZ_CTRL_FOCUSIN = 11;
    public static final int HI_P2P_PTZ_CTRL_FOCUSOUT = 12;
    public static final int HI_P2P_PTZ_CTRL_HOME = 20;
    public static final int HI_P2P_PTZ_CTRL_LEFT = 1;
    public static final int HI_P2P_PTZ_CTRL_LEFT_DOWN = 6;
    public static final int HI_P2P_PTZ_CTRL_LEFT_UP = 5;
    public static final int HI_P2P_PTZ_CTRL_RIGHT = 2;
    public static final int HI_P2P_PTZ_CTRL_RIGHT_DOWN = 8;
    public static final int HI_P2P_PTZ_CTRL_RIGHT_UP = 7;
    public static final int HI_P2P_PTZ_CTRL_STOP = 0;
    public static final int HI_P2P_PTZ_CTRL_UP = 3;
    public static final int HI_P2P_PTZ_CTRL_ZOOMIN = 9;
    public static final int HI_P2P_PTZ_CTRL_ZOOMOUT = 10;
    public static final int HI_P2P_PTZ_MODE_RUN = 0;
    public static final int HI_P2P_PTZ_MODE_STEP = 1;
    public static final int HI_P2P_PTZ_PRESET_ACT_CALL = 23;
    public static final int HI_P2P_PTZ_PRESET_ACT_DEL = 25;
    public static final int HI_P2P_PTZ_PRESET_ACT_SET = 24;
    public static final int HI_P2P_PTZ_PRESET_NUM_MAX = 16;
    public static final int HI_P2P_RECORD_PLAY = 16778;
    public static final int HI_P2P_RECTYPE_SEARCH = 65611;
    public static final int HI_P2P_RING = 16758;
    public static final int HI_P2P_RINGNEW_LOGIN = 131072;
    public static final int HI_P2P_RING_LOGIN = 18459;
    public static final int HI_P2P_SDK_SVR_LEN = 512;
    public static final int HI_P2P_SDK_TYPE_OBJ = 1;
    public static final int HI_P2P_SDK_TYPE_SYUN = 2;
    public static final int HI_P2P_SDK_TYPE_TUTK = 3;
    public static final int HI_P2P_SDK_UUID_LEN = 512;
    public static final int HI_P2P_SDK_VER_LEN = 16;
    public static final int HI_P2P_SEFLAG_LAN = 2;
    public static final int HI_P2P_SEFLAG_P2P = 0;
    public static final int HI_P2P_SEFLAG_RELAY = 1;
    public static final int HI_P2P_SET_485 = 16784;
    public static final int HI_P2P_SET_ABSOLUTE_LIGHT_TYPE = 16767;
    public static final int HI_P2P_SET_ACCOUNTS_PARAM = 16825;
    public static final int HI_P2P_SET_ALARMTOSOUND = 16774;
    public static final int HI_P2P_SET_ALARM_PARAM = 20744;
    public static final int HI_P2P_SET_ALARM_SCHEDULE = 20752;
    public static final int HI_P2P_SET_AUDIBLE_VISUAL_ALARM_TYPE = 16791;
    public static final int HI_P2P_SET_AUDIO_ALM_PARAM = 20742;
    public static final int HI_P2P_SET_AUDIO_ATTR = 12562;
    public static final int HI_P2P_SET_DEVICE_FISH_PARAM = 16776;
    public static final int HI_P2P_SET_DISPLAY_PARAM = 12550;
    public static final int HI_P2P_SET_DOWNLOAD = 18433;
    public static final int HI_P2P_SET_EMAIL_PARAM = 28932;
    public static final int HI_P2P_SET_EMAIL_PARAM_EXT = 16653;
    public static final int HI_P2P_SET_EMAIL_PARAM_NEWPWD255_EXT = 16745;
    public static final int HI_P2P_SET_FORMAT_SD = 28947;
    public static final int HI_P2P_SET_FTP_PARAM = 28930;
    public static final int HI_P2P_SET_FTP_PARAM_EXT = 16655;
    public static final int HI_P2P_SET_FTP_PARAM_EXT_NEWPWD255_EXT = 16747;
    public static final int HI_P2P_SET_INFRARED = 37123;
    public static final int HI_P2P_SET_INTELLIGENTAUDIO_PARAM = 16794;
    public static final int HI_P2P_SET_LANGUAGE = 16772;
    public static final int HI_P2P_SET_MD_PARAM = 20738;
    public static final int HI_P2P_SET_MD_PARAM_NEW = 16770;
    public static final int HI_P2P_SET_NETSTATUS = 16786;
    public static final int HI_P2P_SET_NET_PARAM = 16642;
    public static final int HI_P2P_SET_PRI_CLOUD_PARAM = 16797;
    public static final int HI_P2P_SET_PTZ_CTRL = 33025;
    public static final int HI_P2P_SET_PTZ_PRESET = 33027;
    public static final int HI_P2P_SET_REBOOT = 37121;
    public static final int HI_P2P_SET_REC_AUTO_PARAM = 24838;
    public static final int HI_P2P_SET_REC_AUTO_SCHEDULE = 24840;
    public static final int HI_P2P_SET_RESET = 37122;
    public static final int HI_P2P_SET_RESOLUTION = 16669;
    public static final int HI_P2P_SET_SMART_HSR_PARAM = 16796;
    public static final int HI_P2P_SET_SMART_MOTO = 16751;
    public static final int HI_P2P_SET_SNAP_ALARM_PARAM = 16657;
    public static final int HI_P2P_SET_SNAP_AUTO_PARAM = 24834;
    public static final int HI_P2P_SET_SNAP_AUTO_SCHEDULE = 24836;
    public static final int HI_P2P_SET_SP_IMAGE_PARAM_EXT = 16739;
    public static final int HI_P2P_SET_STREAM_CTRL = 61442;
    public static final int HI_P2P_SET_TIMER_REBOOT = 16753;
    public static final int HI_P2P_SET_TIME_PARAM = 28936;
    public static final int HI_P2P_SET_TIME_ZONE = 28950;
    public static final int HI_P2P_SET_TIME_ZONE_EXT = 16741;
    public static final int HI_P2P_SET_USER_PARAM = 28934;
    public static final int HI_P2P_SET_USER_PARAM_EXT = 16742;
    public static final int HI_P2P_SET_UTC_TIME_PARAM = 16705;
    public static final int HI_P2P_SET_VIDEO_CODE = 16651;
    public static final int HI_P2P_SET_VIDEO_PARAM = 12546;
    public static final int HI_P2P_SET_WIFI_CHECK = 16652;
    public static final int HI_P2P_SET_WIFI_PARAM = 16644;
    public static final int HI_P2P_SET_WIFI_PARAM_NEWPWD255_EXT = 16750;
    public static final int HI_P2P_SET_WIFI_PARAM_NEWPWD255_EXT1 = 16763;
    public static final int HI_P2P_START_LIVE = 4097;
    public static final int HI_P2P_START_REC_UPLOAD_EXT = 16689;
    public static final int HI_P2P_START_TALK = 4113;
    public static final int HI_P2P_STATUS_FAILURE = -1;
    public static final int HI_P2P_STATUS_SUCCESS = 0;
    public static final int HI_P2P_STOP_LIVE = 4098;
    public static final int HI_P2P_STOP_REC_UPLOAD = 16675;
    public static final int HI_P2P_STOP_TALK = 4114;
    public static final int HI_P2P_STREAM_1 = 1;
    public static final int HI_P2P_STREAM_2 = 0;
    public static final int HI_P2P_STREAM_3 = 2;
    public static final int HI_P2P_SUPPORT_IFRAME4 = 16799;
    public static final int HI_P2P_TEMPERATURE_ALARM_GET = 16725;
    public static final int HI_P2P_TEMPERATURE_ALARM_SET = 16726;
    public static final int HI_P2P_TRANSFER_AUDIOFILE = 16780;
    public static final int HI_P2P_TRANSFER_SOUNDFILE = 65601;
    public static final int HI_P2P_TRANSPARENT_CHN_0_GET = 16736;
    public static final int HI_P2P_TRANSPARENT_CHN_0_SET = 16737;
    public static final int HI_P2P_TYPE_ALARM = 0;
    public static final int HI_P2P_TYPE_PLAN = 1;
    public static final int HI_P2P_TYPE_SNAP = 2;
    public static final int HI_P2P_VIDEO_FRAME_FLAG = 1180063816;
    public static final int HI_P2P_VIDEO_FRAME_I = 1;
    public static final int HI_P2P_VIDEO_FRAME_P = 2;
    public static final int HI_P2P_WHITE_LIGHT_GET = 16678;
    public static final int HI_P2P_WHITE_LIGHT_GET_EXT = 16682;
    public static final int HI_P2P_WHITE_LIGHT_SET = 16679;
    public static final int HI_P2P_WHITE_LIGHT_SET_EXT = 16683;
    public static final byte HI_P2P_WIFIAPENC_INVALID = 0;
    public static final byte HI_P2P_WIFIAPENC_NONE = 1;
    public static final byte HI_P2P_WIFIAPENC_WEP = 2;
    public static final byte HI_P2P_WIFIAPENC_WPA2_AES = 6;
    public static final byte HI_P2P_WIFIAPENC_WPA2_TKIP = 5;
    public static final byte HI_P2P_WIFIAPENC_WPA_AES = 4;
    public static final byte HI_P2P_WIFIAPENC_WPA_TKIP = 3;
    public static final byte HI_P2P_WIFIAPMODE_ADHOC = 1;
    public static final byte HI_P2P_WIFIAPMODE_INFRA = 0;
    public static final int HI_SDK_T_DUAL_FRAME_FLAG = 1178884168;
    public static final int HI_SUCCESS = 0;
    public static final int P2P_ENCODE_LEN = 128;
    public static final int P2P_PC_NET_LAN = 0;
    public static final int P2P_PC_NET_WAN = 1;
    public static final int P2P_PHONE_NET_2G = 5;
    public static final int P2P_PHONE_NET_3G = 3;
    public static final int P2P_PHONE_NET_4G = 4;
    public static final int P2P_PHONE_NET_WIFI = 2;

    public static class HI_P2P_REC_UPLOAD_DATA {
        byte[] sData = new byte[0];
        HI_P2P_REC_FILE_STREAM_HEAD sHead;
    }

    public static class HI_P2P_S_LIVE_RESP {
        int u32AudioType;
        int u32Stream;
        int u32VideoHeight;
        int u32VideoWidth;
    }

    public static class HI_P2P_S_PB_FILE_INFO {
        int u32AudioType;
        int u32VideoHeight;
        int u32VideoWidth;
    }

    public static class HI_P2P_S_PB_FILE_INFO_EXT {
        int u32AudioType;
        int u32Command;
        int u32EncodeType;
        int u32VideoHeight;
        int u32VideoWidth;
    }

    public static class HI_P2P_S_PB_LIST_RESP {
        byte count;
        byte endflag;
        int index;
        HI_P2P_FILE_INFO[] sFileInfo;
        byte[] sReserved = new byte[2];
        int total;
    }

    public static class HI_P2P_S_DOC {
        byte[] strSvr;
        int u32Share;

        public static byte[] parseContent(String str, int i) {
            if (str == null) {
                return null;
            }
            byte[] bArr = new byte[516];
            byte[] bytes = str.getBytes();
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(i);
            System.arraycopy(bytes, 0, bArr, 0, bytes.length);
            System.arraycopy(intToByteArray_Little, 0, bArr, 512, 4);
            return bArr;
        }

        public HI_P2P_S_DOC(byte[] bArr) {
            byte[] bArr2 = new byte[512];
            this.strSvr = bArr2;
            if (bArr.length >= 516) {
                System.arraycopy(bArr, 0, bArr2, 0, 512);
                this.u32Share = Packet.byteArrayToInt_Little(bArr, 512);
            }
        }
    }

    public static class HI_P2P_S_SDKINFO {
        byte[] strVersion = new byte[16];
        int u32Type;

        public static byte[] parseContent(int i, String str) {
            if (str == null) {
                return null;
            }
            byte[] bArr = new byte[20];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(i);
            byte[] bytes = str.getBytes();
            System.arraycopy(intToByteArray_Little, 0, bArr, 0, 4);
            System.arraycopy(bytes, 0, bArr, 4, bytes.length);
            return bArr;
        }
    }

    public static class HI_P2P_S_SEATTR {
        public byte[] strUUID;
        public short u16Port;

        public static byte[] parseContent(String str, short s) {
            if (str == null) {
                return null;
            }
            byte[] bArr = new byte[514];
            if (str != null) {
                byte[] bytes = str.getBytes();
                System.arraycopy(bytes, 0, bArr, 0, bytes.length);
            }
            System.arraycopy(Packet.shortToByteArray_Little(s), 0, bArr, 512, 2);
            return bArr;
        }

        public HI_P2P_S_SEATTR(byte[] bArr) {
            byte[] bArr2 = new byte[512];
            this.strUUID = bArr2;
            if (bArr.length >= 514) {
                System.arraycopy(bArr, 0, bArr2, 0, 512);
                this.u16Port = Packet.byteArrayToShort_Little(bArr, 512);
            }
        }
    }

    public static class HI_P2P_S_SESTAT {
        public int u32ConnTime;
        public int u32Flag;

        public static byte[] parseContent(int i, int i2) {
            byte[] bArr = new byte[8];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(i);
            byte[] intToByteArray_Little2 = Packet.intToByteArray_Little(i2);
            System.arraycopy(intToByteArray_Little, 0, bArr, 0, 4);
            System.arraycopy(intToByteArray_Little2, 0, bArr, 4, 4);
            return bArr;
        }

        public HI_P2P_S_SESTAT(byte[] bArr) {
            if (bArr.length >= 8) {
                this.u32Flag = Packet.byteArrayToInt_Little(bArr, 0);
                this.u32ConnTime = Packet.byteArrayToInt_Little(bArr, 4);
            }
        }

        public HI_P2P_S_SESTAT() {
        }
    }

    public static class HI_P2P_S_HEADER {
        int s32Status;
        int u32Flag;
        int u32Lens;
        int[] u32Reserved;
        int u32Type;

        public static int sizeof() {
            return 24;
        }

        public byte[] parseContent() {
            byte[] bArr = new byte[24];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(this.u32Flag);
            byte[] intToByteArray_Little2 = Packet.intToByteArray_Little(this.u32Lens);
            byte[] intToByteArray_Little3 = Packet.intToByteArray_Little(this.u32Type);
            byte[] intToByteArray_Little4 = Packet.intToByteArray_Little(this.s32Status);
            System.arraycopy(intToByteArray_Little, 0, bArr, 0, 4);
            System.arraycopy(intToByteArray_Little2, 0, bArr, 4, 4);
            System.arraycopy(intToByteArray_Little3, 0, bArr, 8, 4);
            System.arraycopy(intToByteArray_Little4, 0, bArr, 12, 4);
            for (int i = 0; i < 2; i++) {
                System.arraycopy(Packet.intToByteArray_Little(this.u32Reserved[i]), 0, bArr, i + 16, 4);
            }
            return bArr;
        }

        public HI_P2P_S_HEADER() {
            this.u32Reserved = new int[2];
        }

        public HI_P2P_S_HEADER(byte[] bArr) {
            this.u32Reserved = new int[2];
            if (bArr.length >= 24) {
                this.u32Flag = Packet.byteArrayToInt_Little(bArr, 0);
                this.u32Lens = Packet.byteArrayToInt_Little(bArr, 4);
                this.u32Type = Packet.byteArrayToInt_Little(bArr, 8);
                this.s32Status = Packet.byteArrayToInt_Little(bArr, 12);
                for (int i = 0; i < 2; i++) {
                    this.u32Reserved[i] = Packet.byteArrayToInt_Little(bArr, i + 16);
                }
            }
        }
    }

    public static class HI_P2P_CMD {
        byte[] CmdBuf;
        HI_P2P_S_HEADER sHead;

        public byte[] parseContent() {
            byte[] bArr = new byte[HI_P2P_S_HEADER.sizeof() + 1000];
            System.arraycopy(this.sHead.parseContent(), 0, bArr, 0, HI_P2P_S_HEADER.sizeof());
            System.arraycopy(this.CmdBuf, 0, bArr, HI_P2P_S_HEADER.sizeof(), 1000);
            return bArr;
        }

        public HI_P2P_CMD(byte[] bArr) {
            this.sHead = new HI_P2P_S_HEADER();
            this.CmdBuf = new byte[1000];
            if (bArr.length >= 1024) {
                this.sHead = new HI_P2P_S_HEADER(bArr);
                System.arraycopy(bArr, 24, this.CmdBuf, 0, 1000);
            }
        }

        public HI_P2P_CMD() {
            this.sHead = new HI_P2P_S_HEADER();
            this.CmdBuf = new byte[1000];
        }
    }

    public static class HI_P2P_LOGIN_INFO {
        int u32LoginLevel;

        public static byte[] parseContent(int i, String str, String str2) {
            byte[] bArr = new byte[1000];
            String str3 = str + Constants.COLON_SEPARATOR + str2;
            System.arraycopy(Packet.intToByteArray_Little(i), 0, bArr, 0, 4);
            if (str3.getBytes().length > 512) {
                return bArr;
            }
            byte[] encode = Base64.encode(str3.getBytes(), 2);
            if (encode.length > 1000) {
                return bArr;
            }
            HiLog.e("HI_P2P_LOGIN_INFO:" + new String(Base64.decode(encode, 2)), 1, 0);
            System.arraycopy(encode, 0, bArr, 4, encode.length);
            byte[] bArr2 = new byte[encode.length + 4];
            System.arraycopy(bArr, 0, bArr2, 0, encode.length + 4);
            return bArr2;
        }
    }

    public static class HI_P2P_S_AUTH {
        public int u32UserLevel;
        public byte[] u8UserName = new byte[64];
        public byte[] u8Password = new byte[64];

        public static byte[] parseContent(int i, String str, String str2) {
            if (str == null || str2 == null) {
                return null;
            }
            byte[] bArr = new byte[132];
            byte[] encode = Base64.encode(str.getBytes(), 2);
            byte[] encode2 = Base64.encode(str2.getBytes(), 2);
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(i);
            System.arraycopy(encode, 0, bArr, 0, encode.length);
            System.arraycopy(encode2, 0, bArr, 64, encode2.length);
            System.arraycopy(intToByteArray_Little, 0, bArr, 128, 4);
            return bArr;
        }
    }

    public static class HI_P2P_SET_AUTH {
        HI_P2P_S_AUTH sNewUser;
        HI_P2P_S_AUTH sOldUser;

        public static byte[] parseContent(byte[] bArr, byte[] bArr2) {
            byte[] bArr3 = new byte[264];
            System.arraycopy(bArr, 0, bArr3, 0, 132);
            System.arraycopy(bArr2, 0, bArr3, 132, 132);
            return bArr3;
        }
    }

    public static class HI_P2P_S_AUTH_EXT {
        public int u32UserLevel;
        public byte[] u8UserName = new byte[342];
        public byte[] u8Password = new byte[342];

        public static byte[] parseContent(int i, String str, String str2) {
            if (str == null || str2 == null) {
                return null;
            }
            byte[] bArr = new byte[688];
            byte[] encode = Base64.encode(str.getBytes(), 2);
            byte[] encode2 = Base64.encode(str2.getBytes(), 2);
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(i);
            System.arraycopy(encode, 0, bArr, 0, encode.length);
            System.arraycopy(encode2, 0, bArr, 342, encode2.length);
            System.arraycopy(intToByteArray_Little, 0, bArr, 684, 4);
            return bArr;
        }
    }

    public static class HI_P2P_SET_AUTH_EXT {
        HI_P2P_S_AUTH_EXT sNewUser;

        public static byte[] parseContent(byte[] bArr) {
            byte[] bArr2 = new byte[688];
            System.arraycopy(bArr, 0, bArr2, 0, 688);
            return bArr2;
        }
    }

    public static class HI_P2P_ENCRIPT_LONGIN_INFO {
        public int u32LoginLevel;
        public byte[] u8UserName = new byte[342];
        public byte[] u8Password = new byte[342];

        public static byte[] parseContent(int i, byte[] bArr, byte[] bArr2) {
            byte[] bArr3 = new byte[688];
            System.arraycopy(Packet.intToByteArray_Little(i), 0, bArr3, 4, 4);
            System.arraycopy(bArr, 0, bArr3, 4, bArr.length);
            System.arraycopy(bArr2, 0, bArr3, 346, bArr2.length);
            return bArr3;
        }
    }

    public static class HI_P2P_ENCRIPT_LOGIN_RESP {
        public int s32Result;
        public int u32DeviceType;
        public int u32NetMode;
        public int u32SyncTime;

        public HI_P2P_ENCRIPT_LOGIN_RESP(byte[] bArr) {
            if (bArr.length >= 48) {
                this.s32Result = Packet.byteArrayToInt_Little(bArr, 0);
                this.u32DeviceType = Packet.byteArrayToInt_Little(bArr, 4);
                this.u32NetMode = Packet.byteArrayToInt_Little(bArr, 8);
                this.u32SyncTime = Packet.byteArrayToInt_Little(bArr, 12);
            }
        }
    }

    public static class HI_P2P_S_LIVE_REQ {
        byte[] sReserved = new byte[4];
        int u32Channel;
        int u32Quality;
        int u32Stream;
        int u32Type;

        public static byte[] parseContent(int i, int i2, int i3, int i4) {
            byte[] bArr = new byte[20];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(i);
            byte[] intToByteArray_Little2 = Packet.intToByteArray_Little(i2);
            byte[] intToByteArray_Little3 = Packet.intToByteArray_Little(i3);
            byte[] intToByteArray_Little4 = Packet.intToByteArray_Little(i4);
            System.arraycopy(intToByteArray_Little, 0, bArr, 0, 4);
            System.arraycopy(intToByteArray_Little2, 0, bArr, 4, 4);
            System.arraycopy(intToByteArray_Little3, 0, bArr, 8, 4);
            System.arraycopy(intToByteArray_Little4, 0, bArr, 12, 4);
            return bArr;
        }

        public static byte[] parseContent1(int i, int i2, int i3, int i4, int i5) {
            byte[] bArr = new byte[20];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(i);
            byte[] intToByteArray_Little2 = Packet.intToByteArray_Little(i2);
            byte[] intToByteArray_Little3 = Packet.intToByteArray_Little(i3);
            byte[] intToByteArray_Little4 = Packet.intToByteArray_Little(i4);
            System.arraycopy(intToByteArray_Little, 0, bArr, 0, 4);
            System.arraycopy(intToByteArray_Little2, 0, bArr, 4, 4);
            System.arraycopy(intToByteArray_Little3, 0, bArr, 8, 4);
            System.arraycopy(intToByteArray_Little4, 0, bArr, 12, 4);
            bArr[16] = (byte) i5;
            return bArr;
        }
    }

    public static class HI_Oss_DownLoad2File {
        public int u32End;
        public int u32Start;

        public static int sizeof() {
            return 4;
        }

        public HI_Oss_DownLoad2File() {
        }

        public HI_Oss_DownLoad2File(byte[] bArr) {
            if (bArr.length >= 8) {
                this.u32Start = Packet.byteArrayToInt_Little(bArr, 0);
                this.u32End = Packet.byteArrayToInt_Little(bArr, 4);
            }
        }

        public void setData(byte[] bArr) {
            if (bArr.length >= 8) {
                this.u32Start = Packet.byteArrayToInt_Little(bArr, 0);
                this.u32End = Packet.byteArrayToInt_Little(bArr, 4);
            }
        }

        public static byte[] parseContent(int i, int i2) {
            byte[] bArr = new byte[8];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(i);
            byte[] intToByteArray_Little2 = Packet.intToByteArray_Little(i2);
            System.arraycopy(intToByteArray_Little, 0, bArr, 0, 4);
            System.arraycopy(intToByteArray_Little2, 0, bArr, 4, 4);
            return bArr;
        }
    }

    public static class HI_P2P_S_AVFrame {
        public int u32AVFrameFlag;
        public int u32AVFrameLen;
        public int u32AVFramePTS;
        public int u32VFrameType;

        public static int sizeof() {
            return 16;
        }

        public HI_P2P_S_AVFrame() {
        }

        public HI_P2P_S_AVFrame(byte[] bArr) {
            if (bArr.length >= 16) {
                this.u32AVFrameFlag = Packet.byteArrayToInt_Little(bArr, 0);
                this.u32AVFrameLen = Packet.byteArrayToInt_Little(bArr, 4);
                this.u32AVFramePTS = Packet.byteArrayToInt_Little(bArr, 8);
                this.u32VFrameType = Packet.byteArrayToInt_Little(bArr, 12);
            }
        }

        public void setData(byte[] bArr) {
            if (bArr.length >= 16) {
                this.u32AVFrameFlag = Packet.byteArrayToInt_Little(bArr, 0);
                this.u32AVFrameLen = Packet.byteArrayToInt_Little(bArr, 4);
                this.u32AVFramePTS = Packet.byteArrayToInt_Little(bArr, 8);
                this.u32VFrameType = Packet.byteArrayToInt_Little(bArr, 12);
            }
        }

        public static byte[] parseContent(int i, int i2, int i3, int i4) {
            byte[] bArr = new byte[16];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(i);
            byte[] intToByteArray_Little2 = Packet.intToByteArray_Little(i2);
            byte[] intToByteArray_Little3 = Packet.intToByteArray_Little(i3);
            byte[] intToByteArray_Little4 = Packet.intToByteArray_Little(i4);
            System.arraycopy(intToByteArray_Little, 0, bArr, 0, 4);
            System.arraycopy(intToByteArray_Little2, 0, bArr, 4, 4);
            System.arraycopy(intToByteArray_Little3, 0, bArr, 8, 4);
            System.arraycopy(intToByteArray_Little4, 0, bArr, 12, 4);
            return bArr;
        }
    }

    public static class HI_P2P_AUDIOFILE_FIFO {
        public int currlen;
        public int flag;
        public int total;

        public static byte[] parseContent(int i, int i2, int i3) {
            byte[] bArr = new byte[16];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(i);
            byte[] intToByteArray_Little2 = Packet.intToByteArray_Little(i2);
            byte[] intToByteArray_Little3 = Packet.intToByteArray_Little(i3);
            System.arraycopy(intToByteArray_Little, 0, bArr, 0, 4);
            System.arraycopy(intToByteArray_Little2, 0, bArr, 4, 4);
            System.arraycopy(intToByteArray_Little3, 0, bArr, 8, 4);
            return bArr;
        }
    }

    public static class HI_S_AVFrame_New {
        public int u32AVFrameFlag;
        public int u32AVFrameLen;
        public int u32AVFramePTS;
        public int u32AVStartEndFlag;
        public int u32VFrameType;

        public static int sizeof() {
            return 36;
        }

        public HI_S_AVFrame_New() {
        }

        public HI_S_AVFrame_New(byte[] bArr) {
            if (bArr.length >= 20) {
                this.u32AVFrameFlag = Packet.byteArrayToInt_Little(bArr, 0);
                this.u32AVFrameLen = Packet.byteArrayToInt_Little(bArr, 4);
                this.u32AVFramePTS = Packet.byteArrayToInt_Little(bArr, 8);
                this.u32VFrameType = Packet.byteArrayToInt_Little(bArr, 12);
                this.u32AVStartEndFlag = Packet.byteArrayToInt_Little(bArr, 16);
            }
        }

        public void setData(byte[] bArr) {
            if (bArr.length >= 20) {
                this.u32AVFrameFlag = Packet.byteArrayToInt_Little(bArr, 0);
                this.u32AVFrameLen = Packet.byteArrayToInt_Little(bArr, 4);
                this.u32AVFramePTS = Packet.byteArrayToInt_Little(bArr, 8);
                this.u32VFrameType = Packet.byteArrayToInt_Little(bArr, 12);
                this.u32AVStartEndFlag = Packet.byteArrayToInt_Little(bArr, 16);
            }
        }

        public static byte[] parseContent(int i, int i2, int i3, int i4, int i5) {
            byte[] bArr = new byte[20];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(i);
            byte[] intToByteArray_Little2 = Packet.intToByteArray_Little(i2);
            byte[] intToByteArray_Little3 = Packet.intToByteArray_Little(i3);
            byte[] intToByteArray_Little4 = Packet.intToByteArray_Little(i4);
            byte[] intToByteArray_Little5 = Packet.intToByteArray_Little(i5);
            System.arraycopy(intToByteArray_Little, 0, bArr, 0, 4);
            System.arraycopy(intToByteArray_Little2, 0, bArr, 4, 4);
            System.arraycopy(intToByteArray_Little3, 0, bArr, 8, 4);
            System.arraycopy(intToByteArray_Little4, 0, bArr, 12, 4);
            System.arraycopy(intToByteArray_Little5, 0, bArr, 16, 4);
            return bArr;
        }
    }

    public static class HI_P2P_S_AVFrameDual {
        public int u32Chn1FrameLen;
        public int u32DualFrameFlag;
        public int u32DualFrameLen;
        public int u8Chn1FrameType;
        public int u8Chn2FrameType;

        public static int sizeof() {
            return 16;
        }

        public HI_P2P_S_AVFrameDual() {
        }

        public HI_P2P_S_AVFrameDual(byte[] bArr) {
            if (bArr.length >= 16) {
                this.u32DualFrameFlag = Packet.byteArrayToInt_Little(bArr, 0);
                this.u32DualFrameLen = Packet.byteArrayToInt_Little(bArr, 4);
                this.u32Chn1FrameLen = Packet.byteArrayToInt_Little(bArr, 8);
                this.u8Chn1FrameType = bArr[12];
                this.u8Chn2FrameType = bArr[13];
            }
        }

        public void setData(byte[] bArr) {
            if (bArr.length >= 16) {
                this.u32DualFrameFlag = Packet.byteArrayToInt_Little(bArr, 0);
                this.u32DualFrameLen = Packet.byteArrayToInt_Little(bArr, 4);
                this.u32Chn1FrameLen = Packet.byteArrayToInt_Little(bArr, 8);
                this.u8Chn1FrameType = bArr[12];
                this.u8Chn2FrameType = bArr[13];
            }
        }

        public static byte[] parseContent(int i, int i2, int i3, int i4, int i5) {
            byte[] bArr = new byte[16];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(i);
            byte[] intToByteArray_Little2 = Packet.intToByteArray_Little(i2);
            byte[] intToByteArray_Little3 = Packet.intToByteArray_Little(i3);
            System.arraycopy(intToByteArray_Little, 0, bArr, 0, 4);
            System.arraycopy(intToByteArray_Little2, 0, bArr, 4, 4);
            System.arraycopy(intToByteArray_Little3, 0, bArr, 8, 4);
            bArr[12] = (byte) i4;
            bArr[13] = (byte) i5;
            return bArr;
        }
    }

    public static class HI_S_PLAYBACK_HANDLE {
        public int FrameNum;
        public int Len;

        public static int sizeof() {
            return 8;
        }

        public HI_S_PLAYBACK_HANDLE() {
        }

        public HI_S_PLAYBACK_HANDLE(byte[] bArr) {
            if (bArr.length >= 8) {
                this.Len = Packet.byteArrayToInt_Little(bArr, 0);
                this.FrameNum = bArr[4];
            }
        }

        public void setData(byte[] bArr) {
            if (bArr.length >= 8) {
                this.Len = Packet.byteArrayToInt_Little(bArr, 0);
                this.FrameNum = bArr[4];
            }
        }
    }

    public static class HI_P2P_S_TALK_REQ {
        int u32AudioType;
        int u32Channel;

        public static byte[] parseContent(int i, int i2) {
            byte[] bArr = new byte[8];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(i);
            byte[] intToByteArray_Little2 = Packet.intToByteArray_Little(i2);
            System.arraycopy(intToByteArray_Little, 0, bArr, 0, 4);
            System.arraycopy(intToByteArray_Little2, 0, bArr, 4, 4);
            return bArr;
        }
    }

    public static class HI_P2P_S_PTZ_CTRL {
        short u16Speed;
        int u32Channel;
        int u32Ctrl;
        int u32Mode;
        short u32TurnTime;

        public static byte[] parseContent(int i, int i2, int i3, short s, short s2) {
            byte[] bArr = new byte[16];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(i);
            byte[] intToByteArray_Little2 = Packet.intToByteArray_Little(i2);
            byte[] intToByteArray_Little3 = Packet.intToByteArray_Little(i3);
            byte[] shortToByteArray_Little = Packet.shortToByteArray_Little(s);
            byte[] shortToByteArray_Little2 = Packet.shortToByteArray_Little(s2);
            System.arraycopy(intToByteArray_Little, 0, bArr, 0, 4);
            System.arraycopy(intToByteArray_Little2, 0, bArr, 4, 4);
            System.arraycopy(intToByteArray_Little3, 0, bArr, 8, 4);
            System.arraycopy(shortToByteArray_Little, 0, bArr, 12, 2);
            System.arraycopy(shortToByteArray_Little2, 0, bArr, 14, 2);
            return bArr;
        }
    }

    public static class STimeDay {
        public byte day;
        public byte hour;
        public byte minute;
        public byte month;
        public byte second;
        public byte wday;
        public short year;

        public STimeDay(byte[] bArr, int i) {
            if (bArr.length >= 8) {
                this.year = Packet.byteArrayToShort_Little(bArr, i + 0);
                this.month = bArr[i + 2];
                this.day = bArr[i + 3];
                this.hour = bArr[i + 4];
                this.minute = bArr[i + 5];
                this.second = bArr[i + 6];
                this.wday = bArr[i + 7];
            }
        }

        public void resetData(int i) {
            long timeInMillis = getTimeInMillis() + (i * 3600000);
            Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("gmt"));
            calendar.setTimeInMillis(timeInMillis);
            this.year = (short) calendar.get(1);
            this.month = (byte) (calendar.get(2) + 1);
            this.day = (byte) calendar.get(5);
            this.hour = (byte) calendar.get(11);
            this.minute = (byte) calendar.get(12);
            this.second = (byte) calendar.get(13);
            this.wday = (byte) calendar.get(7);
        }

        public long getTimeInMillis() {
            Calendar.getInstance().set(this.year, this.month - 1, this.day, this.hour, this.minute, this.second);
            Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("gmt"));
            calendar.set(this.year, this.month - 1, this.day, this.hour, this.minute, this.second);
            return calendar.getTimeInMillis();
        }

        public long getTimeInMillis2() {
            Calendar calendar = Calendar.getInstance();
            calendar.set(this.year, this.month - 1, this.day, this.hour, this.minute, this.second);
            return calendar.getTimeInMillis();
        }

        public static byte[] parseContent(int i, int i2, int i3, int i4, int i5, int i6, int i7) {
            System.arraycopy(Packet.shortToByteArray_Little((short) i), 0, r0, 0, 2);
            byte[] bArr = {0, 0, (byte) i2, (byte) i3, (byte) i5, (byte) i6, (byte) i7, (byte) i4};
            return bArr;
        }

        public byte[] parseContent() {
            System.arraycopy(Packet.shortToByteArray_Little(this.year), 0, r0, 0, 2);
            byte[] bArr = {0, 0, this.month, this.day, this.hour, this.minute, this.second, this.wday};
            return bArr;
        }

        public String toString() {
            Calendar calendar = Calendar.getInstance(TimeZone.getDefault());
            calendar.set(this.year, this.month - 1, this.day, this.hour, this.minute, this.second);
            return new SimpleDateFormat(TimeUtil.FORMAT_DATE_TIME_FULL).format(calendar.getTime());
        }

        public String toString2() {
            Calendar calendar = Calendar.getInstance(TimeZone.getDefault());
            calendar.set(this.year, this.month - 1, this.day, this.hour, this.minute, this.second);
            return new SimpleDateFormat("yyyy.MM.dd.HH:mm:ss").format(calendar.getTime());
        }
    }

    public static class HI_P2P_S_PB_LIST_REQ {
        byte EventType;
        STimeDay sEndtime;
        byte[] sReserved = new byte[2];
        STimeDay sStartTime;
        byte timeZone;
        int u32Chn;

        public static byte[] parseContent(int i, long j, long j2, byte b, int i2) {
            int i3;
            TimeZone timeZone = TimeZone.getDefault();
            int rawOffset = (int) ((timeZone.getRawOffset() / 3600) / 10);
            Calendar calendar = Calendar.getInstance(TimeZone.getDefault());
            Calendar calendar2 = Calendar.getInstance(TimeZone.getDefault());
            calendar.setTimeInMillis(j);
            calendar2.setTimeInMillis(j2);
            HiLog.e("search from " + calendar.get(1) + "/" + calendar.get(2) + "/" + calendar.get(5) + " " + calendar.get(11) + Constants.COLON_SEPARATOR + calendar.get(12) + Constants.COLON_SEPARATOR + calendar.get(13), 1, 0);
            HiLog.e("       to   " + calendar2.get(1) + "/" + calendar2.get(2) + "/" + calendar2.get(5) + " " + calendar2.get(11) + Constants.COLON_SEPARATOR + calendar2.get(12) + Constants.COLON_SEPARATOR + calendar2.get(13), 1, 0);
            long currentTimeMillis = System.currentTimeMillis();
            Calendar calendar3 = Calendar.getInstance(TimeZone.getDefault());
            calendar3.setTimeInMillis(currentTimeMillis);
            System.out.println("       to   " + calendar3.get(1) + "/" + calendar3.get(2) + "/" + calendar3.get(5) + " " + calendar3.get(11) + Constants.COLON_SEPARATOR + calendar3.get(12) + Constants.COLON_SEPARATOR + calendar3.get(13));
            SimpleDateFormat simpleDateFormat = new SimpleDateFormat();
            simpleDateFormat.setTimeZone(TimeZone.getDefault());
            PrintStream printStream = System.out;
            StringBuilder sb = new StringBuilder();
            sb.append(" curtime:");
            sb.append(simpleDateFormat.format(calendar3.getTime()));
            printStream.println(sb.toString());
            byte[] bArr = new byte[24];
            System.arraycopy(Packet.intToByteArray_Little(i), 0, bArr, 0, 4);
            System.arraycopy(STimeDay.parseContent(calendar.get(1), calendar.get(2) + 1, calendar.get(5), calendar.get(7), calendar.get(11), calendar.get(12), calendar.get(13)), 0, bArr, 4, 8);
            System.arraycopy(STimeDay.parseContent(calendar2.get(1), calendar2.get(2) + 1, calendar2.get(5), calendar2.get(7), calendar2.get(11), calendar2.get(12), calendar.get(13)), 0, bArr, 12, 8);
            bArr[20] = b;
            if (1 == i2) {
                int i4 = rawOffset % 100;
                if (rawOffset > 0 && i4 == 0) {
                    i3 = rawOffset / 100;
                } else if (rawOffset <= 0 && i4 == 0) {
                    i3 = ((-rawOffset) / 100) + 24;
                } else if (rawOffset > 0 && i4 == 50) {
                    i3 = (rawOffset / 100) + 72;
                } else {
                    i3 = (rawOffset > 0 || i4 != -50) ? 0 : ((-rawOffset) / 100) + 48;
                }
                boolean inDaylightTime = timeZone.inDaylightTime(calendar3.getTime());
                HiLog.e("fffffff" + inDaylightTime + ":::::" + i3, 1, 0);
                if (inDaylightTime) {
                    i3++;
                }
                HiLog.e("fffffff" + inDaylightTime + ":::::" + i3, 1, 0);
                bArr[21] = (byte) i3;
                HiLog.e("timezone:" + i3 + ";;;;;;;;;;;", 1, 0);
            }
            return bArr;
        }

        public static byte[] parseContent(int i, long j, long j2, int i2, byte b) {
            byte b2;
            int i3;
            Calendar calendar = Calendar.getInstance(TimeZone.getDefault());
            Calendar calendar2 = Calendar.getInstance(TimeZone.getDefault());
            calendar.setTimeInMillis(j);
            calendar2.setTimeInMillis(j2);
            System.out.println("search from " + calendar.get(1) + "/" + calendar.get(2) + "/" + calendar.get(5) + " " + calendar.get(11) + Constants.COLON_SEPARATOR + calendar.get(12) + Constants.COLON_SEPARATOR + calendar.get(13));
            System.out.println("       to   " + calendar2.get(1) + "/" + calendar2.get(2) + "/" + calendar2.get(5) + " " + calendar2.get(11) + Constants.COLON_SEPARATOR + calendar2.get(12) + Constants.COLON_SEPARATOR + calendar2.get(13));
            long currentTimeMillis = System.currentTimeMillis();
            Calendar calendar3 = Calendar.getInstance(TimeZone.getDefault());
            calendar3.setTimeInMillis(currentTimeMillis);
            System.out.println("       to   " + calendar3.get(1) + "/" + calendar3.get(2) + "/" + calendar3.get(5) + " " + calendar3.get(11) + Constants.COLON_SEPARATOR + calendar3.get(12) + Constants.COLON_SEPARATOR + calendar3.get(13));
            SimpleDateFormat simpleDateFormat = new SimpleDateFormat();
            simpleDateFormat.setTimeZone(TimeZone.getDefault());
            PrintStream printStream = System.out;
            StringBuilder sb = new StringBuilder();
            sb.append(" curtime:");
            sb.append(simpleDateFormat.format(calendar3.getTime()));
            printStream.println(sb.toString());
            byte[] bArr = new byte[24];
            System.arraycopy(Packet.intToByteArray_Little(i), 0, bArr, 0, 4);
            System.arraycopy(STimeDay.parseContent(calendar.get(1), calendar.get(2) + 1, calendar.get(5), calendar.get(7), calendar.get(11), calendar.get(12), 0), 0, bArr, 4, 8);
            System.arraycopy(STimeDay.parseContent(calendar2.get(1), calendar2.get(2) + 1, calendar2.get(5), calendar2.get(7), calendar2.get(11), calendar2.get(12), 0), 0, bArr, 12, 8);
            bArr[20] = b;
            int i4 = i2 % 100;
            if (i2 > 0 && i4 == 0) {
                i3 = i2 / 100;
            } else if (i2 <= 0 && i4 == 0) {
                i3 = ((-i2) / 100) + 24;
            } else if (i2 > 0 && i4 == 50) {
                i3 = (i2 / 100) + 72;
            } else if (i2 <= 0 && i4 == -50) {
                i3 = ((-i2) / 100) + 48;
            } else {
                b2 = 0;
                bArr[21] = b2;
                HiLog.e("timezone:" + ((int) b2) + ";;;;;;;;;;;", 1, 0);
                return bArr;
            }
            b2 = (byte) i3;
            bArr[21] = b2;
            HiLog.e("timezone:" + ((int) b2) + ";;;;;;;;;;;", 1, 0);
            return bArr;
        }

        public void setTimeZone(float f) {
            int i = (int) (f * 100.0f);
            int i2 = i % 100;
            if (i > 0 && i2 == 0) {
                this.timeZone = (byte) (i / 100);
                return;
            }
            if (i <= 0 && i2 == 0) {
                this.timeZone = (byte) (((-i) / 100) + 24);
                return;
            }
            if (i > 0 && i2 == 50) {
                this.timeZone = (byte) ((i / 100) + 48);
            } else {
                if (i > 0 || i2 != -50) {
                    return;
                }
                this.timeZone = (byte) (((-i) / 100) + 36);
            }
        }
    }

    public static class HI_P2P_FILE_INFO {
        public byte EventType;
        public STimeDay sEndTime;
        public byte[] sReserved = new byte[3];
        public STimeDay sStartTime;
        public int u32size;

        public static int sizeof() {
            return 24;
        }

        public HI_P2P_FILE_INFO(byte[] bArr) {
            if (bArr.length >= 24) {
                this.sStartTime = new STimeDay(bArr, 0);
                this.sEndTime = new STimeDay(bArr, 8);
                this.u32size = Packet.byteArrayToInt_Little(bArr, 16);
                this.EventType = bArr[20];
                System.arraycopy(bArr, 21, this.sReserved, 0, 3);
            }
        }
    }

    public static class HI_P2P_S_PB_PLAY_REQ {
        short command;
        byte[] sReserved = new byte[2];
        STimeDay sStartTime;
        int u32Chn;

        public static byte[] parseContent(int i, short s, byte[] bArr) {
            byte[] bArr2 = new byte[16];
            System.arraycopy(Packet.intToByteArray_Little(i), 0, bArr2, 0, 4);
            System.arraycopy(Packet.shortToByteArray_Little(s), 0, bArr2, 4, 2);
            System.arraycopy(bArr, 0, bArr2, 6, 8);
            return bArr2;
        }

        public static byte[] parseContentWhitTimeZone(int i, short s, byte[] bArr) {
            byte b;
            int i2;
            byte[] bArr2 = new byte[16];
            System.arraycopy(Packet.intToByteArray_Little(i), 0, bArr2, 0, 4);
            System.arraycopy(Packet.shortToByteArray_Little(s), 0, bArr2, 4, 2);
            System.arraycopy(bArr, 0, bArr2, 6, 8);
            int rawOffset = (int) ((TimeZone.getDefault().getRawOffset() / 3600) / 10);
            int i3 = rawOffset % 100;
            if (rawOffset > 0 && i3 == 0) {
                i2 = rawOffset / 100;
            } else if (rawOffset <= 0 && i3 == 0) {
                i2 = ((-rawOffset) / 100) + 24;
            } else if (rawOffset > 0 && i3 == 50) {
                i2 = (rawOffset / 100) + 72;
            } else if (rawOffset <= 0 && i3 == -50) {
                i2 = ((-rawOffset) / 100) + 48;
            } else {
                b = 0;
                HiLog.v("timezone----------:" + ((int) b), 1, 0);
                bArr2[14] = b;
                return bArr2;
            }
            b = (byte) i2;
            HiLog.v("timezone----------:" + ((int) b), 1, 0);
            bArr2[14] = b;
            return bArr2;
        }

        public static byte[] parseContent(int i, short s, STimeDay sTimeDay) {
            byte[] bArr = new byte[16];
            System.arraycopy(Packet.intToByteArray_Little(i), 0, bArr, 0, 4);
            System.arraycopy(Packet.shortToByteArray_Little(s), 0, bArr, 4, 2);
            if (sTimeDay != null) {
                System.arraycopy(sTimeDay.parseContent(), 0, bArr, 6, 8);
            }
            return bArr;
        }

        public static byte[] parseContentdual(int i, short s, STimeDay sTimeDay, int i2) {
            byte[] bArr = new byte[16];
            System.arraycopy(Packet.intToByteArray_Little(i), 0, bArr, 0, 4);
            System.arraycopy(Packet.shortToByteArray_Little(s), 0, bArr, 4, 2);
            if (sTimeDay != null) {
                System.arraycopy(sTimeDay.parseContent(), 0, bArr, 6, 8);
            }
            bArr[14] = (byte) i2;
            return bArr;
        }
    }

    public static class HI_P2P_S_PB_PLAYFAST_REQ {
        short command;
        int lPos;
        byte[] sReserved = new byte[6];
        STimeDay sStartTime;
        int u32Chn;

        public static byte[] parseContent(int i, short s, STimeDay sTimeDay, int i2) {
            byte[] bArr = new byte[24];
            System.arraycopy(Packet.intToByteArray_Little(i), 0, bArr, 0, 4);
            System.arraycopy(Packet.intToByteArray_Little(i2), 0, bArr, 4, 4);
            System.arraycopy(Packet.shortToByteArray_Little(s), 0, bArr, 8, 2);
            if (sTimeDay != null) {
                System.arraycopy(sTimeDay.parseContent(), 0, bArr, 10, 8);
            }
            return bArr;
        }

        public static byte[] parseContent(int i, short s, STimeDay sTimeDay, STimeDay sTimeDay2, int i2) {
            byte[] bArr = new byte[32];
            System.arraycopy(Packet.intToByteArray_Little(i), 0, bArr, 0, 4);
            System.arraycopy(Packet.intToByteArray_Little(i2), 0, bArr, 4, 4);
            System.arraycopy(Packet.shortToByteArray_Little(s), 0, bArr, 8, 2);
            if (sTimeDay != null) {
                System.arraycopy(sTimeDay.parseContent(), 0, bArr, 10, 8);
            }
            if (sTimeDay2 != null) {
                System.arraycopy(sTimeDay2.parseContent(), 0, bArr, 18, 8);
            }
            return bArr;
        }

        public static byte[] parseContentdual(int i, short s, STimeDay sTimeDay, int i2) {
            byte[] bArr = new byte[16];
            System.arraycopy(Packet.intToByteArray_Little(i), 0, bArr, 0, 4);
            System.arraycopy(Packet.shortToByteArray_Little(s), 0, bArr, 4, 2);
            if (sTimeDay != null) {
                System.arraycopy(sTimeDay.parseContent(), 0, bArr, 6, 8);
            }
            bArr[14] = (byte) i2;
            return bArr;
        }
    }

    public static class HI_P2P_S_VIDEO_PARAM {
        public int u32BitRate;
        public int u32Cbr;
        public int u32Channel;
        public int u32Frame;
        public int u32IFrmInter;
        public int u32Quality;
        public int u32Stream;

        public byte[] parseContent() {
            return parseContent(this.u32Channel, this.u32Stream, this.u32Cbr, this.u32Frame, this.u32BitRate, this.u32Quality, this.u32IFrmInter);
        }

        public static byte[] parseContent(int i, int i2, int i3, int i4, int i5, int i6, int i7) {
            byte[] bArr = new byte[28];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(i);
            byte[] intToByteArray_Little2 = Packet.intToByteArray_Little(i2);
            byte[] intToByteArray_Little3 = Packet.intToByteArray_Little(i3);
            byte[] intToByteArray_Little4 = Packet.intToByteArray_Little(i4);
            byte[] intToByteArray_Little5 = Packet.intToByteArray_Little(i5);
            byte[] intToByteArray_Little6 = Packet.intToByteArray_Little(i6);
            byte[] intToByteArray_Little7 = Packet.intToByteArray_Little(i7);
            System.arraycopy(intToByteArray_Little, 0, bArr, 0, 4);
            System.arraycopy(intToByteArray_Little2, 0, bArr, 4, 4);
            System.arraycopy(intToByteArray_Little3, 0, bArr, 8, 4);
            System.arraycopy(intToByteArray_Little4, 0, bArr, 12, 4);
            System.arraycopy(intToByteArray_Little5, 0, bArr, 16, 4);
            System.arraycopy(intToByteArray_Little6, 0, bArr, 20, 4);
            System.arraycopy(intToByteArray_Little7, 0, bArr, 24, 4);
            return bArr;
        }

        public HI_P2P_S_VIDEO_PARAM(int i, int i2, int i3, int i4, int i5, int i6, int i7) {
            this.u32Channel = i;
            this.u32Stream = i2;
            this.u32Frame = i4;
            this.u32BitRate = i5;
            this.u32Quality = i6;
            this.u32Cbr = i3;
            this.u32IFrmInter = i7;
        }

        public HI_P2P_S_VIDEO_PARAM(byte[] bArr) {
            if (bArr.length >= 28) {
                this.u32Channel = Packet.byteArrayToInt_Little(bArr, 0);
                this.u32Stream = Packet.byteArrayToInt_Little(bArr, 4);
                this.u32Cbr = Packet.byteArrayToInt_Little(bArr, 8);
                this.u32Frame = Packet.byteArrayToInt_Little(bArr, 12);
                this.u32BitRate = Packet.byteArrayToInt_Little(bArr, 16);
                this.u32Quality = Packet.byteArrayToInt_Little(bArr, 20);
                this.u32IFrmInter = Packet.byteArrayToInt_Little(bArr, 24);
            }
        }

        public HI_P2P_S_VIDEO_PARAM(byte[] bArr, int i) {
            if (bArr.length >= i + 28) {
                this.u32Channel = Packet.byteArrayToInt_Little(bArr, i + 0);
                this.u32Stream = Packet.byteArrayToInt_Little(bArr, i + 4);
                this.u32Cbr = Packet.byteArrayToInt_Little(bArr, i + 8);
                this.u32Frame = Packet.byteArrayToInt_Little(bArr, i + 12);
                this.u32BitRate = Packet.byteArrayToInt_Little(bArr, i + 16);
                this.u32Quality = Packet.byteArrayToInt_Little(bArr, i + 20);
                this.u32IFrmInter = Packet.byteArrayToInt_Little(bArr, i + 24);
            }
        }

        public HI_P2P_S_VIDEO_PARAM(int i, int i2, int i3, int i4, int i5) {
            this.u32Channel = 0;
            if (i2 == 2) {
                if (i != 0) {
                    if (i == 1) {
                        this.u32Stream = 0;
                        this.u32Frame = 15;
                        this.u32BitRate = 400;
                        this.u32IFrmInter = i4 == 1 ? 60 : 15;
                        this.u32Quality = 1;
                        return;
                    }
                    if (i == 2) {
                        this.u32Stream = 0;
                        this.u32Frame = 10;
                        this.u32BitRate = 256;
                        this.u32IFrmInter = i4 == 1 ? 40 : 10;
                        this.u32Quality = 1;
                        return;
                    }
                    return;
                }
                if (i3 == 5) {
                    this.u32Stream = 1;
                    this.u32Frame = i4 == 1 ? 11 : 10;
                    this.u32BitRate = BOFRecord.VERSION;
                    this.u32IFrmInter = i4 == 1 ? 44 : 20;
                    this.u32Quality = 1;
                    return;
                }
                if (i3 == 3) {
                    this.u32Stream = 1;
                    this.u32Frame = 12;
                    this.u32BitRate = 1792;
                    this.u32IFrmInter = i4 == 1 ? 48 : 24;
                    this.u32Quality = 1;
                    return;
                }
                this.u32Stream = 1;
                this.u32Frame = 12;
                this.u32BitRate = 1024;
                this.u32IFrmInter = i4 == 1 ? 48 : 24;
                this.u32Quality = 1;
                return;
            }
            if (i2 == 0) {
                if (i != 0) {
                    if (i == 1) {
                        this.u32Stream = 0;
                        this.u32Frame = 12;
                        this.u32BitRate = 256;
                        this.u32IFrmInter = i4 == 1 ? 48 : 24;
                        this.u32Quality = 2;
                        return;
                    }
                    if (i == 2) {
                        this.u32Stream = 0;
                        this.u32Frame = 10;
                        this.u32BitRate = 128;
                        this.u32IFrmInter = i4 == 1 ? 40 : 10;
                        this.u32Quality = 3;
                        return;
                    }
                    return;
                }
                if (i3 == 5) {
                    this.u32Stream = 1;
                    this.u32Frame = i4 == 1 ? 6 : 5;
                    this.u32BitRate = 640;
                    this.u32IFrmInter = i4 != 1 ? 10 : 24;
                    this.u32Quality = i4 == 1 ? 2 : 3;
                    return;
                }
                if (i3 == 3) {
                    this.u32Stream = 1;
                    this.u32Frame = 6;
                    this.u32BitRate = 896;
                    this.u32IFrmInter = i4 == 1 ? 24 : 12;
                    this.u32Quality = 1;
                    return;
                }
                this.u32Stream = 1;
                this.u32Quality = 2;
                this.u32Frame = 5;
                this.u32BitRate = 256;
                this.u32IFrmInter = i4 == 1 ? 20 : 10;
                return;
            }
            if (i2 == 1) {
                if (i != 0) {
                    if (i == 1) {
                        this.u32Stream = 0;
                        this.u32Frame = 6;
                        this.u32BitRate = 128;
                        this.u32IFrmInter = i4 == 1 ? 24 : 12;
                        this.u32Quality = 2;
                        return;
                    }
                    if (i == 2) {
                        this.u32Stream = 0;
                        this.u32Frame = 6;
                        this.u32BitRate = 128;
                        this.u32IFrmInter = i4 == 1 ? 24 : 12;
                        this.u32Quality = 3;
                        return;
                    }
                    return;
                }
                if (i3 == 5) {
                    this.u32Stream = 1;
                    this.u32Frame = 4;
                    this.u32BitRate = 384;
                    this.u32IFrmInter = i4 != 1 ? 8 : 16;
                    this.u32Quality = i4 != 1 ? 4 : 2;
                    return;
                }
                if (i3 == 3) {
                    this.u32Stream = 1;
                    this.u32Frame = 4;
                    this.u32BitRate = 256;
                    this.u32IFrmInter = i4 != 1 ? 8 : 16;
                    this.u32Quality = 4;
                    return;
                }
                if (1 == i5) {
                    this.u32Stream = 1;
                    this.u32Frame = 4;
                    this.u32BitRate = HSSFShapeTypes.ActionButtonInformation;
                    this.u32IFrmInter = i4 != 1 ? 8 : 16;
                    this.u32Quality = 3;
                    return;
                }
                this.u32Stream = 1;
                this.u32Frame = 4;
                this.u32BitRate = 256;
                this.u32IFrmInter = i4 != 1 ? 8 : 16;
                this.u32Quality = 2;
            }
        }
    }

    public static class HI_P2P_S_SNAP_REQ {
        public int u32Channel;
        public int u32Stream;

        public static byte[] parseContent(int i, int i2) {
            byte[] bArr = new byte[8];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(i);
            byte[] intToByteArray_Little2 = Packet.intToByteArray_Little(i2);
            System.arraycopy(intToByteArray_Little, 0, bArr, 0, 4);
            System.arraycopy(intToByteArray_Little2, 0, bArr, 4, 4);
            return bArr;
        }
    }

    public static class HI_P2P_S_SNAP_RESP {
        public byte[] pSnapBuf;
        public short u16Flag;
        public int u32SendLen;
        public int u32SnapLen;

        public HI_P2P_S_SNAP_RESP(byte[] bArr) {
            if (bArr.length >= 10) {
                this.u32SnapLen = Packet.byteArrayToInt_Little(bArr, 0);
                this.u32SendLen = Packet.byteArrayToInt_Little(bArr, 4);
                this.u16Flag = Packet.byteArrayToShort_Little(bArr, 8);
                int i = this.u32SendLen;
                byte[] bArr2 = new byte[i];
                this.pSnapBuf = bArr2;
                System.arraycopy(bArr, 10, bArr2, 0, i);
            }
        }
    }

    public static class HI_P2P_S_DISPLAY {
        public int u32Brightness;
        public int u32Channel;
        public int u32Contrast;
        public int u32Flip;
        public int u32Mirror;
        public int u32Mode;
        public int u32Night;
        public int u32Saturation;
        public int u32Sharpness;
        public int u32Shutter;
        public int u32Wdr;

        public HI_P2P_S_DISPLAY(byte[] bArr) {
            if (bArr.length >= 44) {
                this.u32Channel = Packet.byteArrayToInt_Little(bArr, 0);
                this.u32Brightness = Packet.byteArrayToInt_Little(bArr, 4);
                this.u32Contrast = Packet.byteArrayToInt_Little(bArr, 8);
                this.u32Saturation = Packet.byteArrayToInt_Little(bArr, 12);
                this.u32Sharpness = Packet.byteArrayToInt_Little(bArr, 16);
                this.u32Flip = Packet.byteArrayToInt_Little(bArr, 20);
                this.u32Mirror = Packet.byteArrayToInt_Little(bArr, 24);
                this.u32Mode = Packet.byteArrayToInt_Little(bArr, 28);
                this.u32Wdr = Packet.byteArrayToInt_Little(bArr, 32);
                this.u32Shutter = Packet.byteArrayToInt_Little(bArr, 36);
                this.u32Night = Packet.byteArrayToInt_Little(bArr, 40);
            }
        }

        public static byte[] parseContent(int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8, int i9, int i10, int i11) {
            byte[] bArr = new byte[44];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(i);
            byte[] intToByteArray_Little2 = Packet.intToByteArray_Little(i2);
            byte[] intToByteArray_Little3 = Packet.intToByteArray_Little(i3);
            byte[] intToByteArray_Little4 = Packet.intToByteArray_Little(i4);
            byte[] intToByteArray_Little5 = Packet.intToByteArray_Little(i5);
            byte[] intToByteArray_Little6 = Packet.intToByteArray_Little(i6);
            byte[] intToByteArray_Little7 = Packet.intToByteArray_Little(i7);
            byte[] intToByteArray_Little8 = Packet.intToByteArray_Little(i8);
            byte[] intToByteArray_Little9 = Packet.intToByteArray_Little(i9);
            byte[] intToByteArray_Little10 = Packet.intToByteArray_Little(i10);
            byte[] intToByteArray_Little11 = Packet.intToByteArray_Little(i11);
            System.arraycopy(intToByteArray_Little, 0, bArr, 0, 4);
            System.arraycopy(intToByteArray_Little2, 0, bArr, 4, 4);
            System.arraycopy(intToByteArray_Little3, 0, bArr, 8, 4);
            System.arraycopy(intToByteArray_Little4, 0, bArr, 12, 4);
            System.arraycopy(intToByteArray_Little5, 0, bArr, 16, 4);
            System.arraycopy(intToByteArray_Little6, 0, bArr, 20, 4);
            System.arraycopy(intToByteArray_Little7, 0, bArr, 24, 4);
            System.arraycopy(intToByteArray_Little8, 0, bArr, 28, 4);
            System.arraycopy(intToByteArray_Little9, 0, bArr, 32, 4);
            System.arraycopy(intToByteArray_Little10, 0, bArr, 36, 4);
            System.arraycopy(intToByteArray_Little11, 0, bArr, 40, 4);
            return bArr;
        }

        public byte[] parseContent() {
            byte[] bArr = new byte[44];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(this.u32Channel);
            byte[] intToByteArray_Little2 = Packet.intToByteArray_Little(this.u32Brightness);
            byte[] intToByteArray_Little3 = Packet.intToByteArray_Little(this.u32Contrast);
            byte[] intToByteArray_Little4 = Packet.intToByteArray_Little(this.u32Saturation);
            byte[] intToByteArray_Little5 = Packet.intToByteArray_Little(this.u32Sharpness);
            byte[] intToByteArray_Little6 = Packet.intToByteArray_Little(this.u32Flip);
            byte[] intToByteArray_Little7 = Packet.intToByteArray_Little(this.u32Mirror);
            byte[] intToByteArray_Little8 = Packet.intToByteArray_Little(this.u32Mode);
            byte[] intToByteArray_Little9 = Packet.intToByteArray_Little(this.u32Wdr);
            byte[] intToByteArray_Little10 = Packet.intToByteArray_Little(this.u32Shutter);
            byte[] intToByteArray_Little11 = Packet.intToByteArray_Little(this.u32Night);
            System.arraycopy(intToByteArray_Little, 0, bArr, 0, 4);
            System.arraycopy(intToByteArray_Little2, 0, bArr, 4, 4);
            System.arraycopy(intToByteArray_Little3, 0, bArr, 8, 4);
            System.arraycopy(intToByteArray_Little4, 0, bArr, 12, 4);
            System.arraycopy(intToByteArray_Little5, 0, bArr, 16, 4);
            System.arraycopy(intToByteArray_Little6, 0, bArr, 20, 4);
            System.arraycopy(intToByteArray_Little7, 0, bArr, 24, 4);
            System.arraycopy(intToByteArray_Little8, 0, bArr, 28, 4);
            System.arraycopy(intToByteArray_Little9, 0, bArr, 32, 4);
            System.arraycopy(intToByteArray_Little10, 0, bArr, 36, 4);
            System.arraycopy(intToByteArray_Little11, 0, bArr, 40, 4);
            return bArr;
        }
    }

    public static class HI_P2P_S_ALARM_PARAM {
        public int u32Channel;
        public int u32EmailSnap;
        public int u32FtpRec;
        public int u32FtpSnap;
        public int u32PTZ;
        public int u32Relay;
        public int u32RelayTime;
        public int u32SDRec;
        public int u32SDSnap;
        public int u32Svr;

        public HI_P2P_S_ALARM_PARAM(byte[] bArr) {
            if (bArr.length >= 40) {
                this.u32Channel = Packet.byteArrayToInt_Little(bArr, 0);
                this.u32EmailSnap = Packet.byteArrayToInt_Little(bArr, 4);
                this.u32SDSnap = Packet.byteArrayToInt_Little(bArr, 8);
                this.u32SDRec = Packet.byteArrayToInt_Little(bArr, 12);
                this.u32FtpRec = Packet.byteArrayToInt_Little(bArr, 16);
                this.u32FtpSnap = Packet.byteArrayToInt_Little(bArr, 20);
                this.u32Relay = Packet.byteArrayToInt_Little(bArr, 24);
                this.u32RelayTime = Packet.byteArrayToInt_Little(bArr, 28);
                this.u32PTZ = Packet.byteArrayToInt_Little(bArr, 32);
                this.u32Svr = Packet.byteArrayToInt_Little(bArr, 36);
            }
        }

        public static byte[] parseContent(int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8, int i9, int i10) {
            byte[] bArr = new byte[40];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(i);
            byte[] intToByteArray_Little2 = Packet.intToByteArray_Little(i2);
            byte[] intToByteArray_Little3 = Packet.intToByteArray_Little(i3);
            byte[] intToByteArray_Little4 = Packet.intToByteArray_Little(i4);
            byte[] intToByteArray_Little5 = Packet.intToByteArray_Little(i5);
            byte[] intToByteArray_Little6 = Packet.intToByteArray_Little(i6);
            byte[] intToByteArray_Little7 = Packet.intToByteArray_Little(i7);
            byte[] intToByteArray_Little8 = Packet.intToByteArray_Little(i8);
            byte[] intToByteArray_Little9 = Packet.intToByteArray_Little(i9);
            byte[] intToByteArray_Little10 = Packet.intToByteArray_Little(i10);
            System.arraycopy(intToByteArray_Little, 0, bArr, 0, 4);
            System.arraycopy(intToByteArray_Little2, 0, bArr, 4, 4);
            System.arraycopy(intToByteArray_Little3, 0, bArr, 8, 4);
            System.arraycopy(intToByteArray_Little4, 0, bArr, 12, 4);
            System.arraycopy(intToByteArray_Little5, 0, bArr, 16, 4);
            System.arraycopy(intToByteArray_Little6, 0, bArr, 20, 4);
            System.arraycopy(intToByteArray_Little7, 0, bArr, 24, 4);
            System.arraycopy(intToByteArray_Little8, 0, bArr, 28, 4);
            System.arraycopy(intToByteArray_Little9, 0, bArr, 32, 4);
            System.arraycopy(intToByteArray_Little10, 0, bArr, 36, 4);
            return bArr;
        }

        public byte[] parseContent() {
            byte[] bArr = new byte[40];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(this.u32Channel);
            byte[] intToByteArray_Little2 = Packet.intToByteArray_Little(this.u32EmailSnap);
            byte[] intToByteArray_Little3 = Packet.intToByteArray_Little(this.u32SDSnap);
            byte[] intToByteArray_Little4 = Packet.intToByteArray_Little(this.u32SDRec);
            byte[] intToByteArray_Little5 = Packet.intToByteArray_Little(this.u32FtpRec);
            byte[] intToByteArray_Little6 = Packet.intToByteArray_Little(this.u32FtpSnap);
            byte[] intToByteArray_Little7 = Packet.intToByteArray_Little(this.u32Relay);
            byte[] intToByteArray_Little8 = Packet.intToByteArray_Little(this.u32RelayTime);
            byte[] intToByteArray_Little9 = Packet.intToByteArray_Little(this.u32PTZ);
            byte[] intToByteArray_Little10 = Packet.intToByteArray_Little(this.u32Svr);
            System.arraycopy(intToByteArray_Little, 0, bArr, 0, 4);
            System.arraycopy(intToByteArray_Little2, 0, bArr, 4, 4);
            System.arraycopy(intToByteArray_Little3, 0, bArr, 8, 4);
            System.arraycopy(intToByteArray_Little4, 0, bArr, 12, 4);
            System.arraycopy(intToByteArray_Little5, 0, bArr, 16, 4);
            System.arraycopy(intToByteArray_Little6, 0, bArr, 20, 4);
            System.arraycopy(intToByteArray_Little7, 0, bArr, 24, 4);
            System.arraycopy(intToByteArray_Little8, 0, bArr, 28, 4);
            System.arraycopy(intToByteArray_Little9, 0, bArr, 32, 4);
            System.arraycopy(intToByteArray_Little10, 0, bArr, 36, 4);
            return bArr;
        }
    }

    public static class HI_P2P_S_MD_PARAM {
        public HI_P2P_S_MD_AREA struArea;
        public int u32Channel;

        public static byte[] parseContent(int i, HI_P2P_S_MD_AREA hi_p2p_s_md_area) {
            byte[] bArr = new byte[32];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(i);
            byte[] parseContent = hi_p2p_s_md_area.parseContent();
            System.arraycopy(intToByteArray_Little, 0, bArr, 0, 4);
            System.arraycopy(parseContent, 0, bArr, 4, parseContent.length);
            return bArr;
        }

        public byte[] parseContent() {
            byte[] bArr = new byte[32];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(this.u32Channel);
            byte[] parseContent = this.struArea.parseContent();
            System.arraycopy(intToByteArray_Little, 0, bArr, 0, 4);
            System.arraycopy(parseContent, 0, bArr, 4, parseContent.length);
            return bArr;
        }

        public HI_P2P_S_MD_PARAM(byte[] bArr) {
            if (bArr.length >= 32) {
                this.u32Channel = Packet.byteArrayToInt_Little(bArr, 0);
                this.struArea = new HI_P2P_S_MD_AREA(bArr, 4);
            }
        }

        public HI_P2P_S_MD_PARAM(int i, HI_P2P_S_MD_AREA hi_p2p_s_md_area) {
            this.u32Channel = i;
            this.struArea = hi_p2p_s_md_area;
        }
    }

    public static class HI_P2P_S_ALM_PARAM {
        public int channel;
        public int conti;
        public int enable;
        public int sensi;

        public HI_P2P_S_ALM_PARAM(byte[] bArr) {
            if (bArr.length >= 16) {
                this.channel = Packet.byteArrayToInt_Little(bArr, 0);
                this.enable = Packet.byteArrayToInt_Little(bArr, 4);
                this.sensi = Packet.byteArrayToInt_Little(bArr, 8);
                this.conti = Packet.byteArrayToInt_Little(bArr, 12);
            }
        }

        public static byte[] parseContent(int i, int i2, int i3, int i4) {
            byte[] bArr = new byte[16];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(i);
            byte[] intToByteArray_Little2 = Packet.intToByteArray_Little(i2);
            byte[] intToByteArray_Little3 = Packet.intToByteArray_Little(i3);
            byte[] intToByteArray_Little4 = Packet.intToByteArray_Little(i4);
            System.arraycopy(intToByteArray_Little, 0, bArr, 0, 4);
            System.arraycopy(intToByteArray_Little2, 0, bArr, 4, 4);
            System.arraycopy(intToByteArray_Little3, 0, bArr, 8, 4);
            System.arraycopy(intToByteArray_Little4, 0, bArr, 12, 4);
            return bArr;
        }

        public byte[] parseContent() {
            byte[] bArr = new byte[16];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(this.channel);
            byte[] intToByteArray_Little2 = Packet.intToByteArray_Little(this.enable);
            byte[] intToByteArray_Little3 = Packet.intToByteArray_Little(this.sensi);
            byte[] intToByteArray_Little4 = Packet.intToByteArray_Little(this.conti);
            System.arraycopy(intToByteArray_Little, 0, bArr, 0, 4);
            System.arraycopy(intToByteArray_Little2, 0, bArr, 4, 4);
            System.arraycopy(intToByteArray_Little3, 0, bArr, 8, 4);
            System.arraycopy(intToByteArray_Little4, 0, bArr, 12, 4);
            return bArr;
        }
    }

    public static class HI_P2P_S_MD_AREA {
        public int u32Area;
        public int u32Enable;
        public int u32Height;
        public int u32Sensi;
        public int u32Width;
        public int u32X;
        public int u32Y;

        public static byte[] parseContent(int i, int i2, int i3, int i4, int i5, int i6, int i7) {
            byte[] bArr = new byte[28];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(i);
            byte[] intToByteArray_Little2 = Packet.intToByteArray_Little(i2);
            byte[] intToByteArray_Little3 = Packet.intToByteArray_Little(i3);
            byte[] intToByteArray_Little4 = Packet.intToByteArray_Little(i4);
            byte[] intToByteArray_Little5 = Packet.intToByteArray_Little(i5);
            byte[] intToByteArray_Little6 = Packet.intToByteArray_Little(i6);
            byte[] intToByteArray_Little7 = Packet.intToByteArray_Little(i7);
            System.arraycopy(intToByteArray_Little, 0, bArr, 0, 4);
            System.arraycopy(intToByteArray_Little2, 0, bArr, 4, 4);
            System.arraycopy(intToByteArray_Little3, 0, bArr, 8, 4);
            System.arraycopy(intToByteArray_Little4, 0, bArr, 12, 4);
            System.arraycopy(intToByteArray_Little5, 0, bArr, 16, 4);
            System.arraycopy(intToByteArray_Little6, 0, bArr, 20, 4);
            System.arraycopy(intToByteArray_Little7, 0, bArr, 24, 4);
            return bArr;
        }

        public byte[] parseContent() {
            byte[] bArr = new byte[28];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(this.u32Area);
            byte[] intToByteArray_Little2 = Packet.intToByteArray_Little(this.u32Enable);
            byte[] intToByteArray_Little3 = Packet.intToByteArray_Little(this.u32X);
            byte[] intToByteArray_Little4 = Packet.intToByteArray_Little(this.u32Y);
            byte[] intToByteArray_Little5 = Packet.intToByteArray_Little(this.u32Width);
            byte[] intToByteArray_Little6 = Packet.intToByteArray_Little(this.u32Height);
            byte[] intToByteArray_Little7 = Packet.intToByteArray_Little(this.u32Sensi);
            System.arraycopy(intToByteArray_Little, 0, bArr, 0, 4);
            System.arraycopy(intToByteArray_Little2, 0, bArr, 4, 4);
            System.arraycopy(intToByteArray_Little3, 0, bArr, 8, 4);
            System.arraycopy(intToByteArray_Little4, 0, bArr, 12, 4);
            System.arraycopy(intToByteArray_Little5, 0, bArr, 16, 4);
            System.arraycopy(intToByteArray_Little6, 0, bArr, 20, 4);
            System.arraycopy(intToByteArray_Little7, 0, bArr, 24, 4);
            return bArr;
        }

        public HI_P2P_S_MD_AREA(byte[] bArr, int i) {
            if (bArr.length >= 28) {
                this.u32Area = Packet.byteArrayToInt_Little(bArr, i + 0);
                this.u32Enable = Packet.byteArrayToInt_Little(bArr, i + 4);
                this.u32X = Packet.byteArrayToInt_Little(bArr, i + 8);
                this.u32Y = Packet.byteArrayToInt_Little(bArr, i + 12);
                this.u32Width = Packet.byteArrayToInt_Little(bArr, i + 16);
                this.u32Height = Packet.byteArrayToInt_Little(bArr, i + 20);
                this.u32Sensi = Packet.byteArrayToInt_Little(bArr, i + 24);
            }
        }

        public HI_P2P_S_MD_AREA(int i, int i2, int i3, int i4, int i5, int i6, int i7) {
            this.u32Area = i;
            this.u32Enable = i2;
            this.u32X = i3;
            this.u32Y = i4;
            this.u32Width = i5;
            this.u32Height = i6;
            this.u32Sensi = i7;
        }
    }

    public static class HI_P2P_S_WIFI_PARAM {
        public byte EncType;
        public byte Mode;
        public int u32Channel;
        public int u32Enable;
        public byte[] strSSID = new byte[32];
        public byte[] strKey = new byte[64];

        public HI_P2P_S_WIFI_PARAM(byte[] bArr) {
            if (bArr.length >= 106) {
                this.u32Channel = Packet.byteArrayToInt_Little(bArr, 0);
                this.u32Enable = Packet.byteArrayToInt_Little(bArr, 4);
                this.Mode = bArr[8];
                this.EncType = bArr[9];
                System.arraycopy(bArr, 10, this.strSSID, 0, 32);
                System.arraycopy(bArr, 42, this.strKey, 0, 64);
            }
        }

        public static byte[] parseContent(int i, int i2, byte b, byte b2, byte[] bArr, byte[] bArr2) {
            byte[] bArr3 = new byte[106];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(i);
            byte[] intToByteArray_Little2 = Packet.intToByteArray_Little(i2);
            System.arraycopy(intToByteArray_Little, 0, bArr3, 0, 4);
            System.arraycopy(intToByteArray_Little2, 0, bArr3, 4, 4);
            bArr3[8] = b;
            bArr3[9] = b2;
            System.arraycopy(bArr, 0, bArr3, 10, bArr.length);
            System.arraycopy(bArr2, 0, bArr3, 42, bArr2.length);
            return bArr3;
        }
    }

    public static class SWifiAp {
        public byte EncType;
        public byte Mode;
        public byte Signal;
        public byte Status;
        public byte[] strSSID;

        public static int getTotalSize() {
            return 36;
        }

        public SWifiAp(byte[] bArr) {
            byte[] bArr2 = new byte[32];
            this.strSSID = bArr2;
            if (bArr.length >= 36) {
                System.arraycopy(bArr, 0, bArr2, 0, bArr.length);
                this.Mode = bArr[32];
                this.EncType = bArr[33];
                this.Signal = bArr[34];
                this.Status = bArr[35];
            }
        }

        public SWifiAp(byte[] bArr, byte b, byte b2, byte b3, byte b4) {
            byte[] bArr2 = new byte[32];
            this.strSSID = bArr2;
            if (bArr.length <= bArr2.length) {
                System.arraycopy(bArr, 0, bArr2, 0, bArr.length);
            }
            this.Mode = b;
            this.EncType = b2;
            this.Signal = b3;
            this.Status = b4;
        }
    }

    public static class HI_P2P_S_WIFI_CHECK {
        public byte EncType;
        public byte Mode;
        public int u32Channel;
        public int u32Check;
        public int u32Enable;
        public byte[] strSSID = new byte[32];
        public byte[] strKey = new byte[64];

        public static byte[] parseContent(int i, int i2, byte b, byte b2, byte[] bArr, byte[] bArr2, int i3) {
            byte[] bArr3 = new byte[112];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(i);
            byte[] intToByteArray_Little2 = Packet.intToByteArray_Little(i2);
            System.arraycopy(intToByteArray_Little, 0, bArr3, 0, 4);
            System.arraycopy(intToByteArray_Little2, 0, bArr3, 4, 4);
            bArr3[8] = b;
            bArr3[9] = b2;
            System.arraycopy(bArr, 0, bArr3, 10, bArr.length);
            System.arraycopy(bArr2, 0, bArr3, 42, bArr2.length);
            System.arraycopy(Packet.intToByteArray_Little(i3), 0, bArr3, 108, 4);
            return bArr3;
        }
    }

    public static class HI_P2P_S_DEV_INFO {
        public int sUserNum;
        public byte[] strCableMAC;
        public int u32NetType;
        public byte[] strWifiMAC = new byte[32];
        public byte[] strSoftVer = new byte[32];
        public byte[] strHardVer = new byte[32];
        public byte[] strDeviceName = new byte[32];

        public HI_P2P_S_DEV_INFO(byte[] bArr) {
            byte[] bArr2 = new byte[32];
            this.strCableMAC = bArr2;
            if (bArr.length >= 132) {
                System.arraycopy(bArr, 0, bArr2, 0, 32);
                System.arraycopy(bArr, 32, this.strWifiMAC, 0, 32);
                this.u32NetType = Packet.byteArrayToInt_Little(bArr, 64);
                System.arraycopy(bArr, 68, this.strSoftVer, 0, 32);
                System.arraycopy(bArr, 100, this.strHardVer, 0, 32);
                if (bArr.length <= 132) {
                    return;
                }
                System.arraycopy(bArr, 132, this.strDeviceName, 0, 32);
                this.sUserNum = Packet.byteArrayToInt_Little(bArr, 164);
            }
        }
    }

    public static class HI_P2P_S_NET_PARAM {
        public int u32Channel;
        public int u32DhcpFlag;
        public int u32DnsDynFlag;
        public int u32Port;
        public byte[] strIPAddr = new byte[64];
        public byte[] strNetMask = new byte[64];
        public byte[] strGateWay = new byte[64];
        public byte[] strFDNSIP = new byte[64];
        public byte[] strSDNSIP = new byte[64];

        public HI_P2P_S_NET_PARAM(byte[] bArr) {
            if (bArr.length >= 332) {
                this.u32Channel = Packet.byteArrayToInt_Little(bArr, 0);
                System.arraycopy(bArr, 4, this.strIPAddr, 0, 64);
                System.arraycopy(bArr, 68, this.strNetMask, 0, 64);
                System.arraycopy(bArr, 132, this.strGateWay, 0, 64);
                System.arraycopy(bArr, 196, this.strFDNSIP, 0, 64);
                System.arraycopy(bArr, 260, this.strSDNSIP, 0, 64);
                this.u32Port = Packet.byteArrayToInt_Little(bArr, 324);
                this.u32DhcpFlag = Packet.byteArrayToInt_Little(bArr, 328);
                if (bArr.length > 332) {
                    this.u32DnsDynFlag = Packet.byteArrayToInt_Little(bArr, 332);
                }
            }
        }
    }

    public static class HI_P2P_S_SD_INFO {
        public int u32Channel;
        public int u32LeftSpace;
        public int u32Space;
        public int u32Status;

        public HI_P2P_S_SD_INFO(byte[] bArr) {
            if (bArr.length >= 16) {
                this.u32Channel = Packet.byteArrayToInt_Little(bArr, 0);
                this.u32Status = Packet.byteArrayToInt_Little(bArr, 4);
                this.u32Space = Packet.byteArrayToInt_Little(bArr, 8);
                this.u32LeftSpace = Packet.byteArrayToInt_Little(bArr, 12);
            }
        }
    }

    public static class HI_P2P_S_VENDOR {
        public byte[] strProduct = new byte[32];
        public byte[] strVendor;

        public HI_P2P_S_VENDOR(byte[] bArr) {
            byte[] bArr2 = new byte[32];
            this.strVendor = bArr2;
            if (bArr.length >= 64) {
                System.arraycopy(bArr, 0, bArr2, 0, 32);
                System.arraycopy(bArr, 32, this.strProduct, 0, 32);
            }
        }
    }

    public static class HI_P2P_S_TIME_ZONE {
        public int s32TimeZone;
        public int u32Channel;
        public int u32DstMode;

        public HI_P2P_S_TIME_ZONE(byte[] bArr) {
            if (bArr.length >= 12) {
                this.u32Channel = Packet.byteArrayToInt_Little(bArr, 0);
                this.s32TimeZone = Packet.byteArrayToInt_Little(bArr, 4);
                this.u32DstMode = Packet.byteArrayToInt_Little(bArr, 8);
            }
        }

        public static byte[] parseContent(int i, int i2, int i3) {
            byte[] bArr = new byte[12];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(i);
            byte[] intToByteArray_Little2 = Packet.intToByteArray_Little(i2);
            byte[] intToByteArray_Little3 = Packet.intToByteArray_Little(i3);
            System.arraycopy(intToByteArray_Little, 0, bArr, 0, 4);
            System.arraycopy(intToByteArray_Little2, 0, bArr, 4, 4);
            System.arraycopy(intToByteArray_Little3, 0, bArr, 8, 4);
            return bArr;
        }
    }

    public static class HI_P2P_S_TIME_ZONE_EXT {
        public byte[] sTimeZone;
        public int u32DstMode;

        public HI_P2P_S_TIME_ZONE_EXT(byte[] bArr) {
            byte[] bArr2 = new byte[32];
            this.sTimeZone = bArr2;
            if (bArr.length >= 36) {
                System.arraycopy(bArr, 0, bArr2, 0, 32);
                this.u32DstMode = Packet.byteArrayToInt_Little(bArr, 32);
            }
        }

        public static byte[] parseContent(byte[] bArr, int i) {
            if (bArr.length > 32) {
                return null;
            }
            byte[] bArr2 = new byte[40];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(i);
            System.arraycopy(bArr, 0, bArr2, 0, bArr.length);
            System.arraycopy(intToByteArray_Little, 0, bArr2, 32, 4);
            return bArr2;
        }
    }

    public static class HI_P2P_S_TIME_PARAM {
        public int u32Day;
        public int u32Hour;
        public int u32Minute;
        public int u32Month;
        public int u32Second;
        public int u32Year;

        public HI_P2P_S_TIME_PARAM(int i, int i2, int i3, int i4, int i5, int i6) {
            this.u32Year = i;
            this.u32Month = i2;
            this.u32Day = i3;
            this.u32Hour = i4;
            this.u32Minute = i5;
            this.u32Second = i6;
        }

        public HI_P2P_S_TIME_PARAM(byte[] bArr) {
            if (bArr.length >= 24) {
                this.u32Year = Packet.byteArrayToInt_Little(bArr, 0);
                this.u32Month = Packet.byteArrayToInt_Little(bArr, 4);
                this.u32Day = Packet.byteArrayToInt_Little(bArr, 8);
                this.u32Hour = Packet.byteArrayToInt_Little(bArr, 12);
                this.u32Minute = Packet.byteArrayToInt_Little(bArr, 16);
                this.u32Second = Packet.byteArrayToInt_Little(bArr, 20);
            }
        }

        public static byte[] parseContent(int i, int i2, int i3, int i4, int i5, int i6) {
            byte[] bArr = new byte[24];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(i);
            byte[] intToByteArray_Little2 = Packet.intToByteArray_Little(i2);
            byte[] intToByteArray_Little3 = Packet.intToByteArray_Little(i3);
            byte[] intToByteArray_Little4 = Packet.intToByteArray_Little(i4);
            byte[] intToByteArray_Little5 = Packet.intToByteArray_Little(i5);
            byte[] intToByteArray_Little6 = Packet.intToByteArray_Little(i6);
            System.arraycopy(intToByteArray_Little, 0, bArr, 0, 4);
            System.arraycopy(intToByteArray_Little2, 0, bArr, 4, 4);
            System.arraycopy(intToByteArray_Little3, 0, bArr, 8, 4);
            System.arraycopy(intToByteArray_Little4, 0, bArr, 12, 4);
            System.arraycopy(intToByteArray_Little5, 0, bArr, 16, 4);
            System.arraycopy(intToByteArray_Little6, 0, bArr, 20, 4);
            return bArr;
        }
    }

    public static class HI_P2P_S_AUDIO_ATTR {
        public int u32AudioType;
        public int u32Channel;
        public int u32Enable;
        public int u32InMode;
        public int u32InVol;
        public int u32OutVol;
        public int u32Stream;

        public static byte[] parseContent(int i, int i2, int i3, int i4, int i5, int i6, int i7) {
            byte[] bArr = new byte[28];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(i);
            byte[] intToByteArray_Little2 = Packet.intToByteArray_Little(i2);
            byte[] intToByteArray_Little3 = Packet.intToByteArray_Little(i3);
            byte[] intToByteArray_Little4 = Packet.intToByteArray_Little(i4);
            byte[] intToByteArray_Little5 = Packet.intToByteArray_Little(i5);
            byte[] intToByteArray_Little6 = Packet.intToByteArray_Little(i6);
            byte[] intToByteArray_Little7 = Packet.intToByteArray_Little(i7);
            System.arraycopy(intToByteArray_Little, 0, bArr, 0, 4);
            System.arraycopy(intToByteArray_Little2, 0, bArr, 4, 4);
            System.arraycopy(intToByteArray_Little3, 0, bArr, 8, 4);
            System.arraycopy(intToByteArray_Little4, 0, bArr, 12, 4);
            System.arraycopy(intToByteArray_Little5, 0, bArr, 16, 4);
            System.arraycopy(intToByteArray_Little6, 0, bArr, 20, 4);
            System.arraycopy(intToByteArray_Little7, 0, bArr, 24, 4);
            return bArr;
        }

        public HI_P2P_S_AUDIO_ATTR(byte[] bArr) {
            if (bArr.length >= 28) {
                this.u32Channel = Packet.byteArrayToInt_Little(bArr, 0);
                this.u32Enable = Packet.byteArrayToInt_Little(bArr, 4);
                this.u32Stream = Packet.byteArrayToInt_Little(bArr, 8);
                this.u32AudioType = Packet.byteArrayToInt_Little(bArr, 12);
                this.u32InMode = Packet.byteArrayToInt_Little(bArr, 16);
                this.u32InVol = Packet.byteArrayToInt_Little(bArr, 20);
                this.u32OutVol = Packet.byteArrayToInt_Little(bArr, 24);
            }
        }
    }

    public static class HI_P2P_CODING_PARAM {
        byte[] sReserved = new byte[8];
        public int u32Channel;
        public int u32Frequency;
        public int u32Profile;

        public HI_P2P_CODING_PARAM(byte[] bArr) {
            if (bArr.length >= 12) {
                this.u32Channel = Packet.byteArrayToInt_Little(bArr, 0);
                this.u32Frequency = Packet.byteArrayToInt_Little(bArr, 4);
                this.u32Profile = Packet.byteArrayToInt_Little(bArr, 8);
            }
        }

        public static byte[] parseContent(int i, int i2, int i3) {
            byte[] bArr = new byte[20];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(i);
            byte[] intToByteArray_Little2 = Packet.intToByteArray_Little(i2);
            byte[] intToByteArray_Little3 = Packet.intToByteArray_Little(i3);
            System.arraycopy(intToByteArray_Little, 0, bArr, 0, 4);
            System.arraycopy(intToByteArray_Little2, 0, bArr, 4, 4);
            System.arraycopy(intToByteArray_Little3, 0, bArr, 8, 4);
            return bArr;
        }
    }

    public static class HI_P2P_SNAP_ALARM {
        public byte[] sReserved = new byte[8];
        public int u32Channel;
        public int u32Chn;
        public int u32Enable;
        public int u32Interval;
        public int u32Number;

        public static byte[] parseContent(int i, int i2, int i3, int i4, int i5) {
            byte[] bArr = new byte[28];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(i);
            byte[] intToByteArray_Little2 = Packet.intToByteArray_Little(i2);
            byte[] intToByteArray_Little3 = Packet.intToByteArray_Little(i3);
            byte[] intToByteArray_Little4 = Packet.intToByteArray_Little(i4);
            byte[] intToByteArray_Little5 = Packet.intToByteArray_Little(i5);
            System.arraycopy(intToByteArray_Little, 0, bArr, 0, 4);
            System.arraycopy(intToByteArray_Little2, 0, bArr, 4, 4);
            System.arraycopy(intToByteArray_Little3, 0, bArr, 8, 4);
            System.arraycopy(intToByteArray_Little4, 0, bArr, 12, 4);
            System.arraycopy(intToByteArray_Little5, 0, bArr, 16, 4);
            return bArr;
        }

        public byte[] parseContent() {
            byte[] bArr = new byte[28];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(this.u32Channel);
            byte[] intToByteArray_Little2 = Packet.intToByteArray_Little(this.u32Enable);
            byte[] intToByteArray_Little3 = Packet.intToByteArray_Little(this.u32Chn);
            byte[] intToByteArray_Little4 = Packet.intToByteArray_Little(this.u32Number);
            byte[] intToByteArray_Little5 = Packet.intToByteArray_Little(this.u32Interval);
            System.arraycopy(intToByteArray_Little, 0, bArr, 0, 4);
            System.arraycopy(intToByteArray_Little2, 0, bArr, 4, 4);
            System.arraycopy(intToByteArray_Little3, 0, bArr, 8, 4);
            System.arraycopy(intToByteArray_Little4, 0, bArr, 12, 4);
            System.arraycopy(intToByteArray_Little5, 0, bArr, 16, 4);
            return bArr;
        }

        public HI_P2P_SNAP_ALARM(byte[] bArr) {
            if (bArr.length >= 20) {
                this.u32Channel = Packet.byteArrayToInt_Little(bArr, 0);
                this.u32Enable = Packet.byteArrayToInt_Little(bArr, 4);
                this.u32Chn = Packet.byteArrayToInt_Little(bArr, 8);
                this.u32Number = Packet.byteArrayToInt_Little(bArr, 12);
                this.u32Interval = Packet.byteArrayToInt_Little(bArr, 16);
            }
        }
    }

    public static class HI_P2P_RESOLUTION {
        public int u32Channel;
        public int u32Resolution;
        public int u32Stream;

        public static byte[] parseContent(int i, int i2) {
            byte[] bArr = new byte[28];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(i);
            byte[] intToByteArray_Little2 = Packet.intToByteArray_Little(i2);
            System.arraycopy(intToByteArray_Little, 0, bArr, 0, 4);
            System.arraycopy(intToByteArray_Little2, 0, bArr, 4, 4);
            return bArr;
        }

        public HI_P2P_RESOLUTION(byte[] bArr) {
            if (bArr.length >= 12) {
                this.u32Channel = Packet.byteArrayToInt_Little(bArr, 0);
                this.u32Stream = Packet.byteArrayToInt_Little(bArr, 4);
                this.u32Resolution = Packet.byteArrayToInt_Little(bArr, 8);
            }
        }
    }

    public static class HI_P2P_S_REC_AUTO_PARAM {
        public int u32Channel;
        public int u32Enable;
        public int u32FileLen;
        public int u32Stream;

        public byte[] parseContent() {
            byte[] bArr = new byte[16];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(this.u32Channel);
            byte[] intToByteArray_Little2 = Packet.intToByteArray_Little(this.u32Enable);
            byte[] intToByteArray_Little3 = Packet.intToByteArray_Little(this.u32FileLen);
            byte[] intToByteArray_Little4 = Packet.intToByteArray_Little(this.u32Stream);
            System.arraycopy(intToByteArray_Little, 0, bArr, 0, 4);
            System.arraycopy(intToByteArray_Little2, 0, bArr, 4, 4);
            System.arraycopy(intToByteArray_Little3, 0, bArr, 8, 4);
            System.arraycopy(intToByteArray_Little4, 0, bArr, 12, 4);
            return bArr;
        }

        public HI_P2P_S_REC_AUTO_PARAM(byte[] bArr) {
            if (bArr.length >= 16) {
                this.u32Channel = Packet.byteArrayToInt_Little(bArr, 0);
                this.u32Enable = Packet.byteArrayToInt_Little(bArr, 4);
                this.u32FileLen = Packet.byteArrayToInt_Little(bArr, 8);
                this.u32Stream = Packet.byteArrayToInt_Little(bArr, 12);
            }
        }
    }

    public static class HI_P2P_QUANTUM_TIME {
        public byte[][] sDayData = (byte[][]) Array.newInstance((Class<?>) byte.class, 7, 49);
        public int u32QtType;

        public HI_P2P_QUANTUM_TIME(byte[] bArr) {
            if (bArr.length >= 347) {
                this.u32QtType = Packet.byteArrayToInt_Little(bArr, 0);
                int i = 4;
                for (int i2 = 0; i2 < 7; i2++) {
                    System.arraycopy(bArr, i, this.sDayData[i2], 0, 49);
                    i += 49;
                }
            }
        }

        public byte[] parseContent() {
            byte[] bArr = new byte[347];
            int i = 4;
            System.arraycopy(Packet.intToByteArray_Little(this.u32QtType), 0, bArr, 0, 4);
            for (int i2 = 0; i2 < 7; i2++) {
                System.arraycopy(this.sDayData[i2], 0, bArr, i, 49);
                i += 49;
            }
            return bArr;
        }
    }

    public static class HI_P2P_S_PTZ_PRESET {
        public int u32Action;
        public int u32Channel;
        public int u32Number;

        public static byte[] parseContent(int i, int i2, int i3) {
            byte[] bArr = new byte[12];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(i);
            byte[] intToByteArray_Little2 = Packet.intToByteArray_Little(i2);
            byte[] intToByteArray_Little3 = Packet.intToByteArray_Little(i3);
            System.arraycopy(intToByteArray_Little, 0, bArr, 0, 4);
            System.arraycopy(intToByteArray_Little2, 0, bArr, 4, 4);
            System.arraycopy(intToByteArray_Little3, 0, bArr, 8, 4);
            return bArr;
        }
    }

    public static class HI_P2P_S_EMAIL_PARAM {
        public int u32Auth;
        public int u32Channel;
        public int u32LoginType;
        public int u32Port;
        public byte[] strSvr = new byte[64];
        public byte[] strUsernm = new byte[64];
        public byte[] strPasswd = new byte[64];
        public byte[] strFrom = new byte[64];
        public byte[][] strTo = (byte[][]) Array.newInstance((Class<?>) byte.class, 3, 64);
        public byte[] strSubject = new byte[128];
        public byte[] strText = new byte[256];

        public HI_P2P_S_EMAIL_PARAM(byte[] bArr) {
            if (bArr.length >= 848) {
                this.u32Channel = Packet.byteArrayToInt_Little(bArr, 0);
                System.arraycopy(bArr, 4, this.strSvr, 0, 64);
                this.u32Port = Packet.byteArrayToInt_Little(bArr, 68);
                this.u32Auth = Packet.byteArrayToInt_Little(bArr, 72);
                this.u32LoginType = Packet.byteArrayToInt_Little(bArr, 76);
                System.arraycopy(bArr, 80, this.strUsernm, 0, 64);
                System.arraycopy(bArr, 144, this.strPasswd, 0, 64);
                System.arraycopy(bArr, AdEventType.VIDEO_CLICKED, this.strFrom, 0, 64);
                int i = 272;
                for (int i2 = 0; i2 < 3; i2++) {
                    System.arraycopy(bArr, i, this.strTo[i2], 0, 64);
                    i += 64;
                }
                System.arraycopy(bArr, i, this.strSubject, 0, 128);
                System.arraycopy(bArr, i + 128, this.strText, 0, 256);
            }
        }

        public byte[] parseContent() {
            byte[] bArr = new byte[848];
            System.arraycopy(Packet.intToByteArray_Little(this.u32Channel), 0, bArr, 0, 4);
            System.arraycopy(this.strSvr, 0, bArr, 4, 64);
            System.arraycopy(Packet.intToByteArray_Little(this.u32Port), 0, bArr, 68, 4);
            System.arraycopy(Packet.intToByteArray_Little(this.u32Auth), 0, bArr, 72, 4);
            System.arraycopy(Packet.intToByteArray_Little(this.u32LoginType), 0, bArr, 76, 4);
            System.arraycopy(this.strUsernm, 0, bArr, 80, 64);
            System.arraycopy(this.strPasswd, 0, bArr, 144, 64);
            System.arraycopy(this.strFrom, 0, bArr, AdEventType.VIDEO_CLICKED, 64);
            int i = 272;
            for (int i2 = 0; i2 < 3; i2++) {
                System.arraycopy(this.strTo[i2], 0, bArr, i, 64);
                i += 64;
            }
            System.arraycopy(this.strSubject, 0, bArr, i, 128);
            byte[] bArr2 = this.strText;
            System.arraycopy(bArr2, 0, bArr, i + 128, bArr2.length);
            int length = this.strText.length;
            return bArr;
        }

        public void setStrSvr(String str) {
            if (str != null) {
                byte[] bytes = str.getBytes();
                Arrays.fill(this.strSvr, (byte) 0);
                System.arraycopy(bytes, 0, this.strSvr, 0, bytes.length <= 64 ? bytes.length : 64);
            }
        }

        public void setStrUsernm(String str) {
            if (str != null) {
                byte[] bytes = str.getBytes();
                Arrays.fill(this.strUsernm, (byte) 0);
                System.arraycopy(bytes, 0, this.strUsernm, 0, bytes.length <= 64 ? bytes.length : 64);
            }
        }

        public void setStrPasswd(String str) {
            if (str != null) {
                byte[] bytes = str.getBytes();
                Arrays.fill(this.strPasswd, (byte) 0);
                System.arraycopy(bytes, 0, this.strPasswd, 0, bytes.length <= 64 ? bytes.length : 64);
            }
        }

        public void setStrFrom(String str) {
            if (str != null) {
                byte[] bytes = str.getBytes();
                Arrays.fill(this.strFrom, (byte) 0);
                System.arraycopy(bytes, 0, this.strFrom, 0, bytes.length <= 64 ? bytes.length : 64);
            }
        }

        public void setStrTo(String str) {
            if (str != null) {
                byte[] bytes = str.getBytes();
                Arrays.fill(this.strTo[0], (byte) 0);
                System.arraycopy(bytes, 0, this.strTo[0], 0, bytes.length <= 64 ? bytes.length : 64);
            }
        }

        public void setStrSubject(String str) {
            if (str != null) {
                byte[] bytes = str.getBytes();
                Arrays.fill(this.strSubject, (byte) 0);
                System.arraycopy(bytes, 0, this.strSubject, 0, bytes.length <= 128 ? bytes.length : 128);
            }
        }

        public void setStrText(String str) {
            if (str != null) {
                byte[] bytes = str.getBytes();
                Arrays.fill(this.strText, (byte) 0);
                System.arraycopy(bytes, 0, this.strText, 0, bytes.length <= 256 ? bytes.length : 256);
            }
        }
    }

    public static class HI_P2P_S_EMAIL_PARAM_EXT {
        public HI_P2P_S_EMAIL_PARAM email_param;
        byte[] strReserved = new byte[8];
        public int u32Check;

        public static byte[] parseContent(HI_P2P_S_EMAIL_PARAM hi_p2p_s_email_param, int i) {
            byte[] bArr = new byte[860];
            System.arraycopy(hi_p2p_s_email_param.parseContent(), 0, bArr, 0, 848);
            System.arraycopy(Packet.intToByteArray_Little(i), 0, bArr, 848, 4);
            return bArr;
        }
    }

    public static class HI_P2P_S_EMAIL_PARAM_NEWPWD255_EXT {
        public int u32Auth;
        public int u32Channel;
        public int u32LoginType;
        public int u32Port;
        public byte[] strSvr = new byte[64];
        public byte[] strUsernm = new byte[128];
        public byte[] strPasswd = new byte[256];
        public byte[] strFrom = new byte[64];
        public byte[][] strTo = (byte[][]) Array.newInstance((Class<?>) byte.class, 3, 64);
        public byte[] strSubject = new byte[128];
        public byte[] strText = new byte[128];

        public HI_P2P_S_EMAIL_PARAM_NEWPWD255_EXT(byte[] bArr) {
            if (bArr.length >= 976) {
                this.u32Channel = Packet.byteArrayToInt_Little(bArr, 0);
                System.arraycopy(bArr, 4, this.strSvr, 0, 64);
                this.u32Port = Packet.byteArrayToInt_Little(bArr, 68);
                this.u32Auth = Packet.byteArrayToInt_Little(bArr, 72);
                this.u32LoginType = Packet.byteArrayToInt_Little(bArr, 76);
                System.arraycopy(bArr, 80, this.strUsernm, 0, 128);
                System.arraycopy(bArr, AdEventType.VIDEO_CLICKED, this.strPasswd, 0, 256);
                System.arraycopy(bArr, 464, this.strFrom, 0, 64);
                int i = 528;
                for (int i2 = 0; i2 < 3; i2++) {
                    System.arraycopy(bArr, i, this.strTo[i2], 0, 64);
                    i += 64;
                }
                System.arraycopy(bArr, i, this.strSubject, 0, 128);
                System.arraycopy(bArr, i + 128, this.strText, 0, 128);
            }
        }

        public byte[] parseContent() {
            byte[] bArr = new byte[976];
            System.arraycopy(Packet.intToByteArray_Little(this.u32Channel), 0, bArr, 0, 4);
            System.arraycopy(this.strSvr, 0, bArr, 4, 64);
            System.arraycopy(Packet.intToByteArray_Little(this.u32Port), 0, bArr, 68, 4);
            System.arraycopy(Packet.intToByteArray_Little(this.u32Auth), 0, bArr, 72, 4);
            System.arraycopy(Packet.intToByteArray_Little(this.u32LoginType), 0, bArr, 76, 4);
            System.arraycopy(this.strUsernm, 0, bArr, 80, 128);
            System.arraycopy(this.strPasswd, 0, bArr, AdEventType.VIDEO_CLICKED, 256);
            System.arraycopy(this.strFrom, 0, bArr, 464, 64);
            int i = 528;
            for (int i2 = 0; i2 < 3; i2++) {
                System.arraycopy(this.strTo[i2], 0, bArr, i, 64);
                i += 64;
            }
            System.arraycopy(this.strSubject, 0, bArr, i, 128);
            byte[] bArr2 = this.strText;
            System.arraycopy(bArr2, 0, bArr, i + 128, bArr2.length);
            int length = this.strText.length;
            return bArr;
        }

        public void setStrSvr(String str) {
            if (str != null) {
                byte[] bytes = str.getBytes();
                Arrays.fill(this.strSvr, (byte) 0);
                System.arraycopy(bytes, 0, this.strSvr, 0, bytes.length <= 64 ? bytes.length : 64);
            }
        }

        public void setStrUsernm(String str) {
            if (str != null) {
                byte[] bytes = str.getBytes();
                Arrays.fill(this.strUsernm, (byte) 0);
                System.arraycopy(bytes, 0, this.strUsernm, 0, bytes.length <= 128 ? bytes.length : 128);
            }
        }

        public void setStrPasswd(String str) {
            if (str != null) {
                byte[] bytes = str.getBytes();
                Arrays.fill(this.strPasswd, (byte) 0);
                System.arraycopy(bytes, 0, this.strPasswd, 0, bytes.length <= 256 ? bytes.length : 256);
            }
        }

        public void setStrFrom(String str) {
            if (str != null) {
                byte[] bytes = str.getBytes();
                Arrays.fill(this.strFrom, (byte) 0);
                System.arraycopy(bytes, 0, this.strFrom, 0, bytes.length <= 64 ? bytes.length : 64);
            }
        }

        public void setStrTo(String str) {
            if (str != null) {
                byte[] bytes = str.getBytes();
                Arrays.fill(this.strTo[0], (byte) 0);
                System.arraycopy(bytes, 0, this.strTo[0], 0, bytes.length <= 64 ? bytes.length : 64);
            }
        }

        public void setStrSubject(String str) {
            if (str != null) {
                byte[] bytes = str.getBytes();
                Arrays.fill(this.strSubject, (byte) 0);
                System.arraycopy(bytes, 0, this.strSubject, 0, bytes.length <= 128 ? bytes.length : 128);
            }
        }

        public void setStrText(String str) {
            if (str != null) {
                byte[] bytes = str.getBytes();
                Arrays.fill(this.strText, (byte) 0);
                System.arraycopy(bytes, 0, this.strText, 0, bytes.length <= 128 ? bytes.length : 128);
            }
        }
    }

    public static class HI_P2P_S_EMAIL_PARAM_EXT_NEWPWD255_EXT {
        public HI_P2P_S_EMAIL_PARAM_NEWPWD255_EXT email_param;
        byte[] strReserved = new byte[8];
        public int u32Check;

        public static byte[] parseContent(HI_P2P_S_EMAIL_PARAM_NEWPWD255_EXT hi_p2p_s_email_param_newpwd255_ext, int i) {
            byte[] bArr = new byte[988];
            System.arraycopy(hi_p2p_s_email_param_newpwd255_ext.parseContent(), 0, bArr, 0, 976);
            System.arraycopy(Packet.intToByteArray_Little(i), 0, bArr, 976, 4);
            return bArr;
        }
    }

    public static class HI_P2P_S_FTP_PARAM {
        public int u32Channel;
        public int u32Port;
        public byte[] strSvr = new byte[64];
        public byte[] strUsernm = new byte[64];
        public byte[] strPasswd = new byte[64];
        public byte[] strFilePath = new byte[256];

        public HI_P2P_S_FTP_PARAM(byte[] bArr) {
            if (bArr.length >= 456) {
                this.u32Channel = Packet.byteArrayToInt_Little(bArr, 0);
                System.arraycopy(bArr, 4, this.strSvr, 0, 64);
                this.u32Port = Packet.byteArrayToInt_Little(bArr, 68);
                System.arraycopy(bArr, 72, this.strUsernm, 0, 64);
                System.arraycopy(bArr, 136, this.strPasswd, 0, 64);
                System.arraycopy(bArr, 200, this.strFilePath, 0, 256);
            }
        }

        public byte[] parseContent() {
            byte[] bArr = new byte[456];
            System.arraycopy(Packet.intToByteArray_Little(this.u32Channel), 0, bArr, 0, 4);
            System.arraycopy(this.strSvr, 0, bArr, 4, 64);
            System.arraycopy(Packet.intToByteArray_Little(this.u32Port), 0, bArr, 68, 4);
            System.arraycopy(this.strUsernm, 0, bArr, 72, 64);
            System.arraycopy(this.strPasswd, 0, bArr, 136, 64);
            System.arraycopy(this.strFilePath, 0, bArr, 200, 256);
            return bArr;
        }

        public void setStrSvr(String str) {
            if (str != null) {
                byte[] bytes = str.getBytes();
                Arrays.fill(this.strSvr, (byte) 0);
                System.arraycopy(bytes, 0, this.strSvr, 0, bytes.length <= 64 ? bytes.length : 64);
            }
        }

        public void setStrUsernm(String str) {
            if (str != null) {
                byte[] bytes = str.getBytes();
                Arrays.fill(this.strUsernm, (byte) 0);
                System.arraycopy(bytes, 0, this.strUsernm, 0, bytes.length <= 64 ? bytes.length : 64);
            }
        }

        public void setStrPasswd(String str) {
            if (str != null) {
                byte[] bytes = str.getBytes();
                Arrays.fill(this.strPasswd, (byte) 0);
                System.arraycopy(bytes, 0, this.strPasswd, 0, bytes.length <= 64 ? bytes.length : 64);
            }
        }

        public void setStrFilePath(String str) {
            if (str != null) {
                byte[] bytes = str.getBytes();
                Arrays.fill(this.strFilePath, (byte) 0);
                System.arraycopy(bytes, 0, this.strFilePath, 0, bytes.length <= 256 ? bytes.length : 256);
            }
        }
    }

    public static class HI_P2P_S_FTP_PARAM_EXT {
        public int u32Channel;
        public int u32Check;
        public int u32CreatePath;
        public int u32Mode;
        public int u32Port;
        public byte[] strSvr = new byte[64];
        public byte[] strUsernm = new byte[64];
        public byte[] strPasswd = new byte[64];
        public byte[] strFilePath = new byte[256];
        public byte[] strReserved = new byte[8];

        public HI_P2P_S_FTP_PARAM_EXT(byte[] bArr) {
            if (bArr.length >= 476) {
                this.u32Channel = Packet.byteArrayToInt_Little(bArr, 0);
                System.arraycopy(bArr, 4, this.strSvr, 0, 64);
                this.u32Port = Packet.byteArrayToInt_Little(bArr, 68);
                this.u32Mode = Packet.byteArrayToInt_Little(bArr, 72);
                System.arraycopy(bArr, 76, this.strUsernm, 0, 64);
                System.arraycopy(bArr, 140, this.strPasswd, 0, 64);
                System.arraycopy(bArr, 204, this.strFilePath, 0, 256);
                this.u32CreatePath = Packet.byteArrayToInt_Little(bArr, 460);
                this.u32Check = Packet.byteArrayToInt_Little(bArr, 464);
                System.arraycopy(bArr, 468, this.strReserved, 0, 8);
            }
        }

        public byte[] parseContent() {
            byte[] bArr = new byte[476];
            System.arraycopy(Packet.intToByteArray_Little(this.u32Channel), 0, bArr, 0, 4);
            System.arraycopy(this.strSvr, 0, bArr, 4, 64);
            System.arraycopy(Packet.intToByteArray_Little(this.u32Port), 0, bArr, 68, 4);
            System.arraycopy(Packet.intToByteArray_Little(this.u32Mode), 0, bArr, 72, 4);
            System.arraycopy(this.strUsernm, 0, bArr, 76, 64);
            System.arraycopy(this.strPasswd, 0, bArr, 140, 64);
            System.arraycopy(this.strFilePath, 0, bArr, 204, 256);
            System.arraycopy(Packet.intToByteArray_Little(this.u32CreatePath), 0, bArr, 460, 4);
            System.arraycopy(Packet.intToByteArray_Little(this.u32Check), 0, bArr, 464, 4);
            System.arraycopy(this.strReserved, 0, bArr, 468, 8);
            return bArr;
        }

        public void setStrSvr(String str) {
            if (str != null) {
                byte[] bytes = str.getBytes();
                Arrays.fill(this.strSvr, (byte) 0);
                System.arraycopy(bytes, 0, this.strSvr, 0, bytes.length <= 64 ? bytes.length : 64);
            }
        }

        public void setStrUsernm(String str) {
            if (str != null) {
                byte[] bytes = str.getBytes();
                Arrays.fill(this.strUsernm, (byte) 0);
                System.arraycopy(bytes, 0, this.strUsernm, 0, bytes.length <= 64 ? bytes.length : 64);
            }
        }

        public void setStrPasswd(String str) {
            if (str != null) {
                byte[] bytes = str.getBytes();
                Arrays.fill(this.strPasswd, (byte) 0);
                System.arraycopy(bytes, 0, this.strPasswd, 0, bytes.length <= 64 ? bytes.length : 64);
            }
        }

        public void setStrFilePath(String str) {
            if (str != null) {
                byte[] bytes = str.getBytes();
                Arrays.fill(this.strFilePath, (byte) 0);
                System.arraycopy(bytes, 0, this.strFilePath, 0, bytes.length <= 256 ? bytes.length : 256);
            }
        }
    }

    public static class HI_P2P_S_FTP_PARAM_EXT_NEWPWD255_EXT {
        public int u32Channel;
        public int u32Check;
        public int u32CreatePath;
        public int u32Mode;
        public int u32Port;
        public byte[] strSvr = new byte[64];
        public byte[] strUsernm = new byte[128];
        public byte[] strPasswd = new byte[256];
        public byte[] strFilePath = new byte[256];
        public byte[] strReserved = new byte[8];

        public HI_P2P_S_FTP_PARAM_EXT_NEWPWD255_EXT(byte[] bArr) {
            if (bArr.length >= 732) {
                this.u32Channel = Packet.byteArrayToInt_Little(bArr, 0);
                System.arraycopy(bArr, 4, this.strSvr, 0, 64);
                this.u32Port = Packet.byteArrayToInt_Little(bArr, 68);
                this.u32Mode = Packet.byteArrayToInt_Little(bArr, 72);
                System.arraycopy(bArr, 76, this.strUsernm, 0, 128);
                System.arraycopy(bArr, 204, this.strPasswd, 0, 256);
                System.arraycopy(bArr, 460, this.strFilePath, 0, 256);
                this.u32CreatePath = Packet.byteArrayToInt_Little(bArr, 716);
                this.u32Check = Packet.byteArrayToInt_Little(bArr, 720);
                System.arraycopy(bArr, 724, this.strReserved, 0, 8);
            }
        }

        public byte[] parseContent() {
            byte[] bArr = new byte[732];
            System.arraycopy(Packet.intToByteArray_Little(this.u32Channel), 0, bArr, 0, 4);
            System.arraycopy(this.strSvr, 0, bArr, 4, 64);
            System.arraycopy(Packet.intToByteArray_Little(this.u32Port), 0, bArr, 68, 4);
            System.arraycopy(Packet.intToByteArray_Little(this.u32Mode), 0, bArr, 72, 4);
            System.arraycopy(this.strUsernm, 0, bArr, 76, 128);
            System.arraycopy(this.strPasswd, 0, bArr, 204, 256);
            System.arraycopy(this.strFilePath, 0, bArr, 460, 256);
            System.arraycopy(Packet.intToByteArray_Little(this.u32CreatePath), 0, bArr, 716, 4);
            System.arraycopy(Packet.intToByteArray_Little(this.u32Check), 0, bArr, 720, 4);
            System.arraycopy(this.strReserved, 0, bArr, 724, 8);
            return bArr;
        }

        public void setStrSvr(String str) {
            if (str != null) {
                byte[] bytes = str.getBytes();
                Arrays.fill(this.strSvr, (byte) 0);
                System.arraycopy(bytes, 0, this.strSvr, 0, bytes.length <= 64 ? bytes.length : 64);
            }
        }

        public void setStrUsernm(String str) {
            if (str != null) {
                byte[] bytes = str.getBytes();
                Arrays.fill(this.strUsernm, (byte) 0);
                System.arraycopy(bytes, 0, this.strUsernm, 0, bytes.length <= 128 ? bytes.length : 128);
            }
        }

        public void setStrPasswd(String str) {
            if (str != null) {
                byte[] bytes = str.getBytes();
                Arrays.fill(this.strPasswd, (byte) 0);
                System.arraycopy(bytes, 0, this.strPasswd, 0, bytes.length <= 256 ? bytes.length : 256);
            }
        }

        public void setStrFilePath(String str) {
            if (str != null) {
                byte[] bytes = str.getBytes();
                Arrays.fill(this.strFilePath, (byte) 0);
                System.arraycopy(bytes, 0, this.strFilePath, 0, bytes.length <= 256 ? bytes.length : 256);
            }
        }
    }

    public static class HI_P2P_FUNCTION {
        public byte[] s32Function;

        public HI_P2P_FUNCTION(byte[] bArr) {
            byte[] bArr2 = new byte[256];
            this.s32Function = bArr2;
            System.arraycopy(bArr, 0, bArr2, 0, bArr.length < 256 ? bArr.length : 256);
        }
    }

    public static class HI_P2P_EVENT {
        public int u32Channel;
        public int u32Event;
        public int u32Time;
        public byte[] sType = new byte[16];
        public byte[] sReserved = new byte[16];

        public HI_P2P_EVENT(byte[] bArr) {
            if (bArr.length >= 28) {
                this.u32Channel = Packet.byteArrayToInt_Little(bArr, 0);
                this.u32Time = Packet.byteArrayToInt_Little(bArr, 4);
                this.u32Event = Packet.byteArrayToInt_Little(bArr, 8);
                System.arraycopy(bArr, 12, this.sType, 0, 16);
            }
        }
    }

    public static class HI_P2P_S_INFRARED {
        public int u32Channel;
        public int u32State;

        public HI_P2P_S_INFRARED(byte[] bArr) {
            if (bArr.length >= 8) {
                this.u32Channel = Packet.byteArrayToInt_Little(bArr, 0);
                this.u32State = Packet.byteArrayToInt_Little(bArr, 4);
            }
        }

        public static byte[] parseContent(int i, int i2) {
            byte[] bArr = new byte[8];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(i);
            byte[] intToByteArray_Little2 = Packet.intToByteArray_Little(i2);
            System.arraycopy(intToByteArray_Little, 0, bArr, 0, 4);
            System.arraycopy(intToByteArray_Little2, 0, bArr, 4, 4);
            return bArr;
        }

        public byte[] parseContent() {
            byte[] bArr = new byte[8];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(this.u32Channel);
            byte[] intToByteArray_Little2 = Packet.intToByteArray_Little(this.u32State);
            System.arraycopy(intToByteArray_Little, 0, bArr, 0, 4);
            System.arraycopy(intToByteArray_Little2, 0, bArr, 4, 4);
            return bArr;
        }
    }

    public static class HI_P2P_GET_UUID_CRCKEY {
        public byte[] szCrcKet = new byte[128];
        public byte[] szUID;

        public HI_P2P_GET_UUID_CRCKEY(byte[] bArr) {
            byte[] bArr2 = new byte[32];
            this.szUID = bArr2;
            if (bArr.length >= 160) {
                System.arraycopy(bArr, 0, bArr2, 0, 32);
                System.arraycopy(bArr, 32, this.szCrcKet, 0, 128);
            }
        }
    }

    public static class HI_P2P_GET_DEV_INFO_EXT {
        public int s32SDFreeSpace;
        public int s32SDStatus;
        public int s32SDTotalSpace;
        public int sUserNum;
        public int u32Channel;
        public int u32NetType;
        public byte[] strCableMAC = new byte[32];
        public byte[] strWifiMAC = new byte[32];
        public byte[] aszSystemSoftVersion = new byte[64];
        public byte[] strHardVer = new byte[32];
        public byte[] aszSystemName = new byte[40];
        public byte[] aszSystemModel = new byte[40];
        public byte[] aszStartDate = new byte[40];
        public byte[] aszWebVersion = new byte[64];
        public byte[] sReserved = new byte[8];

        public HI_P2P_GET_DEV_INFO_EXT(byte[] bArr) {
            if (bArr.length >= 376) {
                this.u32Channel = Packet.byteArrayToInt_Little(bArr, 0);
                System.arraycopy(bArr, 4, this.strCableMAC, 0, 32);
                System.arraycopy(bArr, 36, this.strWifiMAC, 0, 32);
                this.u32NetType = Packet.byteArrayToInt_Little(bArr, 68);
                System.arraycopy(bArr, 72, this.aszSystemSoftVersion, 0, 64);
                System.arraycopy(bArr, 136, this.strHardVer, 0, 32);
                System.arraycopy(bArr, 168, this.aszSystemName, 0, 40);
                this.sUserNum = Packet.byteArrayToInt_Little(bArr, AdEventType.VIDEO_CLICKED);
                System.arraycopy(bArr, AdEventType.VIDEO_PRELOADED, this.aszSystemModel, 0, 40);
                System.arraycopy(bArr, 252, this.aszStartDate, 0, 40);
                this.s32SDStatus = Packet.byteArrayToInt_Little(bArr, 292);
                this.s32SDFreeSpace = Packet.byteArrayToInt_Little(bArr, 296);
                this.s32SDTotalSpace = Packet.byteArrayToInt_Little(bArr, 300);
                System.arraycopy(bArr, 304, this.sReserved, 0, 8);
            }
        }
    }

    public static class HI_P2P_S_SET_DOWNLOAD {
        byte[] sFileName = new byte[128];
        int u32Channel;

        public static byte[] parseContent(int i, byte[] bArr) {
            byte[] bArr2 = new byte[132];
            System.arraycopy(Packet.intToByteArray_Little(i), 0, bArr2, 0, 4);
            System.arraycopy(bArr, 0, bArr2, 4, 128);
            return bArr2;
        }
    }

    public static class HI_P2P_WHITE_LIGHT_INFO {
        public byte[] sReserved = new byte[4];
        public int u32Chn;
        public int u32State;

        public static byte[] parseContent(int i, int i2) {
            byte[] bArr = new byte[12];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(i);
            byte[] intToByteArray_Little2 = Packet.intToByteArray_Little(i2);
            System.arraycopy(intToByteArray_Little, 0, bArr, 0, 4);
            System.arraycopy(intToByteArray_Little2, 0, bArr, 4, 4);
            return bArr;
        }

        public HI_P2P_WHITE_LIGHT_INFO(byte[] bArr) {
            if (bArr.length >= 8) {
                this.u32Chn = Packet.byteArrayToInt_Little(bArr, 0);
                this.u32State = Packet.byteArrayToInt_Little(bArr, 4);
            }
        }
    }

    public static class HI_P2P_PB_SETPOS_REQ {
        public static byte[] parseContent(int i, int i2, byte[] bArr) {
            int i3;
            byte[] bArr2 = new byte[20];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(i);
            byte[] intToByteArray_Little2 = Packet.intToByteArray_Little(i2);
            byte b = 0;
            System.arraycopy(intToByteArray_Little, 0, bArr2, 0, 4);
            System.arraycopy(intToByteArray_Little2, 0, bArr2, 4, 4);
            System.arraycopy(bArr, 0, bArr2, 8, bArr.length);
            int rawOffset = (int) ((TimeZone.getDefault().getRawOffset() / 3600) / 10);
            int i4 = rawOffset % 100;
            if (rawOffset > 0 && i4 == 0) {
                i3 = rawOffset / 100;
            } else if (rawOffset <= 0 && i4 == 0) {
                i3 = ((-rawOffset) / 100) + 24;
            } else {
                if (rawOffset <= 0 || i4 != 50) {
                    if (rawOffset <= 0 && i4 == -50) {
                        i3 = ((-rawOffset) / 100) + 48;
                    }
                    bArr2[16] = b;
                    return bArr2;
                }
                i3 = (rawOffset / 100) + 72;
            }
            b = (byte) i3;
            bArr2[16] = b;
            return bArr2;
        }
    }

    public static class HI_P2P_INPUT_ALARM_INFO {
        public byte[] sReserved = new byte[4];
        public int u32Chn;
        public int u32Enable;
        public int u32State;

        public static byte[] parseContent(int i, int i2, int i3) {
            byte[] bArr = new byte[16];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(i);
            byte[] intToByteArray_Little2 = Packet.intToByteArray_Little(i2);
            byte[] intToByteArray_Little3 = Packet.intToByteArray_Little(i3);
            System.arraycopy(intToByteArray_Little, 0, bArr, 0, 4);
            System.arraycopy(intToByteArray_Little2, 0, bArr, 4, 4);
            System.arraycopy(intToByteArray_Little3, 0, bArr, 8, 4);
            return bArr;
        }

        public HI_P2P_INPUT_ALARM_INFO(byte[] bArr) {
            if (bArr.length >= 12) {
                this.u32Chn = Packet.byteArrayToInt_Little(bArr, 0);
                this.u32Enable = Packet.byteArrayToInt_Little(bArr, 4);
                this.u32State = Packet.byteArrayToInt_Little(bArr, 8);
            }
        }
    }

    public static class HI_P2P_WHITE_LIGHT_INFO_EXT {
        public byte[] sReserved = new byte[4];
        public int u32Chn;
        public int u32State;

        public static byte[] parseContent(int i, int i2) {
            byte[] bArr = new byte[12];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(i);
            byte[] intToByteArray_Little2 = Packet.intToByteArray_Little(i2);
            System.arraycopy(intToByteArray_Little, 0, bArr, 0, 4);
            System.arraycopy(intToByteArray_Little2, 0, bArr, 4, 4);
            return bArr;
        }

        public HI_P2P_WHITE_LIGHT_INFO_EXT(byte[] bArr) {
            if (bArr.length >= 8) {
                this.u32Chn = Packet.byteArrayToInt_Little(bArr, 0);
                this.u32State = Packet.byteArrayToInt_Little(bArr, 4);
            }
        }
    }

    public static class HI_P2P_PRESET_STATUS_INFO {
        public int u32Chn;
        public int u32PresetNum;
        public byte[] szPresetStatus = new byte[16];
        public byte[] sReserved = new byte[4];

        public static byte[] parseContent(int i, int i2, byte[] bArr) {
            byte[] bArr2 = new byte[28];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(i);
            byte[] intToByteArray_Little2 = Packet.intToByteArray_Little(i2);
            System.arraycopy(intToByteArray_Little, 0, bArr2, 0, 4);
            System.arraycopy(intToByteArray_Little2, 0, bArr2, 4, 4);
            System.arraycopy(bArr, 0, bArr2, 8, 16);
            return bArr2;
        }

        public HI_P2P_PRESET_STATUS_INFO(byte[] bArr) {
            if (bArr.length >= 24) {
                this.u32Chn = Packet.byteArrayToInt_Little(bArr, 0);
                this.u32PresetNum = Packet.byteArrayToInt_Little(bArr, 4);
                System.arraycopy(bArr, 8, this.szPresetStatus, 0, 16);
            }
        }
    }

    public static class HI_P2P_ALARM_REC_LEN_INFO {
        public byte[] sReserved = new byte[3];
        public int u32Chn;
        public byte u8FileLen;

        public byte[] parseContent() {
            byte[] bArr = new byte[11];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(this.u32Chn);
            byte b = this.u8FileLen;
            System.arraycopy(intToByteArray_Little, 0, bArr, 0, 4);
            bArr[4] = b;
            return bArr;
        }

        public static byte[] parseContent(int i, int i2) {
            byte[] bArr = new byte[11];
            System.arraycopy(Packet.intToByteArray_Little(i), 0, bArr, 0, 4);
            bArr[4] = (byte) (i2 & 255);
            return bArr;
        }

        public HI_P2P_ALARM_REC_LEN_INFO(byte[] bArr) {
            if (bArr.length >= 5) {
                this.u32Chn = Packet.byteArrayToInt_Little(bArr, 0);
                this.u8FileLen = bArr[4];
            }
        }
    }

    public static class HI_P2P_START_REC_UPLOAD_REQ_EXT {
        int eFlag;
        STimeDay sStartTime;
        byte[] sReserved = new byte[4];
        int u32Chn = 0;

        public HI_P2P_START_REC_UPLOAD_REQ_EXT(STimeDay sTimeDay, int i) {
            this.sStartTime = sTimeDay;
            this.eFlag = i;
        }

        public byte[] parseContent() {
            byte[] bArr = new byte[20];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(this.u32Chn);
            byte[] parseContent = this.sStartTime.parseContent();
            byte[] intToByteArray_Little2 = Packet.intToByteArray_Little(this.eFlag);
            System.arraycopy(intToByteArray_Little, 0, bArr, 0, 4);
            System.arraycopy(parseContent, 0, bArr, 4, 8);
            System.arraycopy(intToByteArray_Little2, 0, bArr, 12, 4);
            return bArr;
        }
    }

    public static class HI_P2P_START_REC_UPLOAD_RESP_EXT {
        public byte[] sReserved = new byte[2];
        public short u16VideoHeight;
        public short u16VideoWidth;
        public int u32FileSize;
        public byte u8AudioType;
        public byte u8Bit;
        public byte u8Channel;
        public byte u8FileType;
        public byte u8Sample;
        public byte videotype;

        public HI_P2P_START_REC_UPLOAD_RESP_EXT(byte[] bArr) {
            if (bArr.length >= 13) {
                this.u32FileSize = Packet.byteArrayToInt_Little(bArr, 0);
                this.u16VideoWidth = Packet.byteArrayToShort_Little(bArr, 4);
                this.u16VideoHeight = Packet.byteArrayToShort_Little(bArr, 6);
                this.u8AudioType = bArr[8];
                this.u8Sample = bArr[9];
                this.u8Bit = bArr[10];
                this.u8Channel = bArr[11];
                this.u8FileType = bArr[12];
                this.videotype = bArr[13];
            }
        }
    }

    public static class HI_P2P_REC_FILE_STREAM_HEAD {
        public byte sFileFlag;
        public byte[] sReserved;
        public int u32Flag;
        public int u32Size;

        public HI_P2P_REC_FILE_STREAM_HEAD(byte[] bArr) {
            this.sReserved = new byte[3];
            if (bArr.length >= 9) {
                this.u32Flag = Packet.byteArrayToInt_Little(bArr, 0);
                this.u32Size = Packet.byteArrayToInt_Little(bArr, 4);
                this.sFileFlag = bArr[8];
            }
        }

        public HI_P2P_REC_FILE_STREAM_HEAD() {
            this.sReserved = new byte[3];
        }

        public void setData(byte[] bArr) {
            if (bArr.length >= 9) {
                this.u32Flag = Packet.byteArrayToInt_Little(bArr, 0);
                this.u32Size = Packet.byteArrayToInt_Little(bArr, 4);
                this.sFileFlag = bArr[8];
            }
        }
    }

    public static class HI_P2P_STOP_REC_UPLOAD_REQ {
        byte[] sReserved = new byte[4];
        int u32Chn;

        public static byte[] parseContent(int i) {
            byte[] bArr = new byte[8];
            System.arraycopy(Packet.intToByteArray_Little(i), 0, bArr, 0, 4);
            return bArr;
        }
    }

    public static class HI_S_VideoHeader {
        public int u32Height;
        public int u32Width;

        public HI_S_VideoHeader(byte[] bArr, int i) {
            if (bArr.length >= i + 8) {
                this.u32Width = Packet.byteArrayToInt_Little(bArr, i + 0);
                this.u32Height = Packet.byteArrayToInt_Little(bArr, i + 4);
            }
        }

        public static byte[] parseContent(int i, int i2) {
            byte[] bArr = new byte[8];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(i);
            byte[] intToByteArray_Little2 = Packet.intToByteArray_Little(i2);
            System.arraycopy(intToByteArray_Little, 0, bArr, 0, 4);
            System.arraycopy(intToByteArray_Little2, 0, bArr, 4, 4);
            return bArr;
        }

        public byte[] parseContent() {
            return parseContent(this.u32Width, this.u32Height);
        }
    }

    public static class HI_S_AudioHeader {
        public int u32Format;

        public HI_S_AudioHeader(byte[] bArr, int i) {
            if (bArr.length >= i + 4) {
                this.u32Format = Packet.byteArrayToInt_Little(bArr, i + 0);
            }
        }

        public static byte[] parseContent(int i) {
            byte[] bArr = new byte[4];
            System.arraycopy(Packet.intToByteArray_Little(i), 0, bArr, 0, 4);
            return bArr;
        }

        public byte[] parseContent() {
            return parseContent(this.u32Format);
        }
    }

    public static class HI_S_SysHeader {
        public HI_S_AudioHeader struAHeader;
        public HI_S_VideoHeader struVHeader;
        public int u32SysFlag;

        public static byte[] parseContent(int i, int i2, int i3, int i4) {
            byte[] bArr = new byte[16];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(i);
            byte[] parseContent = HI_S_VideoHeader.parseContent(i2, i3);
            byte[] parseContent2 = HI_S_AudioHeader.parseContent(i4);
            System.arraycopy(intToByteArray_Little, 0, bArr, 0, 4);
            System.arraycopy(parseContent, 0, bArr, 4, 8);
            System.arraycopy(parseContent2, 0, bArr, 12, 4);
            return bArr;
        }

        public byte[] parseContent() {
            return parseContent(this.u32SysFlag, this.struVHeader.u32Width, this.struVHeader.u32Height, this.struAHeader.u32Format);
        }

        public HI_S_SysHeader(byte[] bArr, int i) {
            if (bArr.length >= i + 16) {
                this.u32SysFlag = Packet.byteArrayToInt_Little(bArr, i + 0);
            }
            this.struVHeader = new HI_S_VideoHeader(bArr, i + 4);
            this.struAHeader = new HI_S_AudioHeader(bArr, i + 12);
        }
    }

    public static class HI_LIVE_VIDEO_PARAM {
        public HI_P2P_S_VIDEO_PARAM video_curr;
        public HI_P2P_S_VIDEO_PARAM video_set;

        public static byte[] parseContent(HI_P2P_S_VIDEO_PARAM hi_p2p_s_video_param, HI_P2P_S_VIDEO_PARAM hi_p2p_s_video_param2) {
            byte[] bArr = new byte[56];
            byte[] parseContent = hi_p2p_s_video_param.parseContent();
            byte[] parseContent2 = hi_p2p_s_video_param2.parseContent();
            System.arraycopy(parseContent, 0, bArr, 0, 28);
            System.arraycopy(parseContent2, 0, bArr, 28, 28);
            return bArr;
        }

        public byte[] parseContent() {
            return parseContent(this.video_curr, this.video_set);
        }

        public HI_LIVE_VIDEO_PARAM(byte[] bArr) {
            if (bArr.length >= 56) {
                this.video_curr = new HI_P2P_S_VIDEO_PARAM(bArr, 0);
                this.video_set = new HI_P2P_S_VIDEO_PARAM(bArr, 28);
            }
        }

        public HI_LIVE_VIDEO_PARAM(HI_P2P_S_VIDEO_PARAM hi_p2p_s_video_param, HI_P2P_S_VIDEO_PARAM hi_p2p_s_video_param2) {
            this.video_curr = hi_p2p_s_video_param;
            this.video_set = hi_p2p_s_video_param2;
        }
    }

    public static class HI_P2P_IPCRF_ENABLE {
        public int u32Enable;

        public static byte[] parseContent(int i) {
            byte[] bArr = new byte[4];
            System.arraycopy(Packet.intToByteArray_Little(i), 0, bArr, 0, 4);
            return bArr;
        }

        public byte[] parseContent() {
            return parseContent(this.u32Enable);
        }

        public HI_P2P_IPCRF_ENABLE(byte[] bArr) {
            if (bArr.length >= 4) {
                this.u32Enable = Packet.byteArrayToInt_Little(bArr);
            }
        }
    }

    public static class HI_P2P_IPCRF_INFO {
        public byte s8AlarmVoiceLink;
        public byte s8PtzLink;
        public byte[] sName;
        public byte[] sReserved;
        public byte[] sRfCode;
        public byte[] sType;
        public int u32Enable;
        public int u32Index;

        public static byte[] parseContent(int i, int i2, String str, String str2, String str3, byte b, byte b2) {
            if (str == null || str2 == null || str3 == null) {
                return null;
            }
            byte[] bArr = new byte[112];
            System.arraycopy(Packet.intToByteArray_Little(i), 0, bArr, 0, 4);
            System.arraycopy(Packet.intToByteArray_Little(i2), 0, bArr, 4, 4);
            byte[] bytes = str.getBytes();
            System.arraycopy(bytes, 0, bArr, 8, bytes.length < 16 ? bytes.length : 16);
            byte[] bytes2 = str2.getBytes();
            System.arraycopy(bytes2, 0, bArr, 24, bytes2.length < 16 ? bytes2.length : 16);
            try {
                byte[] bytes3 = str3.getBytes("utf-8");
                System.arraycopy(bytes3, 0, bArr, 40, bytes3.length < 64 ? bytes3.length : 64);
            } catch (UnsupportedEncodingException e) {
                e.printStackTrace();
            }
            bArr[104] = b;
            bArr[105] = b2;
            return bArr;
        }

        public byte[] parseContent() {
            String str;
            try {
                str = new String(this.sName, "utf-8");
            } catch (UnsupportedEncodingException e) {
                e.printStackTrace();
                str = "";
            }
            return parseContent(this.u32Index, this.u32Enable, Packet.getString(this.sRfCode), Packet.getString(this.sType), str, this.s8AlarmVoiceLink, this.s8PtzLink);
        }

        public HI_P2P_IPCRF_INFO(int i, String str) {
            this.sRfCode = new byte[16];
            this.sType = new byte[16];
            this.sName = new byte[64];
            this.sReserved = new byte[6];
            if (str != null) {
                this.u32Index = i;
                this.u32Enable = 0;
                byte[] bytes = str.getBytes();
                System.arraycopy(bytes, 0, this.sType, 0, bytes.length < 16 ? bytes.length : 16);
                this.s8AlarmVoiceLink = (byte) 0;
                this.s8PtzLink = (byte) 0;
            }
        }

        public HI_P2P_IPCRF_INFO(byte[] bArr) {
            this.sRfCode = new byte[16];
            this.sType = new byte[16];
            this.sName = new byte[64];
            this.sReserved = new byte[6];
            if (bArr.length >= 104) {
                this.u32Index = Packet.byteArrayToInt_Little(bArr, 0);
                this.u32Enable = Packet.byteArrayToInt_Little(bArr, 4);
                System.arraycopy(bArr, 8, this.sRfCode, 0, 16);
                System.arraycopy(bArr, 24, this.sType, 0, 16);
                System.arraycopy(bArr, 40, this.sName, 0, 64);
                this.s8AlarmVoiceLink = bArr[104];
                this.s8PtzLink = bArr[105];
            }
        }

        public HI_P2P_IPCRF_INFO(byte[] bArr, int i) {
            this.sRfCode = new byte[16];
            this.sType = new byte[16];
            this.sName = new byte[64];
            this.sReserved = new byte[6];
            int i2 = i + 104;
            if (bArr.length >= i2) {
                this.u32Index = Packet.byteArrayToInt_Little(bArr, i + 0);
                this.u32Enable = Packet.byteArrayToInt_Little(bArr, i + 4);
                System.arraycopy(bArr, i + 8, this.sRfCode, 0, 16);
                System.arraycopy(bArr, i + 24, this.sType, 0, 16);
                System.arraycopy(bArr, i + 40, this.sName, 0, 64);
                this.s8AlarmVoiceLink = bArr[i2];
                this.s8PtzLink = bArr[i + 105];
            }
        }
    }

    public static class HI_P2P_IPCRF_ALL_INFO {
        public HI_P2P_IPCRF_INFO[] sRfInfo = new HI_P2P_IPCRF_INFO[8];
        public int u32Flag;

        public HI_P2P_IPCRF_ALL_INFO(byte[] bArr) {
            this.u32Flag = Packet.byteArrayToInt_Little(bArr, 0);
            int i = 4;
            for (int i2 = 0; i2 < 8; i2++) {
                this.sRfInfo[i2] = new HI_P2P_IPCRF_INFO(bArr, i);
                i += 112;
            }
        }
    }

    public static class HI_P2P_IPCRF_Code {
        public byte[] sReserved = new byte[4];
        public byte[] sRfCode;

        public static byte[] parseContent(String str) {
            if (str == null) {
                return null;
            }
            byte[] bArr = new byte[20];
            byte[] bytes = str.getBytes();
            System.arraycopy(bytes, 0, bArr, 0, bytes.length < 16 ? bytes.length : 16);
            return bArr;
        }

        public byte[] parseContent() {
            return parseContent(Packet.getString(this.sRfCode));
        }

        public HI_P2P_IPCRF_Code(byte[] bArr) {
            byte[] bArr2 = new byte[16];
            this.sRfCode = bArr2;
            if (bArr.length >= 16) {
                System.arraycopy(bArr, 0, bArr2, 0, 16);
            }
        }
    }

    public static class HI_P2P_GET_ALARM_LOG_EXT {
        public int cmdtype;
        public int length;

        public HI_P2P_GET_ALARM_LOG_EXT(byte[] bArr) {
            if (bArr.length >= 12) {
                this.cmdtype = Packet.byteArrayToInt_Little(bArr, 0);
                this.length = Packet.byteArrayToInt_Little(bArr, 8);
            }
        }
    }

    public static class HI_P2P_TMP_ALARM {
        public float fMaxTemperature;
        public float fMinTemperature;
        public int u32Enable;

        public static byte[] parseContent(int i, float f, float f2) {
            byte[] bArr = new byte[12];
            System.arraycopy(Packet.intToByteArray_Little(i), 0, bArr, 0, 4);
            System.arraycopy(Packet.floatToByte(f), 0, bArr, 4, 4);
            System.arraycopy(Packet.floatToByte(f2), 0, bArr, 8, 4);
            return bArr;
        }

        public byte[] parseContent() {
            return parseContent(this.u32Enable, this.fMaxTemperature, this.fMinTemperature);
        }

        public HI_P2P_TMP_ALARM(byte[] bArr) {
            if (bArr.length >= 12) {
                this.u32Enable = Packet.byteArrayToInt_Little(bArr, 0);
                this.fMaxTemperature = Packet.byteToFloat(bArr, 4);
                this.fMinTemperature = Packet.byteToFloat(bArr, 8);
            }
        }
    }

    public static class HI_P2P_HUM_ALARM {
        public float fMaxHumidity;
        public float fMinHumidity;
        public int u32Enable;

        public static byte[] parseContent(int i, float f, float f2) {
            byte[] bArr = new byte[12];
            System.arraycopy(Packet.intToByteArray_Little(i), 0, bArr, 0, 4);
            System.arraycopy(Packet.floatToByte(f), 0, bArr, 4, 4);
            System.arraycopy(Packet.floatToByte(f2), 0, bArr, 8, 4);
            return bArr;
        }

        public byte[] parseContent() {
            return parseContent(this.u32Enable, this.fMaxHumidity, this.fMinHumidity);
        }

        public HI_P2P_HUM_ALARM(byte[] bArr) {
            if (bArr.length >= 12) {
                this.u32Enable = Packet.byteArrayToInt_Little(bArr, 0);
                this.fMaxHumidity = Packet.byteToFloat(bArr, 4);
                this.fMinHumidity = Packet.byteToFloat(bArr, 8);
            }
        }
    }

    public static class HI_P2P_TRANSPARENT_CHN_INFO {
        public byte[] sData = new byte[992];
        public int u16OnceLen;
        public int u16TotalLen;
        public int u32Flag;

        public static byte[] parseContent(int i, int i2, int i3, byte[] bArr) {
            byte[] bArr2 = new byte[1000];
            System.arraycopy(Packet.intToByteArray_Little(i), 0, bArr2, 0, 4);
            System.arraycopy(Packet.intToByteArray_Little(i2), 0, bArr2, 4, 2);
            System.arraycopy(Packet.intToByteArray_Little(i3), 0, bArr2, 6, 2);
            System.arraycopy(bArr, 0, bArr2, 8, bArr.length);
            return bArr2;
        }

        public HI_P2P_TRANSPARENT_CHN_INFO(byte[] bArr) {
            this.u32Flag = Packet.byteArrayToInt_Little(bArr, 0);
            this.u16OnceLen = Packet.byteArrayToShort_Little(bArr, 4);
            this.u16TotalLen = Packet.byteArrayToShort_Little(bArr, 6);
            LogUtils.e("", "" + ((int) bArr[7]) + Constants.COLON_SEPARATOR + ((int) bArr[8]) + Constants.COLON_SEPARATOR + ((int) bArr[9]) + Constants.COLON_SEPARATOR + ((int) bArr[10]));
            System.arraycopy(bArr, 8, this.sData, 0, this.u16OnceLen);
            LogUtils.e("", "" + ((int) this.sData[0]) + Constants.COLON_SEPARATOR + ((int) this.sData[1]) + Constants.COLON_SEPARATOR + ((int) this.sData[2]) + Constants.COLON_SEPARATOR + ((int) this.sData[3]));
        }
    }

    public static class HI_P2P_SMART_MOTO {
        public int bSmartTrack;

        public static byte[] parseContent(int i) {
            byte[] bArr = new byte[8];
            System.arraycopy(Packet.intToByteArray_Little(i), 0, bArr, 0, 4);
            return bArr;
        }

        public HI_P2P_SMART_MOTO(byte[] bArr) {
            if (bArr.length > 4) {
                this.bSmartTrack = Packet.byteArrayToInt_Little(bArr, 0);
            }
        }
    }

    public static class HI_P2P_ALARM_TIME {
        public byte[] AlarmTime = new byte[16];
        public byte[] sData = new byte[32];

        public static byte[] parseContent(byte[] bArr) {
            if (bArr.length > 16) {
                return null;
            }
            byte[] bArr2 = new byte[32];
            System.arraycopy(bArr, 0, bArr2, 0, bArr.length);
            return bArr2;
        }
    }

    public static class HI_P2P_RING_Fun {
        public int enable;

        public static byte[] parseContent(int i) {
            byte[] bArr = new byte[4];
            System.arraycopy(Packet.intToByteArray_Little(i), 0, bArr, 0, 4);
            return bArr;
        }

        public HI_P2P_RING_Fun(byte[] bArr) {
            if (bArr.length >= 4) {
                this.enable = Packet.byteArrayToInt_Little(bArr, 0);
            }
        }
    }

    public static class HI_P2P_DEV_MOLD {
        public int mold;

        public HI_P2P_DEV_MOLD(byte[] bArr) {
            if (bArr.length >= 4) {
                this.mold = Packet.byteArrayToInt_Little(bArr, 0);
            }
        }
    }

    public static class HI_P2P_DEV_FISH {
        public int fish;
        public int mold;
        public float rcircle;
        public int type;
        public float xcircle;
        public float ycircle;

        public HI_P2P_DEV_FISH(byte[] bArr) {
            if (bArr.length >= 24) {
                this.fish = Packet.byteArrayToInt_Little(bArr, 0);
                this.mold = Packet.byteArrayToInt_Little(bArr, 4);
                this.type = Packet.byteArrayToInt_Little(bArr, 8);
                this.xcircle = Packet.byteToFloat(bArr, 12);
                this.ycircle = Packet.byteToFloat(bArr, 16);
                this.rcircle = Packet.byteToFloat(bArr, 20);
            }
        }

        public static byte[] parseContent(int i, int i2, int i3, float f, float f2, float f3) {
            byte[] bArr = new byte[28];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(i);
            byte[] intToByteArray_Little2 = Packet.intToByteArray_Little(i2);
            Packet.intToByteArray_Little(i3);
            Packet.floatToByte(f);
            Packet.floatToByte(f2);
            Packet.floatToByte(f3);
            System.arraycopy(intToByteArray_Little, 0, bArr, 0, 4);
            System.arraycopy(intToByteArray_Little2, 0, bArr, 4, 4);
            System.arraycopy(intToByteArray_Little, 0, bArr, 8, 4);
            System.arraycopy(intToByteArray_Little2, 0, bArr, 12, 4);
            System.arraycopy(intToByteArray_Little, 0, bArr, 16, 4);
            return bArr;
        }
    }

    public static class HI_P2P_S_WIFI_PARAM_NEWPWD255_EXT1 {
        public byte EncType;
        public byte Mode;
        public int u32Channel;
        public int u32Enable;
        public byte[] strSSID = new byte[64];
        public byte[] strKey = new byte[256];

        public HI_P2P_S_WIFI_PARAM_NEWPWD255_EXT1(byte[] bArr) {
            if (bArr.length >= 330) {
                this.u32Channel = Packet.byteArrayToInt_Little(bArr, 0);
                this.u32Enable = Packet.byteArrayToInt_Little(bArr, 4);
                this.Mode = bArr[8];
                this.EncType = bArr[9];
                System.arraycopy(bArr, 10, this.strSSID, 0, 64);
                System.arraycopy(bArr, 74, this.strKey, 0, 256);
            }
        }

        public static byte[] parseContent(int i, int i2, byte b, byte b2, byte[] bArr, byte[] bArr2) {
            byte[] bArr3 = new byte[330];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(i);
            byte[] intToByteArray_Little2 = Packet.intToByteArray_Little(i2);
            System.arraycopy(intToByteArray_Little, 0, bArr3, 0, 4);
            System.arraycopy(intToByteArray_Little2, 0, bArr3, 4, 4);
            bArr3[8] = b;
            bArr3[9] = b2;
            System.arraycopy(bArr, 0, bArr3, 10, bArr.length);
            System.arraycopy(bArr2, 0, bArr3, 74, bArr2.length);
            return bArr3;
        }
    }

    public static class HI_P2P_S_WIFI_CHECK_NEWPWD255_EXT1 {
        public byte EncType;
        public byte Mode;
        public int u32Channel;
        public int u32Check;
        public int u32Enable;
        public byte[] strSSID = new byte[64];
        public byte[] strKey = new byte[256];
        public byte[] rev = new byte[2];

        public HI_P2P_S_WIFI_CHECK_NEWPWD255_EXT1(byte[] bArr) {
            if (bArr.length >= 336) {
                this.u32Channel = Packet.byteArrayToInt_Little(bArr, 0);
                this.u32Enable = Packet.byteArrayToInt_Little(bArr, 4);
                this.Mode = bArr[8];
                this.EncType = bArr[9];
                System.arraycopy(bArr, 10, this.strSSID, 0, 64);
                System.arraycopy(bArr, 74, this.strKey, 0, 256);
                this.u32Check = Packet.byteArrayToInt_Little(bArr, 332);
            }
        }

        public static byte[] parseContent(int i, int i2, byte b, byte b2, byte[] bArr, byte[] bArr2, int i3) {
            byte[] bArr3 = new byte[336];
            byte[] intToByteArray_Little = Packet.intToByteArray_Little(i);
            byte[] intToByteArray_Little2 = Packet.intToByteArray_Little(i2);
            System.arraycopy(intToByteArray_Little, 0, bArr3, 0, 4);
            System.arraycopy(intToByteArray_Little2, 0, bArr3, 4, 4);
            bArr3[8] = b;
            bArr3[9] = b2;
            System.arraycopy(bArr, 0, bArr3, 10, bArr.length);
            System.arraycopy(bArr2, 0, bArr3, 74, bArr2.length);
            System.arraycopy(Packet.intToByteArray_Little(i3), 0, bArr3, 332, 4);
            return bArr3;
        }
    }

    public static class SWifiAp_Ext {
        public byte EncType;
        public byte Mode;
        public byte Signal;
        public byte Status;
        public byte[] strSSID;

        public SWifiAp_Ext(byte[] bArr, int i) {
            byte[] bArr2 = new byte[64];
            this.strSSID = bArr2;
            if (bArr.length >= 68) {
                System.arraycopy(bArr, i, bArr2, 0, 64);
                this.Mode = bArr[i + 64];
                this.EncType = bArr[i + 65];
                this.Signal = bArr[i + 66];
                this.Status = bArr[i + 67];
            }
        }
    }

    public static class HI_P2P_S_WIFI_LIST_EXT {
        public int flag;
        public int u32Num;

        public HI_P2P_S_WIFI_LIST_EXT(byte[] bArr) {
            if (bArr.length >= 8) {
                this.u32Num = Packet.byteArrayToInt_Little(bArr, 0);
                this.flag = Packet.byteArrayToInt_Little(bArr, 4);
            }
        }
    }

    public static class ABSOLUTE_LIGHT_TYPE {
        public int s32State;

        public ABSOLUTE_LIGHT_TYPE(byte[] bArr) {
            if (bArr.length >= 4) {
                this.s32State = Packet.byteArrayToInt_Little(bArr, 0);
            }
        }

        public static byte[] parseContent(int i) {
            byte[] bArr = new byte[20];
            System.arraycopy(Packet.intToByteArray_Little(i), 0, bArr, 0, 4);
            return bArr;
        }
    }

    public static class LANGUAGE_TYPE {
        public int language;

        public LANGUAGE_TYPE(byte[] bArr) {
            if (bArr.length >= 4) {
                this.language = Packet.byteArrayToInt_Little(bArr, 0);
            }
        }

        public static byte[] parseContent(int i) {
            byte[] bArr = new byte[16];
            System.arraycopy(Packet.intToByteArray_Little(i), 0, bArr, 0, 4);
            return bArr;
        }
    }

    public static class ALARMTOSOUND_TYPE {
        public byte SoundType;
        public byte TimeLast;
        public byte enable;

        public static byte[] parseContent(byte b, byte b2, byte b3) {
            byte[] bArr = new byte[8];
            bArr[0] = b;
            bArr[1] = b2;
            bArr[2] = b3;
            return bArr;
        }

        public ALARMTOSOUND_TYPE(byte[] bArr) {
            if (bArr.length >= 3) {
                this.enable = bArr[0];
                this.SoundType = bArr[1];
                this.TimeLast = bArr[2];
            }
        }
    }

    public static class SD_STATE {
        public int s32format;
        public int u32Channel;
        public int u32LeftSpace;
        public int u32Space;
        public int u32Status;

        public SD_STATE(byte[] bArr) {
            if (bArr.length >= 20) {
                this.u32Channel = Packet.byteArrayToInt_Little(bArr, 0);
                this.u32Status = Packet.byteArrayToInt_Little(bArr, 4);
                this.u32Space = Packet.byteArrayToInt_Little(bArr, 8);
                this.u32LeftSpace = Packet.byteArrayToInt_Little(bArr, 12);
                this.s32format = Packet.byteArrayToInt_Little(bArr, 16);
            }
        }
    }

    public static class SD_YEARMONTH {
        public byte mon;
        public short year;

        public static byte[] parseContent(int i, int i2) {
            byte[] bArr = new byte[8];
            System.arraycopy(Packet.shortToByteArray_Little((short) i), 0, bArr, 0, 2);
            bArr[2] = (byte) i2;
            return bArr;
        }

        public byte[] parseContent() {
            byte[] bArr = new byte[8];
            System.arraycopy(Packet.shortToByteArray_Little(this.year), 0, bArr, 0, 2);
            bArr[2] = this.mon;
            return bArr;
        }
    }

    public static class SD_FILEDAY {
        public byte[] day = new byte[31];
        public byte month;
        public byte num;
        public short year;

        public SD_FILEDAY(byte[] bArr) {
            if (bArr.length >= 35) {
                this.year = Packet.byteArrayToShort_Little(bArr, 0);
                this.month = bArr[2];
                this.num = bArr[3];
                System.arraycopy(bArr, 4, this.day, 0, 31);
            }
        }
    }

    public static class RECORD_ALLFILE {
        int Chn;
        byte EventType;
        int day;
        int mon;
        int year;

        public static byte[] parseContent(int i, int i2, int i3, int i4, byte b) {
            byte[] bArr = new byte[24];
            System.arraycopy(Packet.intToByteArray_Little(i), 0, bArr, 0, 4);
            System.arraycopy(Packet.intToByteArray_Little(i2), 0, bArr, 4, 4);
            System.arraycopy(Packet.intToByteArray_Little(i3), 0, bArr, 8, 4);
            System.arraycopy(Packet.intToByteArray_Little(i4), 0, bArr, 12, 4);
            bArr[16] = b;
            return bArr;
        }

        public byte[] parseContent() {
            byte[] bArr = new byte[24];
            System.arraycopy(Packet.intToByteArray_Little(this.Chn), 0, bArr, 0, 4);
            System.arraycopy(Packet.intToByteArray_Little(this.year), 0, bArr, 4, 4);
            System.arraycopy(Packet.intToByteArray_Little(this.mon), 0, bArr, 8, 4);
            System.arraycopy(Packet.intToByteArray_Little(this.day), 0, bArr, 12, 4);
            bArr[16] = this.EventType;
            return bArr;
        }
    }

    public static class PB_RECORDPLAY_REQ {
        public int chn;
        public int command;
        public STimeDay endtim;
        public int movetime;
        public int remainnum;
        public int setpos;
        public int setsec;
        public STimeDay starttim;

        public static byte[] parseContent(int i, short s, long j, long j2, int i2, int i3, int i4, int i5) {
            long rawOffset = (TimeZone.getDefault().getRawOffset() / 3600) / 10;
            Calendar calendar = Calendar.getInstance(TimeZone.getDefault());
            Calendar calendar2 = Calendar.getInstance(TimeZone.getDefault());
            calendar.setTimeInMillis(j);
            calendar2.setTimeInMillis(j2);
            HiLog.e("search from " + calendar.get(1) + "/" + calendar.get(2) + "/" + calendar.get(5) + " " + calendar.get(11) + Constants.COLON_SEPARATOR + calendar.get(12) + Constants.COLON_SEPARATOR + calendar.get(13), 1, 0);
            HiLog.e("       to   " + calendar2.get(1) + "/" + calendar2.get(2) + "/" + calendar2.get(5) + " " + calendar2.get(11) + Constants.COLON_SEPARATOR + calendar2.get(12) + Constants.COLON_SEPARATOR + calendar2.get(13), 1, 0);
            StringBuilder sb = new StringBuilder();
            sb.append("");
            sb.append((int) s);
            sb.append("dddd");
            sb.append(i2);
            sb.append("ddddd");
            sb.append(i3);
            HiLog.e(sb.toString(), 1, 0);
            byte[] bArr = new byte[40];
            System.arraycopy(Packet.intToByteArray_Little(i), 0, bArr, 0, 4);
            System.arraycopy(Packet.intToByteArray_Little(s), 0, bArr, 4, 4);
            System.arraycopy(STimeDay.parseContent(calendar.get(1), calendar.get(2) + 1, calendar.get(5), calendar.get(7), calendar.get(11), calendar.get(12), calendar.get(13)), 0, bArr, 8, 8);
            System.arraycopy(STimeDay.parseContent(calendar2.get(1), calendar2.get(2) + 1, calendar2.get(5), calendar2.get(7), calendar2.get(11), calendar2.get(12), calendar2.get(13)), 0, bArr, 16, 8);
            System.arraycopy(Packet.intToByteArray_Little(i2), 0, bArr, 24, 4);
            System.arraycopy(Packet.intToByteArray_Little(i3), 0, bArr, 28, 4);
            System.arraycopy(Packet.intToByteArray_Little(i4), 0, bArr, 32, 4);
            bArr[35] = (byte) i5;
            return bArr;
        }
    }

    public static class Record_FILE_INFO {
        public int audiotype;
        public int command;
        public int encodetyp;
        public STimeDay sEndTime;
        public STimeDay sStartTime;
        public int videoh;
        public int videow;

        public Record_FILE_INFO(byte[] bArr) {
            if (bArr.length >= 36) {
                this.videow = Packet.byteArrayToInt_Little(bArr, 0);
                this.videoh = Packet.byteArrayToInt_Little(bArr, 4);
                this.audiotype = Packet.byteArrayToInt_Little(bArr, 8);
                this.command = Packet.byteArrayToInt_Little(bArr, 12);
                this.encodetyp = Packet.byteArrayToInt_Little(bArr, 16);
                this.sStartTime = new STimeDay(bArr, 20);
                this.sEndTime = new STimeDay(bArr, 28);
            }
        }
    }

    public static class HI_P2P_S_LOG_REC_PB_REQ {
        short command;
        byte[] sRecFileName = new byte[32];

        public static byte[] parseContent(short s, byte[] bArr) {
            byte[] bArr2 = new byte[40];
            System.arraycopy(bArr, 0, bArr2, 0, bArr.length);
            System.arraycopy(Packet.shortToByteArray_Little(s), 0, bArr2, 32, 2);
            return bArr2;
        }
    }

    public static class HI_P2P_S_DOWNLOADSnap {
        public int chn;
        public int command;
        public STimeDay starttim;

        public static byte[] parseContent(int i, short s, STimeDay sTimeDay) {
            HiLog.e("" + ((int) s) + "dddd" + sTimeDay + "ddddd", 1, 0);
            byte[] bArr = new byte[24];
            System.arraycopy(Packet.intToByteArray_Little(i), 0, bArr, 0, 4);
            System.arraycopy(Packet.shortToByteArray_Little(s), 0, bArr, 4, 2);
            if (sTimeDay != null) {
                System.arraycopy(sTimeDay.parseContent(), 0, bArr, 6, 8);
            }
            return bArr;
        }
    }

    public static String getFileNameWithTime(String str, int i) {
        if (str == null || TextUtils.isEmpty(str) || str.length() < 14) {
            return getFileNameWithTime(1, i);
        }
        if (i == 1) {
            str = str + "-01";
        } else if (i == 2) {
            str = str + "-02";
        }
        return str + ".mp4";
    }

    public static String getFileNameWithTime(int i, int i2) {
        String format = new SimpleDateFormat(TimeUtil.FORMAT_DATE_TIME_NEW2, Locale.getDefault()).format(new Date());
        if (i == 0) {
            format = "IMG_" + format;
        }
        if (i2 == 1) {
            format = format + "-01";
        } else if (i2 == 2) {
            format = format + "-02";
        }
        if (i == 0) {
            return format + ".jpg";
        }
        return format + ".mp4";
    }

    public static String getFileNameWithTime1(int i, int i2) {
        Calendar calendar = Calendar.getInstance();
        int i3 = calendar.get(1);
        int i4 = calendar.get(2) + 1;
        int i5 = calendar.get(5);
        int i6 = calendar.get(11);
        int i7 = calendar.get(12);
        int i8 = calendar.get(13);
        StringBuffer stringBuffer = new StringBuffer();
        if (i == 0) {
            stringBuffer.append("IMG_");
        }
        stringBuffer.append(i3);
        if (i4 < 10) {
            stringBuffer.append('0');
        }
        stringBuffer.append(i4);
        if (i5 < 10) {
            stringBuffer.append('0');
        }
        stringBuffer.append(i5);
        stringBuffer.append(NameUtil.USCORE);
        if (i6 < 10) {
            stringBuffer.append('0');
        }
        stringBuffer.append(i6);
        if (i7 < 10) {
            stringBuffer.append('0');
        }
        stringBuffer.append(i7);
        if (i8 < 10) {
            stringBuffer.append('0');
        }
        stringBuffer.append(i8);
        if (i2 == 1) {
            stringBuffer.append("-01");
        } else if (i2 == 2) {
            stringBuffer.append("-02");
        }
        if (i == 0) {
            stringBuffer.append(".jpg");
        } else if (i == 1) {
            stringBuffer.append(".mp4");
        }
        return stringBuffer.toString();
    }

    public static class HI_P2P_PB_PLAYBACK_FAST_CTL {
        public int u8Pput;
        public int u8time;

        public HI_P2P_PB_PLAYBACK_FAST_CTL(byte[] bArr) {
            if (bArr.length >= 2) {
                this.u8time = bArr[0];
                this.u8Pput = bArr[1];
            }
        }

        public byte[] parseContent() {
            byte[] bArr = new byte[8];
            bArr[0] = (byte) this.u8time;
            bArr[1] = (byte) this.u8Pput;
            return bArr;
        }
    }

    public static class HI_P2P_PLAYBACK_FAST_REPLY {
        public int u32FileTotal;
        public int u32FrameFlag;
        public int u32FrameLen;
        public int u8flag;

        public HI_P2P_PLAYBACK_FAST_REPLY(byte[] bArr) {
            if (bArr.length >= 13) {
                this.u32FrameFlag = Packet.byteArrayToInt_Little(bArr, 0);
                this.u32FrameLen = Packet.byteArrayToInt_Little(bArr, 4);
                this.u32FileTotal = Packet.byteArrayToInt_Little(bArr, 8);
                this.u8flag = bArr[12];
            }
        }

        public HI_P2P_PLAYBACK_FAST_REPLY() {
        }

        public void setData(byte[] bArr) {
            if (bArr.length >= 13) {
                this.u32FrameFlag = Packet.byteArrayToInt_Little(bArr, 0);
                this.u32FrameLen = Packet.byteArrayToInt_Little(bArr, 4);
                this.u32FileTotal = Packet.byteArrayToInt_Little(bArr, 8);
                this.u8flag = bArr[12];
            }
        }
    }

    public static class HI_P2P_PB_SETPOS_FAST {
        public int u32FileTotal;
        public int u32FrameFlag;
        public int u32FrameLen;
        public int u8flag;

        public static byte[] parseContent(int i, int i2, STimeDay sTimeDay) {
            byte[] bArr = new byte[24];
            System.arraycopy(Packet.intToByteArray_Little(i), 0, bArr, 0, 4);
            System.arraycopy(Packet.intToByteArray_Little(i2), 0, bArr, 4, 4);
            if (sTimeDay != null) {
                System.arraycopy(sTimeDay.parseContent(), 0, bArr, 8, 8);
            }
            return bArr;
        }
    }
}