Skip to content

Commit 1a49b26

Browse files
committed
update:match x-engine V9 build supported
1 parent 2647e4d commit 1a49b26

File tree

36 files changed

+176
-170
lines changed

36 files changed

+176
-170
lines changed

XEngine_Source/StorageModule_APIHelp/APIHelp_Api/APIHelp_Api.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ bool CAPIHelp_Api::APIHelp_Api_RangeFile(int* pInt_SPos, int* pInt_EPos, __int64
135135
{
136136
nBPos = 6;
137137
}
138-
if (!BaseLib_OperatorString_GetKeyValue(tszFieldStr + nBPos, "-", tszKeyStr, tszValueStr))
138+
if (!BaseLib_String_GetKeyValue(tszFieldStr + nBPos, "-", tszKeyStr, tszValueStr))
139139
{
140140
APIHelp_IsErrorOccur = true;
141141
APIHelp_dwErrorCode = ERROR_STORAGE_MODULE_APIHELP_PARSELEN;
@@ -147,7 +147,7 @@ bool CAPIHelp_Api::APIHelp_Api_RangeFile(int* pInt_SPos, int* pInt_EPos, __int64
147147

148148
memset(tszRangeEnd, '\0', sizeof(tszRangeEnd));
149149
memset(tszRangeCount, '\0', sizeof(tszRangeCount));
150-
if (BaseLib_OperatorString_GetKeyValue(tszValueStr, "/", tszRangeEnd, tszRangeCount))
150+
if (BaseLib_String_GetKeyValue(tszValueStr, "/", tszRangeEnd, tszRangeCount))
151151
{
152152
*pInt_SPos = _ttxoi(tszKeyStr);
153153
*pInt_EPos = _ttxoi(tszRangeEnd);
@@ -327,7 +327,7 @@ bool CAPIHelp_Api::APIHelp_Api_UrlParse(XCHAR*** ppptszList, int nListCount, XCH
327327
memset(tszKey, '\0', MAX_PATH);
328328
memset(tszValue, '\0', MAX_PATH);
329329

330-
BaseLib_OperatorString_GetKeyValue((*ppptszList)[i], _X("="), tszKey, tszValue);
330+
BaseLib_String_GetKeyValue((*ppptszList)[i], _X("="), tszKey, tszValue);
331331

332332
if (0 == _tcsxnicmp(lpszHDRFile, tszKey, _tcsxlen(lpszHDRFile)))
333333
{
@@ -336,12 +336,12 @@ bool CAPIHelp_Api::APIHelp_Api_UrlParse(XCHAR*** ppptszList, int nListCount, XCH
336336
XCHAR tszFileName[MAX_PATH];
337337
memset(tszFileName, '\0', MAX_PATH);
338338

339-
OPenSsl_Codec_UrlDeCodec(tszValue, _tcsxlen(tszValue), tszFileName);
339+
Cryption_Codec_UrlDeCodec(tszValue, _tcsxlen(tszValue), tszFileName);
340340

341341
int nLen = _tcsxlen(tszFileName);
342-
BaseLib_OperatorCharset_UTFToAnsi(tszFileName, ptszFileName, &nLen);
342+
BaseLib_Charset_UTFToAnsi(tszFileName, ptszFileName, &nLen);
343343
#else
344-
OPenSsl_Codec_UrlDeCodec(tszValue, _tcsxlen(tszValue), ptszFileName);
344+
Cryption_Codec_UrlDeCodec(tszValue, _tcsxlen(tszValue), ptszFileName);
345345
#endif
346346
}
347347
else if (0 == _tcsxnicmp(lpszHDRKey, tszKey, _tcsxlen(lpszHDRKey)))
@@ -386,18 +386,18 @@ bool CAPIHelp_Api::APIHelp_Api_Boundary(XCHAR*** ppptszList, int nListCount, XCH
386386
XCHAR tszKeyStr[MAX_PATH] = {};
387387
XCHAR tszVluStr[MAX_PATH] = {};
388388

389-
BaseLib_OperatorString_GetKeyValue((*ppptszList)[i], _X(": "), tszKeyStr, tszVluStr);
389+
BaseLib_String_GetKeyValue((*ppptszList)[i], _X(": "), tszKeyStr, tszVluStr);
390390

391391
if (0 == _tcsxnicmp(lpszHDRContent, tszKeyStr, _tcsxlen(lpszHDRContent)))
392392
{
393393
XCHAR tszKeySub[MAX_PATH] = {};
394394
XCHAR tszVluSub[MAX_PATH] = {};
395395
//multipart/form-data; boundary=AaB03x
396-
if (BaseLib_OperatorString_GetKeyValue(tszVluStr, _X(";"), tszKeySub, tszVluSub))
396+
if (BaseLib_String_GetKeyValue(tszVluStr, _X(";"), tszKeySub, tszVluSub))
397397
{
398398
//boundary=AaB03x
399399
ptszBoundStr[0] = '-';//要少一个字节
400-
if (BaseLib_OperatorString_GetKeyValue(tszVluSub, _X("="), tszKeyStr, ptszBoundStr + 1))
400+
if (BaseLib_String_GetKeyValue(tszVluSub, _X("="), tszKeyStr, ptszBoundStr + 1))
401401
{
402402
bRet = true;
403403
break;
@@ -439,7 +439,7 @@ bool CAPIHelp_Api::APIHelp_Api_GetDIRSize(LPCXSTR lpszDIRStr, __int64u* pInt_DIR
439439
_xtstat(ppListFile[i], &st_FStat);
440440
nDirCount += st_FStat.st_size;
441441
}
442-
BaseLib_OperatorMemory_Free((XPPPMEM)&ppListFile, nListCount);
442+
BaseLib_Memory_Free((XPPPMEM)&ppListFile, nListCount);
443443
*pInt_DIRSize = nDirCount;
444444
return true;
445445
}

XEngine_Source/StorageModule_APIHelp/APIHelp_Cryption/APIHelp_Cryption.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ bool CAPIHelp_Cryption::APIHelp_Cryption_BasicEncoder(LPCXSTR lpszUser, LPCXSTR
6565
memset(tszBaseBuffer, '\0', sizeof(tszBaseBuffer));
6666

6767
int nLen = _xstprintf(tszMsgBuffer, _X("%s:%s"), lpszUser, lpszPass);
68-
if (!OPenSsl_Codec_Base64(tszMsgBuffer, tszBaseBuffer, &nLen))
68+
if (!Cryption_Codec_Base64(tszMsgBuffer, tszBaseBuffer, &nLen))
6969
{
7070
return false;
7171
}
@@ -119,15 +119,15 @@ bool CAPIHelp_Cryption::APIHelp_Cryption_BasicDecoder(LPCXSTR lpszMsgBuffer, XCH
119119
if (NULL == _tcsxstr(lpszMsgBuffer, _X("Basic")))
120120
{
121121
int nMsgLen = _tcsxlen(lpszMsgBuffer);
122-
if (!OPenSsl_Codec_Base64(lpszMsgBuffer, tszBaseBuffer, &nMsgLen, false))
122+
if (!Cryption_Codec_Base64(lpszMsgBuffer, tszBaseBuffer, &nMsgLen, false))
123123
{
124124
return false;
125125
}
126126
}
127127
else
128128
{
129129
int nMsgLen = _tcsxlen(lpszMsgBuffer) - 6;
130-
if (!OPenSsl_Codec_Base64(lpszMsgBuffer + 6, tszBaseBuffer, &nMsgLen, false))
130+
if (!Cryption_Codec_Base64(lpszMsgBuffer + 6, tszBaseBuffer, &nMsgLen, false))
131131
{
132132
return false;
133133
}
@@ -223,15 +223,15 @@ bool CAPIHelp_Cryption::APIHelp_Cryption_Digest(XCHAR* ptszResponseStr, LPCXSTR
223223

224224
//计算HA1 的MD5字符串 MD5(USER:PASS:REAL)
225225
int nRet = _xstprintf(tszUserStr, _X("%s:%s:%s"), lpszUser, lpszRealm, lpszPass);
226-
OPenSsl_Api_Digest(tszUserStr, tszUserMD5, &nRet);
227-
BaseLib_OperatorString_StrToHex((XCHAR*)tszUserMD5, nRet, tszUserHex);
226+
Cryption_Api_Digest(tszUserStr, tszUserMD5, &nRet);
227+
BaseLib_String_StrToHex((XCHAR*)tszUserMD5, nRet, tszUserHex);
228228
//计算HA2 的MD5字符串,根据验证模式来计算
229229
nRet = _xstprintf(tszUrlStr, _X("%s:%s"), lpszMethod, lpszUrl);
230-
OPenSsl_Api_Digest(tszUrlStr, tszUrlMD5, &nRet);
231-
BaseLib_OperatorString_StrToHex((XCHAR*)tszUrlMD5, nRet, tszUrlHex);
230+
Cryption_Api_Digest(tszUrlStr, tszUrlMD5, &nRet);
231+
BaseLib_String_StrToHex((XCHAR*)tszUrlMD5, nRet, tszUrlHex);
232232
//计算RESPONSE值
233233
nRet = _xstprintf(tszResponseStr, _X("%s:%s:%s:%s:auth:%s"), tszUserHex, lpszNonce, lpszNC, lpszCNonce, tszUrlHex);
234-
OPenSsl_Api_Digest(tszResponseStr, tszResponseMD5, &nRet);
235-
BaseLib_OperatorString_StrToHex((XCHAR*)tszResponseMD5, nRet, ptszResponseStr);
234+
Cryption_Api_Digest(tszResponseStr, tszResponseMD5, &nRet);
235+
BaseLib_String_StrToHex((XCHAR*)tszResponseMD5, nRet, ptszResponseStr);
236236
return true;
237237
}

XEngine_Source/StorageModule_APIHelp/APIHelp_Distributed/APIHelp_Distributed.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ bool CAPIHelp_Distributed::APIHelp_Distributed_RandomAddr(list<string>* pStl_Lis
5959
if (1 == nMode)
6060
{
6161
XNETHANDLE xhToken = 0;
62-
BaseLib_OperatorHandle_Create(&xhToken, 0, pStl_ListAddr->size(), false);
62+
BaseLib_Handle_Create(&xhToken, 0, pStl_ListAddr->size(), false);
6363
if (xhToken == pStl_ListAddr->size())
6464
{
6565
xhToken--;
@@ -128,7 +128,7 @@ bool CAPIHelp_Distributed::APIHelp_Distributed_FileList(list<APIHELP_LBFILEINFO>
128128
return false;
129129
}
130130

131-
BaseLib_OperatorMemory_Malloc((XPPPMEM)pppSt_ListPacket, pStl_ListParse->size(), sizeof(XSTORAGECORE_DBFILE));
131+
BaseLib_Memory_Malloc((XPPPMEM)pppSt_ListPacket, pStl_ListParse->size(), sizeof(XSTORAGECORE_DBFILE));
132132
list<APIHELP_LBFILEINFO>::const_iterator stl_ListIterator = pStl_ListParse->begin();
133133
for (int i = 0; stl_ListIterator != pStl_ListParse->end(); stl_ListIterator++, i++)
134134
{
@@ -392,7 +392,7 @@ bool CAPIHelp_Distributed::APIHelp_Distributed_UPStorage(list<XENGINE_STORAGEBUC
392392
if (1 == nMode)
393393
{
394394
XNETHANDLE xhToken = 0;
395-
BaseLib_OperatorHandle_Create(&xhToken, 0, stl_BuckSelect.size(), false);
395+
BaseLib_Handle_Create(&xhToken, 0, stl_BuckSelect.size(), false);
396396
if (xhToken == stl_BuckSelect.size())
397397
{
398398
xhToken--;

XEngine_Source/StorageModule_APIHelp/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ RELEASE = 0
88
UNICODE = 0
99
LOADHDR = -I ./ -I ../XEngine_Depend/XEngine_Module/jsoncpp
1010
LOADSO = -L ../XEngine_Depend/XEngine_Module/jsoncpp
11-
LIB = -lXEngine_BaseLib -lXEngine_OPenSsl -lRfcComponents_HttpProtocol -lXEngine_SystemApi -ljsoncpp
11+
LIB = -lXEngine_BaseLib -lXEngine_Cryption -lRfcComponents_HttpProtocol -lXEngine_SystemApi -ljsoncpp
1212
LIBEX =
1313
OBJECTS = APIHelp_Distributed.o APIHelp_Api.o APIHelp_Cryption.o pch.o
1414

XEngine_Source/StorageModule_APIHelp/pch.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ using namespace std;
3131
#include <XEngine_Include/XEngine_BaseLib/BaseLib_Error.h>
3232
#include <XEngine_Include/XEngine_Core/ManagePool_Define.h>
3333
#include <XEngine_Include/XEngine_Core/ManagePool_Error.h>
34-
#include <XEngine_Include/XEngine_Core/OPenSsl_Define.h>
35-
#include <XEngine_Include/XEngine_Core/OPenSsl_Error.h>
34+
#include <XEngine_Include/XEngine_Core/Cryption_Define.h>
35+
#include <XEngine_Include/XEngine_Core/Cryption_Error.h>
3636
#include <XEngine_Include/XEngine_HelpComponents/DataBase_Define.h>
3737
#include <XEngine_Include/XEngine_HelpComponents/DataBase_Error.h>
3838
#include <XEngine_Include/XEngine_SystemSdk/ProcFile_Define.h>
@@ -61,7 +61,7 @@ extern XLONG APIHelp_dwErrorCode;
6161

6262
#ifdef _MSC_BUILD
6363
#pragma comment(lib,"XEngine_BaseLib/XEngine_BaseLib")
64-
#pragma comment(lib,"XEngine_Core/XEngine_OPenSsl")
64+
#pragma comment(lib,"XEngine_Core/XEngine_Cryption")
6565
#pragma comment(lib,"XEngine_RfcComponents/RfcComponents_HttpProtocol")
6666
#pragma comment(lib,"XEngine_SystemSdk/XEngine_SystemApi")
6767
#ifdef _DEBUG

XEngine_Source/StorageModule_BTorrent/BTorrent_Creator/BTorrent_Creator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ bool CBTorrent_Creator::BTorrent_Creator_Init(XNETHANDLE* pxhToken, LPCXSTR lpsz
7272
st_BTCreator.m_nPieceSize = nPieceSize;
7373
_tcsxcpy(st_BTCreator.tszBTPath, lpszBTPath);
7474

75-
BaseLib_OperatorHandle_Create(pxhToken);
75+
BaseLib_Handle_Create(pxhToken);
7676
st_Locker.lock();
7777
stl_MapBTCreator.insert(make_pair(*pxhToken, st_BTCreator));
7878
st_Locker.unlock();

XEngine_Source/StorageModule_BTorrent/BTorrent_DLoader/BTorrent_DLoader.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ bool CBTorrent_DLoader::BTorrent_DLoader_Create(XNETHANDLE* pxhToken, LPCXSTR lp
107107
_tcsxcpy(pSt_BTDLoader->tszAddr, lpszAddr);
108108
_tcsxcpy(pSt_BTDLoader->tszFile, lpszSavePath);
109109
//生成句柄
110-
BaseLib_OperatorHandle_Create(pxhToken);
110+
BaseLib_Handle_Create(pxhToken);
111111

112112
st_Locker.lock();
113113
stl_MapDLoader.insert(make_pair(*pxhToken, pSt_BTDLoader));
@@ -171,7 +171,7 @@ bool CBTorrent_DLoader::BTorrent_DLoader_Query(XNETHANDLE xhToken, ENUM_BTORRENT
171171
return false;
172172
}
173173
*pInt_ListCount = stl_VectorAlerts.size();
174-
BaseLib_OperatorMemory_Malloc((XPPPMEM)pppenEventList, stl_VectorAlerts.size(), sizeof(ENUM_BTORRENT_EVENT_TYPE));
174+
BaseLib_Memory_Malloc((XPPPMEM)pppenEventList, stl_VectorAlerts.size(), sizeof(ENUM_BTORRENT_EVENT_TYPE));
175175
//轮训元素
176176
int i = 0;
177177
for (lt::alert const* stl_ListElement : stl_VectorAlerts)
@@ -225,7 +225,7 @@ bool CBTorrent_DLoader::BTorrent_DLoader_Query(XNETHANDLE xhToken, ENUM_BTORRENT
225225
{
226226
#if _MSC_BUILD
227227
int nUTFLen = stl_VectorIterator->name.length();
228-
BaseLib_OperatorCharset_UTFToAnsi(stl_VectorIterator->name.c_str(), stl_MapIterator->second->st_DLStatus.tszFileName, &nUTFLen);
228+
BaseLib_Charset_UTFToAnsi(stl_VectorIterator->name.c_str(), stl_MapIterator->second->st_DLStatus.tszFileName, &nUTFLen);
229229
stl_MapIterator->second->st_DLStatus.nDLoadTotal = stl_VectorIterator->total;
230230
#else
231231
_tcsxcpy(stl_MapIterator->second->st_DLStatus.tszFileName, stl_VectorIterator->name.c_str());

XEngine_Source/StorageModule_BTorrent/BTorrent_Define.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ extern "C" bool BTorrent_Parse_Init(XNETHANDLE* pxhToken, LPCXSTR lpszAddr);
246246
In/Out:Out
247247
类型:三级指针
248248
可空:N
249-
意思:输出解析到的节点列表,此参数需要BaseLib_OperatorMemory_Free释放内存
249+
意思:输出解析到的节点列表,此参数需要BaseLib_Memory_Free释放内存
250250
参数.三:pInt_ListCount
251251
In/Out:Out
252252
类型:整数型指针
@@ -270,7 +270,7 @@ extern "C" bool BTorrent_Parse_GetNode(XNETHANDLE xhToken, BTORRENT_PARSEMAP***
270270
In/Out:Out
271271
类型:三级指针
272272
可空:N
273-
意思:输出解析到的列表,此参数需要BaseLib_OperatorMemory_Free释放内存
273+
意思:输出解析到的列表,此参数需要BaseLib_Memory_Free释放内存
274274
参数.三:pInt_ListCount
275275
In/Out:Out
276276
类型:整数型指针
@@ -294,7 +294,7 @@ extern "C" bool BTorrent_Parse_GetTracker(XNETHANDLE xhToken, BTORRENT_PARSEMAP*
294294
In/Out:Out
295295
类型:三级指针
296296
可空:N
297-
意思:输出解析到的列表,此参数需要BaseLib_OperatorMemory_Free释放内存
297+
意思:输出解析到的列表,此参数需要BaseLib_Memory_Free释放内存
298298
参数.三:pInt_ListCount
299299
In/Out:Out
300300
类型:整数型指针

XEngine_Source/StorageModule_BTorrent/BTorrent_Parse/BTorrent_Parse.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ bool CBTorrent_Parse::BTorrent_Parse_Init(XNETHANDLE* pxhToken, LPCXSTR lpszAddr
9090
//如果是磁力
9191
}
9292

93-
BaseLib_OperatorHandle_Create(pxhToken);
93+
BaseLib_Handle_Create(pxhToken);
9494
st_Locker.lock();
9595
stl_MapBTParse.insert(make_pair(*pxhToken, pSt_BTParse));
9696
st_Locker.unlock();
@@ -109,7 +109,7 @@ bool CBTorrent_Parse::BTorrent_Parse_Init(XNETHANDLE* pxhToken, LPCXSTR lpszAddr
109109
In/Out:Out
110110
类型:三级指针
111111
可空:N
112-
意思:输出解析到的节点列表,此参数需要BaseLib_OperatorMemory_Free释放内存
112+
意思:输出解析到的节点列表,此参数需要BaseLib_Memory_Free释放内存
113113
参数.三:pInt_ListCount
114114
In/Out:Out
115115
类型:整数型指针
@@ -141,7 +141,7 @@ bool CBTorrent_Parse::BTorrent_Parse_GetNode(XNETHANDLE xhToken, BTORRENT_PARSEM
141141
}
142142
#if 1 == _XENGIEN_STORAGE_BUILDSWITCH_BTORRENT
143143
*pInt_ListCount = stl_MapIterator->second->m_BTInfo->nodes().size();
144-
BaseLib_OperatorMemory_Malloc((XPPPMEM)pppSt_Parse, stl_MapIterator->second->m_BTInfo->nodes().size(), sizeof(BTORRENT_PARSEMAP));
144+
BaseLib_Memory_Malloc((XPPPMEM)pppSt_Parse, stl_MapIterator->second->m_BTInfo->nodes().size(), sizeof(BTORRENT_PARSEMAP));
145145
std::vector<std::pair<std::string, int>>::const_iterator stl_ListIterator = stl_MapIterator->second->m_BTInfo->nodes().begin();
146146
for (int i = 0; stl_ListIterator != stl_MapIterator->second->m_BTInfo->nodes().end(); stl_ListIterator++, i++)
147147
{
@@ -164,7 +164,7 @@ bool CBTorrent_Parse::BTorrent_Parse_GetNode(XNETHANDLE xhToken, BTORRENT_PARSEM
164164
In/Out:Out
165165
类型:三级指针
166166
可空:N
167-
意思:输出解析到的列表,此参数需要BaseLib_OperatorMemory_Free释放内存
167+
意思:输出解析到的列表,此参数需要BaseLib_Memory_Free释放内存
168168
参数.三:pInt_ListCount
169169
In/Out:Out
170170
类型:整数型指针
@@ -197,7 +197,7 @@ bool CBTorrent_Parse::BTorrent_Parse_GetTracker(XNETHANDLE xhToken, BTORRENT_PAR
197197
#if 1 == _XENGIEN_STORAGE_BUILDSWITCH_BTORRENT
198198
int i = 0;
199199
*pInt_ListCount = stl_MapIterator->second->m_BTInfo->trackers().size();
200-
BaseLib_OperatorMemory_Malloc((XPPPMEM)pppSt_Parse, stl_MapIterator->second->m_BTInfo->trackers().size(), sizeof(BTORRENT_PARSEMAP));
200+
BaseLib_Memory_Malloc((XPPPMEM)pppSt_Parse, stl_MapIterator->second->m_BTInfo->trackers().size(), sizeof(BTORRENT_PARSEMAP));
201201

202202
for (auto const& stl_ListIterator : stl_MapIterator->second->m_BTInfo->trackers())
203203
{
@@ -221,7 +221,7 @@ bool CBTorrent_Parse::BTorrent_Parse_GetTracker(XNETHANDLE xhToken, BTORRENT_PAR
221221
In/Out:Out
222222
类型:三级指针
223223
可空:N
224-
意思:输出解析到的列表,此参数需要BaseLib_OperatorMemory_Free释放内存
224+
意思:输出解析到的列表,此参数需要BaseLib_Memory_Free释放内存
225225
参数.三:pInt_ListCount
226226
In/Out:Out
227227
类型:整数型指针
@@ -254,7 +254,7 @@ bool CBTorrent_Parse::BTorrent_Parse_GetSeeds(XNETHANDLE xhToken, BTORRENT_PARSE
254254
#if 1 == _XENGIEN_STORAGE_BUILDSWITCH_BTORRENT
255255
int i = 0;
256256
*pInt_ListCount = stl_MapIterator->second->m_BTInfo->web_seeds().size();
257-
BaseLib_OperatorMemory_Malloc((XPPPMEM)pppSt_Parse, stl_MapIterator->second->m_BTInfo->web_seeds().size(), sizeof(BTORRENT_PARSEMAP));
257+
BaseLib_Memory_Malloc((XPPPMEM)pppSt_Parse, stl_MapIterator->second->m_BTInfo->web_seeds().size(), sizeof(BTORRENT_PARSEMAP));
258258

259259
for (auto const& stl_ListIterator : stl_MapIterator->second->m_BTInfo->web_seeds())
260260
{
@@ -451,10 +451,10 @@ bool CBTorrent_Parse::BTorrent_Parse_GetFile(XNETHANDLE xhToken, XCHAR* ptszFile
451451
}
452452
#if 1 == _XENGIEN_STORAGE_BUILDSWITCH_BTORRENT
453453
int nUTFLen = stl_MapIterator->second->m_BTInfo->name().length();
454-
BaseLib_OperatorCharset_UTFToAnsi(stl_MapIterator->second->m_BTInfo->name().c_str(), ptszFilePath, &nUTFLen);
454+
BaseLib_Charset_UTFToAnsi(stl_MapIterator->second->m_BTInfo->name().c_str(), ptszFilePath, &nUTFLen);
455455

456456
*pInt_ListCount = stl_MapIterator->second->m_BTInfo->num_files();
457-
BaseLib_OperatorMemory_Malloc((XPPPMEM)pppSt_FileList, stl_MapIterator->second->m_BTInfo->num_files(), sizeof(BTORRENT_FILEINFO));
457+
BaseLib_Memory_Malloc((XPPPMEM)pppSt_FileList, stl_MapIterator->second->m_BTInfo->num_files(), sizeof(BTORRENT_FILEINFO));
458458

459459
lt::file_storage const& m_FileStorage = stl_MapIterator->second->m_BTInfo->files();
460460
int i = 0;
@@ -470,9 +470,9 @@ bool CBTorrent_Parse::BTorrent_Parse_GetFile(XNETHANDLE xhToken, XCHAR* ptszFile
470470
}
471471
#ifdef _MSC_BUILD
472472
nUTFLen = m_FileStorage.file_path(stl_ListIterator).length();
473-
BaseLib_OperatorCharset_UTFToAnsi(m_FileStorage.file_path(stl_ListIterator).c_str(), (*pppSt_FileList)[i]->tszFilePath, &nUTFLen);
473+
BaseLib_Charset_UTFToAnsi(m_FileStorage.file_path(stl_ListIterator).c_str(), (*pppSt_FileList)[i]->tszFilePath, &nUTFLen);
474474
nUTFLen = m_FileStorage.file_name(stl_ListIterator).size();
475-
BaseLib_OperatorCharset_UTFToAnsi(m_FileStorage.file_name(stl_ListIterator).data(), (*pppSt_FileList)[i]->tszFileName, &nUTFLen);
475+
BaseLib_Charset_UTFToAnsi(m_FileStorage.file_name(stl_ListIterator).data(), (*pppSt_FileList)[i]->tszFileName, &nUTFLen);
476476
#else
477477
_tcsxcpy((*pppSt_FileList)[i]->tszFilePath, m_FileStorage.file_path(stl_ListIterator).c_str());
478478
_tcsxcpy((*pppSt_FileList)[i]->tszFileName, m_FileStorage.file_name(stl_ListIterator).data());

XEngine_Source/StorageModule_Database/Database_File/Database_File.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ bool CDatabase_File::Database_File_FileInsert(XSTORAGECORE_DBFILE *pSt_DBManage,
132132
XSTORAGECORE_DBFILE **ppSt_ListFile;
133133
if (Database_File_FileQuery(&ppSt_ListFile, &nListCount, NULL, NULL, NULL, NULL, NULL, pSt_DBManage->st_ProtocolFile.tszFileHash))
134134
{
135-
BaseLib_OperatorMemory_Free((void***)&ppSt_ListFile, nListCount);
135+
BaseLib_Memory_Free((void***)&ppSt_ListFile, nListCount);
136136
return true;
137137
}
138138
XCHAR tszSQLQuery[2048];
@@ -146,7 +146,7 @@ bool CDatabase_File::Database_File_FileInsert(XSTORAGECORE_DBFILE *pSt_DBManage,
146146

147147
int nType = 0;
148148
std::string m_StrSQL = tszSQLQuery;
149-
BaseLib_OperatorString_GetPath(pSt_DBManage->st_ProtocolFile.tszFilePath, &nType);
149+
BaseLib_String_GetPath(pSt_DBManage->st_ProtocolFile.tszFilePath, &nType);
150150
if (1 == nType)
151151
{
152152
std::string m_StrSource = "\\";
@@ -443,7 +443,7 @@ bool CDatabase_File::Database_File_FileQuery(XSTORAGECORE_DBFILE*** pppSt_ListFi
443443
Database_dwErrorCode = ERROR_XENGINE_XSTROGE_CORE_DB_QUERYFILE_EMPTY;
444444
return false;
445445
}
446-
BaseLib_OperatorMemory_Malloc((XPPPMEM)pppSt_ListFile, stl_ListFile.size(), sizeof(XSTORAGECORE_DBFILE));
446+
BaseLib_Memory_Malloc((XPPPMEM)pppSt_ListFile, stl_ListFile.size(), sizeof(XSTORAGECORE_DBFILE));
447447

448448
list<XSTORAGECORE_DBFILE>::const_iterator stl_ListIterator = stl_ListFile.begin();
449449
for (int i = 0; stl_ListIterator != stl_ListFile.end(); stl_ListIterator++, i++)
@@ -480,7 +480,7 @@ bool CDatabase_File::Database_File_CreateTable()
480480
XENGINE_LIBTIMER st_DBTime;
481481
memset(&st_DBTime, 0, sizeof(XENGINE_LIBTIMER));
482482

483-
BaseLib_OperatorTime_GetSysTime(&st_DBTime);
483+
BaseLib_Time_GetSysTime(&st_DBTime);
484484

485485
if (12 == st_DBTime.wMonth)
486486
{
@@ -507,7 +507,7 @@ bool CDatabase_File::Database_File_CreateTable()
507507
int nUTFLen = 0;
508508
XCHAR tszUTFBuffer[2048];
509509
memset(tszUTFBuffer, '\0', sizeof(tszUTFBuffer));
510-
BaseLib_OperatorCharset_AnsiToUTF(tszSQLQuery, tszUTFBuffer, &nUTFLen);
510+
BaseLib_Charset_AnsiToUTF(tszSQLQuery, tszUTFBuffer, &nUTFLen);
511511
if (!DataBase_MySQL_Execute(xhDBSQL, tszUTFBuffer))
512512
#else
513513
if (!DataBase_MySQL_Execute(xhDBSQL, tszSQLQuery))
@@ -545,7 +545,7 @@ bool CDatabase_File::Database_File_TimeMonth(LPCXSTR lpszStartTime, int* pInt_Mo
545545
XENGINE_LIBTIMER st_EndTime;
546546
memset(&st_EndTime, '\0', sizeof(XENGINE_LIBTIMER));
547547

548-
BaseLib_OperatorTime_GetSysTime(&st_EndTime);
548+
BaseLib_Time_GetSysTime(&st_EndTime);
549549

550550
XCHAR tszTimeStr[64];
551551
memset(tszTimeStr, '\0', sizeof(tszTimeStr));
@@ -611,7 +611,7 @@ bool CDatabase_File::Database_File_TimeDel()
611611
memset(tszSQLQuery, '\0', sizeof(tszSQLQuery));
612612
_xstprintf(tszSQLQuery, _X("DROP TABLE `%s`"), pptszResult[0]);
613613
DataBase_MySQL_Execute(xhDBSQL, tszSQLQuery);
614-
BaseLib_OperatorMemory_Free((XPPPMEM)&ppSt_ListFile, nListCount);
614+
BaseLib_Memory_Free((XPPPMEM)&ppSt_ListFile, nListCount);
615615
}
616616
}
617617
}

0 commit comments

Comments
 (0)