Skip to content

Commit 111a813

Browse files
authored
Merge pull request #20 from libxengine/develop
V3.5Merge
2 parents 0374273 + a427a07 commit 111a813

File tree

84 files changed

+8461
-791
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+8461
-791
lines changed

.gitee/ISSUE_TEMPLATE.zh-CN.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

.gitee/PULL_REQUEST_TEMPLATE.zh-CN.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

README.en.md

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -35,35 +35,18 @@ feature list:
3535
#### Requirements
3636
support system above windows 7sp1 and linux(ubuntu20.04,centos8)
3737
XEngine need V7.24 or above
38-
vcpkg need 2021.05.11 or above
3938

4039
#### Windows
41-
use vs2019 x86(debug or release) x64(only release) open and complie
40+
use vs open and complie
4241
You need to configure the environment in the following way, otherwise you may need to set the library directory in the project yourself
4342

44-
##### install Dependent library
45-
vcpkg:https://github.com/microsoft/vcpkg
46-
vcpkg.exe install jsoncpp
47-
vcpkg integrate install
48-
you can not use vcpkg and config jsoncpp development for youself
49-
5043
##### XEngine
5144
download xengine through git.read xengine project readme file to configure your env
5245

5346
#### Linux
5447
Linux use Makefile to complie
55-
supproted ubuntu x64 or centos x64
56-
57-
##### install Dependent library
58-
install jsoncpp to your system
59-
ubuntu20.04
60-
sudo apt install libjsoncpp-devel
61-
Centos8.x
62-
sudo dnf install jsoncpp-devel
63-
64-
##### XEngine Install
65-
you can install xengine env to your system by shell
66-
like this:sudo XEngine_LINEnv.sh -i 3
48+
supproted ubuntu x64 or centos x64
49+
6750
##### complie
6851
execute command in XEngine_Source path
6952
make complie

README.md

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,10 @@ c c++ file storage service
3434
#### 版本需求
3535
支持WINDOWS 7SP1和LINUX(UBUNT20.04,CENTOS8)以上系统
3636
XEngine版本需要V7.24或者以上版本
37-
vcpkg 需要2021.05.11以上版本
3837

3938
#### Windows
40-
使用VS2019 x86(debug release) x64(release)打开并且编译
39+
使用VS打开并且编译
4140
你需要按照下面的方式配置环境,不然你可能需要自己在项目中设置库目录
42-
##### 三方库环境
43-
需要使用VCPKG安装环境.代码地址:https://github.com/microsoft/vcpkg
44-
安装好后你可能需要把它集成到你的VS中
45-
然后命令安装环境: vcpkg.exe install jsoncpp
46-
集成VS环境: vcpkg integrate install
47-
vcpkg 主要为了方便安装jsoncpp,如果你想自己配置jsoncpp的环境,可以不使用vcpkg...
4841

4942
##### XEngine环境
5043
XEngine通过GIT下载,参考XEngine项目的readme配置环境
@@ -53,14 +46,6 @@ XEngine通过GIT下载,参考XEngine项目的readme配置环境
5346
Linux使用Makefile编译
5447
UBUNTU20.04 x64或者CENTOS8 x64均可
5548

56-
##### 三方库环境
57-
基于不同系统,可能命令不同,比如在Ubuntu下面
58-
sudo apt install libjsoncpp-devel
59-
Centos8.x
60-
sudo dnf install jsoncpp-devel
61-
62-
##### XEngine环境
63-
XEngine可以通过脚本文件安装sudo XEngine_LINEnv.sh -i 3
6449
##### 编译命令
6550
在XEngine_Source目录下执行命令
6651
make 编译

XEngine_Docment/Docment_en.docx

-477 KB
Binary file not shown.

XEngine_Docment/Docment_zh.docx

-477 KB
Binary file not shown.

XEngine_Release/XEngine_Config/XEngine_Config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
},
7676
"XVer":{
7777
"StorageVersion":[
78+
"3.5.0.1001 Build20220228",
7879
"3.4.1.1001 Build20220126",
7980
"3.4.0.1001 Build20220121",
8081
"3.3.0.1001 Build20220106",

XEngine_Release/XEngine_Config/XEngine_LBConfig.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@
2929
"Size":"1024MB",
3030
"XEngine_Key":"storagekey1",
3131
"XEngine_Path":"./XEngine_File"
32-
}
33-
,
32+
},
3433
{
3534
"bEnable":1,
3635
"nLevel":1,

XEngine_Source/Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ UNICODE = 0
33

44
FLAGS = RELEASE=$(RELEASE)
55

6+
THIRD_JSONCPP_PATH = ./XEngine_ThirdPart/jsoncpp
7+
68
STORAGE_SQL_PATH = ./XEngine_StorageComponents/XStorage_SQLPacket
79
STORAGE_P2XP_PATH = ./XEngine_StorageComponents/XStorage_P2XPPeer
810

@@ -13,13 +15,17 @@ BASE_PROTOCOL_PATH = ./StorageModule_Protocol
1315

1416
APPSERVICE_STORAGE_PATH = ./XEngine_StorageApp
1517

16-
NETENGINE_LIB = libXStorage_SQLPacket.so libXStorage_P2XPPeer.so \
18+
NETENGINE_LIB = libjsoncpp.so \
19+
libXStorage_SQLPacket.so libXStorage_P2XPPeer.so \
1720
libStorageModule_Config.so libStorageModule_Session.so libStorageModule_APIHelp.so libStorageModule_Protocol.so \
1821
XEngine_StorageApp.exe
1922

2023
.PHONY:MakeAll
2124
MakeAll:$(NETENGINE_LIB)
2225

26+
libjsoncpp.so:
27+
make -C $(THIRD_JSONCPP_PATH) $(FLAGS)
28+
2329
libXStorage_SQLPacket.so:
2430
make -C $(STORAGE_SQL_PATH) $(FLAGS)
2531
libXStorage_P2XPPeer.so:

XEngine_Source/StorageModule_APIHelp/APIHelp_Api/APIHelp_Api.cpp

Lines changed: 88 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
#include "pch.h"
1+
#include "pch.h"
22
#include "APIHelp_Api.h"
33
/********************************************************************
44
// Created: 2022/01/07 14:36:59
55
// File Name: D:\XEngine_Storage\XEngine_Source\StorageModule_APIHelp\APIHelp_Api\APIHelp_Api.cpp
66
// File Path: D:\XEngine_Storage\XEngine_Source\StorageModule_APIHelp\APIHelp_Api
77
// File Base: APIHelp_Api
88
// File Ext: cpp
9-
// Project: XEngine(网络通信引擎)
9+
// Project: XEngine(网络通信引擎)
1010
// Author: qyt
11-
// Purpose: 帮助函数
11+
// Purpose: 帮助函数
1212
// History:
1313
*********************************************************************/
1414
CAPIHelp_Api::CAPIHelp_Api()
@@ -20,35 +20,35 @@ CAPIHelp_Api::~CAPIHelp_Api()
2020

2121
}
2222
//////////////////////////////////////////////////////////////////////////
23-
// 公有函数
23+
// 公有函数
2424
//////////////////////////////////////////////////////////////////////////
2525
/********************************************************************
26-
函数名称:APIHelp_Api_ProxyAuth
27-
函数功能:代理验证
28-
参数.一:ptszUser
29-
In/Out:Out
30-
类型:字符指针
31-
可空:N
32-
意思:输出用户名
33-
参数.二:ptszPass
34-
In/Out:Out
35-
类型:字符指针
36-
可空:N
37-
意思:输出密码
38-
参数.三:pptszListHdr
39-
In/Out:In
40-
类型:指向指针的指针
41-
可空:N
42-
意思:输入要解析的HTTP头
43-
参数.四:nHdrCount
44-
In/Out:In
45-
类型:整数型
46-
可空:N
47-
意思:输入要解析的HTTP头列表个数
48-
返回值
49-
类型:逻辑型
50-
意思:是否成功
51-
备注:
26+
函数名称:APIHelp_Api_ProxyAuth
27+
函数功能:代理验证
28+
参数.一:ptszUser
29+
In/Out:Out
30+
类型:字符指针
31+
可空:N
32+
意思:输出用户名
33+
参数.二:ptszPass
34+
In/Out:Out
35+
类型:字符指针
36+
可空:N
37+
意思:输出密码
38+
参数.三:pptszListHdr
39+
In/Out:In
40+
类型:指向指针的指针
41+
可空:N
42+
意思:输入要解析的HTTP头
43+
参数.四:nHdrCount
44+
In/Out:In
45+
类型:整数型
46+
可空:N
47+
意思:输入要解析的HTTP头列表个数
48+
返回值
49+
类型:逻辑型
50+
意思:是否成功
51+
备注:
5252
*********************************************************************/
5353
BOOL CAPIHelp_Api::APIHelp_Api_ProxyAuth(TCHAR* ptszUser, TCHAR* ptszPass, TCHAR** pptszListHdr, int nHdrCount)
5454
{
@@ -62,14 +62,14 @@ BOOL CAPIHelp_Api::APIHelp_Api_ProxyAuth(TCHAR* ptszUser, TCHAR* ptszPass, TCHAR
6262

6363
memset(tszAuthStr, '\0', MAX_PATH);
6464
memset(tszSDBuffer, '\0', sizeof(tszSDBuffer));
65-
//是否有验证信息
65+
//是否有验证信息
6666
if (!RfcComponents_HttpHelp_GetAuthInfo(&pptszListHdr, nHdrCount, tszAuthStr, &nAuthLen, &nAuthType))
6767
{
6868
APIHelp_IsErrorOccur = TRUE;
6969
APIHelp_dwErrorCode = ERROR_STORAGE_MODULE_APIHELP_NOTAUTH;
7070
return FALSE;
7171
}
72-
//是否是BASIC
72+
//是否是BASIC
7373
if (1 != nAuthType)
7474
{
7575
APIHelp_IsErrorOccur = TRUE;
@@ -80,37 +80,37 @@ BOOL CAPIHelp_Api::APIHelp_Api_ProxyAuth(TCHAR* ptszUser, TCHAR* ptszPass, TCHAR
8080
return TRUE;
8181
}
8282
/********************************************************************
83-
函数名称:APIHelp_Api_RangeFile
84-
函数功能:获取HTTP的范围
85-
参数.一:pInt_SPos
86-
In/Out:Out
87-
类型:整数型指针
88-
可空:N
89-
意思:输出起始范围
90-
参数.二:pInt_EPos
91-
In/Out:Out
92-
类型:整数型指针
93-
可空:N
94-
意思:输出结束范围
95-
参数.三:pInt_Count
96-
In/Out:Out
97-
类型:整数型指针
98-
可空:N
99-
意思:输出总大小
100-
参数.四:pptszListHdr
101-
In/Out:In
102-
类型:指向指针的指针
103-
可空:N
104-
意思:输入HTTP协议头列表
105-
参数.五:nHdrCount
106-
In/Out:In
107-
类型:指向指针的指针
108-
可空:N
109-
意思:输入列表个数
110-
返回值
111-
类型:逻辑型
112-
意思:是否成功
113-
备注:
83+
函数名称:APIHelp_Api_RangeFile
84+
函数功能:获取HTTP的范围
85+
参数.一:pInt_SPos
86+
In/Out:Out
87+
类型:整数型指针
88+
可空:N
89+
意思:输出起始范围
90+
参数.二:pInt_EPos
91+
In/Out:Out
92+
类型:整数型指针
93+
可空:N
94+
意思:输出结束范围
95+
参数.三:pInt_Count
96+
In/Out:Out
97+
类型:整数型指针
98+
可空:N
99+
意思:输出总大小
100+
参数.四:pptszListHdr
101+
In/Out:In
102+
类型:指向指针的指针
103+
可空:N
104+
意思:输入HTTP协议头列表
105+
参数.五:nHdrCount
106+
In/Out:In
107+
类型:指向指针的指针
108+
可空:N
109+
意思:输入列表个数
110+
返回值
111+
类型:逻辑型
112+
意思:是否成功
113+
备注:
114114
*********************************************************************/
115115
BOOL CAPIHelp_Api::APIHelp_Api_RangeFile(int* pInt_SPos, int* pInt_EPos, __int64x* pInt_Count, TCHAR** pptszListHdr, int nHdrCount)
116116
{
@@ -126,11 +126,11 @@ BOOL CAPIHelp_Api::APIHelp_Api_RangeFile(int* pInt_SPos, int* pInt_EPos, __int64
126126
memset(tszKeyStr, '\0', sizeof(tszKeyStr));
127127
memset(tszValueStr, '\0', sizeof(tszValueStr));
128128
memset(tszFieldStr, '\0', sizeof(tszFieldStr));
129-
//是否有范围
129+
//是否有范围
130130
if (RfcComponents_HttpHelp_GetField(&pptszListHdr, nHdrCount, lpszRangeStr, tszFieldStr))
131131
{
132-
//是否没有找到
133-
int nBPos = 0; //某些时候有个BYTE
132+
//是否没有找到
133+
int nBPos = 0; //某些时候有个BYTE
134134
if (NULL != _tcsstr(tszFieldStr, _T("bytes=")))
135135
{
136136
nBPos = 6;
@@ -141,7 +141,7 @@ BOOL CAPIHelp_Api::APIHelp_Api_RangeFile(int* pInt_SPos, int* pInt_EPos, __int64
141141
APIHelp_dwErrorCode = ERROR_STORAGE_MODULE_APIHELP_PARSELEN;
142142
return FALSE;
143143
}
144-
//得到 1/2 如果有的话
144+
//得到 1/2 如果有的话
145145
TCHAR tszRangeEnd[128];
146146
TCHAR tszRangeCount[128];
147147

@@ -180,27 +180,27 @@ BOOL CAPIHelp_Api::APIHelp_Api_RangeFile(int* pInt_SPos, int* pInt_EPos, __int64
180180
return TRUE;
181181
}
182182
/********************************************************************
183-
函数名称:APIHelp_Api_VerHash
184-
函数功能:验证HASH值
185-
参数.一:lpszFileHash
186-
In/Out:In
187-
类型:常量字符指针
188-
可空:N
189-
意思:输入要比对的HASH值
190-
参数.二:pptszListHdr
191-
In/Out:In
192-
类型:指向指针的指针
193-
可空:N
194-
意思:输入HTTP协议头列表
195-
参数.三:nHdrCount
196-
In/Out:In
197-
类型:指向指针的指针
198-
可空:N
199-
意思:输入列表个数
200-
返回值
201-
类型:逻辑型
202-
意思:是否成功
203-
备注:
183+
函数名称:APIHelp_Api_VerHash
184+
函数功能:验证HASH值
185+
参数.一:lpszFileHash
186+
In/Out:In
187+
类型:常量字符指针
188+
可空:N
189+
意思:输入要比对的HASH值
190+
参数.二:pptszListHdr
191+
In/Out:In
192+
类型:指向指针的指针
193+
可空:N
194+
意思:输入HTTP协议头列表
195+
参数.三:nHdrCount
196+
In/Out:In
197+
类型:指向指针的指针
198+
可空:N
199+
意思:输入列表个数
200+
返回值
201+
类型:逻辑型
202+
意思:是否成功
203+
备注:
204204
*********************************************************************/
205205
BOOL CAPIHelp_Api::APIHelp_Api_VerHash(LPCTSTR lpszFileHash, TCHAR** pptszListHdr, int nHdrCount)
206206
{

0 commit comments

Comments
 (0)