![]() |
MAK RTIspy API Documentation for HLA 1.3
|
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 (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. | |
| DtAssistantLicQueryDialog * | myLicQueryDlg |
| The dialog which queries the user for license information. | |
| DtAssistantLicServerConfigWidget * | myLicConfigWidget |
| 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! | |
| DtAssistantLicenseQueryMgr & | operator= (DtAssistantLicenseQueryMgr const &) |
| Assignment not implemented -- Assignment Not Allowed! | |
Message Callbacks | |
| 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. | |
enum DtAssistantLicenseQueryMgr::DtLicenseChosenState [protected] |
| 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 | ||
| ) |
Constructor.
References DtAssistantLicServerInfoMsg::addCallback(), DtAssistantLicQueryMsg::addCallback(), addLicenseServerFromComponent(), addLicQueryMsgToQueue(), clearStoredLicense(), closeLicQueryDialogForId(), connect(), LicenseChosen, lm, myChosenLicenseServer, myCompMgr, myLicConfigWidget, myLicenseChosenState, myLicQueryDlg, myLicQueryMsgQueue, DtAssistantMgr::myPeer, myPrefMgr, DtAssistantMgr::myServer, processLicQueryMsg(), processLicQueryResults(), processLicServerInfoMsg(), sendLicenseServerUpdate(), DtLicServerInfo::setServerName(), DtLicServerInfo::setServerPort(), DtAssistantMgr::startDialog(), and UnlicensedChosen.
| DtAssistantLicenseQueryMgr::~DtAssistantLicenseQueryMgr | ( | ) | [virtual] |
| DtAssistantLicenseQueryMgr::DtAssistantLicenseQueryMgr | ( | DtAssistantLicenseQueryMgr const & | ) | [private] |
Copy Constructor not implemented -- Copy Not Allowed!
| void DtAssistantLicenseQueryMgr::addLicenseServerFromComponent | ( | int | id | ) | [slot] |
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().
| void DtAssistantLicenseQueryMgr::addLicQueryMsgToQueue | ( | const DtAssistantLicQueryMsg & | msg | ) | [protected, virtual] |
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().
| void DtAssistantLicenseQueryMgr::clearStoredLicense | ( | ) | [slot] |
Clears the stored license.
References lm, myChosenLicenseServer, myLicenseChosenState, myPrefMgr, NothingChosen, DtLicServerInfo::setServerName(), DtLicServerInfo::setServerPort(), and UnlicensedChosen.
Referenced by DtAssistantLicenseQueryMgr(), and processLicQueryMsg().
| void DtAssistantLicenseQueryMgr::closeLicQueryDialogForId | ( | int | id | ) | [slot] |
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] |
Called by the callback function to process license query messages.
References clearStoredLicense(), DtAssistantMsgQueue::currentCompId(), DtAssistantMsgQueue::finishProcessMsg(), DtAssistantLicQueryMsg::isUnlicensed(), LicenseChosen, DtAssistantComponentInfo::licenseServer(), DtAssistantLicQueryMsg::licenseServerName(), lm, myChosenLicenseServer, myCompMgr, myLicenseChosenState, myLicQueryDlg, myLicQueryMsgQueue, DtAssistantMgr::myServer, DtAssistantLicQueryMsg::port(), DtLicServerInfo::serverName(), DtLicServerInfo::serverPort(), DtAssistantLicQueryDialog::setAllowUnlicensed(), DtAssistantComponentInfo::setLicenseServer(), DtAssistantMgr::showDialog(), UnlicensedChosen, and updateLicQuery().
| void DtAssistantLicenseQueryMgr::processLicQueryResults | ( | int | result | ) | [slot] |
Processes the results of a license query dialog.
References chosenLicServerUpdated(), DtAssistantMsgQueue::currentCompId(), DtAssistantMsgQueue::finishProcessMsg(), DtAssistantLicQueryDialog::getResults(), LicenseChosen, lm, myChosenLicenseServer, myCompMgr, myLicenseChosenState, myLicQueryDlg, myLicQueryMsgQueue, myPrefMgr, DtAssistantMgr::myServer, DtAssistantComponentInfo::setLicenseServer(), DtLicServerInfo::setServerName(), DtLicServerInfo::setServerPort(), DtAssistantMgr::showDialog(), DtLicServerInfo::string(), and UnlicensedChosen.
Referenced by DtAssistantLicenseQueryMgr().
| 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().
| void DtAssistantLicenseQueryMgr::processLicServerInfoMsg | ( | const DtAssistantLicServerInfoMsg & | msg | ) | [protected, virtual] |
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.
| void DtAssistantLicenseQueryMgr::sendLicenseServerUpdate | ( | ) | [slot] |
Sends a license server update message.
References myLicenseServers, DtAssistantMgr::myPeer, and myRemovedLicenseServers.
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] |
Forces the configuration widget to be updated.
Reimplemented from DtAssistantMgr.
References LicenseChosen, myChosenLicenseServer, myLicConfigWidget, myLicenseChosenState, DtLicServerInfo::serverName(), DtLicServerInfo::serverPort(), DtAssistantLicServerConfigWidget::setConfiguration(), and UnlicensedChosen.
| void DtAssistantLicenseQueryMgr::updateLicQuery | ( | ) | [protected, virtual] |
Updates the list of available license servers.
References DtAssistantLicQueryDialog::addServer(), DtAssistantLicQueryDialog::clearServers(), myLicenseServers, and myLicQueryDlg.
Referenced by processLicQueryMsg(), and processLicServerInfoMsg().
The currently chosen license server.
Referenced by clearStoredLicense(), DtAssistantLicenseQueryMgr(), processLicQueryMsg(), processLicQueryResults(), and updateConfigWidget().
DtBoost::shared_ptr<DtAssistantComponentMgr> DtAssistantLicenseQueryMgr::myCompMgr [protected] |
The manager that keeps track of all local RTI components.
Referenced by addLicenseServerFromComponent(), DtAssistantLicenseQueryMgr(), processLicQueryMsg(), and processLicQueryResults().
std::set<int> DtAssistantLicenseQueryMgr::myCompsWithLicServers [protected] |
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().
Set of license servers known to this assistant.
Referenced by addLicenseServerFromComponent(), processLicServerInfoMsg(), removeLicenseServer(), sendLicenseServerUpdate(), and updateLicQuery().
The dialog which queries the user for license information.
Referenced by closeLicQueryDialogForId(), DtAssistantLicenseQueryMgr(), processLicQueryMsg(), processLicQueryResults(), processLicServerInfoMsg(), and updateLicQuery().
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().
DtBoost::shared_ptr<DtAssistantPreferencesInfoMgr> DtAssistantLicenseQueryMgr::myPrefMgr [protected] |
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().