Warning: That file was not part of the compilation database. It may have many parsing errors.

1/* This file is part of the KDE project
2 Copyright (C) 2007 Bernhard Loos <nhuh.put@web.de>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License version 2 as published by the Free Software Foundation.
7
8 This library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
12
13 You should have received a copy of the GNU Library General Public License
14 along with this library; see the file COPYING.LIB. If not, write to
15 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 Boston, MA 02110-1301, USA.
17*/
18#ifndef KDECORE_KEXPORTPLUGIN_H
19#define KDECORE_KEXPORTPLUGIN_H
20
21#include <kglobal.h>
22#include <kdeversion.h>
23
24#include <QtCore/QPluginLoader>
25#include <QtCore/QtPlugin>
26
27/**
28 * \internal
29 * Stores KDE version information in a plugin library.
30 * \see K_PLUGIN_VERIFICATION_DATA
31 */
32struct KDEPluginVerificationData
33{
34 enum { PluginVerificationDataVersion = 1 };
35
36 /**
37 * \internal
38 * The version of this structure. Do not ever delete or change a field.
39 * Increase it in the K_EXPORT_PLUGIN_VERSION macro whenever you
40 * append a field to this structure.
41 */
42 quint8 dataVersion;
43 quint32 KDEVersion;
44 const char *KDEVersionString;
45};
46
47/**
48 * \internal
49 * Used to export the KDE version a plugin was compiled against.
50 * \see KDEPluginVerificationData
51 */
52#define K_PLUGIN_VERIFICATION_DATA \
53Q_EXTERN_C KDE_EXPORT const KDEPluginVerificationData kde_plugin_verification_data = \
54{ KDEPluginVerificationData::PluginVerificationDataVersion, KDE_VERSION, KDE_VERSION_STRING };
55
56/**
57 * \relates KPluginLoader
58 * Use this macro if you want to give your plugin a version number.
59 * You can later access the version number with KPluginLoader::pluginVersion()
60 */
61#define K_EXPORT_PLUGIN_VERSION(version) \
62Q_EXTERN_C KDE_EXPORT const quint32 kde_plugin_version = version;
63
64
65/**
66 * \relates KPluginLoader
67 * This macro exports the main object of the plugin. Most times, this will be a KPluginFactory
68 * or derived class, but any QObject derived class can be used.
69 * Take a look at the documentation of Q_EXPORT_PLUGIN2 for some details.
70 */
71#define K_EXPORT_PLUGIN(factory) \
72Q_EXPORT_PLUGIN(factory) \
73K_PLUGIN_VERIFICATION_DATA
74
75#endif // KDECORE_KEXPORTPLUGIN_H
76
77

Warning: That file was not part of the compilation database. It may have many parsing errors.