Skip to content

Commit 3b48db4

Browse files
committed
update:vscopy
added:info report
1 parent 5852c72 commit 3b48db4

File tree

9 files changed

+54
-8
lines changed

9 files changed

+54
-8
lines changed

XEngine_Source/VSCopy-Debug.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ copy /y "D:\XEngine\XEngine_SourceCode\Debug\XEngine_ManagePool.dll" "./"
55
copy /y "D:\XEngine\XEngine_SourceCode\Debug\XEngine_OPenSsl.dll" "./"
66

77
copy /y "D:\XEngine\XEngine_SourceCode\Debug\XClient_Stream.dll" "./"
8+
copy /y "D:\XEngine\XEngine_SourceCode\Debug\XClient_APIHelp.dll" "./"
89

910
copy /y "D:\XEngine\XEngine_SourceCode\Debug\NetHelp_XSocket.dll" "./"
10-
copy /y "D:\XEngine\XEngine_SourceCode\Debug\NetHelp_APIHelp.dll" "./"
1111
copy /y "D:\XEngine\XEngine_SourceCode\Debug\XEngine_SystemApi.dll" "./"
1212

1313
copy /y "D:\XEngine\XEngine_SourceCode\Debug\HelpComponents_Packets.dll" "./"

XEngine_Source/VSCopy-x64.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ copy /y "%XEngine_Lib64%\XEngine_Core\XEngine_ManagePool.dll" "./"
55
copy /y "%XEngine_Lib64%\XEngine_Core\XEngine_OPenSsl.dll" "./"
66

77
copy /y "%XEngine_Lib64%\XEngine_Client\XClient_Stream.dll" "./"
8+
copy /y "%XEngine_Lib64%\XEngine_Client\XClient_APIHelp.dll" "./"
89

910
copy /y "%XEngine_Lib64%\XEngine_NetHelp\NetHelp_XSocket.dll" "./"
10-
copy /y "%XEngine_Lib64%\XEngine_NetHelp\NetHelp_APIHelp.dll" "./"
1111
copy /y "%XEngine_Lib64%\XEngine_SystemSdk\XEngine_SystemApi.dll" "./"
1212

1313
copy /y "%XEngine_Lib64%\XEngine_HelpComponents\HelpComponents_Packets.dll" "./"

XEngine_Source/VSCopy-x86.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ copy /y "%XEngine_Lib32%\XEngine_Core\XEngine_ManagePool.dll" "./"
55
copy /y "%XEngine_Lib32%\XEngine_Core\XEngine_OPenSsl.dll" "./"
66

77
copy /y "%XEngine_Lib32%\XEngine_Client\XClient_Stream.dll" "./"
8+
copy /y "%XEngine_Lib32%\XEngine_Client\XClient_APIHelp.dll" "./"
89

910
copy /y "%XEngine_Lib32%\XEngine_NetHelp\NetHelp_XSocket.dll" "./"
10-
copy /y "%XEngine_Lib32%\XEngine_NetHelp\NetHelp_APIHelp.dll" "./"
1111
copy /y "%XEngine_Lib32%\XEngine_SystemSdk\XEngine_SystemApi.dll" "./"
1212

1313
copy /y "%XEngine_Lib32%\XEngine_HelpComponents\HelpComponents_Packets.dll" "./"

XEngine_Source/XEngine_ModuleConfigure/ModuleConfig_Define.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,12 @@ typedef struct tag_XEngine_ServiceConfig
9898
bool bEnable;
9999
}st_PullWebRtc;
100100
}st_XPull;
101+
struct
102+
{
103+
XCHAR tszAPIUrl[MAX_PATH];
104+
XCHAR tszServiceName[128];
105+
bool bEnable;
106+
}st_XReport;
101107
struct
102108
{
103109
list<string> *pStl_ListVer; //版本列表

XEngine_Source/XEngine_ModuleConfigure/ModuleConfig_Error.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@
1818
#define ERROR_MODULE_CONFIGURE_JSON_XLOG 0xA0006 //读取XLOG配置失败
1919
#define ERROR_MODULE_CONFIGURE_JSON_XVER 0xA0007 //读取版本列表失败
2020
#define ERROR_MODULE_CONFIGURE_JSON_MALLOC 0xA0008 //申请内存失败
21-
#define ERROR_MODULE_CONFIGURE_JSON_XPULL 0xA0009 //拉流配置不存在
21+
#define ERROR_MODULE_CONFIGURE_JSON_XPULL 0xA0009 //拉流配置不存在
22+
#define ERROR_MODULE_CONFIGURE_JSON_REPORT 0xA000A //报告配置不存在

XEngine_Source/XEngine_ModuleConfigure/ModuleConfigure_Json/ModuleConfigure_Json.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,17 @@ bool CModuleConfigure_Json::ModuleConfigure_Json_File(LPCXSTR lpszConfigFile, XE
171171
pSt_ServerConfig->st_XLog.nMaxSize = st_JsonXLog["MaxSize"].asInt();
172172
pSt_ServerConfig->st_XLog.nMaxCount = st_JsonXLog["MaxCount"].asInt();
173173
pSt_ServerConfig->st_XLog.nLogLeave = st_JsonXLog["LogLeave"].asInt();
174+
//信息报告
175+
if (st_JsonRoot["XReport"].empty() || (3 != st_JsonRoot["XReport"].size()))
176+
{
177+
Config_IsErrorOccur = true;
178+
Config_dwErrorCode = ERROR_MODULE_CONFIGURE_JSON_REPORT;
179+
return false;
180+
}
181+
Json::Value st_JsonReport = st_JsonRoot["XReport"];
182+
pSt_ServerConfig->st_XReport.bEnable = st_JsonReport["bEnable"].asBool();
183+
_tcsxcpy(pSt_ServerConfig->st_XReport.tszServiceName, st_JsonReport["tszServiceName"].asCString());
184+
_tcsxcpy(pSt_ServerConfig->st_XReport.tszAPIUrl, st_JsonReport["tszAPIUrl"].asCString());
174185
//版本列表
175186
if (st_JsonRoot["XVer"].empty())
176187
{

XEngine_Source/XEngine_ModuleConfigure/XEngine_ModuleConfigure.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
<PropertyGroup Label="UserMacros" />
7373
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
7474
<LinkIncremental>true</LinkIncremental>
75-
<IncludePath>$(XEngine_Include);../XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath)</IncludePath>
75+
<IncludePath>$(XEngine_Include);../XEngine_Depend/XEngine_Module/jsoncpp;..\XEngine_ModuleConfigure;$(IncludePath)</IncludePath>
7676
<LibraryPath>$(XEngine_Lib32);$(LibraryPath)</LibraryPath>
7777
</PropertyGroup>
7878
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">

XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/XEngine_Hdr.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ using namespace std;
3232
#include <XEngine_Include/XEngine_Core/OPenSsl_Error.h>
3333
#include <XEngine_Include/XEngine_NetHelp/XSocket_Define.h>
3434
#include <XEngine_Include/XEngine_NetHelp/XSocket_Error.h>
35-
#include <XEngine_Include/XEngine_NetHelp/APIHelp_Define.h>
36-
#include <XEngine_Include/XEngine_NetHelp/APIHelp_Error.h>
3735
#include <XEngine_Include/XEngine_HelpComponents/XLog_Define.h>
3836
#include <XEngine_Include/XEngine_HelpComponents/XLog_Error.h>
3937
#include <XEngine_Include/XEngine_HelpComponents/Packets_Define.h>
@@ -76,6 +74,8 @@ using namespace std;
7674
#include "../../XEngine_ModuleHelp/ModuleHelp_Error.h"
7775
#include "../../XEngine_ModuleQueue/ModuleQueue_Define.h"
7876
#include "../../XEngine_ModuleQueue/ModuleQueue_Error.h"
77+
#include "../../XEngine_Depend/XEngine_Module/XEngine_InfoReport/InfoReport_Define.h"
78+
#include "../../XEngine_Depend/XEngine_Module/XEngine_InfoReport/InfoReport_Error.h"
7979
//加载自己的头文件
8080
#include "XEngine_Configure.h"
8181
#include "XEngine_Network.h"
@@ -147,12 +147,14 @@ extern FILE* pSt_AFile;
147147
#pragma comment(lib,"../../x64/Debug/XEngine_ModuleSession.lib")
148148
#pragma comment(lib,"../../x64/Debug/XEngine_ModuleHelp")
149149
#pragma comment(lib,"../../x64/Debug/XEngine_ModuleQueue")
150+
#pragma comment(lib,"../../x64/Debug/XEngine_InfoReport")
150151
#else
151152
#pragma comment(lib,"../../x64/Release/XEngine_ModuleConfigure.lib")
152153
#pragma comment(lib,"../../x64/Release/XEngine_ModuleProtocol.lib")
153154
#pragma comment(lib,"../../x64/Release/XEngine_ModuleSession.lib")
154155
#pragma comment(lib,"../../x64/Release/XEngine_ModuleHelp")
155156
#pragma comment(lib,"../../x64/Release/XEngine_ModuleQueue")
157+
#pragma comment(lib,"../../x64/Release/XEngine_InfoReport")
156158
#endif
157159
#else
158160
#ifdef _DEBUG
@@ -161,20 +163,21 @@ extern FILE* pSt_AFile;
161163
#pragma comment(lib,"../../Debug/XEngine_ModuleSession.lib")
162164
#pragma comment(lib,"../../Debug/XEngine_ModuleHelp")
163165
#pragma comment(lib,"../../Debug/XEngine_ModuleQueue")
166+
#pragma comment(lib,"../../Debug/XEngine_InfoReport")
164167
#else
165168
#pragma comment(lib,"../../Release/XEngine_ModuleConfigure.lib")
166169
#pragma comment(lib,"../../Release/XEngine_ModuleProtocol.lib")
167170
#pragma comment(lib,"../../Release/XEngine_ModuleSession.lib")
168171
#pragma comment(lib,"../../Release/XEngine_ModuleHelp")
169172
#pragma comment(lib,"../../Release/XEngine_ModuleQueue")
173+
#pragma comment(lib,"../../Release/XEngine_InfoReport")
170174
#endif
171175
#endif
172176
#pragma comment(lib,"XEngine_BaseLib/XEngine_BaseLib.lib")
173177
#pragma comment(lib,"XEngine_Core/XEngine_Core.lib")
174178
#pragma comment(lib,"XEngine_Core/XEngine_ManagePool.lib")
175179
#pragma comment(lib,"XEngine_Core/XEngine_OPenSsl.lib")
176180
#pragma comment(lib,"XEngine_NetHelp/NetHelp_XSocket.lib")
177-
#pragma comment(lib,"XEngine_NetHelp/NetHelp_APIHelp.lib")
178181
#pragma comment(lib,"XEngine_HelpComponents/HelpComponents_XLog.lib")
179182
#pragma comment(lib,"XEngine_HelpComponents/HelpComponents_Packets")
180183
#pragma comment(lib,"XEngine_RfcComponents/RfcComponents_HttpProtocol.lib")

XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/XEngine_StreamMediaApp.cpp

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,31 @@ int main(int argc, char** argv)
534534
{
535535
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_WARN, _X("启动服务中,HLS(M3U8)文件流被设置为禁用"));
536536
}
537+
//发送信息报告
538+
if (st_ServiceConfig.st_XReport.bEnable)
539+
{
540+
if (InfoReport_APIMachine_Send(st_ServiceConfig.st_XReport.tszAPIUrl, st_ServiceConfig.st_XReport.tszServiceName))
541+
{
542+
__int64x nTimeCount = 0;
543+
if (InfoReport_APIMachine_GetTime(st_ServiceConfig.st_XReport.tszAPIUrl, st_ServiceConfig.st_XReport.tszServiceName, &nTimeCount))
544+
{
545+
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("启动服务中,启动信息报告给API服务器:%s 成功,报告次数:%lld"), st_ServiceConfig.st_XReport.tszAPIUrl, nTimeCount);
546+
}
547+
else
548+
{
549+
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("启动服务中,启动信息报告给API服务器:%s 成功,获取报告次数失败,错误:%lX"), st_ServiceConfig.st_XReport.tszAPIUrl, InfoReport_GetLastError());
550+
}
551+
}
552+
else
553+
{
554+
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("启动服务中,启动信息报告给API服务器:%s 失败,错误:%lX"), st_ServiceConfig.st_XReport.tszAPIUrl, InfoReport_GetLastError());
555+
}
556+
}
557+
else
558+
{
559+
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_WARN, _X("启动服务中,信息报告给API服务器没有启用"));
560+
}
561+
537562

538563
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("所有服务成功启动,服务运行中,XEngine版本:%s,服务版本:%s,发行次数;%d。。。"), BaseLib_OperatorVer_XNumberStr(), st_ServiceConfig.st_XVer.pStl_ListVer->front().c_str(), st_ServiceConfig.st_XVer.pStl_ListVer->size());
539564

0 commit comments

Comments
 (0)