MAK RTIspy API Documentation for HLA 1.3
Public Slots | Signals | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions
DtAssistantLicenseQueryMgr Class Reference

Maintains list of known RTI license servers and processes license queries from RTI components. More...

+ Inheritance diagram for DtAssistantLicenseQueryMgr:
+ Collaboration diagram for DtAssistantLicenseQueryMgr:

List of all members.

Public Slots

void processLicQueryResults (int result)
 Processes the results of a license query dialog.
void closeLicQueryDialogForId (int id)
 Closes the license query dialog if it is for the component with the matching ID.
void addLicenseServerFromComponent (int id)
 Adds a new license server (or servers if string contains multiple) to the list.
void removeLicenseServer (const MAKRti::DtString &server)
 Removes a license server from the list.
void sendLicenseServerUpdate ()
 Sends a license server update message.
void clearStoredLicense ()
 Clears the stored license.

Signals

void chosenLicServerUpdated (const QString &name, int port)
 Emitted when the chosen license server changes.
void unlicensedModeChosen (bool)
 Emitted when unlicensed mode is chosen or unchosen.

Public Member Functions

 DtAssistantLicenseQueryMgr (DtBoost::shared_ptr< DtRtiAssistantServer > server, DtBoost::shared_ptr< DtRtiAssistantPeer > peer, DtBoost::shared_ptr< DtAssistantPreferencesInfoMgr > prefMgr, DtBoost::shared_ptr< DtAssistantComponentMgr > compMgr, DtBoost::shared_ptr< DtAssistantConnectionInfoMgr > connInfoMgr)
 Constructor.
virtual ~DtAssistantLicenseQueryMgr ()
 Destructor.
virtual void tick ()
 Performs tasks that need to be completed periodically.
virtual void configWidget (DtAssistantConfigWidget **widget, QIcon &icon, QString &name)
 Retrieves a widget which will be placed in the configuration dialog for configuring user preferences.
virtual void updateConfigWidget ()
 Forces the configuration widget to be updated.

Protected Types

enum  DtLicenseChosenState { NothingChosen, UnlicensedChosen, LicenseChosen }

Protected Member Functions

virtual void updateLicQuery ()
 Updates the list of available license servers.

Protected Attributes

DtAssistantMsgQueue myLicQueryMsgQueue
 The queue which holds license query messages.
DtBoost::shared_ptr
< DtAssistantPreferencesInfoMgr
myPrefMgr
 The manager that keeps track of Assistant preferences.
DtBoost::shared_ptr
< DtAssistantComponentMgr
myCompMgr
 The manager that keeps track of all local RTI components.
DtAssistantLicQueryDialogmyLicQueryDlg
 The dialog which queries the user for license information.
DtAssistantLicServerConfigWidgetmyLicConfigWidget
 The widget that displays the current preferred license in the configuration dialog.
DtLicenseChosenState myLicenseChosenState
 Whether a license is chosen, unlicensed mode is chosen, or nothing is chosen.
DtLicServerInfo myChosenLicenseServer
 The currently chosen license server.
DtLicServerSet myLicenseServers
 Set of license servers known to this assistant.
DtLicServerSet myRemovedLicenseServers
 Set of removed local license servers since last update was sent.
std::set< int > myCompsWithLicServers
 The set of components we've received license servers from.

Private Member Functions

 DtAssistantLicenseQueryMgr (DtAssistantLicenseQueryMgr const &)
 Copy Constructor not implemented -- Copy Not Allowed!
DtAssistantLicenseQueryMgroperator= (DtAssistantLicenseQueryMgr const &)
 Assignment not implemented -- Assignment Not Allowed!

Message Callbacks

Callbacks for license messages

static void addLicQueryMsgToQueue (const DtAssistantLicQueryMsg &msg, void *usr)
 Callback to add license query message to queue.
static void processLicQueryMsg (const DtAssistantLicQueryMsg &msg, void *usr)
 Callback to process a license query message from a component.
static void processLicServerInfoMsg (const DtAssistantLicServerInfoMsg &msg, void *usr)
 Called to process a change in the available license servers.
virtual void addLicQueryMsgToQueue (const DtAssistantLicQueryMsg &msg)
 Called by the callback function to add a message to the queue.
virtual void processLicQueryMsg (const DtAssistantLicQueryMsg &msg)
 Called by the callback function to process license query messages.
virtual void processLicServerInfoMsg (const DtAssistantLicServerInfoMsg &msg)
 Called by the callback function to process the a change in the available license servers.

Detailed Description

Maintains list of known RTI license servers and processes license queries from RTI components.


Member Enumeration Documentation

Enumerator:
NothingChosen 
UnlicensedChosen 
LicenseChosen 

Constructor & Destructor Documentation

DtAssistantLicenseQueryMgr::DtAssistantLicenseQueryMgr ( DtBoost::shared_ptr< DtRtiAssistantServer server,
DtBoost::shared_ptr< DtRtiAssistantPeer peer,
DtBoost::shared_ptr< DtAssistantPreferencesInfoMgr prefMgr,
DtBoost::shared_ptr< DtAssistantComponentMgr compMgr,
DtBoost::shared_ptr< DtAssistantConnectionInfoMgr connInfoMgr 
)

Copy Constructor not implemented -- Copy Not Allowed!


Member Function Documentation

Adds a new license server (or servers if string contains multiple) to the list.

References DtAssistantComponentInfo::licenseServer(), myCompMgr, myCompsWithLicServers, and myLicenseServers.

Referenced by DtAssistantLicenseQueryMgr().

void DtAssistantLicenseQueryMgr::addLicQueryMsgToQueue ( const DtAssistantLicQueryMsg msg,
void *  usr 
) [static, protected]

Callback to add license query message to queue.

License query messages should be added to a queue in order to be processed one at a time. Two license query dialogs should not be displayed at the same time.

Referenced by DtAssistantLicenseQueryMgr(), and ~DtAssistantLicenseQueryMgr().

Called by the callback function to add a message to the queue.

References DtAssistantMsgQueue::addMsg(), myLicQueryMsgQueue, and DtAssistantMgr::myServer.

void DtAssistantLicenseQueryMgr::chosenLicServerUpdated ( const QString &  name,
int  port 
) [signal]

Emitted when the chosen license server changes.

Referenced by processLicQueryResults().

Closes the license query dialog if it is for the component with the matching ID.

References DtAssistantMsgQueue::currentCompId(), myLicQueryDlg, and myLicQueryMsgQueue.

Referenced by DtAssistantLicenseQueryMgr().

void DtAssistantLicenseQueryMgr::configWidget ( DtAssistantConfigWidget **  widget,
QIcon &  icon,
QString &  name 
) [virtual]

Retrieves a widget which will be placed in the configuration dialog for configuring user preferences.

Reimplemented from DtAssistantMgr.

References DtRtiLibPath(), and myLicConfigWidget.

DtAssistantLicenseQueryMgr& DtAssistantLicenseQueryMgr::operator= ( DtAssistantLicenseQueryMgr const &  ) [private]

Assignment not implemented -- Assignment Not Allowed!

void DtAssistantLicenseQueryMgr::processLicQueryMsg ( const DtAssistantLicQueryMsg msg,
void *  usr 
) [static, protected]

Callback to process a license query message from a component.

Referenced by DtAssistantLicenseQueryMgr(), and ~DtAssistantLicenseQueryMgr().

void DtAssistantLicenseQueryMgr::processLicQueryMsg ( const DtAssistantLicQueryMsg msg) [protected, virtual]
void DtAssistantLicenseQueryMgr::processLicServerInfoMsg ( const DtAssistantLicServerInfoMsg msg,
void *  usr 
) [static, protected]

Called to process a change in the available license servers.

Referenced by DtAssistantLicenseQueryMgr(), and ~DtAssistantLicenseQueryMgr().

Called by the callback function to process the a change in the available license servers.

References DtAssistantLicServerInfoMsg::getLicenseServers(), DtAssistantLicServerInfoMsg::isRemoval(), myLicenseServers, myLicQueryDlg, and updateLicQuery().

void DtAssistantLicenseQueryMgr::removeLicenseServer ( const MAKRti::DtString &  server) [slot]

Removes a license server from the list.

References myLicenseServers, and myRemovedLicenseServers.

Sends a license server update message.

References myLicenseServers, DtAssistantMgr::myPeer, and myRemovedLicenseServers.

Referenced by DtAssistantLicenseQueryMgr().

Performs tasks that need to be completed periodically.

Reimplemented from DtAssistantMgr.

References DtAssistantMsgQueue::beginProcessMsg(), and myLicQueryMsgQueue.

Emitted when unlicensed mode is chosen or unchosen.

void DtAssistantLicenseQueryMgr::updateLicQuery ( ) [protected, virtual]

Member Data Documentation

The manager that keeps track of all local RTI components.

Referenced by addLicenseServerFromComponent(), DtAssistantLicenseQueryMgr(), processLicQueryMsg(), and processLicQueryResults().

The set of components we've received license servers from.

Referenced by addLicenseServerFromComponent().

The widget that displays the current preferred license in the configuration dialog.

Referenced by configWidget(), DtAssistantLicenseQueryMgr(), and updateConfigWidget().

Whether a license is chosen, unlicensed mode is chosen, or nothing is chosen.

Referenced by clearStoredLicense(), DtAssistantLicenseQueryMgr(), processLicQueryMsg(), processLicQueryResults(), and updateConfigWidget().

The queue which holds license query messages.

Only one may be processed at a time, but this should not prevent the processing of other messages.

Referenced by addLicQueryMsgToQueue(), closeLicQueryDialogForId(), DtAssistantLicenseQueryMgr(), processLicQueryMsg(), processLicQueryResults(), tick(), and ~DtAssistantLicenseQueryMgr().

The manager that keeps track of Assistant preferences.

Referenced by clearStoredLicense(), DtAssistantLicenseQueryMgr(), and processLicQueryResults().

Set of removed local license servers since last update was sent.

Referenced by removeLicenseServer(), and sendLicenseServerUpdate().


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

Document ID: Generated on Thu Jun 14 14:15:04 EDT 2012 from SVN revision 116116
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)