From f2327d66d762a2279bf7b725a818a17a213e9e0b Mon Sep 17 00:00:00 2001
From: pans <pans@454eff88-639b-444f-9e54-f578c98de674>
Date: 星期三, 09 八月 2017 14:57:48 +0800
Subject: [PATCH] add RemoteMethod.capnp etc.
---
ProxyServer/proxyserver.h | 28 +++++++++++-----------------
1 files changed, 11 insertions(+), 17 deletions(-)
diff --git a/ProxyServer/proxyserver.h b/ProxyServer/proxyserver.h
index 0799edf..c75e125 100644
--- a/ProxyServer/proxyserver.h
+++ b/ProxyServer/proxyserver.h
@@ -1,6 +1,6 @@
-#include <sys/socket.h>
-#include <sys/types.h>
-#include <netinet/in.h>
+#include<sys/socket.h>
+#include<sys/types.h>
+#include<netinet/in.h>
#include <netdb.h>
#include <stdio.h>
#include <string.h>
@@ -14,6 +14,7 @@
#include <sys/time.h>
#include <stdbool.h>
#include <fcntl.h>
+#include "/usr/include/mysql/mysql.h"
#include <sys/stat.h>
#define _DELETE_FILE
#include <dirent.h>
@@ -61,6 +62,7 @@
{
bool mp4downed;
bool Ack;
+ bool InSearchRange;
char Date[15];
char Time[15];
char Rule[20];
@@ -91,16 +93,6 @@
void zclock_sleep (int msecs);
-
-
-void zclock_sleep (int msecs)
-{
- struct timespec t;
- t.tv_sec = msecs / 1000;
- t.tv_nsec = (msecs % 1000) * 1000000;
- nanosleep (&t, NULL);
-}
-
typedef struct{
char name[1024];
}filenames,*lpfilenames;
@@ -112,7 +104,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 +119,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 +132,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