/* * publicfuc.h * * Created on: 2009-11-5 * Author: letian */ #ifndef PUBLICFUC_H_ #define PUBLICFUC_H_ #include #include #include #include "DemoPublic.h" #ifndef HPR_OK #define HPR_OK 0 #endif #ifndef HPR_ERROR #define HPR_ERROR -1 #endif #ifndef INT_LEN #define INT_LEN 10 //the length of the string of 32 bit int #endif #ifndef IP_LEN #define IP_LEN 16 //Ò»¸öIPµØÖ·µÄ×î´ó³¤¶È #endif #define KIT_ERRPR_DIS_TYPE 1 typedef struct { int iArrayChanInfo[MAX_CHANNUM_V30]; //-1±íʾÎÞЧͨµÀºÅ; ÒÑ+ÆðʼͨµÀºÅ char cStartNO; //ÆðʼͨµÀºÅ char cTotalNum; //¿ÉÓÃͨµÀ×ÜÊý, Ò²¿ÉÒÔÓÉiArrayChanInfo[]Öµ´óÓÚ-1µÄÊý£¬Í³¼Æ³öÀ´ char cSupportIP; //ÊÇ·ñÖ§³ÖIPͨµÀ0£º²»Ö§³Ö£¬1£ºÖ§³Ö char cRes; }KIT_CHAN_INFO, *PKIT_CHAN_INFO; int KIT_editToInt(const QLineEdit *pEdit, int *pNum); int KIT_intToEdit(QLineEdit *pEdit, int iNum); int KIT_unintToEdit(QLineEdit *pEdit, unsigned int iNum); int KIT_checkIP(char * ip);//check ip int KIT_editToStr(const QLineEdit *pEdit, BYTE *pStr, int iLen); int KIT_editToIP(const QLineEdit *pEditIP, BYTE *pIP, int iLen); int KIT_qstringToStr(const QString *pString, BYTE *pStr, int iLen); int KIT_qstringToInt(const QString *pString, int *pNum); //ͨ¹ýÓû§IDÈ¥»ñȡͨµÀÐÅÏ¢, iArrayChanelInfoÊý×é´óСΪMAX_CHANNUM_V30 int KIT_GetChannelInfo(long lUserID, PKIT_CHAN_INFO pChanInfo); //ͨ¹ýÓû§IDÈ¥´´½¨Ò»¸ö¿ÉÓÃͨµÀµÄcheckboxÊý×é; new³öÀ´µÄ±äÁ¿£¬ÓÉÍⲿÊÍ·Å //¸ÃÊý×é´óСΪ64, ´«ÈëµÄÊý×éÒ»¶¨²»ÄܱÈÕâ¸öС£¬·ñÔò³ÌÐò»á±ÀÀ£ int KIT_CreateCheckboxChanArr(long lUserID, QCheckBox *qArrChan[], int *piTotalNum); //¸ù¾Ý±¨¾¯Êä³öÐòºÅ£¬»ñÈ¡±¨¾¯Êä³öÃû³Æ int getAlarmOutInfo(int iAlarmOut, QCheckBox *pQCheckAlarmOut); //»ñÈ¡¿ÉÓñ¨¾¯Êä³öͨµÀCheckboxÊý×飻 new³öÀ´µÄ±äÁ¿£¬ÓÉÍⲿÊÍ·Å //¸ÃÊý×é´óСΪMAX_ALARMOUT_V30, ´«ÈëµÄÊý×éÒ»¶¨²»ÄܱÈÕâ¸öС£¬·ñÔò³ÌÐò»á±ÀÀ£ int KIT_CreateCheckboxAlarmOut(long lUserID, QCheckBox *qArrAlarmOut[], int *piTotalNum); //ÏÔʾ´íÎóÌáʾÐÅÏ¢ int KIT_DisplayErrorInfo(char *pInfoType, int iDisplayType); void KIT_OutputDebugString(const char * ); #endif /* PUBLICFUC_H_ */