From 1055d5ce8bea8ed299a1f102e58a1664a0961f6c Mon Sep 17 00:00:00 2001
From: Kevin12345 <2353144101@qq.com>
Date: 星期五, 01 十一月 2024 18:19:15 +0800
Subject: [PATCH] 修改结构体
---
Client/朱航/log/朱航1031.doc | 0
Server/马渝杭/log/日志_马渝杭_20241031.doc | 0
Client/冀浩昶/log/日志_冀浩昶_1101.doc | 0
Server/王琨元/log/日志模板_王琨元_1031 .doc | 0
Server/马渝杭/log/日志_马渝杭_20241101.doc | 0
Client/朱航/log/朱航1101.doc | 0
Client/黎弘霖/log/设备管理_黎弘霖_1101.doc | 0
Server/王琨元/document/表.docx | 0
Server/马渝杭/log/20241101昆仑日报.doc | 0
Server/王琨元/document/~$表.docx | 0
/dev/null | 67 -------------
Client/朱航/log/朱航1030.doc | 0
Client/黎弘霖/code/Devices_Management_Struct.h | 48 ++++++---
common.h | 159 ++++++++++++++++++++-----------
14 files changed, 131 insertions(+), 143 deletions(-)
diff --git "a/Client/\345\206\200\346\265\251\346\230\266/log/\346\227\245\345\277\227_\345\206\200\346\265\251\346\230\266_1101.doc" "b/Client/\345\206\200\346\265\251\346\230\266/log/\346\227\245\345\277\227_\345\206\200\346\265\251\346\230\266_1101.doc"
new file mode 100644
index 0000000..3c27051
--- /dev/null
+++ "b/Client/\345\206\200\346\265\251\346\230\266/log/\346\227\245\345\277\227_\345\206\200\346\265\251\346\230\266_1101.doc"
Binary files differ
diff --git "a/Client/\346\234\261\350\210\252/log/\346\234\261\350\210\2521030.doc" "b/Client/\346\234\261\350\210\252/log/\346\234\261\350\210\2521030.doc"
new file mode 100644
index 0000000..f1496da
--- /dev/null
+++ "b/Client/\346\234\261\350\210\252/log/\346\234\261\350\210\2521030.doc"
Binary files differ
diff --git "a/Client/\346\234\261\350\210\252/log/\346\234\261\350\210\2521031.doc" "b/Client/\346\234\261\350\210\252/log/\346\234\261\350\210\2521031.doc"
new file mode 100644
index 0000000..ee2e85f
--- /dev/null
+++ "b/Client/\346\234\261\350\210\252/log/\346\234\261\350\210\2521031.doc"
Binary files differ
diff --git "a/Client/\346\234\261\350\210\252/log/\346\234\261\350\210\2521101.doc" "b/Client/\346\234\261\350\210\252/log/\346\234\261\350\210\2521101.doc"
new file mode 100644
index 0000000..55be380
--- /dev/null
+++ "b/Client/\346\234\261\350\210\252/log/\346\234\261\350\210\2521101.doc"
Binary files differ
diff --git "a/Client/\351\273\216\345\274\230\351\234\226/code/Devices_Management_Struct.h" "b/Client/\351\273\216\345\274\230\351\234\226/code/Devices_Management_Struct.h"
index 70ae3d4..67b38a2 100644
--- "a/Client/\351\273\216\345\274\230\351\234\226/code/Devices_Management_Struct.h"
+++ "b/Client/\351\273\216\345\274\230\351\234\226/code/Devices_Management_Struct.h"
@@ -3,8 +3,8 @@
{
AD_Req,//添加设备请求
AD_Res,//添加设备响应
- DD_Req,//关闭设备请求
- DD_Res,//关闭设备请求
+ CD_Req,//关闭设备请求
+ CD_Res,//关闭设备请求
PD_Req,//暂停设备请求
PD_Res,//暂停设备请求
};
@@ -29,15 +29,22 @@
{
char Device_Name[32];
char Device_Status[32];
- char Start_Time[32];
- char Work_Time[32];
char Manufacturer[100];
char Devices_Type[32];
+ double Longitude;
+ double Latitude;
};
struct ADRes
{
Head head;
-
+ char Device_Name[32];
+ char Device_Status[32];
+ char Start_Time[32];
+ char Work_Time[32];
+ char Manufacturer[100];
+ char Devices_Type[32];
+ double Longitude;
+ double Latitude;
ADPermission per;
ADRes() {
head.type = AD_Res;
@@ -47,16 +54,16 @@
};
//关闭设备
-struct DDReq
+struct CDReq
{
Head head;
char Device_Name[32];
- DDReq() {
- head.type = DD_Req;
- head.len = sizeof(DDReq);
+ CDReq() {
+ head.type = CD_Req;
+ head.len = sizeof(CDReq);
}
};
-struct DDPermission
+struct CDPermission
{
char Device_Name[32];
char Device_Status[32];
@@ -64,15 +71,18 @@
char Work_Time[32];
char Manufacturer[100];
char Devices_Type[32];
+ double Longitude;
+ double Latitude;
};
-struct DDRes
+struct CDRes
{
Head head;
-
- DDPermission per;
- DDRes() {
- head.type = DD_Res;
- head.len = sizeof(DDRes);
+ char Device_Status[32];
+ int status;
+ CDPermission per;
+ CDRes() {
+ head.type = CD_Res;
+ head.len = sizeof(CDRes);
}
};
@@ -94,11 +104,15 @@
char Work_Time[32];
char Manufacturer[100];
char Devices_Type[32];
+ double Longitude;
+ double Latitude;
};
struct PDRes
{
Head head;
-
+ char Device_Status[32];
+ char Work_Time[32];
+ int status;
PDPermission per;
PDRes() {
head.type = PD_Res;
diff --git "a/Client/\351\273\216\345\274\230\351\234\226/log/\350\256\276\345\244\207\347\256\241\347\220\206_\351\273\216\345\274\230\351\234\226_1101.doc" "b/Client/\351\273\216\345\274\230\351\234\226/log/\350\256\276\345\244\207\347\256\241\347\220\206_\351\273\216\345\274\230\351\234\226_1101.doc"
new file mode 100644
index 0000000..c9ef8ff
--- /dev/null
+++ "b/Client/\351\273\216\345\274\230\351\234\226/log/\350\256\276\345\244\207\347\256\241\347\220\206_\351\273\216\345\274\230\351\234\226_1101.doc"
Binary files differ
diff --git "a/Server/\347\216\213\347\220\250\345\205\203/document/~$\350\241\250.docx" "b/Server/\347\216\213\347\220\250\345\205\203/document/~$\350\241\250.docx"
new file mode 100644
index 0000000..8b245e2
--- /dev/null
+++ "b/Server/\347\216\213\347\220\250\345\205\203/document/~$\350\241\250.docx"
Binary files differ
diff --git "a/Server/\347\216\213\347\220\250\345\205\203/document/\345\244\207\344\273\275\345\257\274\345\207\272.txt" "b/Server/\347\216\213\347\220\250\345\205\203/document/\345\244\207\344\273\275\345\257\274\345\207\272.txt"
deleted file mode 100644
index 79c8216..0000000
--- "a/Server/\347\216\213\347\220\250\345\205\203/document/\345\244\207\344\273\275\345\257\274\345\207\272.txt"
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/bash
-
-# 鏁版嵁搴撹繛鎺ュ弬鏁�
-DB_USER="your_username"
-DB_PASS="your_password"
-DB_NAME="your_database_name"
-BACKUP_DIR="/path/to/backup/directory"
-
-# 鑾峰彇褰撳墠鏃ユ湡锛岀敤浜庢枃浠跺悕
-DATE=$(date +%Y%m%d%H%M%S)
-
-# 澶囦唤鏂囦欢鍚�
-BACKUP_FILE="${BACKUP_DIR}/backup_${DATE}.sql"
-
-# 鍒涘缓澶囦唤鐩綍锛堝鏋滀笉瀛樺湪锛�
-mkdir -p $BACKUP_DIR
-
-# 浣跨敤mysqldump杩涜鏁版嵁搴撳浠�
-mysqldump -u $DB_USER -p$DB_PASS $DB_NAME > $BACKUP_FILE
-
-if [ $? -eq 0 ]; then
- echo "鏁版嵁搴撳浠芥垚鍔燂細$BACKUP_FILE"
-else
- echo "鏁版嵁搴撳浠藉け璐�"
-fi
-
-# 娣诲姞瀹氭椂浠诲姟锛堜娇鐢╟rontab -e鏉ョ紪杈戝畾鏃朵换鍔★級
-# 渚嬪锛屾瘡澶╁噷鏅�2鐐规墽琛屽浠�
-# 0 2 * * * /path/to/this/script.sh
\ No newline at end of file
diff --git "a/Server/\347\216\213\347\220\250\345\205\203/document/\345\273\272\350\241\250.docx" "b/Server/\347\216\213\347\220\250\345\205\203/document/\345\273\272\350\241\250.docx"
deleted file mode 100644
index ed3cc7a..0000000
--- "a/Server/\347\216\213\347\220\250\345\205\203/document/\345\273\272\350\241\250.docx"
+++ /dev/null
Binary files differ
diff --git "a/Server/\347\216\213\347\220\250\345\205\203/document/\350\241\250.docx" "b/Server/\347\216\213\347\220\250\345\205\203/document/\350\241\250.docx"
new file mode 100644
index 0000000..4c098dd
--- /dev/null
+++ "b/Server/\347\216\213\347\220\250\345\205\203/document/\350\241\250.docx"
Binary files differ
diff --git "a/Server/\347\216\213\347\220\250\345\205\203/document/\351\230\262\346\263\250\345\205\245.txt" "b/Server/\347\216\213\347\220\250\345\205\203/document/\351\230\262\346\263\250\345\205\245.txt"
deleted file mode 100644
index 19a2f6c..0000000
--- "a/Server/\347\216\213\347\220\250\345\205\203/document/\351\230\262\346\263\250\345\205\245.txt"
+++ /dev/null
@@ -1,67 +0,0 @@
-#include <iostream>
-#include <mysql_driver.h>
-#include <mysql_connection.h>
-#include <cppconn/statement.h>
-#include <cppconn/prepared_statement.h>
-#include <cppconn/resultset.h>
-#include <string>
-#include <regex>
-
-class DatabaseUtils {
-public:
- // 杩炴帴鏁版嵁搴�
- static sql::Connection* connect() {
- try {
- sql::mysql::MySQL_Driver* driver = sql::mysql::get_mysql_driver_instance();
- sql::Connection* con = driver->connect("tcp://127.0.0.1:3306", "mayi", "123456");
- con->setSchema("your_database");
- return con;
- } catch (sql::SQLException& e) {
- std::cerr << "鏁版嵁搴撹繛鎺ラ敊璇�: " << e.what() << std::endl;
- return nullptr;
- }
- }
-
- // 妫�鏌QL璇彞鏄惁瀛樺湪娼滃湪娉ㄥ叆椋庨櫓锛堢畝鍗曟鍒欐牎楠岋級
- static bool isSafeSQL(const std::string& sql) {
- // 绠�鍗曠殑姝e垯琛ㄨ揪寮忥紝闃叉甯歌鐨勬敞鍏ュ叧閿瘝
- std::regex injectionRegex("(drop|delete|update|insert|select\\s+\\*\\s+from)", std::regex_constants::icase);
- return!std::regex_search(sql, injectionRegex);
- }
-
- // 浣跨敤鍙傛暟鍖栨煡璇㈡墽琛孲QL璇彞
- static sql::ResultSet* executeSafeQuery(sql::Connection* con, const std::string& sql, const std::vector<std::string>& params) {
- try {
- sql::PreparedStatement* pstmt = con->prepareStatement(sql);
- for (size_t i = 0; i < params.size(); ++i) {
- pstmt->setString(i + 1, params[i]);
- }
- return pstmt->executeQuery();
- } catch (sql::SQLException& e) {
- std::cerr << "鏌ヨ鎵ц閿欒: " << e.what() << std::endl;
- return nullptr;
- }
- }
-};
-
-int main() {
- sql::Connection* con = DatabaseUtils::connect();
- if (con) {
- std::string sql = "SELECT * FROM your_table WHERE column_name =?";
- std::vector<std::string> params = {"test_value"};
- if (DatabaseUtils::isSafeSQL(sql)) {
- sql::ResultSet* res = DatabaseUtils::executeSafeQuery(con, sql, params);
- if (res) {
- while (res->next()) {
- // 澶勭悊缁撴灉
- std::cout << res->getString(1) << std::endl;
- }
- delete res;
- }
- } else {
- std::cerr << "娼滃湪鐨凷QL娉ㄥ叆椋庨櫓" << std::endl;
- }
- delete con;
- }
- return 0;
-}
\ No newline at end of file
diff --git "a/Server/\347\216\213\347\220\250\345\205\203/log/\346\227\245\345\277\227\346\250\241\346\235\277_\347\216\213\347\220\250\345\205\203_1031 .doc" "b/Server/\347\216\213\347\220\250\345\205\203/log/\346\227\245\345\277\227\346\250\241\346\235\277_\347\216\213\347\220\250\345\205\203_1031 .doc"
new file mode 100644
index 0000000..45c9110
--- /dev/null
+++ "b/Server/\347\216\213\347\220\250\345\205\203/log/\346\227\245\345\277\227\346\250\241\346\235\277_\347\216\213\347\220\250\345\205\203_1031 .doc"
Binary files differ
diff --git "a/Server/\351\251\254\346\270\235\346\235\255/log/20241101\346\230\206\344\273\221\346\227\245\346\212\245.doc" "b/Server/\351\251\254\346\270\235\346\235\255/log/20241101\346\230\206\344\273\221\346\227\245\346\212\245.doc"
new file mode 100644
index 0000000..27eef8f
--- /dev/null
+++ "b/Server/\351\251\254\346\270\235\346\235\255/log/20241101\346\230\206\344\273\221\346\227\245\346\212\245.doc"
Binary files differ
diff --git "a/Server/\351\251\254\346\270\235\346\235\255/log/\346\227\245\345\277\227_\351\251\254\346\270\235\346\235\255_20241030.doc" "b/Server/\351\251\254\346\270\235\346\235\255/log/\346\227\245\345\277\227_\351\251\254\346\270\235\346\235\255_20241031.doc"
similarity index 100%
rename from "Server/\351\251\254\346\270\235\346\235\255/log/\346\227\245\345\277\227_\351\251\254\346\270\235\346\235\255_20241030.doc"
rename to "Server/\351\251\254\346\270\235\346\235\255/log/\346\227\245\345\277\227_\351\251\254\346\270\235\346\235\255_20241031.doc"
Binary files differ
diff --git "a/Server/\351\251\254\346\270\235\346\235\255/log/\346\227\245\345\277\227_\351\251\254\346\270\235\346\235\255_20241101.doc" "b/Server/\351\251\254\346\270\235\346\235\255/log/\346\227\245\345\277\227_\351\251\254\346\270\235\346\235\255_20241101.doc"
new file mode 100644
index 0000000..75600f2
--- /dev/null
+++ "b/Server/\351\251\254\346\270\235\346\235\255/log/\346\227\245\345\277\227_\351\251\254\346\270\235\346\235\255_20241101.doc"
Binary files differ
diff --git a/common.h b/common.h
index 3804b49..03aa54b 100644
--- a/common.h
+++ b/common.h
@@ -1,9 +1,7 @@
#ifndef COMMON_H
#define COMMON_H
-#include <iostream>
-#include <cstring>
-#include <QString>
+#include <string.h>
enum TypeInfo{
@@ -25,8 +23,8 @@
//璁惧绠$悊
AD_Req,//娣诲姞璁惧璇锋眰
AD_Res,//娣诲姞璁惧鍝嶅簲
- DD_Req,//鍋滄璁惧璇锋眰
- DD_Res,//鍋滄璁惧璇锋眰
+ CD_Req,//鍏抽棴璁惧璇锋眰
+ CD_Res,//鍏抽棴璁惧璇锋眰
PD_Req,//鏆傚仠璁惧璇锋眰
PD_Res,//鏆傚仠璁惧璇锋眰
@@ -273,15 +271,22 @@
{
char Device_Name[32];
char Device_Status[32];
- char Start_Time[32];
- char Work_Time[32];
char Manufacturer[100];
char Devices_Type[32];
+ double Longitude;
+ double Latitude;
};
struct ADRes
{
Head head;
-
+ char Device_Name[32];
+ char Device_Status[32];
+ char Start_Time[32];
+ char Work_Time[32];
+ char Manufacturer[100];
+ char Devices_Type[32];
+ double Longitude;
+ double Latitude;
ADPermission per;
ADRes() {
head.type = AD_Res;
@@ -290,17 +295,17 @@
};
-//鍋滄璁惧
-struct DDReq
+//鍏抽棴璁惧
+struct CDReq
{
Head head;
char Device_Name[32];
- DDReq() {
- head.type = DD_Req;
- head.len = sizeof(DDReq);
+ CDReq() {
+ head.type = CD_Req;
+ head.len = sizeof(CDReq);
}
};
-struct DDPermission
+struct CDPermission
{
char Device_Name[32];
char Device_Status[32];
@@ -308,15 +313,18 @@
char Work_Time[32];
char Manufacturer[100];
char Devices_Type[32];
+ double Longitude;
+ double Latitude;
};
-struct DDRes
+struct CDRes
{
Head head;
-
- DDPermission per;
- DDRes() {
- head.type = DD_Res;
- head.len = sizeof(DDRes);
+ char Device_Status[32];
+ int status;
+ CDPermission per;
+ CDRes() {
+ head.type = CD_Res;
+ head.len = sizeof(CDRes);
}
};
@@ -338,11 +346,15 @@
char Work_Time[32];
char Manufacturer[100];
char Devices_Type[32];
+ double Longitude;
+ double Latitude;
};
struct PDRes
{
Head head;
-
+ char Device_Status[32];
+ char Work_Time[32];
+ int status;
PDPermission per;
PDRes() {
head.type = PD_Res;
@@ -635,26 +647,26 @@
// 绯荤粺杩愯鐘舵�佽〃鐩稿叧淇℃伅
struct Histroy_Info{
int sysId; // 瀵瑰簲绯荤粺杩愯鐘舵�佽〃鐨勮褰曠紪鍙�
- QString sysDataCollectionTime; // 鏁版嵁閲囬泦鏃堕棿
- QString sysDeviceType; // 璁惧绫诲瀷
- QString sysDeviceId; // 璁惧缂栧彿
- QString sysDeviceStatus; // 璁惧鐘舵��
- QString sysSystemStatus; // 绯荤粺鏁翠綋杩愯鐘舵�佹弿杩�
+ char sysDataCollectionTime[50]; // 鏁版嵁閲囬泦鏃堕棿
+ char sysDeviceType[50]; // 璁惧绫诲瀷
+ char sysDeviceId[50]; // 璁惧缂栧彿
+ char sysDeviceStatus[50]; // 璁惧鐘舵��
+ char sysSystemStatus[50]; // 绯荤粺鏁翠綋杩愯鐘舵�佹弿杩�
int devId; // 瀵瑰簲璁惧璇︾粏淇℃伅琛ㄧ殑璁板綍缂栧彿
- QString devDeviceType; // 璁惧绫诲瀷锛堜笌绯荤粺杩愯鐘舵�佽〃涓殑璁惧绫诲瀷瀵瑰簲锛屽彲鐢ㄤ簬鍏宠仈锛�
- QString devDeviceId; // 璁惧缂栧彿锛堜笌绯荤粺杩愯鐘舵�佽〃涓殑璁惧缂栧彿瀵瑰簲锛屽彲鐢ㄤ簬鍏宠仈锛�
- QString devModel; // 璁惧鍨嬪彿
- QString runDeviceStatus; // 璁惧鐘舵��
- QString runFaultAlarmTime; // 鏁呴殰鎶ヨ鏃堕棿
- QString runFaultDescription; // 鏁呴殰璇︾粏鎻忚堪
+ char devDeviceType[50]; // 璁惧绫诲瀷锛堜笌绯荤粺杩愯鐘舵�佽〃涓殑璁惧绫诲瀷瀵瑰簲锛屽彲鐢ㄤ簬鍏宠仈锛�
+ char devDeviceId[50]; // 璁惧缂栧彿锛堜笌绯荤粺杩愯鐘舵�佽〃涓殑璁惧缂栧彿瀵瑰簲锛屽彲鐢ㄤ簬鍏宠仈锛�
+ char devModel[50]; // 璁惧鍨嬪彿
+ char runDeviceStatus[50]; // 璁惧鐘舵��
+ char runFaultAlarmTime[50]; // 鏁呴殰鎶ヨ鏃堕棿
+ char runFaultDescription[50]; // 鏁呴殰璇︾粏鎻忚堪
int safetyId; // 瀵瑰簲璁惧瀹夊叏鐘舵�佽〃鐨勮褰曠紪鍙�
- QString safetyDataCollectionTime; // 鏁版嵁閲囬泦鏃堕棿锛堝彲鐢ㄤ簬鍏宠仈涓嶅悓琛ㄥ湪鍚屼竴鏃堕棿鐐圭殑鏁版嵁鎯呭喌锛�
- QString safetyDeviceType; // 璁惧绫诲瀷锛堢敤浜庡叧鑱旓級
- QString safetyDeviceId; // 璁惧缂栧彿锛堢敤浜庡叧鑱旓級
- QString safetyStatus; // 璁惧瀹夊叏鐘舵��
- QString safetyParameter; // 瀹夊叏鍙傛暟
+ char safetyDataCollectionTime[50]; // 鏁版嵁閲囬泦鏃堕棿锛堝彲鐢ㄤ簬鍏宠仈涓嶅悓琛ㄥ湪鍚屼竴鏃堕棿鐐圭殑鏁版嵁鎯呭喌锛�
+ char safetyDeviceType[50]; // 璁惧绫诲瀷锛堢敤浜庡叧鑱旓級
+ char safetyDeviceId[50]; // 璁惧缂栧彿锛堢敤浜庡叧鑱旓級
+ char safetyStatus[50]; // 璁惧瀹夊叏鐘舵��
+ char safetyParameter[50]; // 瀹夊叏鍙傛暟
};
// 鍘嗗彶鏌ヨ鍝嶅簲缁撴瀯浣�
// 瀹夊叏鐘舵�佽〃鐩稿叧淇℃伅
@@ -683,7 +695,7 @@
struct VersionNumRes // 鐗堟湰鍙峰搷搴�
{
Head head;
- char version_id[64]; // 鐗堟湰鍙�
+ char versionId[64]; // 鐗堟湰鍙�
VersionNumRes() {
head.type = VERSION_NUM_RES;
head.len = sizeof(VersionNumRes);
@@ -693,8 +705,8 @@
// 鏂囦欢浼犺緭
struct FileInfo
{
- char file_name[256];
- long long file_size;
+ char fileName[256];
+ long long fileSize;
char s_filepath[128];
char content[0];
};
@@ -712,7 +724,7 @@
struct UploadFileRes { // 涓婁紶鏂囦欢鐨勫搷搴�
Head head;
bool state = false;
- char file_name[256];
+ char fileName[256];
long long file_size;
UploadFileRes()
{
@@ -725,14 +737,9 @@
// 璇锋眰
struct VersionInfoEntryReq {
Head head;
- char version_id[64]; // 鐗堟湰鍙�
- char version_id_old[64]; // 涓婁竴涓増鏈彿
- char s_filepath[16][128]; //鏈嶅姟鍣ㄦ斁鏈�鏂扮増鏈殑璺緞
- char version_description[256]; //鏇存柊鍐呭
- char version_creattime[32]; // 鏇存柊鏃堕棿
- char filename[16][128];
- long long filesize[16];
- char c_filepath[16][128];
+ char versionId[64]; // 鐗堟湰鍙�
+ char versionIdOld[64]; // 涓婁竴涓増鏈彿
+ char context[0]; //鍖呭惈涓嬭浇鏂囦欢淇℃伅
int fileNum;
VersionInfoEntryReq()
@@ -757,7 +764,7 @@
struct VersionUpdateReq {
Head head;
- char cur_version_id[64]; // 鐗堟湰鍙�
+ char curVersionId[64]; // 鐗堟湰鍙�
VersionUpdateReq()
{
head.type = VERSION_UPDATE_REQ;
@@ -769,9 +776,9 @@
struct VersionUpdateRes {
Head head;
bool state = false;
- char version_id[64]; // 鐗堟湰鍙�
- char update_date[32]; // 鏇存柊鏃堕棿
- char version_description[1024]; //鏇存柊鎻忚堪
+ char versionId[64]; // 鐗堟湰鍙�
+ char updateDate[32]; // 鏇存柊鏃堕棿
+ char versionDescription[1024]; //鏇存柊鎻忚堪
VersionUpdateRes()
{
@@ -783,7 +790,7 @@
// 鐗堟湰鏇存柊鏂囦欢涓嬭浇璇锋眰
struct FileDownloadsReq {
Head head;
- char version_id[64]; // 鐗堟湰鍙�
+ char versionId[64]; // 鐗堟湰鍙�
FileDownloadsReq()
{
head.type = FILE_DOWNLOADS_REQ;
@@ -794,12 +801,12 @@
// 鐗堟湰鏇存柊鏂囦欢涓嬭浇鍝嶅簲
struct FileDownloadsRes {
Head head;
- char version_id[64]; // 鐗堟湰鍙�
+ char versionId[64]; // 鐗堟湰鍙�
char filename[128]; //鏂囦欢鍚�
long long filesize; //鏂囦欢澶у皬
char c_filepath[128]; //瀹㈡埛绔斁鏈�鏂扮増鏈殑鏈湴璺緞
int fileNum; // 鏂囦欢鏁伴噺
- long long all_fileSize; // 鏂囦欢鎬诲ぇ灏�
+ long long allFileSize; // 鏂囦欢鎬诲ぇ灏�
char content[0];
FileDownloadsRes()
{
@@ -812,8 +819,8 @@
struct DownloadSuccessfullyRes{
Head head;
bool state = false;
- char file_name[256];
- long long file_size;
+ char fileName[256];
+ long long fileSize;
DownloadSuccessfullyRes()
{
head.type = DOWNLOAD_SUCCESSFULLY_RES;
@@ -821,6 +828,26 @@
}
};
+<<<<<<< HEAD
+//鏃ュ織鏌ヨ
+
+enum Typeinfo{
+ LOGSEARCH_REQ,//鏃ュ織鏌ヨ璇锋眰
+ LOGSEARCH_RES,//鏃ュ織鏌ヨ鍝嶅簲
+
+};
+
+struct Head
+{
+ int type; // 鍔熻兘绫诲瀷
+ int len; //灏佸寘闀垮害
+
+};
+// 鏃ュ織鏌ヨ璇锋眰缁撴瀯浣�
+struct LogQueryReq {
+ Head heade; // 鏁版嵁澶�
+ char keyWords[0]; // 瀛樺偍澶氫釜鍏抽敭瀛楃殑鏌旀�ф暟缁�
+=======
//鏃ュ織
struct ParsedLog {
char timestamp[64]; // 鏃堕棿鎴�
@@ -834,7 +861,12 @@
// 鏃ュ織鏌ヨ璇锋眰缁撴瀯浣�
struct LogQueryReq {
Head head; // 鏁版嵁澶�
+<<<<<<< HEAD
char keyWords[32]; // 瀛樺偍鍏抽敭瀛楃殑鏁扮粍
+=======
+ char keyWords[32]; // 瀛樺偍鍏抽敭瀛楃殑鏁扮粍
+>>>>>>> bb11cc624ab058fc3a6541f91f37985b8caae9b6
+>>>>>>> 3d2b586460830c5dbebffe49bd3d5c2477de0aee
// 鏃犲弬鏋勯�犲嚱鏁�
LogQueryReq() {
head.type = LOGSEARCH_REQ;
@@ -844,18 +876,27 @@
// 鏃ュ織鏌ヨ鍝嶅簲缁撴瀯浣�
struct LogQueryRes {
+<<<<<<< HEAD
+ Head heade;
+=======
Head head;
+>>>>>>> bb11cc624ab058fc3a6541f91f37985b8caae9b6
int status; // 鍝嶅簲鐘舵�� (濡� 0 琛ㄧず鎴愬姛锛岄潪 0 琛ㄧず澶辫触)
char errorMessage[256]; // 閿欒淇℃伅锛堝鏋滄湁锛�
// 鏃犲弬鏋勯�犲嚱鏁�
LogQueryRes() {
head.type = LOGSEARCH_RES;
+<<<<<<< HEAD
+ head.len = sizeof(LogQueryRes);
+=======
head.len = sizeof(LogQueryRes);
+>>>>>>> bb11cc624ab058fc3a6541f91f37985b8caae9b6
}
};
-#endif // COMMON_H
\ No newline at end of file
+#endif // COMMON_H
+
--
Gitblit v1.8.0