ALBA
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
albaLicenceManager Class Reference

#include <albaLicenceManager.h>

Inheritance diagram for albaLicenceManager:
Inheritance graph
[legend]
Collaboration diagram for albaLicenceManager:
Collaboration graph
[legend]

Public Types

enum  licenceStatuses { TRIAL_MODE , LICENSED_MODE , EXPIRED_MODE }
 
enum  licenceModalities { TIME_LICENCE , BINARY_LICENCE }
 
enum  licenceScope { USER_LICENCE , MACHINE_LICENCE }
 
enum  addLicenceStatuses { LICENCE_ADDED , WRONG_LICENCE , BAD_DATE , ALREADY_REGISTERED }
 
enum  CreateNewLicenceStatuses { WRONG_BASE_STRING , WRONG_FULL_STRING , WRONG_SECS_IN_MILLENNIUM , LICENCE_CREATED }
 
enum  LicenceManagerEventId { ID_COPY_KEY = MINID , ID_VERIFY_KEY , ID_GENERATE_KEY }
 

Public Member Functions

 albaLicenceManager (wxString appName)
 
 ~albaLicenceManager ()
 
licenceStatuses GetCurrentMode ()
 
void ShowRegistrationDialog ()
 
void HideRegistrationDialog ()
 
void ShowGenerateLicenceDialog ()
 
virtual void OnEvent (albaEventBase *alba_event)
 
bool GetExpireDate (wxDateTime &dateExpire)
 
bool IsRegistred ()
 
void SetListener (albaObserver *Listener)
 
void SetCryptKey (wxString cryptKey)
 
void SetRegistrationMail (wxString mail)
 
void SetImagePath (wxString path)
 
albaLicenceManager::licenceModalities GetLicModality () const
 
void SetLicModality (albaLicenceManager::licenceModalities licModality)
 
void SetLicScope (albaLicenceManager::licenceScope scope)
 
- Public Member Functions inherited from albaObserver
 albaObserver ()
 
virtual ~albaObserver ()
 
virtual void OnEvent (albaEventBase *e)=0
 

Protected Member Functions

wxString EncryptStr (wxString plainStr)
 
wxString DecryptStr (wxString plainStr)
 
CreateNewLicenceStatuses CreateNewTimeLicence (wxString RegCode, wxDateTime expirationDate, wxString &newLicence)
 
CreateNewLicenceStatuses CreateNewBinaryLicence (wxString RegCode, wxString &newLicence)
 
addLicenceStatuses CheckCreateLicence (wxString registrationString)
 
unsigned long SecondsInThisMillennium ()
 
void AddTimeLicence (wxDateTime expireDate)
 
void AddBinaryLicence ()
 
void ToClipboard (HWND hwnd, const std::string &s)
 

Protected Attributes

wxString m_AppName
 
wxString m_CryptKey
 
wxString m_RegistryBaseKey
 
wxString m_RegMail
 
wxString m_RegImagePath
 
albaObserverm_Listener
 
bool m_RegistrationDialogIsOpened
 
wxString m_FirstKey
 
wxString m_SecondKey
 
albaGUIDialogm_RegistrationDialog
 
albaGUIDialogm_GenerateLicenceDialog
 
wxImage * m_PreviewImage
 
wxTextCtrl * m_FirstKey_textCtrl
 
wxTextCtrl * m_Result_textCtrl
 
wxCalendarCtrl * m_CalendarCtrl
 
licenceModalities m_LicModality
 

Detailed Description

Definition at line 27 of file albaLicenceManager.h.

Member Enumeration Documentation

◆ licenceStatuses

Enumerator
TRIAL_MODE 
LICENSED_MODE 
EXPIRED_MODE 

Definition at line 34 of file albaLicenceManager.h.

◆ licenceModalities

Enumerator
TIME_LICENCE 
BINARY_LICENCE 

Definition at line 40 of file albaLicenceManager.h.

◆ licenceScope

Enumerator
USER_LICENCE 
MACHINE_LICENCE 

Definition at line 45 of file albaLicenceManager.h.

◆ addLicenceStatuses

Enumerator
LICENCE_ADDED 
WRONG_LICENCE 
BAD_DATE 
ALREADY_REGISTERED 

Definition at line 51 of file albaLicenceManager.h.

◆ CreateNewLicenceStatuses

Enumerator
WRONG_BASE_STRING 
WRONG_FULL_STRING 
WRONG_SECS_IN_MILLENNIUM 
LICENCE_CREATED 

Definition at line 58 of file albaLicenceManager.h.

◆ LicenceManagerEventId

Enumerator
ID_COPY_KEY 
ID_VERIFY_KEY 
ID_GENERATE_KEY 

Definition at line 68 of file albaLicenceManager.h.

Constructor & Destructor Documentation

◆ albaLicenceManager()

albaLicenceManager::albaLicenceManager ( wxString  appName)

◆ ~albaLicenceManager()

albaLicenceManager::~albaLicenceManager ( )

Member Function Documentation

◆ GetCurrentMode()

licenceStatuses albaLicenceManager::GetCurrentMode ( )

returns current registration status

◆ ShowRegistrationDialog()

void albaLicenceManager::ShowRegistrationDialog ( )

◆ HideRegistrationDialog()

void albaLicenceManager::HideRegistrationDialog ( )

◆ ShowGenerateLicenceDialog()

void albaLicenceManager::ShowGenerateLicenceDialog ( )

◆ OnEvent()

virtual void albaLicenceManager::OnEvent ( albaEventBase alba_event)
virtual

on event function

Implements albaObserver.

◆ GetExpireDate()

bool albaLicenceManager::GetExpireDate ( wxDateTime &  dateExpire)

set expire date to the argument, return false if there is no expire date

◆ IsRegistred()

bool albaLicenceManager::IsRegistred ( )

set expire date to the argument, return false if there is no expire date

◆ SetListener()

void albaLicenceManager::SetListener ( albaObserver Listener)
inline

sets the listener

Definition at line 97 of file albaLicenceManager.h.

◆ SetCryptKey()

void albaLicenceManager::SetCryptKey ( wxString  cryptKey)
inline

Sets CryptKey, if not set the alba default key will be used for enc/decryption.

Definition at line 100 of file albaLicenceManager.h.

◆ SetRegistrationMail()

void albaLicenceManager::SetRegistrationMail ( wxString  mail)
inline

Definition at line 103 of file albaLicenceManager.h.

◆ SetImagePath()

void albaLicenceManager::SetImagePath ( wxString  path)
inline

Definition at line 106 of file albaLicenceManager.h.

◆ GetLicModality()

albaLicenceManager::licenceModalities albaLicenceManager::GetLicModality ( ) const
inline

Returns LicModality.

Definition at line 110 of file albaLicenceManager.h.

◆ SetLicModality()

void albaLicenceManager::SetLicModality ( albaLicenceManager::licenceModalities  licModality)
inline

Sets LicModality.

Definition at line 113 of file albaLicenceManager.h.

◆ SetLicScope()

void albaLicenceManager::SetLicScope ( albaLicenceManager::licenceScope  scope)

◆ EncryptStr()

wxString albaLicenceManager::EncryptStr ( wxString  plainStr)
protected

encrypts the input string

◆ DecryptStr()

wxString albaLicenceManager::DecryptStr ( wxString  plainStr)
protected

decrypts the input string, return empty string if the input is not correctly encrypted

◆ CreateNewTimeLicence()

CreateNewLicenceStatuses albaLicenceManager::CreateNewTimeLicence ( wxString  RegCode,
wxDateTime  expirationDate,
wxString &  newLicence 
)
protected

creates a new licence string

◆ CreateNewBinaryLicence()

CreateNewLicenceStatuses albaLicenceManager::CreateNewBinaryLicence ( wxString  RegCode,
wxString &  newLicence 
)
protected

creates a new licence string

◆ CheckCreateLicence()

addLicenceStatuses albaLicenceManager::CheckCreateLicence ( wxString  registrationString)
protected

check a new licence and add is to the current user

◆ SecondsInThisMillennium()

unsigned long albaLicenceManager::SecondsInThisMillennium ( )
protected

returns the number of seconds from 1/1/2000 00:00 to now

◆ AddTimeLicence()

void albaLicenceManager::AddTimeLicence ( wxDateTime  expireDate)
protected

license the software to expireDate

◆ AddBinaryLicence()

void albaLicenceManager::AddBinaryLicence ( )
protected

license the software to expireDate

◆ ToClipboard()

void albaLicenceManager::ToClipboard ( HWND  hwnd,
const std::string &  s 
)
protected

Member Data Documentation

◆ m_AppName

wxString albaLicenceManager::m_AppName
protected

Definition at line 145 of file albaLicenceManager.h.

◆ m_CryptKey

wxString albaLicenceManager::m_CryptKey
protected

Definition at line 146 of file albaLicenceManager.h.

◆ m_RegistryBaseKey

wxString albaLicenceManager::m_RegistryBaseKey
protected

Definition at line 147 of file albaLicenceManager.h.

◆ m_RegMail

wxString albaLicenceManager::m_RegMail
protected

Definition at line 148 of file albaLicenceManager.h.

◆ m_RegImagePath

wxString albaLicenceManager::m_RegImagePath
protected

Definition at line 149 of file albaLicenceManager.h.

◆ m_Listener

albaObserver* albaLicenceManager::m_Listener
protected

Definition at line 151 of file albaLicenceManager.h.

◆ m_RegistrationDialogIsOpened

bool albaLicenceManager::m_RegistrationDialogIsOpened
protected

Definition at line 155 of file albaLicenceManager.h.

◆ m_FirstKey

wxString albaLicenceManager::m_FirstKey
protected

Definition at line 160 of file albaLicenceManager.h.

◆ m_SecondKey

wxString albaLicenceManager::m_SecondKey
protected

Definition at line 161 of file albaLicenceManager.h.

◆ m_RegistrationDialog

albaGUIDialog* albaLicenceManager::m_RegistrationDialog
protected

Definition at line 163 of file albaLicenceManager.h.

◆ m_GenerateLicenceDialog

albaGUIDialog* albaLicenceManager::m_GenerateLicenceDialog
protected

Definition at line 164 of file albaLicenceManager.h.

◆ m_PreviewImage

wxImage* albaLicenceManager::m_PreviewImage
protected

Definition at line 166 of file albaLicenceManager.h.

◆ m_FirstKey_textCtrl

wxTextCtrl* albaLicenceManager::m_FirstKey_textCtrl
protected

Definition at line 168 of file albaLicenceManager.h.

◆ m_Result_textCtrl

wxTextCtrl* albaLicenceManager::m_Result_textCtrl
protected

Definition at line 169 of file albaLicenceManager.h.

◆ m_CalendarCtrl

wxCalendarCtrl* albaLicenceManager::m_CalendarCtrl
protected

Definition at line 170 of file albaLicenceManager.h.

◆ m_LicModality

licenceModalities albaLicenceManager::m_LicModality
protected

Definition at line 172 of file albaLicenceManager.h.


The documentation for this class was generated from the following file: