MAK RTIspy API Documentation for HLA 1.3
licenseQueryMgr.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 2009 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: licenseQueryMgr.h,v $ $Revision: 1.6 $ $State: Exp $
00007 *********************************************************************/
00008 
00009 #ifndef licenseQueryMgr_H_
00010 #define licenseQueryMgr_H_
00011 
00014 
00015 #include "rtiMsConfig.h"
00016 #include "assistantMgr.h"
00017 #include "assistantLicServerInfo.h"
00018 #include "assistantMsgQueue.h"
00019 
00020 class DtRtiAssistantServer;
00021 class DtRtiAssistantPeer;
00022 class DtAssistantLicQueryDialog;
00023 class DtAssistantComponentMgr;
00024 class DtAssistantPreferencesInfoMgr;
00025 class DtAssistantConnectionInfoMgr;
00026 class DtLicenseCache;
00027 class DtAssistantLicQueryMsg;
00028 class DtAssistantLicServerInfoMsg;
00029 class DtAssistantLicServerConfigWidget;
00030 class QSignalMapper;
00031 
00035 class DT_DLL_ASSISTANTAPP DtAssistantLicenseQueryMgr : public DtAssistantMgr
00036 {
00037    Q_OBJECT
00038 
00039 public:
00040 
00042    DtAssistantLicenseQueryMgr( DtBoost::shared_ptr<DtRtiAssistantServer> server,
00043       DtBoost::shared_ptr<DtRtiAssistantPeer> peer,
00044       DtBoost::shared_ptr<DtAssistantPreferencesInfoMgr> prefMgr,
00045       DtBoost::shared_ptr<DtAssistantComponentMgr> compMgr,
00046       DtBoost::shared_ptr<DtAssistantConnectionInfoMgr> connInfoMgr );
00047 
00049    virtual ~DtAssistantLicenseQueryMgr();
00050 
00051 private:
00052 
00054    DtAssistantLicenseQueryMgr(DtAssistantLicenseQueryMgr const& );
00055 
00057    DtAssistantLicenseQueryMgr& operator= (DtAssistantLicenseQueryMgr const& );
00058 
00059 public:
00060 
00062    virtual void tick();
00063 
00066    virtual void configWidget( DtAssistantConfigWidget** widget, QIcon& icon, QString& name );
00067 
00069    virtual void updateConfigWidget();
00070 
00071 protected:
00072 
00075 
00076 
00080    static void addLicQueryMsgToQueue( const DtAssistantLicQueryMsg& msg, void* usr);
00081 
00083    virtual void addLicQueryMsgToQueue( const DtAssistantLicQueryMsg& msg );
00084 
00086    static void processLicQueryMsg(const DtAssistantLicQueryMsg& msg, void* usr);
00087 
00089    virtual void processLicQueryMsg(const DtAssistantLicQueryMsg& msg);
00090 
00092    static void processLicServerInfoMsg( const DtAssistantLicServerInfoMsg& msg,
00093       void* usr );
00094 
00097    virtual void processLicServerInfoMsg( const DtAssistantLicServerInfoMsg& msg );
00098 
00100 
00102    virtual void updateLicQuery();
00103 
00104 signals:
00105 
00107    void chosenLicServerUpdated( const QString& name, int port );
00108 
00110    void unlicensedModeChosen( bool );
00111 
00112 public slots:
00113 
00115    void processLicQueryResults( int result );
00116 
00119    void closeLicQueryDialogForId( int id );
00120 
00123    void addLicenseServerFromComponent(int id );
00124 
00126    void removeLicenseServer( const MAKRti::DtString& server );
00127 
00129    void sendLicenseServerUpdate();
00130 
00132    void clearStoredLicense();
00133 
00134 protected:
00135 
00138    DtAssistantMsgQueue myLicQueryMsgQueue;
00139 
00141    DtBoost::shared_ptr<DtAssistantPreferencesInfoMgr> myPrefMgr;
00142 
00144    DtBoost::shared_ptr<DtAssistantComponentMgr> myCompMgr;
00145 
00147    DtAssistantLicQueryDialog* myLicQueryDlg;
00148 
00151    DtAssistantLicServerConfigWidget* myLicConfigWidget;
00152 
00153    enum DtLicenseChosenState
00154    {
00155       NothingChosen,
00156       UnlicensedChosen,
00157       LicenseChosen
00158    };
00159 
00162    DtLicenseChosenState myLicenseChosenState;
00163 
00165    DtLicServerInfo myChosenLicenseServer;
00166 
00168    DtLicServerSet myLicenseServers;
00169 
00171    DtLicServerSet myRemovedLicenseServers;
00172 
00174    std::set<int> myCompsWithLicServers;
00175 
00176 };
00177 
00178 #endif

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)