Skip to content

Commit 55794ed

Browse files
committed
fixed:build error and request api name failure
1 parent 598151d commit 55794ed

13 files changed

Lines changed: 31 additions & 32 deletions

File tree

XEngine_APPClient/APPClient_BTorrent/APPClient_BTorrent.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222

2323
int BTorrent_Parse(LPCXSTR lpszFile)
2424
{
25-
XNETHANDLE xhToken;
25+
XHANDLE xhToken = BTorrent_Parse_Init(lpszFile);
2626

27-
if (!BTorrent_Parse_Init(&xhToken, lpszFile))
27+
if (NULL == xhToken)
2828
{
2929
printf("BTorrent_Parse_Init:%lX\n", BTorrent_GetLastError());
3030
return -1;
@@ -110,14 +110,14 @@ int BTorrent_Parse(LPCXSTR lpszFile)
110110
}
111111
int BTorrent_Creator(LPCXSTR lpszFile)
112112
{
113-
XNETHANDLE xhToken;
114113
#ifdef _MSC_BUILD
115114
LPCXSTR lpszFileDir = _X("D:\\321");
116115
#else
117116
LPCXSTR lpszFileDir = _X("./321");
118117
#endif
119118

120-
if (!BTorrent_Creator_Init(&xhToken, lpszFileDir))
119+
XHANDLE xhToken = BTorrent_Creator_Init(lpszFileDir);
120+
if (NULL == xhToken)
121121
{
122122
printf("BTorrent_Creator_Init:%lX\n", BTorrent_GetLastError());
123123
return -1;
@@ -136,7 +136,6 @@ int BTorrent_Creator(LPCXSTR lpszFile)
136136
}
137137
int BTorrent_Download()
138138
{
139-
XNETHANDLE xhToken;
140139
#ifdef _MSC_BUILD
141140
LPCXSTR lpszBTFile = _X("D:\\123.torrent");
142141
LPCXSTR lpszFileDir = _X("D:\\321");
@@ -145,7 +144,8 @@ int BTorrent_Download()
145144
LPCXSTR lpszFileDir = _X("./321");
146145
#endif
147146

148-
if (!BTorrent_DLoader_Create(&xhToken, lpszBTFile, lpszFileDir))
147+
XHANDLE xhToken = BTorrent_DLoader_Create(lpszBTFile, lpszFileDir);
148+
if (NULL == xhToken)
149149
{
150150
printf("BTorrent_Creator_Init:%lX\n", BTorrent_GetLastError());
151151
return -1;

XEngine_APPClient/APPClient_Download/APPClient_Download.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,14 @@
2626
#include <XEngine_Include/XEngine_BaseLib/BaseLib_Error.h>
2727
#include <XEngine_Include/XEngine_Client/APIClient_Define.h>
2828
#include <XEngine_Include/XEngine_Client/APIClient_Error.h>
29-
#include <XEngine_Include/XEngine_SystemSdk/ProcFile_Define.h>
3029
#include <XEngine_Include/XEngine_SystemSdk/SystemApi_Define.h>
3130
#include <XEngine_Include/XEngine_SystemSdk/SystemApi_Error.h>
3231
#include "../../XEngine_Source/XStorage_Protocol.h"
3332
using namespace std;
3433

3534
//需要优先配置XEngine
3635
//WINDOWS使用VS2022 x86 或者 x64 debug 编译
37-
//linux macos::g++ -std=c++17 -Wall -g APPClient_Download.cpp -o APPClient_Download.exe -I ../../XEngine_Source/XEngine_Depend/XEngine_Module/jsoncpp -L ../../XEngine_Release -lXEngine_BaseLib -lXClient_APIHelp -lXEngine_SystemApi -ljsoncpp -Wl,-rpath=../../XEngine_Release
36+
//linux macos::g++ -std=c++17 -Wall -g APPClient_Download.cpp -o APPClient_Download.exe -I ../../XEngine_Source/XEngine_DependLibrary/XEngine_Module/jsoncpp -L ../../XEngine_Release -lXEngine_BaseLib -lXClient_APIHelp -lXEngine_SystemApi -ljsoncpp -Wl,-rpath=../../XEngine_Release
3837

3938
typedef struct
4039
{
@@ -136,7 +135,7 @@ void P2PFile_Create(list<P2PFILE_INFO>* pStl_ListFile, LPCXSTR lpszFile)
136135
{
137136
bComplete = FALSE;
138137
}
139-
_xtprintf("DLToken:%p DLTotal:%lf DLNow:%lf DLStatus:%d\n", pSt_P2PFile[i].xhToken, st_TaskInfo.dlTotal, st_TaskInfo.dlNow, st_TaskInfo.en_DownStatus);
138+
_xtprintf("DLToken:%p DLTotal:%lld DLNow:%lld DLStatus:%d\n", pSt_P2PFile[i].xhToken, st_TaskInfo.dlTotal, st_TaskInfo.dlNow, st_TaskInfo.en_DownStatus);
140139
}
141140
if (bComplete)
142141
{
@@ -164,7 +163,7 @@ int main()
164163
int nBodyLen = 0;
165164
XCHAR *ptszMsgBody = NULL;
166165
//请求分布式存储文件所有位置
167-
LPCXSTR lpszUrl = _X("http://127.0.0.1:5100/Api/Manage/Query");
166+
LPCXSTR lpszUrl = _X("http://127.0.0.1:5100/api?function=manage&param=query");
168167
LPCXSTR lpszFile = _X("D:\\XEngine_Storage\\XEngine_APPClient\\Debug\\qq.exe");
169168

170169
Json::Value st_JsonRoot;

XEngine_APPClient/APPClient_Download/APPClient_Download.vcxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@
7272
<PropertyGroup Label="UserMacros" />
7373
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
7474
<LinkIncremental>true</LinkIncremental>
75-
<IncludePath>$(XEngine_Include);../../XEngine_Source/XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath)</IncludePath>
75+
<IncludePath>$(XEngine_Include);../../XEngine_Source/XEngine_DependLibrary/XEngine_Module/jsoncpp;$(IncludePath)</IncludePath>
7676
<LibraryPath>$(XEngine_Lib32);$(LibraryPath)</LibraryPath>
7777
</PropertyGroup>
7878
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
7979
<LinkIncremental>false</LinkIncremental>
8080
</PropertyGroup>
8181
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
8282
<LinkIncremental>true</LinkIncremental>
83-
<IncludePath>$(XEngine_Include);../../XEngine_Source/XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath)</IncludePath>
83+
<IncludePath>$(XEngine_Include);../../XEngine_Source/XEngine_DependLibrary/XEngine_Module/jsoncpp;$(IncludePath)</IncludePath>
8484
<LibraryPath>$(XEngine_Lib64);$(LibraryPath)</LibraryPath>
8585
</PropertyGroup>
8686
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">

XEngine_APPClient/APPClient_RestApi/APPClient_RestApi.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ using namespace std;
3030
//需要优先配置XEngine
3131
//WINDOWS使用VS2022 x86 或者 x64 debug 编译
3232
//linux使用下面的命令编译
33-
//g++ -std=c++17 -Wall -g APPClient_RestApi.cpp -o APPClient_RestApi.exe -I ../../XEngine_Source/XEngine_Depend/XEngine_Module/jsoncpp -L ../../XEngine_Release -lXEngine_BaseLib -lXClient_APIHelp -ljsoncpp -Wl,-rpath=../../XEngine_Release
33+
//g++ -std=c++17 -Wall -g APPClient_RestApi.cpp -o APPClient_RestApi.exe -I ../../XEngine_Source/XEngine_DependLibrary/XEngine_Module/jsoncpp -L ../../XEngine_Release -lXEngine_BaseLib -lXClient_APIHelp -ljsoncpp -Wl,-rpath=../../XEngine_Release
3434

3535
XCHAR tszBaseBuffer[MAX_PATH];
3636
XCHAR tszHdrBuffer[MAX_PATH];
3737
void API_Manage_Bucket()
3838
{
39-
LPCXSTR lpszUrl = _X("http://127.0.0.1:5100/Api/Manage/Bucket");
39+
LPCXSTR lpszUrl = _X("http://127.0.0.1:5100/api?function=manage&param=bucket");
4040
int nLen = 0;
4141
int nCode = 0;
4242
XCHAR* ptszMsgBuffer = NULL;
@@ -52,7 +52,7 @@ void API_Manage_Bucket()
5252
//查询
5353
void API_Manage_Query()
5454
{
55-
LPCXSTR lpszUrl = _X("http://127.0.0.1:5100/Api/Manage/QueryFile");
55+
LPCXSTR lpszUrl = _X("http://127.0.0.1:5100/api?function=manage&param=query");
5656
int nLen = 0;
5757
int nCode = 0;
5858
XCHAR* ptszMsgBuffer = NULL;
@@ -73,7 +73,7 @@ void API_Manage_Query()
7373
//插入
7474
void API_Manage_Insert()
7575
{
76-
LPCXSTR lpszUrl = _X("http://127.0.0.1:5100/Api/Manage/Insert");
76+
LPCXSTR lpszUrl = _X("http://127.0.0.1:5100/api?function=manage&param=insert");
7777
int nLen = 0;
7878
int nCode = 0;
7979
XCHAR* ptszMsgBuffer = NULL;
@@ -101,7 +101,7 @@ void API_Manage_Insert()
101101
//删除
102102
void API_Manage_Delete()
103103
{
104-
LPCXSTR lpszUrl = _X("http://127.0.0.1:5100/Api/Manage/Delete");
104+
LPCXSTR lpszUrl = _X("http://127.0.0.1:5100/api?function=manage&param=delete");
105105
int nLen = 0;
106106
int nCode = 0;
107107
XCHAR* ptszMsgBuffer = NULL;
@@ -126,7 +126,7 @@ void API_Manage_Delete()
126126
//文件夹
127127
void API_Manage_Dir()
128128
{
129-
LPCXSTR lpszUrl = _X("http://127.0.0.1:5100/Api/Manage/Dir");
129+
LPCXSTR lpszUrl = _X("http://127.0.0.1:5100/api?function=manage&param=dir");
130130
int nLen = 0;
131131
int nCode = 0;
132132
XCHAR* ptszMsgBuffer = NULL;
@@ -170,7 +170,7 @@ void API_Manage_Dir()
170170
//任务管理
171171
void API_Manage_Task()
172172
{
173-
LPCXSTR lpszUrl = _X("http://127.0.0.1:5100/Api/Manage/Task");
173+
LPCXSTR lpszUrl = _X("http://127.0.0.1:5100/api?function=manage&param=task");
174174
int nLen = 0;
175175
int nCode = 0;
176176
XCHAR* ptszMsgBuffer = NULL;

XEngine_APPClient/APPClient_RestApi/APPClient_RestApi.vcxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@
7272
<PropertyGroup Label="UserMacros" />
7373
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
7474
<LinkIncremental>true</LinkIncremental>
75-
<IncludePath>$(XEngine_Include);../../XEngine_Source/XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath)</IncludePath>
75+
<IncludePath>$(XEngine_Include);../../XEngine_Source/XEngine_DependLibrary/XEngine_Module/jsoncpp;$(IncludePath)</IncludePath>
7676
<LibraryPath>$(XEngine_Lib32);$(LibraryPath)</LibraryPath>
7777
</PropertyGroup>
7878
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
7979
<LinkIncremental>false</LinkIncremental>
8080
</PropertyGroup>
8181
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
8282
<LinkIncremental>true</LinkIncremental>
83-
<IncludePath>$(XEngine_Include);../../XEngine_Source/XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath)</IncludePath>
83+
<IncludePath>$(XEngine_Include);../../XEngine_Source/XEngine_DependLibrary/XEngine_Module/jsoncpp;$(IncludePath)</IncludePath>
8484
<LibraryPath>$(XEngine_Lib64);$(LibraryPath)</LibraryPath>
8585
</PropertyGroup>
8686
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">

XEngine_APPClient/APPClient_UPDate/APPClient_UPFile/APPClient_UPFile.vcxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@
7171
</ImportGroup>
7272
<PropertyGroup Label="UserMacros" />
7373
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
74-
<IncludePath>$(XEngine_Include);../../../XEngine_Source/XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath)</IncludePath>
74+
<IncludePath>$(XEngine_Include);../../../XEngine_Source/XEngine_DependLibrary/XEngine_Module/jsoncpp;$(IncludePath)</IncludePath>
7575
<LibraryPath>$(XEngine_Lib32);$(LibraryPath)</LibraryPath>
7676
</PropertyGroup>
7777
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
78-
<IncludePath>$(XEngine_Include);../../../XEngine_Source/XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath)</IncludePath>
78+
<IncludePath>$(XEngine_Include);../../../XEngine_Source/XEngine_DependLibrary/XEngine_Module/jsoncpp;$(IncludePath)</IncludePath>
7979
<LibraryPath>$(XEngine_Lib64);$(LibraryPath)</LibraryPath>
8080
</PropertyGroup>
8181
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">

XEngine_APPClient/APPClient_UPDate/APPClient_UPFile/APPClient_UPHdr.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ using namespace std;
2626
#include <XEngine_Include/XEngine_BaseLib/BaseLib_Error.h>
2727
#include <XEngine_Include/XEngine_Client/APIClient_Define.h>
2828
#include <XEngine_Include/XEngine_Client/APIClient_Error.h>
29-
#include <XEngine_Include/XEngine_SystemSdk/ProcFile_Define.h>
3029
#include <XEngine_Include/XEngine_SystemSdk/SystemApi_Define.h>
3130
#include <XEngine_Include/XEngine_SystemSdk/SystemApi_Error.h>
3231

XEngine_APPClient/APPClient_UPDate/APPClient_UPMaker/APPClient_UPMaker.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ using namespace std;
2525
#include <XEngine_Include/XEngine_Types.h>
2626
#include <XEngine_Include/XEngine_BaseLib/BaseLib_Define.h>
2727
#include <XEngine_Include/XEngine_BaseLib/BaseLib_Error.h>
28-
#include <XEngine_Include/XEngine_SystemSdk/ProcFile_Define.h>
2928
#include <XEngine_Include/XEngine_SystemSdk/SystemApi_Define.h>
3029
#include <XEngine_Include/XEngine_SystemSdk/SystemApi_Error.h>
3130
#include <XEngine_Include/XEngine_Client/APIClient_Define.h>
@@ -103,10 +102,10 @@ bool HelpModule_Api_BuildVer(XCHAR* ptszLocalBuffer, XCHAR* ptszRemoteBuffer, in
103102
Json::StreamWriterBuilder st_JsonBuilder;
104103
//判断是否是自定义版本
105104
XCHAR tszTimer[64];
106-
XENGINE_LIBTIMER st_Timer;
105+
XENGINE_LIBTIME st_Timer;
107106

108107
memset(tszTimer, '\0', sizeof(tszTimer));
109-
memset(&st_Timer, '\0', sizeof(XENGINE_LIBTIMER));
108+
memset(&st_Timer, '\0', sizeof(XENGINE_LIBTIME));
110109

111110
BaseLib_Time_GetSysTime(&st_Timer);
112111
_xstprintf(tszTimer, _X("%04d%02d%02d%02d%02d%02d"), st_Timer.wYear, st_Timer.wMonth, st_Timer.wDay, st_Timer.wHour, st_Timer.wMinute, st_Timer.wSecond);

XEngine_APPClient/APPClient_UPDate/APPClient_UPMaker/APPClient_UPMaker.vcxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@
7171
</ImportGroup>
7272
<PropertyGroup Label="UserMacros" />
7373
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
74-
<IncludePath>$(XEngine_Include);../../../XEngine_Source/XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath)</IncludePath>
74+
<IncludePath>$(XEngine_Include);../../../XEngine_Source/XEngine_DependLibrary/XEngine_Module/jsoncpp;$(IncludePath)</IncludePath>
7575
<LibraryPath>$(XEngine_Lib32);$(LibraryPath)</LibraryPath>
7676
</PropertyGroup>
7777
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
78-
<IncludePath>$(XEngine_Include);../../../XEngine_Source/XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath)</IncludePath>
78+
<IncludePath>$(XEngine_Include);../../../XEngine_Source/XEngine_DependLibrary/XEngine_Module/jsoncpp;$(IncludePath)</IncludePath>
7979
<LibraryPath>$(XEngine_Lib64);$(LibraryPath)</LibraryPath>
8080
</PropertyGroup>
8181
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">

XEngine_APPClient/APPClient_UPDownload/APPClient_UPDownload.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ using namespace std;
3030

3131
//需要优先配置XEngine
3232
//WINDOWS使用VS2022 x86 或者 x64 debug 编译
33-
//linux macos::g++ -std=c++17 -Wall -g APPClient_UPDownload.cpp -o APPClient_UPDownload.exe -I ../../XEngine_Source/XEngine_Depend/XEngine_Module/jsoncpp -L ../../XEngine_Release -lXEngine_BaseLib -lXEngine_Cryption -lXClient_APIHelp -ljsoncpp -Wl,-rpath=../../XEngine_Release
33+
//linux macos::g++ -std=c++17 -Wall -g APPClient_UPDownload.cpp -o APPClient_UPDownload.exe -I ../../XEngine_Source/XEngine_DependLibrary/XEngine_Module/jsoncpp -L ../../XEngine_Release -lXEngine_BaseLib -lXEngine_Cryption -lXClient_APIHelp -ljsoncpp -Wl,-rpath=../../XEngine_Release
3434

3535

3636
//上传文件

0 commit comments

Comments
 (0)