ctkPluginArchive_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 CTKPLUGINARCHIVE_P_H
00023 #define CTKPLUGINARCHIVE_P_H
00024 
00025 #include <QString>
00026 #include <QHash>
00027 #include <QUrl>
00028 
00029 #include "ctkPluginManifest_p.h"
00030 
00031 // Qt forward declarations
00032 class QIODevice;
00033 
00034 typedef quint64 qtimestamp;
00035 
00036 // CTK foraward declarations
00037 class ctkPluginStorage;
00038 
00043 class ctkPluginArchive {
00044 
00045 public:
00046 
00051 static const QString AUTOSTART_SETTING_STOPPED; // = "stopped"
00052 
00057 static const QString AUTOSTART_SETTING_EAGER; // = "eager"
00058 
00063 static const QString AUTOSTART_SETTING_ACTIVATION_POLICY; // = "activation_policy"
00064 
00065 private:
00066 
00067 int autostartSetting;
00068 int id;
00069 qtimestamp lastModified;
00070 QUrl location;
00071 QString localPluginPath;
00072 ctkPluginManifest manifest;
00073 ctkPluginStorage* storage;
00074 
00075 public:
00076 
00081 ctkPluginArchive(ctkPluginStorage* pluginStorage, const QUrl& pluginLocation,
00082         const QString& localPluginPath, int pluginId);
00083 
00092 QString getAttribute(const QString& key) const;
00093 
00097 QHash<QString,QString> getUnlocalizedAttributes() const;
00098 
00099 
00105 int getPluginId() const;
00106 
00107 
00113 QUrl getPluginLocation() const;
00114 
00121  QString getLibLocation() const;
00122 
00123 
00131 QByteArray getPluginResource(const QString& component) const;
00132 
00133 
00142 QStringList findResourcesPath(const QString& path) const;
00143 
00144 
00148 int getStartLevel() const;
00149 
00150 
00154 void setStartLevel(int level);
00155 
00156 
00160 qtimestamp getLastModified() const;
00161 
00162 
00166 void setLastModified(qtimestamp timemillisecs);
00167 
00168 
00174 int getAutostartSetting() const;
00175 
00176 
00182 void setAutostartSetting(int setting);
00183 
00184 
00191 //QList<> getCertificateChains(bool onlyTrusted) const;
00192 
00193 
00198 //void trustCertificateChain(QList<> trustedChain);
00199 
00200 
00205 void purge();
00206 
00207 };
00208 
00209 
00210 
00211 #endif // CTKPLUGINARCHIVE_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