Skip to content

Commit 38460b1

Browse files
authored
Merge pull request #16 from libxengine/develop
V3.0.0.1001 Merge
2 parents 35fccaf + 2ff6e3d commit 38460b1

Some content is hidden

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

55 files changed

+1723
-34
lines changed

CHANGELOG

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
XEngine_APIService V3.0.0.1001
2+
3+
增加:系统API函数模块
4+
增加:进程守护功能和接口支持
5+
增加:启动隐藏窗口和自动启动的功能选项
6+
增加:对本地屏幕和声音录像推流的支持
7+
增加:停止推流协议
8+
增加:权限提示
9+
修改:初始化配置不在需要配置结构参数
10+
修改:启动失败不在直接退出
11+
修正:后台服务协议没有HTTP返回请求的问题
12+
13+
added:system api module
14+
added:deamon process and http api interface for process deamon
15+
added:hide windows when start and auto start option
16+
added:screen and sound push stream
17+
added:stop stream record protocol
18+
added:permission handle
19+
modify:init configure does not need configure parament
20+
modify:does not directly exit when configure init failed.
21+
fixed:does not http response for backservice
22+
======================================================================================
123
XEngine_APIService V2.11.0.1001
224

325
增加:用户验证功能

COPYRIGHT

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
XEngine:https://gitee.com/xyry/libxengine or https://github.com/libxengine/xengine
33
jsoncpp:https://github.com/open-source-parsers/jsoncpp
44
opencc:https://github.com/BYVoid/OpenCC
5+
opencv:https://github.com/opencv/opencv
6+
libqrencode:https://github.com/fukuchi/libqrencode
7+
lua:https://github.com/lua/lua
58

69
data sources:
710
IP:https://github.com/lionsoul2014/ip2region

README.en.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ As long as the repository is not in suspended state, we will maintain and develo
77
c c++ 接口服务器
88
c c++ interface api service
99
This is an api interface for information query service,At present, the information search service on the market need to charge, and our information search service is free and open source.
10+
Not only is it a query service, but it can also provide functions such as machine management and process deamon.
1011
This service mainly uses HTTP/V1.1 to implement various interface services
1112
This is a general information query service that does not contain any language attributes
1213
You can use this code to implement your own information query service, which supports querying any information
@@ -48,6 +49,7 @@ Support privatization deployment, free, safe, open source, controllable
4849
28. Sensitive word detection
4950
29. remote control(back management)
5051
30. Image Process
52+
31. process deamon
5153

5254
## install
5355

@@ -67,7 +69,7 @@ MYSQL database version 8.0 or above is required. Create a table through CreateDa
6769
Modify the database configuration in XSQL in the configuration file to your
6870

6971
#### Windows
70-
need to vcpkg configure third-part env.refer vcpkg install guide.after installed and execution:vcpkg.exe install lua lua:x64-windows opencc opencc:x64-windows opencv[contrib] libqrencode opencv[contrib]:x64-windows libqrencode:x64-windows
72+
need to vcpkg configure third-part env.refer vcpkg install guide.after installed and execution:vcpkg.exe install lua:x84-windows lua:x64-windows opencc:x84-windows opencc:x64-windows opencv[contrib]:x84-windows libqrencode:x84-windows opencv[contrib]:x64-windows libqrencode:x64-windows
7173
use vs open and compile,suport windows 7sp1 and above
7274
Just Run it
7375

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
c c++ 接口服务器
88
c c++ interface api service
99
这是一个信息查询的API接口服务,目前市面上的信息查询服务都需要收费,而我们这个信息查询服务属于免费开源的.
10+
或者说他不光是一个查询服务,他还可以提供机器管理进程守护等功能
1011
这个服务主要使用HTTP/V1.1实现各种接口服务.
1112
这是一个不包含任何语言属性的通用信息查询服务.
1213
你可以使用此代码实现自己的信息查询服务,支持查询任何信息
@@ -47,6 +48,7 @@ c c++ interface api service
4748
28. 敏感词检测
4849
29. 远程控制(后台管理)
4950
30. 图像处理
51+
31. 进程守护
5052

5153
## 安装教程
5254

@@ -66,7 +68,7 @@ macos执行:./XEngine_LINEnv.sh -i 3
6668
修改配置文件里面XSQL里面的数据库配置为你的
6769

6870
#### Windows
69-
需要vcpkg配置第三方环境,具体参考vcpkg安装方式,安装好后执行:vcpkg.exe install lua lua:x64-windows opencc opencc:x64-windows opencv[contrib] libqrencode opencv[contrib]:x64-windows libqrencode:x64-windows
71+
需要vcpkg配置第三方环境,具体参考vcpkg安装方式,安装好后执行:vcpkg.exe install lua:x84-windows lua:x64-windows opencc:x84-windows opencc:x64-windows opencv[contrib]:x84-windows libqrencode:x84-windows opencv[contrib]:x64-windows libqrencode:x64-windows
7072
使用VS打开并且编译,支持WINDOWS 7SP1以上系统
7173
直接运行即可
7274

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
#ifdef _MSC_BUILD
2+
#include <Windows.h>
3+
#include <tchar.h>
4+
#pragma comment(lib,"Ws2_32")
5+
#pragma comment(lib,"jsoncpp")
6+
#pragma comment(lib,"XEngine_BaseLib/XEngine_BaseLib")
7+
#pragma comment(lib,"XEngine_NetHelp/NetHelp_APIClient")
8+
#endif
9+
#include <stdio.h>
10+
#include <stdlib.h>
11+
#include <string.h>
12+
#include <inttypes.h>
13+
#include <json/json.h>
14+
#include <XEngine_Include/XEngine_CommHdr.h>
15+
#include <XEngine_Include/XEngine_Types.h>
16+
#include <XEngine_Include/XEngine_ProtocolHdr.h>
17+
#include <XEngine_Include/XEngine_BaseLib/BaseLib_Define.h>
18+
#include <XEngine_Include/XEngine_BaseLib/BaseLib_Error.h>
19+
#include <XEngine_Include/XEngine_NetHelp/APIClient_Define.h>
20+
#include <XEngine_Include/XEngine_NetHelp/APIClient_Error.h>
21+
22+
//需要优先配置XEngine
23+
//WINDOWS支持VS2022 x64 debug 编译调试
24+
//linux::g++ -std=c++17 -Wall -g APPClient_DeamonExample.cpp -o APPClient_DeamonExample.exe -L /usr/local/lib/XEngine_Release/XEngine_BaseLib -L /usr/local/lib/XEngine_Release/XEngine_NetHelp -lXEngine_BaseLib -lNetHelp_APIClient -ljsoncpp
25+
//macos::g++ -std=c++17 -Wall -g APPClient_DeamonExample.cpp -o APPClient_DeamonExample.exe -lXEngine_BaseLib -lNetHelp_APIClient -ljsoncpp
26+
27+
28+
int test_insert()
29+
{
30+
int nCode = 0;
31+
int nLen = 0;
32+
LPCXSTR lpszAPIUrl = _X("http://127.0.0.1:5501/api?function=deamon");
33+
XCHAR* ptszMsgBuffer = NULL;
34+
35+
Json::Value st_JsonRoot;
36+
st_JsonRoot["bEnable"] = true;
37+
st_JsonRoot["nRetime"] = 3;
38+
st_JsonRoot["tszAPPName"] = "1.exe";
39+
st_JsonRoot["tszAPPPath"] = "D:\\path\\";
40+
41+
if (!APIClient_Http_Request(_X("POST"), lpszAPIUrl, st_JsonRoot.toStyledString().c_str(), &nCode, &ptszMsgBuffer, &nLen))
42+
{
43+
printf("发送投递失败!\n");
44+
return 0;
45+
}
46+
printf("接受到数据,大小:%d,内容:%s\n", nLen, ptszMsgBuffer);
47+
BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
48+
49+
return 0;
50+
}
51+
52+
int main()
53+
{
54+
#ifdef _MSC_BUILD
55+
WSADATA st_WSAData;
56+
WSAStartup(MAKEWORD(2, 2), &st_WSAData);
57+
#endif
58+
test_insert();
59+
60+
#ifdef _MSC_BUILD
61+
WSACleanup();
62+
#endif
63+
return 0;
64+
}
Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|Win32">
5+
<Configuration>Debug</Configuration>
6+
<Platform>Win32</Platform>
7+
</ProjectConfiguration>
8+
<ProjectConfiguration Include="Release|Win32">
9+
<Configuration>Release</Configuration>
10+
<Platform>Win32</Platform>
11+
</ProjectConfiguration>
12+
<ProjectConfiguration Include="Debug|x64">
13+
<Configuration>Debug</Configuration>
14+
<Platform>x64</Platform>
15+
</ProjectConfiguration>
16+
<ProjectConfiguration Include="Release|x64">
17+
<Configuration>Release</Configuration>
18+
<Platform>x64</Platform>
19+
</ProjectConfiguration>
20+
</ItemGroup>
21+
<PropertyGroup Label="Globals">
22+
<VCProjectVersion>17.0</VCProjectVersion>
23+
<Keyword>Win32Proj</Keyword>
24+
<ProjectGuid>{5d064fef-9b83-493a-b891-12e56b1b4c65}</ProjectGuid>
25+
<RootNamespace>APPClientDeamonExample</RootNamespace>
26+
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
27+
</PropertyGroup>
28+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
29+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
30+
<ConfigurationType>Application</ConfigurationType>
31+
<UseDebugLibraries>true</UseDebugLibraries>
32+
<PlatformToolset>v143</PlatformToolset>
33+
<CharacterSet>Unicode</CharacterSet>
34+
</PropertyGroup>
35+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
36+
<ConfigurationType>Application</ConfigurationType>
37+
<UseDebugLibraries>false</UseDebugLibraries>
38+
<PlatformToolset>v143</PlatformToolset>
39+
<WholeProgramOptimization>true</WholeProgramOptimization>
40+
<CharacterSet>Unicode</CharacterSet>
41+
</PropertyGroup>
42+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
43+
<ConfigurationType>Application</ConfigurationType>
44+
<UseDebugLibraries>true</UseDebugLibraries>
45+
<PlatformToolset>v143</PlatformToolset>
46+
<CharacterSet>Unicode</CharacterSet>
47+
</PropertyGroup>
48+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
49+
<ConfigurationType>Application</ConfigurationType>
50+
<UseDebugLibraries>false</UseDebugLibraries>
51+
<PlatformToolset>v143</PlatformToolset>
52+
<WholeProgramOptimization>true</WholeProgramOptimization>
53+
<CharacterSet>Unicode</CharacterSet>
54+
</PropertyGroup>
55+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
56+
<ImportGroup Label="ExtensionSettings">
57+
</ImportGroup>
58+
<ImportGroup Label="Shared">
59+
</ImportGroup>
60+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
61+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
62+
</ImportGroup>
63+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
64+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
65+
</ImportGroup>
66+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
67+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
68+
</ImportGroup>
69+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
70+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
71+
</ImportGroup>
72+
<PropertyGroup Label="UserMacros" />
73+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
74+
<IncludePath>$(XEngine_Include);../../XEngine_Source/XEngine_ThirdPart/jsoncpp;$(IncludePath)</IncludePath>
75+
<LibraryPath>$(XEngine_Lib64);../../XEngine_Source/x64/Debug;$(LibraryPath)</LibraryPath>
76+
</PropertyGroup>
77+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
78+
<ClCompile>
79+
<WarningLevel>Level3</WarningLevel>
80+
<SDLCheck>true</SDLCheck>
81+
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
82+
<ConformanceMode>true</ConformanceMode>
83+
</ClCompile>
84+
<Link>
85+
<SubSystem>Console</SubSystem>
86+
<GenerateDebugInformation>true</GenerateDebugInformation>
87+
</Link>
88+
</ItemDefinitionGroup>
89+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
90+
<ClCompile>
91+
<WarningLevel>Level3</WarningLevel>
92+
<FunctionLevelLinking>true</FunctionLevelLinking>
93+
<IntrinsicFunctions>true</IntrinsicFunctions>
94+
<SDLCheck>true</SDLCheck>
95+
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
96+
<ConformanceMode>true</ConformanceMode>
97+
</ClCompile>
98+
<Link>
99+
<SubSystem>Console</SubSystem>
100+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
101+
<OptimizeReferences>true</OptimizeReferences>
102+
<GenerateDebugInformation>true</GenerateDebugInformation>
103+
</Link>
104+
</ItemDefinitionGroup>
105+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
106+
<ClCompile>
107+
<WarningLevel>Level3</WarningLevel>
108+
<SDLCheck>true</SDLCheck>
109+
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
110+
<ConformanceMode>true</ConformanceMode>
111+
</ClCompile>
112+
<Link>
113+
<SubSystem>Console</SubSystem>
114+
<GenerateDebugInformation>true</GenerateDebugInformation>
115+
</Link>
116+
</ItemDefinitionGroup>
117+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
118+
<ClCompile>
119+
<WarningLevel>Level3</WarningLevel>
120+
<FunctionLevelLinking>true</FunctionLevelLinking>
121+
<IntrinsicFunctions>true</IntrinsicFunctions>
122+
<SDLCheck>true</SDLCheck>
123+
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
124+
<ConformanceMode>true</ConformanceMode>
125+
</ClCompile>
126+
<Link>
127+
<SubSystem>Console</SubSystem>
128+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
129+
<OptimizeReferences>true</OptimizeReferences>
130+
<GenerateDebugInformation>true</GenerateDebugInformation>
131+
</Link>
132+
</ItemDefinitionGroup>
133+
<ItemGroup>
134+
<ClCompile Include="APPClient_DeamonExample.cpp" />
135+
</ItemGroup>
136+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
137+
<ImportGroup Label="ExtensionTargets">
138+
</ImportGroup>
139+
</Project>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup>
4+
<Filter Include="源文件">
5+
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
6+
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
7+
</Filter>
8+
<Filter Include="头文件">
9+
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
10+
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
11+
</Filter>
12+
<Filter Include="资源文件">
13+
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
14+
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
15+
</Filter>
16+
</ItemGroup>
17+
<ItemGroup>
18+
<ClCompile Include="APPClient_DeamonExample.cpp">
19+
<Filter>源文件</Filter>
20+
</ClCompile>
21+
</ItemGroup>
22+
</Project>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup />
4+
</Project>

XEngine_APPClient/XEngine_APPClient.sln

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "APPClient_ImageExample", "A
4141
EndProject
4242
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "APPClient_BackExample", "APPClient_BackExample\APPClient_BackExample.vcxproj", "{384BF475-8401-4ABD-8510-788592511FC1}"
4343
EndProject
44+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "APPClient_DeamonExample", "APPClient_DeamonExample\APPClient_DeamonExample.vcxproj", "{5D064FEF-9B83-493A-B891-12E56B1B4C65}"
45+
EndProject
4446
Global
4547
GlobalSection(SolutionConfigurationPlatforms) = preSolution
4648
Debug|x64 = Debug|x64
@@ -201,6 +203,14 @@ Global
201203
{384BF475-8401-4ABD-8510-788592511FC1}.Release|x64.Build.0 = Release|x64
202204
{384BF475-8401-4ABD-8510-788592511FC1}.Release|x86.ActiveCfg = Release|Win32
203205
{384BF475-8401-4ABD-8510-788592511FC1}.Release|x86.Build.0 = Release|Win32
206+
{5D064FEF-9B83-493A-B891-12E56B1B4C65}.Debug|x64.ActiveCfg = Debug|x64
207+
{5D064FEF-9B83-493A-B891-12E56B1B4C65}.Debug|x64.Build.0 = Debug|x64
208+
{5D064FEF-9B83-493A-B891-12E56B1B4C65}.Debug|x86.ActiveCfg = Debug|Win32
209+
{5D064FEF-9B83-493A-B891-12E56B1B4C65}.Debug|x86.Build.0 = Debug|Win32
210+
{5D064FEF-9B83-493A-B891-12E56B1B4C65}.Release|x64.ActiveCfg = Release|x64
211+
{5D064FEF-9B83-493A-B891-12E56B1B4C65}.Release|x64.Build.0 = Release|x64
212+
{5D064FEF-9B83-493A-B891-12E56B1B4C65}.Release|x86.ActiveCfg = Release|Win32
213+
{5D064FEF-9B83-493A-B891-12E56B1B4C65}.Release|x86.Build.0 = Release|Win32
204214
EndGlobalSection
205215
GlobalSection(SolutionProperties) = preSolution
206216
HideSolutionNode = FALSE

XEngine_Docment/Docment_en.docx

1.43 KB
Binary file not shown.

0 commit comments

Comments
 (0)