File indexing completed on 2023-10-01 04:11:46

0001 /*
0002     SPDX-FileCopyrightText: 2008 Aaron Seigo <aseigo@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #ifndef PLASMAVERSION_H
0008 #define PLASMAVERSION_H
0009 
0010 /** @file plasma/version.h <Plasma/Version> */
0011 
0012 #include <plasma/plasma_export.h>
0013 
0014 #if PLASMA_ENABLE_DEPRECATED_SINCE(5, 85)
0015 
0016 #include <plasma_version.h>
0017 
0018 #define PLASMA_MAKE_VERSION(a, b, c) (((a) << 16) | ((b) << 8) | (c))
0019 
0020 /**
0021  * Compile-time macro for checking the plasma version. Not useful for
0022  * detecting the version of libplasma at runtime.
0023  * @deprecated Since 5.85, use plasma_version.h header instead
0024  */
0025 #define PLASMA_IS_VERSION(a, b, c) (PLASMA_VERSION >= PLASMA_MAKE_VERSION(a, b, c))
0026 
0027 /**
0028  * Namespace for everything in libplasma
0029  */
0030 namespace Plasma
0031 {
0032 /**
0033  * The runtime version of libplasma
0034  * @deprecated Since 5.85, use plasma_version.h header instead
0035  */
0036 PLASMA_DEPRECATED_VERSION(5, 85, "use plasma_version.h header instead")
0037 PLASMA_EXPORT unsigned int version();
0038 
0039 /**
0040  * The runtime major version of libplasma
0041  * @deprecated Since 5.85, use plasma_version.h header instead
0042  */
0043 PLASMA_DEPRECATED_VERSION(5, 85, "use plasma_version.h header instead")
0044 PLASMA_EXPORT unsigned int versionMajor();
0045 
0046 /**
0047  * The runtime major version of libplasma
0048  * @deprecated Since 5.85, use plasma_version.h header instead
0049  */
0050 PLASMA_DEPRECATED_VERSION(5, 85, "use plasma_version.h header instead")
0051 PLASMA_EXPORT unsigned int versionMinor();
0052 
0053 /**
0054  * The runtime major version of libplasma
0055  * @deprecated Since 5.85, use plasma_version.h header instead
0056  */
0057 PLASMA_DEPRECATED_VERSION(5, 85, "use plasma_version.h header instead")
0058 PLASMA_EXPORT unsigned int versionRelease();
0059 
0060 /**
0061  * The runtime version string of libplasma
0062  * @deprecated Since 5.85, use plasma_version.h header instead
0063  */
0064 PLASMA_DEPRECATED_VERSION(5, 85, "use plasma_version.h header instead")
0065 PLASMA_EXPORT const char *versionString();
0066 
0067 /**
0068  * Verifies that a plugin is compatible with plasma
0069  * @deprecated Since 5.85, method is obsolete with the deprecation of KPluginLoader::pluginVersion.
0070  * Consider using a versioned namespace or KPluginMetaData::version instead.
0071  */
0072 PLASMA_DEPRECATED_VERSION(5, 85, "See API docs")
0073 PLASMA_EXPORT bool isPluginVersionCompatible(unsigned int version);
0074 
0075 } // Plasma namespace
0076 
0077 #endif
0078 #endif // multiple inclusion guard