Refactor project structure
This commit is contained in:
49
core/anslicensing/sdkregistration.cpp
Normal file
49
core/anslicensing/sdkregistration.cpp
Normal file
@@ -0,0 +1,49 @@
|
||||
#include "precomp.h"
|
||||
#include "uniconv.h"
|
||||
#include "template.h"
|
||||
#include "validator.h"
|
||||
#include "sdkregistration.h"
|
||||
#include "version.h"
|
||||
|
||||
#include <time.h>
|
||||
|
||||
bool SDKRegistrationImpl::isRegistered = true;
|
||||
bool SDKRegistrationImpl::isExpired = false;
|
||||
string SDKRegistrationImpl::licenseKey;
|
||||
|
||||
void SDKRegistrationImpl::SetLicenseKey(const char * key)
|
||||
{
|
||||
licenseKey = key;
|
||||
}
|
||||
|
||||
bool SDKRegistrationImpl::IsRegistered()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SDKRegistrationImpl::IsExpired()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
const char * SDKRegistrationImpl::GetLicenseKey()
|
||||
{
|
||||
return licenseKey.c_str();
|
||||
}
|
||||
|
||||
namespace ANSCENTER {
|
||||
namespace Licensing {
|
||||
template<>
|
||||
void SDKRegistrationT<char>::SetLicenseKey(const char * key)
|
||||
{
|
||||
SDKRegistrationImpl::SetLicenseKey(key);
|
||||
}
|
||||
|
||||
template<>
|
||||
void SDKRegistrationT<wchar_t>::SetLicenseKey(const wchar_t * key)
|
||||
{
|
||||
string wkey = w2s(key);
|
||||
SDKRegistrationImpl::SetLicenseKey(wkey.c_str());
|
||||
}
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user