Skip to content

Commit

Permalink
Merge pull request #14 from libxengine/develop
Browse files Browse the repository at this point in the history
V3.3.0.1001 Merge
  • Loading branch information
xengine-qyt authored Nov 1, 2022
2 parents 991f6ec + a33043b commit 50c47dd
Show file tree
Hide file tree
Showing 60 changed files with 1,443 additions and 140 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
XEngine_Authorize V3.3.0.1001

增加:自定义序列号导入和导出
增加:功能开关支持(注册,登录,删除,充值,获取时间,找回密码)
修改:支持TCP,WEBSOCEKT,HTTP功能开关
修改:客户端和序列号查询支持设置起始和结束位置
更新:匹配XEngine V7.42
删除:不需要的HTTPGET负载参数

added:custom serial number export and import
added:functions switch support(register,login,delete,pay,get time,get pass)
modify:support tcp and websocket and http function switch
modify:client and serial query supported set start and end pos
update:match xengine v7.42
delete:not need parament for http get
======================================================================================
XEngine_Authorize V3.2.0.1001

增加:为管理程序增加用户注册功能
Expand Down
1 change: 1 addition & 0 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ port :tcp port 5300,websocket port 5301,http management port 5302,Transmission v
![输入图片说明](https://www.xyry.org/XEngine_StructPic/authorize/2.png "在这里输入图片标题")
![输入图片说明](https://www.xyry.org/XEngine_StructPic/authorize/3.png "在这里输入图片标题")
![输入图片说明](https://www.xyry.org/XEngine_StructPic/authorize/4.png "在这里输入图片标题")
![输入图片说明](https://www.xyry.org/XEngine_StructPic/authorize/5.png "在这里输入图片标题")

## Participate in contribution

Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ make FLAGS=CleanAll 清理编译
![输入图片说明](https://www.xyry.org/XEngine_StructPic/authorize/2.png "在这里输入图片标题")
![输入图片说明](https://www.xyry.org/XEngine_StructPic/authorize/3.png "在这里输入图片标题")
![输入图片说明](https://www.xyry.org/XEngine_StructPic/authorize/4.png "在这里输入图片标题")
![输入图片说明](https://www.xyry.org/XEngine_StructPic/authorize/5.png "在这里输入图片标题")

## 参与贡献

Expand All @@ -106,14 +107,17 @@ V3版本为全新版本,为了适应过多环境要求开发
如果你有问题,可以在issues中提交

## 开发计划
功能启用关闭(注册,登录,等)
mfc转qt界面库(我们需要会Qt的人员加入一起开发)
消息公告
支持多端登录
多端登录合并用时
生成会话TOKEN分布式鉴权
支持OAuth验证
mysql支持
列表数据分割,用于大型服务器
支持用户和硬件绑定同时验证
支持自定义序列号插入导入
统计用户所有在线时间
支持自定义序列号导入导出
统计用户所有在线时间
黑名单设置(IP,用户)
支持代理端
支持绑定自定义内容
Binary file modified XEngine_Docment/Docment_en.docx
Binary file not shown.
Binary file modified XEngine_Docment/Docment_zh.docx
Binary file not shown.
1 change: 1 addition & 0 deletions XEngine_Release/XEngine_Config/XEngine_Config.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"LogLeave":32
},
"XVer":[
"V3.3.0.1001 Build20221101",
"V3.2.0.1001 Build20220923",
"V3.1.0.1001 Build20220826",
"V3.0.0.1001 Build20220816",
Expand Down
8 changes: 8 additions & 0 deletions XEngine_Release/XEngine_Config/XEngine_SwitchConfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"bSwitchDelete":true,
"bSwitchRegister":true,
"bSwitchLogin":true,
"bSwitchPay":true,
"bSwitchPass":true,
"bSwtichTime":true
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ LIBRARY
EXPORTS
Config_GetLastError

ModuleConfigure_Json_File
ModuleConfigure_Json_File
ModuleConfigure_Json_Switch
33 changes: 31 additions & 2 deletions XEngine_Source/AuthorizeModule_Configure/Config_Define.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,22 @@ typedef struct
int nMaxSize; //最大大小
int nMaxCount; //备份个数
int nLogLeave; //日志级别
}st_XLog;
}st_XLog;
struct
{
list<string> *pStl_ListVer;
}st_XVer;
}XENGINE_SERVICECONFIG;
//功能开关
typedef struct
{
BOOL bSwitchDelete; //删除开关
BOOL bSwitchRegister; //注册开关
BOOL bSwitchLogin; //登录开关
BOOL bSwitchPay; //充值开关
BOOL bSwitchPass; //找回密码开关
BOOL bSwtichTime; //计时开关,关闭后客户端不会消耗时间(仅分钟卡有效)
}XENGINE_FUNCTIONSWITCH;
//////////////////////////////////////////////////////////////////////////
// 导出的函数
//////////////////////////////////////////////////////////////////////////
Expand All @@ -97,4 +107,23 @@ extern "C" DWORD Config_GetLastError(int* pInt_SysError = NULL);
意思:是否成功
备注:
*********************************************************************/
extern "C" BOOL ModuleConfigure_Json_File(LPCTSTR lpszConfigFile, XENGINE_SERVICECONFIG * pSt_ServerConfig);
extern "C" BOOL ModuleConfigure_Json_File(LPCTSTR lpszConfigFile, XENGINE_SERVICECONFIG * pSt_ServerConfig);
/********************************************************************
函数名称:ModuleConfigure_Json_Switch
函数功能:功能开关配置文件
参数.一:lpszFile
In/Out:In
类型:常量字符指针
可空:N
意思:输入配置文件位置
参数.二:pSt_AuthConfig
In/Out:Out
类型:数据结构指针
可空:N
意思:输出读取到的配置信息
返回值
类型:逻辑型
意思:是否成功
备注:
*********************************************************************/
extern "C" BOOL ModuleConfigure_Json_Switch(LPCTSTR lpszConfigFile, XENGINE_FUNCTIONSWITCH * pSt_ServerConfig);
Original file line number Diff line number Diff line change
Expand Up @@ -181,5 +181,73 @@ BOOL CModuleConfigure_Json::ModuleConfigure_Json_File(LPCTSTR lpszConfigFile, XE
{
pSt_ServerConfig->st_XVer.pStl_ListVer->push_back(st_JsonXVer[i].asCString());
}
return TRUE;
}
/********************************************************************
函数名称:ModuleConfigure_Json_Switch
函数功能:功能开关配置文件
参数.一:lpszFile
In/Out:In
类型:常量字符指针
可空:N
意思:输入配置文件位置
参数.二:pSt_AuthConfig
In/Out:Out
类型:数据结构指针
可空:N
意思:输出读取到的配置信息
返回值
类型:逻辑型
意思:是否成功
备注:
*********************************************************************/
BOOL CModuleConfigure_Json::ModuleConfigure_Json_Switch(LPCTSTR lpszConfigFile, XENGINE_FUNCTIONSWITCH* pSt_ServerConfig)
{
Config_IsErrorOccur = FALSE;

if ((NULL == lpszConfigFile) || (NULL == pSt_ServerConfig))
{
Config_IsErrorOccur = TRUE;
Config_dwErrorCode = ERROR_AUTHORIZE_MODULE_CONFIGURE_PARAMENT;
return FALSE;
}
Json::Value st_JsonRoot;
JSONCPP_STRING st_JsonError;
Json::CharReaderBuilder st_JsonBuilder;
//读取配置文件所有内容到缓冲区
FILE* pSt_File = _tfopen(lpszConfigFile, _T("rb"));
if (NULL == pSt_File)
{
Config_IsErrorOccur = TRUE;
Config_dwErrorCode = ERROR_AUTHORIZE_MODULE_CONFIGURE_OPENFILE;
return FALSE;
}
size_t nCount = 0;
TCHAR tszMsgBuffer[4096];
while (1)
{
size_t nRet = fread(tszMsgBuffer + nCount, 1, 2048, pSt_File);
if (nRet <= 0)
{
break;
}
nCount += nRet;
}
fclose(pSt_File);
//开始解析配置文件
std::unique_ptr<Json::CharReader> const pSt_JsonReader(st_JsonBuilder.newCharReader());
if (!pSt_JsonReader->parse(tszMsgBuffer, tszMsgBuffer + nCount, &st_JsonRoot, &st_JsonError))
{
Config_IsErrorOccur = TRUE;
Config_dwErrorCode = ERROR_AUTHORIZE_MODULE_CONFIGURE_PARSE;
return FALSE;
}
pSt_ServerConfig->bSwitchDelete = st_JsonRoot["bSwitchDelete"].asBool();
pSt_ServerConfig->bSwitchRegister = st_JsonRoot["bSwitchRegister"].asBool();
pSt_ServerConfig->bSwitchLogin = st_JsonRoot["bSwitchLogin"].asBool();
pSt_ServerConfig->bSwitchPay = st_JsonRoot["bSwitchPay"].asBool();
pSt_ServerConfig->bSwitchPass = st_JsonRoot["bSwitchPass"].asBool();
pSt_ServerConfig->bSwtichTime = st_JsonRoot["bSwtichTime"].asBool();

return TRUE;
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class CModuleConfigure_Json
~CModuleConfigure_Json();
public:
BOOL ModuleConfigure_Json_File(LPCTSTR lpszConfigFile, XENGINE_SERVICECONFIG* pSt_ServerConfig);
BOOL ModuleConfigure_Json_Switch(LPCTSTR lpszConfigFile, XENGINE_FUNCTIONSWITCH* pSt_ServerConfig);
protected:
private:
};
4 changes: 4 additions & 0 deletions XEngine_Source/AuthorizeModule_Configure/pch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,8 @@ extern "C" DWORD Config_GetLastError(int* pInt_SysError)
extern "C" BOOL ModuleConfigure_Json_File(LPCTSTR lpszConfigFile, XENGINE_SERVICECONFIG * pSt_ServerConfig)
{
return m_Config.ModuleConfigure_Json_File(lpszConfigFile, pSt_ServerConfig);
}
extern "C" BOOL ModuleConfigure_Json_Switch(LPCTSTR lpszConfigFile, XENGINE_FUNCTIONSWITCH * pSt_ServerConfig)
{
return m_Config.ModuleConfigure_Json_Switch(lpszConfigFile, pSt_ServerConfig);
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ EXPORTS
Database_SQLite_SerialDelete
Database_SQLite_SerialQuery
Database_SQLite_SerialQueryAll
Database_SQLite_SerialPush
Database_SQLite_TryInsert
Database_SQLite_TryQuery
Database_SQLite_TryDelete
Expand Down
38 changes: 36 additions & 2 deletions XEngine_Source/AuthorizeModule_Database/Database_Define.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,22 @@ extern "C" BOOL Database_SQLite_UserSet(AUTHREG_USERTABLE* pSt_UserTable);
类型:整数型
可空:N
意思:输出列表个数
参数.三:nPosStart
In/Out:In
类型:整数型
可空:Y
意思:输入起始位置
参数.四:nPosEnd
In/Out:In
类型:整数型
可空:Y
意思:输入结束位置
返回值
类型:逻辑型
意思:是否成功
备注:
*********************************************************************/
extern "C" BOOL Database_SQLite_UserList(AUTHREG_USERTABLE*** pppSt_UserInfo, int* pInt_ListCount);
extern "C" BOOL Database_SQLite_UserList(AUTHREG_USERTABLE*** pppSt_UserInfo, int* pInt_ListCount, int nPosStart, int nPosEnd);
/********************************************************************
函数名称:Database_SQLite_SerialInsert
函数功能:插入一个序列号到数据库
Expand Down Expand Up @@ -218,12 +228,36 @@ extern "C" BOOL Database_SQLite_SerialQuery(LPCSTR lpszSerialNumber,LPAUTHREG_SE
类型:整数型指针
可空:Y
意思:输出多少张卡
参数.三:nPosStart
In/Out:In
类型:整数型
可空:Y
意思:输入起始位置
参数.四:nPosEnd
In/Out:In
类型:整数型
可空:Y
意思:输入结束位置
返回值
类型:逻辑型
意思:是否查询成功
备注:参数一需要调用基础库的释放内存函数进行内存释放
*********************************************************************/
extern "C" BOOL Database_SQLite_SerialQueryAll(AUTHREG_SERIALTABLE * **pppSt_SerialTable, int* pInt_ListCount);
extern "C" BOOL Database_SQLite_SerialQueryAll(AUTHREG_SERIALTABLE * **pppSt_SerialTable, int* pInt_ListCount, int nPosStart, int nPosEnd);
/********************************************************************
函数名称:Database_SQLite_SerialPush
函数功能:插入一条指定的序列号信息到服务器
参数.一:pSt_SerialTable
In/Out:In
类型:数据结构指针
可空:N
意思:输入要插入的信息
返回值
类型:逻辑型
意思:是否成功
备注:
*********************************************************************/
extern "C" BOOL Database_SQLite_SerialPush(AUTHREG_SERIALTABLE* pSt_SerialTable);
/********************************************************************
函数名称:Database_SQLite_TryInsert
函数功能:网络使用模式插入一条数据
Expand Down
Loading

0 comments on commit 50c47dd

Please sign in to comment.