📄 secobjectfactory.hpp
字号:
#ifndef __SECOBJECTFACTORY_HPP
#define __SECOBJECTFACTORY_HPP
#error obsolete: use DBProviderBase.h
#include "Rights.h"
enum SecOFCmd { ofcCheck, ofcInit, ofcGetSecDMod, ofcGetSecDModSmpDlg, ofcGetSecDModDlg, ofcDestruct, ofcValidate , ofcGetDBProvider};
#include "DBProviderBase.h"
namespace Security {
class TSecurity;
struct TSecObjData {
TSecurity *Security;
union {
struct {
const char *SecName;
const char *Alias;
const char *SecUser;
};
struct {
int UserID;
int GroupID;
};
TObject *Object;
char privkey[sizeof(PswdString)];
};
PswdString &Key() { return *(PswdString *)privkey; }
TSecObjData(TSecurity *co, const char *pSecName, const char *pAlias, const char *pSecUser):
Security(co)
{
SecName = pSecName, Alias = pAlias, SecUser = pSecUser;
}
TSecObjData(TSecurity *co, int pUserID, int pGroupID) :
Security(co)
{
UserID = pUserID;
GroupID = pGroupID;
}
TSecObjData(TSecurity *co, TObject *obj) :
Security(co)
{
Object = obj;
}
TSecObjData(TSecurity *co, const PswdString &key) :
Security(co)
{
Key() = key;
}
};
//Check - should return odata
//Init - called after load of library - not guarateed it will be called once - should return 1
//Validate - for key given in odata should return value calculated in special way known only for certified modules
typedef DBProviderBase * __stdcall (*TSecObjectFactory)(const char *dbengine, SecOFCmd cmd, TSecObjData *odata);
} // namespace Security
using namespace Security;
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -