#ifndef NETMODULE_H #define NETMODULE_H #include using namespace std; #ifdef NETMODULE_EXPORTS #define H264_DVR_API extern "C" __declspec(dllexport) #else #define H264_DVR_API extern "C" __declspec(dllimport) #endif #ifndef CALL_METHOD #define CALL_METHOD __stdcall //__cdecl #endif typedef enum SDK_RET_CODE { H264_DVR_NOERROR = 0, ///no error H264_DVR_SUCCESS = 1, //success H264_DVR_SDK_NOTVALID = -10000, //invalid request H264_DVR_NO_INIT = -10001, //SDK not inited H264_DVR_ILLEGAL_PARAM = -10002, //illegal user parameter H264_DVR_INVALID_HANDLE = -10003, //handle is null H264_DVR_SDK_UNINIT_ERROR = -10004, //SDK clear error H264_DVR_SDK_TIMEOUT = -10005, //timeout H264_DVR_SDK_MEMORY_ERROR = -10006, //memory error H264_DVR_SDK_NET_ERROR = -10007, //network error H264_DVR_SDK_OPEN_FILE_ERROR = -10008, //open file fail H264_DVR_SDK_UNKNOWNERROR = -10009, //unknown error H264_DVR_DEV_VER_NOMATCH = -11000, //version mismatch H264_DVR_ERROR_GET_DATA = -11001, //get data fail(including configure, user information and etc) H264_DVR_OPEN_CHANNEL_ERROR = -11200, //open channel fail H264_DVR_CLOSE_CHANNEL_ERROR = -11201, //close channel fail H264_DVR_SUB_CONNECT_ERROR = -11202, //open media connet fail H264_DVR_SUB_CONNECT_SEND_ERROR = -11203, //media connet send data fail /// error code of user management H264_DVR_NOPOWER = -11300, //no power H264_DVR_PASSWORD_NOT_VALID = -11301, // password not valid H264_DVR_LOGIN_USER_NOEXIST = -11302, // user not exist H264_DVR_USER_LOCKED = -11303, // user is locked H264_DVR_USER_IN_BLACKLIST = -11304, // user is in backlist H264_DVR_USER_HAS_USED = -11305, // user have logined H264_DVR_USER_NOT_LOGIN = -11306, // no login H264_DVR_CONNECT_DEVICE_ERROR = -11307, // maybe device no exist H264_DVR_ACCOUNT_INPUT_NOT_VALID = -11308, //invalid input H264_DVR_ACCOUNT_OVERLAP = -11309, //index overlap H264_DVR_ACCOUNT_OBJECT_NONE = -11310, //object not exist H264_DVR_ACCOUNT_OBJECT_NOT_VALID= -11311, //object invalid H264_DVR_ACCOUNT_OBJECT_IN_USE = -11312, //object in using H264_DVR_ACCOUNT_SUBSET_OVERLAP = -11313, //user power to exceed group power H264_DVR_ACCOUNT_PWD_NOT_VALID = -11314, //password invalid H264_DVR_ACCOUNT_PWD_NOT_MATCH = -11315, //password mismatch H264_DVR_ACCOUNT_RESERVED = -11316, //reserved account /// error code of configure management H264_DVR_OPT_RESTART = -11400, // need to restart application H264_DVR_OPT_REBOOT = -11401, // need to reboot system H264_DVR_OPT_FILE_ERROR = -11402, // write file fail H264_DVR_OPT_CAPS_ERROR = -11403, // not support H264_DVR_OPT_VALIDATE_ERROR = -11404, // validate fail H264_DVR_OPT_CONFIG_NOT_EXIST = -11405, // configuration not exist /// H264_DVR_CTRL_PAUSE_ERROR = -11500, //pause fail H264_DVR_SDK_NOTFOUND = -11501, //not found }; //PTZ control type typedef enum PTZ_ControlType { TILT_UP = 0, //UP TILT_DOWN, //DOWN PAN_LEFT, //LEFT PAN_RIGHT, //RIGTH PAN_LEFTTOP, //LEFT TOP PAN_LEFTDOWN, //LEFT DOWN PAN_RIGTHTOP, //RIGTH TOP PAN_RIGTHDOWN, //RIGTH DOWN ZOOM_OUT, //ZOOM IN ZOOM_IN, //ZOOM OUT FOCUS_FAR, //FOCUS FAR FOCUS_NEAR, //FOCUS NEAR IRIS_OPEN, //IRIS OPEN IRIS_CLOSE, //IRIS CLOSE EXTPTZ_OPERATION_ALARM, // ALARM EXTPTZ_LAMP_ON, // LIGTH OPEN EXTPTZ_LAMP_OFF, // LIGTH CLOSE EXTPTZ_POINT_SET_CONTROL, //SET PRESET POINT EXTPTZ_POINT_DEL_CONTROL, //CLEAR PRESET POINT EXTPTZ_POINT_MOVE_CONTROL, //GOTO PRESET POINT EXTPTZ_STARTPANCRUISE, //START PAN CRUISE EXTPTZ_STOPPANCRUISE, //STOP PAN CRUISE EXTPTZ_SETLEFTBORDER, //SET LEFT BORDER EXTPTZ_SETRIGHTBORDER, //SET RIGHT BORDER EXTPTZ_STARTLINESCAN, //START AUTO SCAN EXTPTZ_CLOSELINESCAN, //STOP AUTO SCAN EXTPTZ_ADDTOLOOP, //ADD PRESET POINT TO CRUISE LINE EXTPTZ_DELFROMLOOP, //DEL PRESET POINT FROM CRUISE LINE EXTPTZ_POINT_LOOP_CONTROL, //START CRUISE EXTPTZ_POINT_STOP_LOOP_CONTROL, //STOP CRUISE EXTPTZ_CLOSELOOP, //CLEAR CRUISE LINE EXTPTZ_FASTGOTO, //FAST GOTO EXTPTZ_AUXIOPEN, //AUX OPEN EXTPTZ_OPERATION_MENU, //OPERATION MENU EXTPTZ_REVERSECOMM, //REVER CAMERAL EXTPTZ_OPERATION_RESET, //PTZ RESET EXTPTZ_TOTAL, }; #define PAN_AUTO 29 #define EXTPTZ_FASTGOTO 30 #define NET_MAX_CHANNUM 32 //max numbers of channels #define NET_DECORDR_CH 16 //max numbers of decorder channels #define NET_MAX_USER_NUM 60 //max numbers of users #define NET_MAX_RIGTH_NUM 128 //max items of power #define NET_MAX_GROUP_NUM 50 //max numbers of groups #define NET_MAX_USER_LENGTH 32 //max length of username #define NET_MAX_COMBINE_NUM 2 //max numbers of combine-encode channel #define NET_MAX_DECORDR_CH 16 //max channel of decoder #define NET_MAX_DDNS_TYPE 5 //max types of DDNS support #define NET_MAX_ARSP_TYPE 5 #define NET_MAX_ALARMSERVER_TYPE 5 #define NET_MAX_SYSFUNC 20 //max system function #define NET_MAX_PTZ_PROTOCOL_LENGTH 32 //max protocol name length #define NET_N_WEEKS 7 //weeks #define NET_N_TSECT 6 //time setct numbers #define NET_MD_REGION_ROW 32 //row numbers of motion detect region #define NET_COVERNUM 8 //max numbers of video cover #define NET_MAX_FILTERIP_NUM 64 //max numbers of IP fliter #define NET_NAME_PASSWORD_LEN 64 //max length of password #define NET_MAX_PATH_LENGTH 260 //max length of path #define NET_N_MIN_TSECT 2 #define NET_MAX_RETURNED_LOGLIST 128 //max numbers of log #define NET_MAX_MAC_LEN 32 //max length of mac addr #define NET_IW_ENCODING_TOKEN_MAX 128 #define NET_MAX_AP_NUMBER 10 #define NET_MAX_INFO_LEN 128 #define NET_MAX_USERNAME_LENGTH 128 #define NET_MAX_SERIALNO_LENGTH 128 //Max serial no. length //DDNS #define DDNS_MAX_DDNS_NAMELEN 64 //DDNS hostname len #define DDNS_MAX_DDNS_PWDLEN 32 //password len #define DDNS_MAX_DDNS_IPSIZE 64 //IP address len //DDNS info typedef struct _DDNS_INFO { std::string ID; //dev id char IP[DDNS_MAX_DDNS_IPSIZE]; //local IP int WebPort; //HTTP port int MediaPort; //Media port int MobilePort; //mobile port int UPNPWebPort; //HTTP Port after UPNP int UPNPMediaPort; //media Port after UPNP int UPNPMobilePort; //moile Port after UPNP char Username[DDNS_MAX_DDNS_NAMELEN]; //username char Password[DDNS_MAX_DDNS_PWDLEN]; //password }DDNS_INFO,*pDDNS_INFO; // real-time monitor type typedef enum _H264_DVR_RealPlayType { NET_RType_Realplay = 0, //main stream 1 monitor NET_RType_Main_Realplay2, //main stream 2 monitor NET_RType_Main_Realplay3, //main stream 3 monitor NET_RType_Sub_Realplay_1, //extra stream 1 NET_RType_Sub_Realplay_2, //extra stream 2 NET_RType_Sub_Realplay_3, //extra stream 3 NET_RType_Multiplay_1, // NET_RType_Multiplay_4, // NET_RType_Multiplay_6, // NET_RType_Multiplay_8, // NET_RType_Multiplay_9, // NET_RType_Multiplay_12, // NET_RType_Multiplay_16, // } NET_RealPlayType; /// combine-encode type enum NetCombinType { NET_COMBIN_NONE, NET_COMBIN_1, NET_COMBIN_2, NET_COMBIN_3, NET_COMBIN_4, NET_COMBIN_5, NET_COMBIN_6, NET_COMBIN_7, NET_COMBIN_8, NET_COMBIN_9, NET_COMBIN_10, NET_COMBIN_11, NET_COMBIN_12, NET_COMBIN_13, NET_COMBIN_14, NET_COMBIN_15, NET_COMBIN_16, NET_COMBIN_1_4, NET_COMBIN_5_8, NET_COMBIN_9_12, NET_COMBIN_13_16, NET_COMBIN_1_8, NET_COMBIN_9_16, NET_COMBIN_1_9, NET_COMBIN_8_16, NET_COMBIN_1_16 }; // encode resolution enum SDK_CAPTURE_SIZE_t { SDK_CAPTURE_SIZE_D1, ///< 720*576(PAL) 720*480(NTSC) SDK_CAPTURE_SIZE_HD1, ///< 352*576(PAL) 352*480(NTSC) SDK_CAPTURE_SIZE_BCIF, ///< 720*288(PAL) 720*240(NTSC) SDK_CAPTURE_SIZE_CIF, ///< 352*288(PAL) 352*240(NTSC) SDK_CAPTURE_SIZE_QCIF, ///< 176*144(PAL) 176*120(NTSC) SDK_CAPTURE_SIZE_VGA, ///< 640*480(PAL) 640*480(NTSC) SDK_CAPTURE_SIZE_QVGA, ///< 320*240(PAL) 320*240(NTSC) SDK_CAPTURE_SIZE_SVCD, ///< 480*480(PAL) 480*480(NTSC) SDK_CAPTURE_SIZE_QQVGA, ///< 160*128(PAL) 160*128(NTSC) SDK_CAPTURE_SIZE_NR ///< }; /// stream control type enum SDK_capture_brc_t { SDK_CAPTURE_BRC_CBR, ///< Constant bitrate SDK_CAPTURE_BRC_VBR, ///< variable bitrate SDK_CAPTURE_BRC_MBR, ///< mix bitrate SDK_CAPTURE_BRC_NR ///< }; /// encode format enum SDK_CAPTURE_COMP_t { SDK_CAPTURE_COMP_DIVX_MPEG4, ///< DIVX MPEG4。 SDK_CAPTURE_COMP_MS_MPEG4, ///< MS MPEG4。 SDK_CAPTURE_COMP_MPEG2, ///< MPEG2。 SDK_CAPTURE_COMP_MPEG1, ///< MPEG1。 SDK_CAPTURE_COMP_H263, ///< H.263 SDK_CAPTURE_COMP_MJPG, ///< MJPG SDK_CAPTURE_COMP_FCC_MPEG4, ///< FCC MPEG4 SDK_CAPTURE_COMP_H264, ///< H.264 SDK_CAPTURE_COMP_NR ///< }; /// stream type enum SDK_CAPTURE_CHANNEL_t { SDK_CHL_MAIN_T = 0, ///< main stream SDK_CHL_2END_T = 1, ///< extram stream 1 SDK_CHL_3IRD_T = 2, ///< extram stream 2 SDK_CHL_4RTH_T = 3, ///< extram stream 3 SDK_CHL_JPEG_T = 4, ///< snapshot SDK_CHL_FUNCTION_NUM }; /// audio format enum SDK_AudioEncodeTypes { SDK_AUDIO_ENCODE_NONE = 0, SDK_AUDIO_ENCODE_G729_8KBIT, SDK_AUDIO_ENCODE_G726_16KBIT, SDK_AUDIO_ENCODE_G726_24KBIT, SDK_AUDIO_ENCODE_G726_32KBIT, SDK_AUDIO_ENCODE_G726_40KBIT, SDK_AUDIO_ENCODE_PCM_8TO16BIT, SDK_AUDIO_ENCODE_PCM_ALAW, SDK_AUDIO_ENCODE_PCM_ULAW, SDK_AUDIO_ENCODE_ADPCM8K16BIT, SDK_AUDIO_ENCODE_ADPCM16K16BIT, SDK_AUDIO_ENCODE_G711_ALAW, SDK_AUDIO_ENCODE_MPEG2_LAYER1, SDK_AUDIO_ENCODE_AMR8K16BIT, SDK_AUDIO_ENCODE_G711_ULAW, SDK_AUDIO_ENCODE_IMA_ADPCM_8K16BIT, SDK_AUDIO_ENCODE_TYPES_NR, }; //configuration type typedef enum _SDK_CONFIG_TYPE { E_SDK_CONFIG_NOTHING = 0, // E_SDK_CONFIG_USER, //User information,including power list,user list and group list E_SDK_CONFIG_ADD_USER, //add user E_SDK_CONFIG_MODIFY_USER, //modify user E_SDK_CONFIG_DELETE_USER, //del user E_SDK_CONFIG_ADD_GROUP, //add group E_SDK_CONFIG_MODIFY_GROUP, //modify group E_SDK_COFIG_DELETE_GROUP, //del group E_SDK_CONFIG_MODIFY_PSW, //modify password E_SDK_CONFIG_ABILITY_SYSFUNC = 9,//support network services E_SDK_CONFIG_ABILTY_ENCODE, //encode ability E_SDK_CONFIG_ABILITY_PTZPRO, //protocols of ptz support E_SDK_COMFIG_ABILITY_COMMPRO, //protocols of 232 support E_SDK_CONFIG_ABILITY_MOTION_FUNC, //Motion detect E_SDK_CONFIG_ABILITY_BLIND_FUNC, //Blind detect E_SDK_CONFIG_ABILITY_DDNS_SERVER, //type of DDNS services support E_SDK_CONFIG_ABILITY_TALK, //encode type of audio talk support E_SDK_CONFIG_SYSINFO = 17, //system information E_SDK_CONFIG_SYSNORMAL, //general E_SDK_CONFIG_SYSENCODE, //encode E_SDK_CONFIG_SYSNET, //network E_SDK_CONFIG_PTZ, //ptz E_SDK_CONFIG_COMM, //232 E_SDK_CONFIG_RECORD, //record E_SDK_CONFIG_MOTION, //motion detect E_SDK_CONFIG_SHELTER, //blind detect E_SDK_CONFIG_VIDEO_LOSS, //loss detect E_SDK_CONFIG_ALARM_IN, //alarm in E_SDK_CONFIG_ALARM_OUT, //alarm out E_SDK_CONFIG_DISK_MANAGER,//disk management E_SDK_CONFIG_OUT_MODE, //out mode E_SDK_CONFIG_CHANNEL_NAME,//channel name E_SDK_CONFIG_AUTO, //auto maintain E_SDK_CONFIG_DEFAULT, //set default E_SDK_CONFIG_DISK_INFO, //disk info E_SDK_CONFIG_LOG_INFO, //get log E_SDK_CONFIG_NET_IPFILTER, //network services:black/white list E_SDK_CONFIG_NET_DHCP, //network services:DHCP E_SDK_CONFIG_NET_DDNS, //network services:DDNS E_SDK_CONFIG_NET_EMAIL, //network services:EMAIL E_SDK_CONFIG_NET_MULTICAST, //network services:Multicast E_SDK_CONFIG_NET_NTP, //network services: NTP E_SDK_CONFIG_NET_PPPOE, //network services: PPPOE E_SDK_CONFIG_NET_DNS, //network services: DNS E_SDK_CONFIG_NET_FTPSERVER, //network services: FTP E_SDK_CONFIG_SYS_TIME, //system time E_SDK_CONFIG_CLEAR_LOG, //clear log E_SDK_REBOOT_DEV, //reboot device E_SDK_CONFIG_ABILITY_LANG, //languages support E_SDK_CONFIG_VIDEO_FORMAT, // video format E_SDK_CONFIG_COMBINEENCODE, //combine-encode E_SDK_CONFIG_EXPORT, //config export E_SDK_CONFIG_IMPORT, //config import E_SDK_LOG_EXPORT, //log export E_SDK_CONFIG_COMBINEENCODEMODE, //mode of combine-encode E_SDK_WORK_STATE, //work status E_SDK_ABILITY_LANGLIST, //language list E_SDK_CONFIG_NET_ARSP, // ARSP E_SDK_CONFIG_SNAP_STORAGE, // Snapshot record E_SDK_CONFIG_NET_3G, //3G dial E_SDK_CONFIG_NET_MOBILE, //mobile monitor E_SDK_CONFIG_UPGRADEINFO, //get upgrade info E_SDK_CONFIG_NET_DECODER, E_SDK_ABILITY_VSTD, E_SDK_CONFIG_ABILITY_VSTD, E_SDK_CONFIG_NET_UPNP, //UPUN CFG E_SDK_CONFIG_NET_WIFI, //WIFI CFG E_SDK_CONFIG_NET_WIFI_AP_LIST, //WIFI AP LIST E_SDK_CONFIG_SYSENCODE_SIMPLIIFY, //simplify encode cfg E_SDK_CONFIG_ALARM_CENTER, //alarm center config E_SDK_CONFIG_NET_ALARM, //net alarm config E_SDK_CONFIG_NET_MEGA, //MEGA E_SDK_CONFIG_NET_XINGWANG, //XINGWANG E_SDK_CONFIG_NET_SHISOU, //SHISOU E_SDK_CONFIG_NET_VVEYE, //VVEYE E_SDK_VIDEO_PREVIEW, E_SDK_CONFIG_NET_DECODER_V2, E_SDK_CONFIG_ABILITY_SERIALNO, // Serial ID E_SDK_CONFIG_NET_RTSP, //RTSP E_SDK_GUISET, //GUISET E_SDK_CATCHPIC, //Catch Picture }SDK_CONFIG_TYPE; /// event code enum SDK_EventCodeTypes { SDK_EVENT_CODE_INIT = 0, SDK_EVENT_CODE_LOCAL_ALARM = 1, //local alarm SDK_EVENT_CODE_NET_ALARM, //network alarm SDK_EVENT_CODE_MANUAL_ALARM, //manual alarm SDK_EVENT_CODE_VIDEO_MOTION, //motion detect SDK_EVENT_CODE_VIDEO_LOSS, //loss detect SDK_EVENT_CODE_VIDEO_BLIND, //blind detect SDK_EVENT_CODE_VIDEO_TITLE, SDK_EVENT_CODE_VIDEO_SPLIT, SDK_EVENT_CODE_VIDEO_TOUR, SDK_EVENT_CODE_STORAGE_NOT_EXIST, SDK_EVENT_CODE_STORAGE_FAILURE, SDK_EVENT_CODE_LOW_SPACE, SDK_EVENT_CODE_NET_ABORT, SDK_EVENT_CODE_COMM, SDK_EVENT_CODE_STORAGE_READ_ERROR, SDK_EVENT_CODE_STORAGE_WRITE_ERROR, SDK_EVENT_CODE_NET_IPCONFLICT, SDK_EVENT_CODE_ALARM_EMERGENCY, SDK_EVENT_CODE_DEC_CONNECT, SDK_EVENT_CODE_NR, }; // Record type enum SDK_ENCODE_TYPE_BY_RECORD { SDK_ENCODE_TYPE_TIM = 0, //time SDK_ENCODE_TYPE_MTD = 1, //motion detect SDK_ENCODE_TYPE_ALM = 2, //alarm in SDK_ENCODE_TYPE_NUM = 3, SDK_ENCODE_TYPE_SNAP_TIMER = 0, SDK_ENCODE_TYPE_SNAP_TRIGGER = 1, }; #define SDK_EXTRATYPES 3 //extra types //stream transfers policy enum SDK_TransferPolicy { SDK_TRANSFER_POLICY_AUTO, ///< auto SDK_TRANSFER_POLICY_QUALITY, ///< quality first SDK_TRANSFER_POLICY_FLUENCY, ///< fluency first SDK_TRANSFER_POLICY_NR, }; typedef struct { int left; int top; int right; int bottom; }sdkRect; /// audio format struct SDK_AudioInFormatConfig { int iBitRate; ///< bitrate,(unit:kbps), such as 192kbps,128kbps int iSampleRate; ///< sample rate(unit:Hz), such as 44100Hz int iSampleBit; ///< sample bit int iEncodeType; ///< type of encode,see refer to AudioEncodeTypes }; // audio talk encode type typedef enum __TALK_CODING_TYPE { TALK_DEFAULT = 0, TALK_PCM = 1, //PCM TALK_G711a, //G711a TALK_AMR, //AMR TALK_G711u, //G711u TALK_G726, //G726 }TALK_CODING_TYPE; typedef struct { TALK_CODING_TYPE encodeType; //encode type int nAudioBit; //audio sample bit unsigned int dwSampleRate; //sample rate char reserved[64]; }H264_DVR_TALKDECODE_INFO; /// system time typedef struct SDK_SYSTEM_TIME{ int year;///< year int month;///< month, January = 1, February = 2, and so on. int day;///< day int wday;///< week day, Sunday = 0, Monday = 1, and so on int hour;///< hour int minute;///< minute int second;///< second int isdst;///< DST flag }SDK_SYSTEM_TIME; //time section typedef struct tagSDK_TIMESECTION { ///< enable int enable; ///< start hour int startHour; ///< start minute int startMinute; ///< start second int startSecond; ///< end hour int endHour; ///< end minute int endMinute; ///< end second int endSecond; }SDK_TIMESECTION; typedef struct{ int dwYear; //year int dwMonth; //month int dwDay; //day int dwHour; //hour int dwMinute; //minute int dwSecond; //second }H264_DVR_TIME,*LPH264_DVR_TIME; //net time structure typedef struct _NEW_NET_TIME { unsigned int second :6; // sec. 1-60 unsigned int minute :6; // min. 1-60 unsigned int hour :5; // hour 1-24 unsigned int day :5; // day 1-31 unsigned int month :4; // month 1-12 unsigned int year :6; // year 2000-2063 }NEW_NET_TIME, *LPNET_TIME; ///< DST struct DSTPoint { int iYear; int iMonth; int iWeek; ///-57db }; struct SDK_NetWifiDevice { char sSSID[36]; //SSID Number int nRSSI; //SEE SDK_RSSI_SINGNAL int nChannel; char sNetType[32]; //Infra, Adhoc char sEncrypType[32]; //NONE, WEP, TKIP, AES char sAuth[32]; //OPEN, SHARED, WEPAUTO, WPAPSK, WPA2PSK, WPANONE, WPA, WPA2 }; struct SDK_NetWifiDeviceAll { int nDevNumber; SDK_NetWifiDevice vNetWifiDeviceAll[NET_MAX_AP_NUMBER]; }; ///< Alarm Center struct SDK_NetAlarmCenterConfig { bool bEnable; ///< enable char sAlarmServerKey[NET_NAME_PASSWORD_LEN]; ///< alarm center type ///< server info SDK_RemoteServerConfig Server; bool bAlarm; //report alarm msg bool bLog; //report log msg }; struct SDK_NetAlarmServerConfigAll { SDK_NetAlarmCenterConfig vAlarmServerConfigAll[NET_MAX_ALARMSERVER_TYPE]; }; //MECG platform struct SDK_CONFIG_NET_MEGA { bool bEnable; bool bNetManEnable; CONFIG_IPAddress ServerIP; int iServerPort; char sDeviceId[32]; char sUserName[24]; char sPasswd[32]; int iMaxCon; int iVideoPort; int iAudioPort; int iMsgPort; int iUpdatePort; }; // XINWANG platform struct SDK_CONFIG_NET_XINGWANG { bool bEnable; bool bSyncTime; bool bSubStream; CONFIG_IPAddress ServerIP; int iServerPort; int iDownLoadPort; char sPasswd[32]; char szSID[32]; }; // SHISOU platform struct SDK_CONFIG_NET_SHISOU { bool bEnable; SDK_RemoteServerConfig Server; char szSID[NET_MAX_USERNAME_LENGTH]; }; // VVEYE platform struct SDK_CONFIG_NET_VVEYE { bool bEnable; bool bCorpEnable; //Only use Business Server SDK_RemoteServerConfig Server; char szDeviceName[NET_MAX_USERNAME_LENGTH]; }; // alarm center msg type enum SDK_AlarmCenterMsgType { SDK_ALARMCENTER_ALARM, SDK_ALARMCENTER_LOG, }; // alarm status enum SDK_AlarmCenterStatus { SDK_AC_START, SDK_AC_STOP, }; // alarm msg info struct SDK_NetAlarmCenterMsg { CONFIG_IPAddress HostIP; ///< device ip int nChannel; ///< channel int nType; ///< see refer to AlarmCenterMsgType int nStatus; ///< see refer to AlarmCenterStatus SDK_SYSTEM_TIME Time; ///< start time char sEvent[NET_MAX_INFO_LEN]; ///< event char sSerialID[NET_MAX_MAC_LEN]; ///< serial ID char sDescrip[NET_MAX_INFO_LEN]; ///< description of event }; /// encode info struct SDK_EncodeInfo { bool bEnable; ///< enable int iStreamType; ///< stream type see refer to capture_channel_t bool bHaveAudio; ///< is support audio unsigned int uiCompression; ///< mask of capture_comp_t unsigned int uiResolution; ///< mask of capture_size_t }; #define NET_CAPTURE_SIZE_NUM 9 /// encode power struct CONFIG_EncodeAbility { unsigned int iMaxEncodePower; ///< max encode power int iChannelMaxSetSync; ///< is resolution need sync each channel, 0-no, 1-yes unsigned int nMaxPowerPerChannel[NET_MAX_CHANNUM]; ///< MaxPower Per Channel for main stream unsigned int ImageSizePerChannel[NET_MAX_CHANNUM]; ///< Image Size Per Channel for main stream unsigned int ExImageSizePerChannel[NET_MAX_CHANNUM]; ///< Image Size Per Channel for extern stream SDK_EncodeInfo vEncodeInfo[SDK_CHL_FUNCTION_NUM]; ///< encode information SDK_EncodeInfo vCombEncInfo[SDK_CHL_FUNCTION_NUM]; ///< combine-encode information int iMaxBps; ///< MAX BPS Kbps unsigned int ExImageSizePerChannelEx[NET_MAX_CHANNUM][NET_CAPTURE_SIZE_NUM]; ///< Image Size support for each solution }; // 232 protocol enum SDK_CommProtocol { SDK_CONSOLE = 0, SDK_KEYBOARD, SDK_COM_TYPES, }; /// 232 protocol struct SDK_COMMFUNC { ///< the numbers of protocol int nProNum; ///< the name of protocol char vCommProtocol[SDK_COM_TYPES][32]; }; /// PTZ protocol struct SDK_PTZPROTOCOLFUNC { ///< the numbers of protocol int nProNum; ///< the name of protocol char vPTZProtocol[100][NET_MAX_PTZ_PROTOCOL_LENGTH]; }; /// blind detect support struct SDK_BlindDetectFunction { int iBlindConverNum; ///< the numbers of cover area support }; /// motion detect struct SDK_MotionDetectFunction { int iGridRow; ///< the number of row int iGridColumn; ///< the number of colum }; /// type of DDNS support struct SDK_DDNSServiceFunction { ///< the numbers of DDNS type int nTypeNum; ///< DDNS type name char vDDNSType[NET_MAX_DDNS_TYPE][64]; }; /// language support struct SDK_MultiLangFunction { ///< the numbers of language int nLangNum; ///< language name char vLanguageName[128][64]; }; /// Video format support struct SDK_MultiVstd { int nVstdNum; char vVstdName[3][64]; }; /// encode ability enum SDK_EncodeFunctionTypes { SDK_ENCODE_FUNCTION_TYPE_DOUBLE_STREAM, ///< multi-stream SDK_ENCODE_FUNCTION_TYPE_COMBINE_STREAM, ///< combine-encode SDK_ENCODE_FUNCTION_TYPE_SNAP_STREAM, ///< snapshot SDK_ENCODE_FUNCTION_TYPE_NR, }; /// 报警功能 enum SDK_AlarmFucntionTypes { SDK_ALARM_FUNCTION_TYPE_MOTION_DETECT, ///< motion detect SDK_ALARM_FUNCTION_TYPE_BLIND_DETECT, ///< blind detect SDK_ALARM_FUNCTION_TYPE_LOSS_DETECT, ///< loss detect SDK_ALARM_FUNCTION_TYPE_LOCAL_ALARM, ///< local alarm SDK_ALARM_FUNCTION_TYPE_NET_ALARM, ///< net alarm SDK_ALARM_FUNCTION_TYPE_IP_CONFLICT, ///< ip conflict SDK_ALARM_FUNCTION_TYPE_NET_ABORT, ///< net abort SDK_ALARM_FUNCTION_TYPE_STORAGE_NOTEXIST, ///< storage not exist SDK_ALARM_FUNCTION_TYPE_STORAGE_LOWSPACE, ///< low space SDK_ALARM_FUNCTION_TYPE_STORAGE_FAILURE, ///< access storage fail SDK_ALARM_FUNCTION_TYPE_NR }; /// net server enum SDK_NetServerTypes { SDK_NET_SERVER_TYPES_IPFILTER, ///< IP fliter SDK_NET_SERVER_TYPES_DHCP, ///< DHCP SDK_NET_SERVER_TYPES_DDNS, ///< DDNS SDK_NET_SERVER_TYPES_EMAIL, ///< Email SDK_NET_SERVER_TYPES_MULTICAST, ///< multi-cast SDK_NET_SERVER_TYPES_NTP, ///< NTP SDK_NET_SERVER_TYPES_PPPOE, ///< PPPOE SDK_NET_SERVER_TYPES_DNS, ///< DNS SDK_NET_SERVER_TYPES_ARSP, ///< ARSP SDK_NET_SERVER_TYPES_3G, ///< 3G SDK_NET_SERVER_TYPES_MOBILE, ///< Mobile monitor SDK_NET_SERVER_TYPES_UPNP, ///< UPNP SDK_NET_SERVER_TYPES_FTP, ///< FTP SDK_NET_SERVER_TYPES_WIFI, ///