Skip to content

Commit 3f4a068

Browse files
authored
Merge pull request #21 from libxengine/develop
V3.5.0.1001 Merge
2 parents 73e9b7f + 6e7b667 commit 3f4a068

File tree

99 files changed

+1496
-7656
lines changed

Some content is hidden

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

99 files changed

+1496
-7656
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Smartphone (please complete the following information):**
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS8.1]
34+
- Browser [e.g. stock browser, safari]
35+
- Version [e.g. 22]
36+
37+
**Additional context**
38+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "XEngine_Source/XEngine_Depend"]
2+
path = XEngine_Source/XEngine_Depend
3+
url = https://github.com/libxengine/XEngine_OPenSource.git

CHANGELOG

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
XEngine_APIService V3.5.0.1001
2+
3+
增加:机器信息收集增加服务名字段
4+
增加:机器信息报告查询
5+
增加:RFC的UDP服务端口的STUN协议代码支持
6+
增加:信息报告配置支持
7+
增加:NTP时间同步协议支持
8+
增加:油价查询支持
9+
修改:jsoncpp现在使用子模块方式加载
10+
修改:分离了版本信息从配置文件中
11+
修复:图像扩展名没有处理的问题
12+
13+
added:rfc witch udp port and stun protocol supported
14+
added:query info for report
15+
added:service name for machine
16+
added:info report supported
17+
added:NTP time sync protocol supported
18+
added:oil price query supported
19+
modify:jsoncpp is depend sub module
20+
modify:detach version configure file
21+
fixed:image process ext name is incorrect
22+
======================================================================================
123
XEngine_APIService V3.4.0.1001
224

325
增加:lua脚本心跳协议支持

CODE_OF_CONDUCT.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the
26+
overall community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or
31+
advances of any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email
35+
address, without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at
63+
64+
All complaints will be reviewed and investigated promptly and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series
86+
of actions.
87+
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or
93+
permanent ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within
113+
the community.
114+
115+
## Attribution
116+
117+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118+
version 2.0, available at
119+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120+
121+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
122+
enforcement ladder](https://github.com/mozilla/diversity).
123+
124+
[homepage]: https://www.contributor-covenant.org
125+
126+
For answers to common questions about this code of conduct, see the FAQ at
127+
https://www.contributor-covenant.org/faq. Translations are available at
128+
https://www.contributor-covenant.org/translations.

README.en.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Support privatization deployment, free, safe, open source, controllable
3030
9. Zodiac Constellation
3131
10. Password generator
3232
11. World Time Zones
33-
12. Oil price inquiry (planned)
33+
12. Oil price inquiry
3434
13. Administrative zip code
3535
14. Bank card verification
3636
15. Exchange rate calculation (planned)
@@ -52,6 +52,8 @@ Support privatization deployment, free, safe, open source, controllable
5252
31. Region ID Convert
5353
32. Machine Information Collect
5454
33. heartbeat
55+
34. STUN NAT Protocol
56+
35. NTP Time Sync Protocol
5557

5658
## install
5759

@@ -75,6 +77,11 @@ need to vcpkg configure third-part env.refer vcpkg install guide.after installed
7577
use vs open and compile,suport windows 7sp1 and above
7678
Just Run it
7779

80+
#### sub module
81+
Due to the dependent sub-modules, after you checkout the warehouse, execute the following command in the warehouse directory to pull the sub-modules
82+
git submodule init
83+
git submodule update
84+
7885
#### Linux
7986
ubuntu:sudo apt install sudo apt install liblua5.4-dev libopencv-dev libopencv-contrib-dev libqrencode-dev
8087
centos:compile by self
@@ -213,6 +220,25 @@ Api:http://app.xyry.org:5501/api?function=log&params1=1
213220
"nLogLevel":4
214221
}
215222
```
223+
Oil Query
224+
API:http://app.xyry.org:5501/api?function=oil&addr=四川
225+
```json
226+
{
227+
"code": 0,
228+
"data": {
229+
"dlValue0": 7.9100000000000001,
230+
"dlValue10": 8.3800000000000008,
231+
"dlValue20": 8.6899999999999995,
232+
"dlValue35": 0,
233+
"dlValue92": 8.2799999999999994,
234+
"dlValue95": 8.8499999999999996,
235+
"dlValue98": 9.6199999999999992,
236+
"tszCityStr": "四川",
237+
"tszUPTime": "2024-05-08 14:39:53"
238+
},
239+
"msg": "success"
240+
}
241+
```
216242
## Participate in contribution
217243
I hope you will submit more code to participate in the contribution
218244

README.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ c c++ interface api service
2929
9. 生肖星座
3030
10. 密码生成器
3131
11. 世界时区
32-
12. 油价查询(计划中)
32+
12. 油价查询
3333
13. 行政邮编
3434
14. 银行卡验证
3535
15. 汇率计算(计划中)
@@ -51,6 +51,8 @@ c c++ interface api service
5151
31. 行政区域ID转换
5252
32. 机器信息收集
5353
33. 心跳处理
54+
34. STUN NAT协议
55+
35. NTP时间同步协议
5456

5557
## 安装教程
5658

@@ -69,6 +71,11 @@ macos执行:./XEngine_LINEnv.sh -i 3
6971
需要MYSQL数据库8.0以上版本.通过CreateDatabase.sql创建表,然后导入剩余的表
7072
修改配置文件里面XSQL里面的数据库配置为你的
7173

74+
#### sub module
75+
由于依赖的子模块,在你checkout仓库后,在仓库目录下执行下面的命令拉取子模块
76+
git submodule init
77+
git submodule update
78+
7279
#### Windows
7380
需要vcpkg配置第三方环境,具体参考vcpkg安装方式,安装好后执行:vcpkg.exe install lua:x86-windows opencv[contrib]:x86-windows libqrencode:x86-windows lua:x64-windows opencv[contrib]:x64-windows libqrencode:x64-windows
7481
使用VS打开并且编译,支持WINDOWS 7SP1以上系统
@@ -214,6 +221,25 @@ make FLAGS=CleanAll 清理编译
214221
"nLogLevel":4
215222
}
216223
```
224+
油价查询
225+
接口:http://app.xyry.org:5501/api?function=oil&addr=四川
226+
```json
227+
{
228+
"code": 0,
229+
"data": {
230+
"dlValue0": 7.9100000000000001,
231+
"dlValue10": 8.3800000000000008,
232+
"dlValue20": 8.6899999999999995,
233+
"dlValue35": 0,
234+
"dlValue92": 8.2799999999999994,
235+
"dlValue95": 8.8499999999999996,
236+
"dlValue98": 9.6199999999999992,
237+
"tszCityStr": "四川",
238+
"tszUPTime": "2024-05-08 14:39:53"
239+
},
240+
"msg": "success"
241+
}
242+
```
217243
## 参与贡献
218244
希望大家多多提交代码参与贡献
219245

SECURITY.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
Use this section to tell people about which versions of your project are
6+
currently being supported with security updates.
7+
8+
| Version | Supported |
9+
| ------- | ------------------ |
10+
| >= 3.x | :white_check_mark: |
11+
| <= 2.x | :x: |
12+
13+
## Reporting a Vulnerability
14+
15+
www.xyry.org or [email protected]

XEngine_APPClient/APPClient_ImageExample/APPClient_ImageExample.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,14 @@ int test_imgzoom()
7979
FILE* pSt_File = _xtfopen(pptszListFile[i], _X("rb"));
8080
int nRet = (int)fread(ptszFileBuffer, 1, XENGINE_MEMORY_SIZE_MAX, pSt_File);
8181
fclose(pSt_File);
82+
8283
APPClient_ImageExample_GetAttr(ptszFileBuffer, nRet, &nWidth, &nHeight);
8384

84-
XCHAR tszAPIUrl[MAX_PATH];
85-
memset(tszAPIUrl, '\0', sizeof(tszAPIUrl));
85+
XCHAR tszAPIUrl[MAX_PATH] = {};
86+
XCHAR tszFileExt[64] = {};
8687

87-
_xstprintf(tszAPIUrl, _X("http://127.0.0.1:5501/api?function=image&type=1&ext=png&width=%d&height=%d"), nWidth / 2, nHeight / 2);
88+
BaseLib_OperatorString_GetFileAndPath(pptszListFile[i], NULL, NULL, NULL, tszFileExt);
89+
_xstprintf(tszAPIUrl, _X("http://127.0.0.1:5501/api?function=image&type=1&ext=%s&width=%d&height=%d"), tszFileExt, nWidth / 2, nHeight / 2);
8890

8991
XCHAR* ptszMsgBuffer = NULL;
9092
if (!APIClient_Http_Request(_X("POST"), tszAPIUrl, ptszFileBuffer, &nCode, &ptszMsgBuffer, &nRet))

0 commit comments

Comments
 (0)