Skip to content

Commit 1efea7d

Browse files
authored
Merge pull request #49 from libxengine/develop
V3.16.0.1001 Merge
2 parents dbfc888 + c9dc787 commit 1efea7d

Some content is hidden

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

53 files changed

+1707
-47
lines changed

README.en.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ feature list:
3333
16. permission control
3434
17. upload file rewrite
3535
18. support convert record(service upload and download)
36+
19. webdav protocol download and upload file support
37+
20. preview file create
3638

3739
## install
3840

@@ -128,6 +130,9 @@ Port:HTTP Center Port 5100,Download 5101,UPLoad 5102
128130
3. Submit the code
129131
4. New Pull Request
130132

133+
## development plan
134+
You can learn more about development content and plans at this address:https://github.com/libxengine/XEngine_Storage/issues
135+
131136
## Follow us
132137
If you think this software is helpful to you, please give us a START
133138
and wechat qr scan to follow us

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ c c++ file storage service
3232
16. 权限控制
3333
17. 上传文件覆写
3434
18. 支持转录(服务器上传下载)
35+
19. 支持WEBDAV协议上传下载文件
36+
20. 预创建文件
3537

3638
## 安装教程
3739

@@ -50,6 +52,7 @@ macos执行:./XEngine_LINEnv.sh -i 3
5052
由于依赖的子模块,在你checkout仓库后,在仓库目录下执行下面的命令拉取子模块
5153
git submodule init
5254
git submodule update
55+
如果github访问失败,也可以在XEngine_Source\XEngine_Depend 下直接clone项目:git clone https://gitee.com/xengine/XEngine_OPenSource.git
5356

5457
#### Windows
5558
使用VS打开并且编译,支持WINDOWS 7SP1以上系统
@@ -131,6 +134,9 @@ jsoncpp模块在使用的时候编译运行时库选择必须一致.否则会崩
131134
3. 提交代码
132135
4. 新建 Pull Request
133136

137+
## 开发计划
138+
你可以通过此地址了解更多开发内容和计划:https://github.com/libxengine/XEngine_Storage/issues
139+
134140
## 关注我们
135141

136142
如果你觉得这个软件对你有帮助,请你给我们一个START吧  

XEngine_Docment/Docment_en.docx

4.64 KB
Binary file not shown.

XEngine_Docment/Docment_zh.docx

4.9 KB
Binary file not shown.

XEngine_Release/XEngine_Config/XEngine_Config.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,23 @@
44
"nCenterPort":5100,
55
"nStorageDLPort":5101,
66
"nStorageUPPort":5102,
7+
"nWebdavPort":5103,
78
"XMax":{
89
"MaxClient":10000,
910
"MaxQueue":10000,
1011
"IOThread":2,
1112
"CenterThread":2,
1213
"nStorageUPThread":2,
13-
"nStorageDLThread":2
14+
"nStorageDLThread":2,
15+
"nWebdavThread":2
1416
},
1517
"XTime":{
1618
"bHBTime":0,
1719
"nDBMonth":3,
1820
"nTimeCheck":3,
1921
"nCenterTimeOut":5,
20-
"nStorageTimeOut":5
22+
"nStorageTimeOut":5,
23+
"nWebdavTimeOut":5
2124
},
2225
"XLog":{
2326
"MaxSize":1024000,
@@ -67,6 +70,7 @@
6770
"bDLEnable":false,
6871
"bUPEnable":false,
6972
"bCHEnable":false,
73+
"bWDEnable":false,
7074
"tszCertChain":"./XEngine_Cert/server.crt",
7175
"tszCertServer":"",
7276
"tszCertKey":"./XEngine_Cert/server.key"

XEngine_Release/XEngine_Config/XEngine_LBConfig.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@
2525
"XEngine_Path":"./XEngine_File",
2626
"PermissionFlags":{
2727
"CreateDir":false,
28-
"Rewrite":false,
29-
"UPLimit":false
28+
"Rewrite":true,
29+
"UPLimit":false,
30+
"UPReady":true
3031
}
3132
},
3233
{
@@ -37,8 +38,9 @@
3738
"XEngine_Path":"./XEngine_File2",
3839
"PermissionFlags":{
3940
"CreateDir":false,
40-
"Rewrite":false,
41-
"UPLimit":false
41+
"Rewrite":true,
42+
"UPLimit":false,
43+
"UPReady":true
4244
}
4345
}
4446
]

XEngine_Release/XEngine_Config/XEngine_VersionConfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"XVer":[
3+
"3.16.0.1001 Build20240813",
34
"3.15.0.1001 Build20240511",
45
"3.14.0.1001 Build20240418",
56
"3.13.0.1001 Build20240301",

XEngine_Source/Makefile

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ PLATFORM=linux
44
FLAGS=
55

66
THIRD_JSONCPP_PATH = ./XEngine_Depend/XEngine_Module/jsoncpp
7+
THIRD_TINYXML_PATH = ./XEngine_Depend/XEngine_Module/tinyxml2
78
THIRD_REPORT_PATH = ./XEngine_Depend/XEngine_Module/XEngine_InfoReport
89

910
BASE_SQL_PATH = ./StorageModule_Database
@@ -15,17 +16,31 @@ BASE_BTORRENT_PATH = ./StorageModule_BTorrent
1516

1617
APPSERVICE_STORAGE_PATH = ./XEngine_StorageApp
1718

18-
XENGINE_MODULES = libjsoncpp.so libXEngine_InfoReport.so \
19+
XENGINE_MODULES = libjsoncpp.so libtinyxml2.so libXEngine_InfoReport.so \
1920
libStorageModule_Database.so libStorageModule_Config.so libStorageModule_Session.so libStorageModule_APIHelp.so libStorageModule_Protocol.so libStorageModule_BTorrent.so \
2021
XEngine_StorageApp.exe
2122

2223
.PHONY:MakeAll
2324
MakeAll:$(XENGINE_MODULES)
2425

2526
libjsoncpp.so:
27+
ifeq ($(FLAGS), InstallAll)
28+
cp $(THIRD_JSONCPP_PATH)/libjsoncpp.so ../XEngine_Release/
29+
else
2630
make -C $(THIRD_JSONCPP_PATH) PLATFORM=$(PLATFORM) $(FLAGS)
31+
endif
32+
libtinyxml2.so:
33+
ifeq ($(FLAGS), InstallAll)
34+
cp $(THIRD_TINYXML_PATH)/libtinyxml2.so ../XEngine_Release/
35+
else
36+
make -C $(THIRD_TINYXML_PATH) PLATFORM=$(PLATFORM) $(FLAGS)
37+
endif
2738
libXEngine_InfoReport.so:
39+
ifeq ($(FLAGS), InstallAll)
40+
cp $(THIRD_REPORT_PATH)/libXEngine_InfoReport.so ../XEngine_Release/
41+
else
2842
make -C $(THIRD_REPORT_PATH) PLATFORM=$(PLATFORM) $(FLAGS)
43+
endif
2944

3045
libStorageModule_Database.so:
3146
make -C $(BASE_SQL_PATH) PLATFORM=$(PLATFORM) $(FLAGS)

XEngine_Source/StorageModule_APIHelp/APIHelp_Api/APIHelp_Api.cpp

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,8 @@ bool CAPIHelp_Api::APIHelp_Api_Boundary(XCHAR*** ppptszList, int nListCount, XCH
427427
*********************************************************************/
428428
bool CAPIHelp_Api::APIHelp_Api_GetDIRSize(LPCXSTR lpszDIRStr, __int64u* pInt_DIRSize)
429429
{
430+
APIHelp_IsErrorOccur = false;
431+
430432
int nListCount = 0;
431433
int nPathType = 0;
432434
__int64u nDirCount = 0; //当前目录大小
@@ -453,5 +455,50 @@ bool CAPIHelp_Api::APIHelp_Api_GetDIRSize(LPCXSTR lpszDIRStr, __int64u* pInt_DIR
453455
}
454456
BaseLib_OperatorMemory_Free((XPPPMEM)&ppListFile, nListCount);
455457
*pInt_DIRSize = nDirCount;
458+
return true;
459+
}
460+
/********************************************************************
461+
函数名称:APIHelp_Api_UrlStr
462+
函数功能:获取URL的KEY
463+
参数.一:ptszKeyStr
464+
In/Out:Out
465+
类型:字符指针
466+
可空:N
467+
意思:输出获取到的数据
468+
参数.二:lpszUrl
469+
In/Out:In
470+
类型:常量字符指针
471+
可空:N
472+
意思:输入要获取的数据
473+
返回值
474+
类型:逻辑型
475+
意思:是否成功
476+
备注:
477+
*********************************************************************/
478+
bool CAPIHelp_Api::APIHelp_Api_UrlStr(XCHAR* ptszKeyStr, LPCXSTR lpszUrl)
479+
{
480+
APIHelp_IsErrorOccur = false;
481+
482+
XCHAR tszUrlStr[MAX_PATH] = {};
483+
_tcsxcpy(tszUrlStr, lpszUrl);
484+
// 查找第一个 '/' 的位置
485+
XCHAR *ptszFirstStr = _tcsxchr(tszUrlStr, '/');
486+
if (ptszFirstStr == NULL)
487+
{
488+
return false;
489+
}
490+
// 查找第二个 '/' 的位置
491+
XCHAR* ptszSecondStr = _tcsxchr(ptszFirstStr + 1, '/');
492+
if (ptszSecondStr == NULL)
493+
{
494+
return false;
495+
}
496+
// 计算提取字符串的长度
497+
int nLen = ptszSecondStr - ptszFirstStr - 1;
498+
// 复制字符串
499+
_tcsxncpy(ptszKeyStr, ptszFirstStr + 1, nLen);
500+
// 添加字符串结束符
501+
ptszKeyStr[nLen] = '\0';
502+
456503
return true;
457504
}

XEngine_Source/StorageModule_APIHelp/APIHelp_Api/APIHelp_Api.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class CAPIHelp_Api
2525
bool APIHelp_Api_UrlParse(XCHAR*** ppptszList, int nListCount, XCHAR* ptszFileName, XCHAR* ptszKeyName);
2626
bool APIHelp_Api_Boundary(XCHAR*** ppptszList, int nListCount, XCHAR* ptszBoundStr);
2727
bool APIHelp_Api_GetDIRSize(LPCXSTR lpszDIRStr, __int64u* pInt_DIRSize);
28+
bool APIHelp_Api_UrlStr(XCHAR* ptszKeyStr, LPCXSTR lpszUrl);
2829
protected:
2930
private:
3031
};

0 commit comments

Comments
 (0)