From c88f653a08d0006fafa9c7b08c43888df2c46b8c Mon Sep 17 00:00:00 2001 From: houxiao <houxiao@454eff88-639b-444f-9e54-f578c98de674> Date: 星期四, 08 十二月 2016 10:10:11 +0800 Subject: [PATCH] merge my fix --- ProxyServer/proxyserver.h | 53 ++++++++++++++++++++++++++++------------------------- 1 files changed, 28 insertions(+), 25 deletions(-) diff --git a/ProxyServer/proxyserver.h b/ProxyServer/proxyserver.h index 0799edf..82fddec 100644 --- a/ProxyServer/proxyserver.h +++ b/ProxyServer/proxyserver.h @@ -1,25 +1,25 @@ -#include <sys/socket.h> -#include <sys/types.h> -#include <netinet/in.h> -#include <netdb.h> -#include <stdio.h> -#include <string.h> -#include <stdlib.h> -#include <unistd.h> -#include <errno.h> -#include <arpa/inet.h> -#include <time.h> -#include <signal.h> -#include <pthread.h> -#include <sys/time.h> -#include <stdbool.h> -#include <fcntl.h> -#include <sys/stat.h> +#include<sys/socket.h> +#include<sys/types.h> +#include<netinet/in.h> +#include<netdb.h> +#include<stdio.h> +#include<string.h> +#include<stdlib.h> +#include<unistd.h> +#include<errno.h> +#include<arpa/inet.h> +#include<time.h> +#include<signal.h> +#include<pthread.h> +#include<sys/time.h> +#include<stdbool.h> +#include<fcntl.h> +#include<sys/stat.h> #define _DELETE_FILE -#include <dirent.h> -#include <limits.h> -#include <sys/io.h> -#include <signal.h> +#include<dirent.h> +#include<limits.h> +#include<sys/io.h> +#include<signal.h> int RealAlarmEventNum[16]; typedef struct{ int Year; @@ -61,6 +61,7 @@ { bool mp4downed; bool Ack; + bool InSearchRange; char Date[15]; char Time[15]; char Rule[20]; @@ -112,7 +113,7 @@ int doesFileExist(const char *filename); void delete_file(const char *path); void delete_folder(const char *path); -void AnalySerFile(char* p_save_buf,int res); +void AnalySerFile(char* p_save_buf,int res, int SearchStartTm, int SearchEndTm); int GetFileNameInFolder(char* dirname,lpfilenames lpfilename); int net_test(char* serverIP,char* port); void GPIOinit(void); @@ -127,7 +128,7 @@ void AurhorizationResponseBytesReatart(char* byte_array_out,int * byte_array_length_out,char *Myuri, char *nonce,char *cnonce,char *response); int Read_MysqlData(); int UpdateMysqData(int key); - +int InsertMysqlData(char *AnalyserName,char* AnalyserIP,char* AnalyserPort,char* ServerIP,char* ServerPort,char* username,char* pass,char* resol,char* commType); @@ -140,9 +141,11 @@ char* GetPHPSearchMetaInfo(char* AnalyserIP,char* user,char* pass,int Channel,int s_year,int s_month,int s_day,int s_hour,int s_minute,int s_sec,int e_year,int e_month,int e_day,int e_hour,int e_minute,int e_sec); //potection function char* GetSearchMetaInfo(char* AnalyserIP,char* user,char* pass,int Channel,lpMyTime StartTm,lpMyTime EndTm); //4.鏌ヨ璁板綍 鍙傛暟锛氬垎鏋愬櫒IP锛屽紑濮嬫椂闂达紝缁撴潫鏃堕棿锛屼俊閬撳彿銆傝繑鍥烇細鏌ヨ缁撴灉銆傦紙鍖呮嫭淇¢亾鍙凤紝鎶ヨ鏃堕棿锛屾挱鏀惧湴鍧�锛岀瓑銆傦級 char* GetAnalyserNet(void); //5.鑾峰彇褰撳墠杞彂鍣ㄧ殑ip 鍙傛暟锛氭棤銆傝繑鍥烇細褰撳墠鐨刬p鍦板潃瀛愮綉鎺╃爜鍜岀綉鍏� -int SetAnalyserNet(char* NetInfo); +int SetAnalyserNet(char* NetInfo); char* GetMp4Info(char* AnalyserIP,char* user,char* pass,int Channel,char* path) ; - +char* GetAnalyserAll(); //9.鏌ヨ璁惧 鍙傛暟锛氭棤 杩斿洖锛氬垎鏋愬櫒鐨勫悕绉板拰ip +int DeleteAnalyser(char* AnalyserIP); //8.鍒犻櫎璁惧 鍙傛暟锛氳澶噄p 杩斿洖锛氭垚鍔熸垨澶辫触鐨勬彁绀恒�� +int InsertAnalyser(char *AnalyserName,char* AnalyserIP,char* AnalyserPort,char* ServerIP,char* ServerPort,char* user,char* pass,char* resol,char* commType);// 7.娣诲姞璁惧 鍙傛暟锛氳澶囧睘鎬с�傝繑鍥烇細鎴愬姛杩斿洖瀵瑰簲鐨勮棰戞祦鍦板潃锛屽け璐ヨ繑鍥炰竴涓彁绀恒�� char* GetDeviceInfo(char* AnalyserIP); int Check_MysqlData(char *AnalyserName,char* AnalyserIP,char* AnalyserPort,char* ServerIP,char* ServerPort,char* user,char* pass,char* resol,char* commType); // -- Gitblit v1.8.0