merge my fix
git-svn-id: http://192.168.1.226/svn/proxy@3 454eff88-639b-444f-9e54-f578c98de674
New file |
| | |
| | | #!/bin/sh |
| | | |
| | | rm /tmp/tmp.zip |
| | | rm /tmp/tmpZip -r |
| | | |
| | | rm demo *.o *.so |
| | | |
| | | gcc -g -c -fPIC -o proxy.o proxyserver.c |
| | | gcc -shared -pthread -o libproxy.so proxy.o -lmysqlclient |
| | | cp libproxy.so /usr/local/lib |
| | | /sbin/ldconfig |
| | | gcc -g -o demo main.c -lproxy |
| | | |
| | | service apache2 restart |
| | |
| | | #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; |
| | |
| | | { |
| | | bool mp4downed; |
| | | bool Ack; |
| | | bool InSearchRange; |
| | | char Date[15]; |
| | | char Time[15]; |
| | | char Rule[20]; |
| | |
| | | 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); |
| | |
| | | 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);
|
| | | |
| | | |
| | | |
| | |
| | | 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 参数:无。返回:当前的ip地址子网掩码和网关 |
| | | 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.删除设备 参数:设备ip 返回:成功或失败的提示。
|
| | | 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); |
| | | // |