MAK RTIspy API Documentation for HLA 1516
List of all members | 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:

Public Slots

void processLicQueryResults (int result)
 Processes the results of a license query dialog.
void closeLicQueryDialogForId (const DtAssistantComponentInfo *)
 Closes the license query dialog if it is for the component with the matching ID.
void addLicenseServerFromComponent (const DtAssistantComponentInfo *)
 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.
void setDefaultToUnlicensed (bool)
 Processes a change in whether or not we are defaulting to unlicensed.
void updateFromCache ()
 Updates the dialog from the stored license.
- Public Slots inherited from DtAssistantMgr
void displayWarningDialogs ()
 Displays all warning dialogs.

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.
void updateDefaultToUnlicensed (bool)
 Emitted when updating whether or not we are defaulting to unlicensed mode.
- Signals inherited from DtAssistantMgr
void warningDialogDisplayed ()
 Emitted when a warning dialog is displayed.
void warningDialogDismissed ()
 Emitted when a warning dialog is dismissed.
void popupRequested (const MAKRti::DtString &text, int sourceCompId, const MAKRti::DtString &advancedText)
 Emitted when a popup dialog should be displayed.
void popupRequested (const MAKRti::DtString &text, const MAKRti::DtString &source, const MAKRti::DtString &advancedText)
 Emitted when a popup dialog should be displayed.
void notificationRequested (const MAKRti::DtString &message, MAKRti::DtNotifyLevelType notifyLevel, int sourceCompId, bool logOnly)
 Emitted when a notification should be displayed.
void notificationRequested (const MAKRti::DtString &message, MAKRti::DtNotifyLevelType notifyLevel, const MAKRti::DtString &source, bool logOnly)
 Emitted when a notification should be displayed.

Public Member Functions

 DtAssistantLicenseQueryMgr (DtBoost::shared_ptr< DtRtiAssistantServer > server, DtBoost::shared_ptr< DtRtiAssistantPeer > peer, DtAssistantSignalRouter &signalRouter, DtBoost::shared_ptr< DtAssistantComponentMgr > compMgr)
 Constructor.
virtual ~DtAssistantLicenseQueryMgr ()
 Destructor.
virtual void tick ()
 Performs tasks that need to be completed periodically.
virtual void configWidget (DtAssistantConfigWidget **widget, QIcon &icon, QString &name, DtPreferencesPage &pageId)
 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.
- Public Member Functions inherited from DtAssistantMgr
 DtAssistantMgr (DtBoost::shared_ptr< DtRtiAssistantServer > server, DtBoost::shared_ptr< DtRtiAssistantPeer > peer, DtAssistantSignalRouter &signalRouter)
 Constructor.
virtual ~DtAssistantMgr ()
 Destructor.
virtual void initialize ()
 Initializes this manager just prior to beginning assistant processing.
virtual void startShutdown ()
 Performs any necessary processing at the start of shutdown.
virtual bool dialogsVisible () const
 Determines if there are any visible dialogs for which this manager is responsible.
virtual void processConfigWidgetAccept ()
 Process the changes that were accepted in the configuration widget.

Protected Types

enum  DtLicenseChosenState { NothingChosen, UnlicensedChosen, LicenseChosen }

Protected Member Functions

virtual void updateLicQuery ()
 Updates the list of available license servers.
- Protected Member Functions inherited from DtAssistantMgr
void startDialog (QDialog *dlg, bool inTaskbar, bool warningDialog)
 Sets up the given widget as a dialog.
void finishDialog (QDialog *dlg)
 Should be called prior to deleting any dialog started with startDialog.
void showDialog (QDialog *dlg)
 Shows the dialog.
void startMainWindow (QMainWindow *dlg)
 Sets up a main window dialog.
void finishMainWindow (QMainWindow *dlg)
 Should be called prior to deleting any dialog started with startMainWindow.
void showMainWindow (QMainWindow *dlg)
 Shows the dialog.
void showPopup (const MAKRti::DtString &text, int sourceCompId=-1, const MAKRti::DtString &advancedText=MAKRti::DtString::nullString())
 Displays a popup message with the given text, advanced text, and name of the given source component.
void showPopup (const MAKRti::DtString &text, const MAKRti::DtString &source, const MAKRti::DtString &advancedText=MAKRti::DtString::nullString())
 Displays a popup message with the given text, advanced text, and source name.
void displayNotification (const MAKRti::DtString &message, MAKRti::DtNotifyLevelType notifyLevel, int sourceCompId=-1)
 Displays and logs a notification from the given component.
void displayNotification (const MAKRti::DtString &message, MAKRti::DtNotifyLevelType notifyLevel, const MAKRti::DtString &source)
 Displays and logs notification with the given component name.
void logNotification (const MAKRti::DtString &message, MAKRti::DtNotifyLevelType notifyLevel, int sourceCompId=-1)
 Logs a notification from the given component, does not display.
void logNotification (const MAKRti::DtString &message, MAKRti::DtNotifyLevelType notifyLevel, const MAKRti::DtString &source)
 Logs a notification with the given component name, does not display.

Protected Attributes

DtAssistantMsgQueue myLicQueryMsgQueue
 The queue which holds license query messages.
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.
- Protected Attributes inherited from DtAssistantMgr
DtBoost::shared_ptr
< DtRtiAssistantServer
myServer
 The Assistant server from which new messages will arrive from local RTI components.
DtBoost::shared_ptr
< DtRtiAssistantPeer
myPeer
 The Assistant peer which communicates with other Assistants.
std::set< QDialog * > myUnparentedDialogs
 All unparented dialogs that are created by the GUI should be added to this set.
std::set< QMainWindow * > myMainWindows
 All main windows that are created by the GUI should be added to this set.
std::set< QDialog * > myWarningDialogs
 Set of the popup dialogs, either parented or unparented, which, when active, should cause a warning icon to be displayed.

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.

Additional Inherited Members

- Static Protected Attributes inherited from DtAssistantMgr
static QIcon theRtiIcon
 The icons used by the RTI Assistant.
static QIcon theSmallRtiIcon
static QIcon theWebIcon
static QIcon theNotifyRtiIcon
static QIcon theWarningRtiIcon
static QIcon thePreferencesIcon
static QIcon theAboutIcon
static QIcon theHelpIcon
static bool theIconsAreLoaded = false
 Whether or not the icons have yet been loaded.

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,
DtAssistantSignalRouter signalRouter,
DtBoost::shared_ptr< DtAssistantComponentMgr compMgr 
)
DtAssistantLicenseQueryMgr::~DtAssistantLicenseQueryMgr ( )
virtual
DtAssistantLicenseQueryMgr::DtAssistantLicenseQueryMgr ( DtAssistantLicenseQueryMgr const &  )
private

Copy Constructor not implemented – Copy Not Allowed!

Member Function Documentation

void DtAssistantLicenseQueryMgr::addLicenseServerFromComponent ( const DtAssistantComponentInfo compInfo)
slot

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

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

Referenced by DtAssistantLicenseQueryMgr().

void DtAssistantLicenseQueryMgr::addLicQueryMsgToQueue ( const DtAssistantLicQueryMsg msg,
void *  usr 
)
staticprotected

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().

void DtAssistantLicenseQueryMgr::addLicQueryMsgToQueue ( const DtAssistantLicQueryMsg msg)
protectedvirtual

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 processLicQueryMsg(), and processLicQueryResults().

void DtAssistantLicenseQueryMgr::clearStoredLicense ( )
slot
void DtAssistantLicenseQueryMgr::closeLicQueryDialogForId ( const DtAssistantComponentInfo compInfo)
slot

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

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

Referenced by DtAssistantLicenseQueryMgr().

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

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

Reimplemented from DtAssistantMgr.

References DtDefaultLicensePage, DtIconAndTextureManager::getIcon(), DtIconAndTextureManager::getInstance(), and myLicConfigWidget.

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

Assignment not implemented – Assignment Not Allowed!

void DtAssistantLicenseQueryMgr::processLicQueryMsg ( const DtAssistantLicQueryMsg msg,
void *  usr 
)
staticprotected

Callback to process a license query message from a component.

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

void DtAssistantLicenseQueryMgr::processLicQueryMsg ( const DtAssistantLicQueryMsg msg)
protectedvirtual
void DtAssistantLicenseQueryMgr::processLicQueryResults ( int  result)
slot
void DtAssistantLicenseQueryMgr::processLicServerInfoMsg ( const DtAssistantLicServerInfoMsg msg,
void *  usr 
)
staticprotected

Called to process a change in the available license servers.

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

void DtAssistantLicenseQueryMgr::processLicServerInfoMsg ( const DtAssistantLicServerInfoMsg msg)
protectedvirtual

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

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

Removes a license server from the list.

References myLicenseServers, and myRemovedLicenseServers.

void DtAssistantLicenseQueryMgr::sendLicenseServerUpdate ( )
slot

Sends a license server update message.

Referenced by DtAssistantLicenseQueryMgr().

void DtAssistantLicenseQueryMgr::setDefaultToUnlicensed ( bool  val)
slot

Processes a change in whether or not we are defaulting to unlicensed.

References myLicenseChosenState, NothingChosen, and UnlicensedChosen.

Referenced by DtAssistantLicenseQueryMgr().

void DtAssistantLicenseQueryMgr::tick ( )
virtual

Performs tasks that need to be completed periodically.

Reimplemented from DtAssistantMgr.

References DtAssistantMsgQueue::beginProcessMsg(), and myLicQueryMsgQueue.

void DtAssistantLicenseQueryMgr::unlicensedModeChosen ( bool  )
signal

Emitted when unlicensed mode is chosen or unchosen.

void DtAssistantLicenseQueryMgr::updateConfigWidget ( )
virtual
void DtAssistantLicenseQueryMgr::updateDefaultToUnlicensed ( bool  )
signal

Emitted when updating whether or not we are defaulting to unlicensed mode.

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

void DtAssistantLicenseQueryMgr::updateFromCache ( )
slot

Updates the dialog from the stored license.

References lm, myLicenseServers, and updateLicQuery().

Referenced by processLicQueryMsg().

void DtAssistantLicenseQueryMgr::updateLicQuery ( )
protectedvirtual

Updates the list of available license servers.

References DtAssistantLicQueryDialog::addServer(), DtAssistantLicQueryDialog::clearServers(), myLicenseServers, and myLicQueryDlg.

Referenced by updateFromCache().

Member Data Documentation

DtLicServerInfo DtAssistantLicenseQueryMgr::myChosenLicenseServer
protected
DtBoost::shared_ptr<DtAssistantComponentMgr> DtAssistantLicenseQueryMgr::myCompMgr
protected

The manager that keeps track of all local RTI components.

Referenced by processLicQueryMsg(), and processLicQueryResults().

std::set<int> DtAssistantLicenseQueryMgr::myCompsWithLicServers
protected

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

Referenced by addLicenseServerFromComponent().

DtAssistantLicServerConfigWidget* DtAssistantLicenseQueryMgr::myLicConfigWidget
protected

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

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

DtLicenseChosenState DtAssistantLicenseQueryMgr::myLicenseChosenState
protected

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

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

DtLicServerSet DtAssistantLicenseQueryMgr::myLicenseServers
protected

Set of license servers known to this assistant.

Referenced by addLicenseServerFromComponent(), removeLicenseServer(), updateFromCache(), and updateLicQuery().

DtAssistantLicQueryDialog* DtAssistantLicenseQueryMgr::myLicQueryDlg
protected

The dialog which queries the user for license information.

Referenced by closeLicQueryDialogForId(), DtAssistantLicenseQueryMgr(), processLicQueryMsg(), processLicQueryResults(), and updateLicQuery().

DtAssistantMsgQueue DtAssistantLicenseQueryMgr::myLicQueryMsgQueue
protected

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().

DtLicServerSet DtAssistantLicenseQueryMgr::myRemovedLicenseServers
protected

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

Referenced by removeLicenseServer().


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

Document ID: Generated on Fri Mar 14 19:08:55 EDT 2014 from SVN revision 137085
Copyright © 2005-2014 VT MÄK Inc. All Rights Reserved (www.mak.com)