dRonin  adbada4
dRonin GCS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
pluginspec_p.h
Go to the documentation of this file.
1 
13 /*
14  * This program is free software; you can redistribute it and/or modify
15  * it under the terms of the GNU General Public License as published by
16  * the Free Software Foundation; either version 3 of the License, or
17  * (at your option) any later version.
18  *
19  * This program is distributed in the hope that it will be useful, but
20  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
21  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  * for more details.
23  *
24  * You should have received a copy of the GNU General Public License along
25  * with this program; if not, see <http://www.gnu.org/licenses/>
26  */
27 
28 #ifndef PLUGINSPEC_P_H
29 #define PLUGINSPEC_P_H
30 
31 #include "pluginspec.h"
32 
33 #include <QtCore/QObject>
34 #include <QtCore/QStringList>
35 #include <QtCore/QXmlStreamReader>
36 
37 namespace ExtensionSystem {
38 
39 class IPlugin;
40 class PluginManager;
41 
42 namespace Internal {
43 
44 class EXTENSIONSYSTEM_EXPORT PluginSpecPrivate : public QObject
45 {
46  Q_OBJECT
47 
48 public:
50 
51  bool read(const QString &fileName);
52  bool provides(const QString &pluginName, const QString &version) const;
53  bool resolveDependencies(const QList<PluginSpec *> &specs);
54  bool loadLibrary();
55  bool initializePlugin();
56  bool initializeExtensions();
57  void stop();
58  void kill();
59 
60  QString name;
61  QString version;
62  QString compatVersion;
63  QString vendor;
64  QString copyright;
65  QString license;
66  QString description;
67  QString url;
69 
70  QString location;
71  QString filePath;
72  QStringList arguments;
73 
77 
79  bool hasError;
80  QString errorString;
81 
82  static bool isValidVersion(const QString &version);
83  static int versionCompare(const QString &version1, const QString &version2);
84 
85 private:
86  PluginSpec *q;
87 
88  bool reportError(const QString &err);
89  void readPluginSpec(QXmlStreamReader &reader);
90  void readDependencies(QXmlStreamReader &reader);
91  void readDependencyEntry(QXmlStreamReader &reader);
92  void readArgumentDescriptions(QXmlStreamReader &reader);
93  void readArgumentDescription(QXmlStreamReader &reader);
94 
95  static QRegExp &versionRegExp();
96 };
97 
98 } // namespace Internal
99 } // namespace ExtensionSystem
100 
101 #endif // PLUGINSPEC_P_H
PluginSpec::PluginArgumentDescriptions argumentDescriptions
Definition: pluginspec_p.h:75
QList< PluginDependency > dependencies
Definition: pluginspec_p.h:68
Contains the information of the plugins xml description file and information about the plugin's curre...
Definition: pluginspec.h:63
Definition: icore.h:39
Base class for all plugins.
Definition: iplugin.h:45