ctkPluginPrivate_p.h

Go to the documentation of this file.
00001 /*=============================================================================
00002 
00003   Library: CTK
00004 
00005   Copyright (c) 2010 German Cancer Research Center,
00006     Division of Medical and Biological Informatics
00007 
00008   Licensed under the Apache License, Version 2.0 (the "License");
00009   you may not use this file except in compliance with the License.
00010   You may obtain a copy of the License at
00011 
00012     http://www.apache.org/licenses/LICENSE-2.0
00013 
00014   Unless required by applicable law or agreed to in writing, software
00015   distributed under the License is distributed on an "AS IS" BASIS,
00016   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00017   See the License for the specific language governing permissions and
00018   limitations under the License.
00019 
00020 =============================================================================*/
00021 
00022 #ifndef CTKPLUGINPRIVATE_P_H
00023 #define CTKPLUGINPRIVATE_P_H
00024 
00025 #include "ctkPlugin.h"
00026 #include "ctkPluginException.h"
00027 #include "ctkRequirePlugin_p.h"
00028 
00029 #include <QHash>
00030 #include <QPluginLoader>
00031 
00032 
00033   class ctkPluginActivator;
00034   class ctkPluginArchive;
00035   class ctkPluginFrameworkContext;
00036 
00037   class ctkPluginPrivate {
00038 
00039   protected:
00040 
00041     ctkPlugin * const q_ptr;
00042 
00043   public:
00044 
00045     Q_DECLARE_PUBLIC(ctkPlugin)
00046 
00047     
00055     ctkPluginPrivate(ctkPlugin& qq, ctkPluginFrameworkContext* fw,
00056                ctkPluginArchive* pa /*, Object checkContext*/);
00057 
00065     ctkPluginPrivate(ctkPlugin& qq,
00066                   ctkPluginFrameworkContext* fw,
00067                   long id,
00068                   const QString& loc,
00069                   const QString& sym,
00070                   const ctkVersion& ver);
00071 
00072     virtual ~ctkPluginPrivate();
00073 
00080     ctkPlugin::State getUpdatedState();
00081 
00087     void setAutostartSetting(const ctkPlugin::StartOptions& setting);
00088 
00092     void finalizeActivation();
00093 
00097     static const ctkPlugin::States RESOLVED_FLAGS;
00098 
00099     ctkPluginFrameworkContext * const fwCtx;
00100 
00104     const long id;
00105 
00109     const QString location;
00110 
00114     QString symbolicName;
00115 
00119     ctkVersion version;
00120 
00124     ctkPlugin::State state;
00125 
00129     ctkPluginArchive* archive;
00130 
00134     ctkPluginContext* pluginContext;
00135 
00139     ctkPluginActivator* pluginActivator;
00140 
00144     QPluginLoader pluginLoader;
00145 
00149     long lastModified;
00150 
00154     QHash<QString, QString> cachedHeaders;
00155 
00159     QHash<QString, QString> cachedRawHeaders;
00160 
00165     bool eagerActivation;
00166 
00168     bool activating;
00169 
00171     bool deactivating;
00172 
00174     //ctkPluginException resolveFailException;
00175 
00177     QList<ctkRequirePlugin*> require;
00178 
00179   private:
00180 
00184     void checkManifestHeaders();
00185 
00186     // This could potentially be run in its own thread,
00187     // parallelizing plugin activations
00188     void start0();
00189 
00195     void removePluginResources();
00196 
00197 
00198   };
00199 
00200 
00201 #endif // CTKPLUGINPRIVATE_P_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated on 21 May 2010 for CTK by  doxygen 1.6.1