File indexing completed on 2024-04-28 11:43:53

0001 /*
0002     SPDX-FileCopyrightText: 2008 Aaron Seigo <aseigo@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #ifndef KPACKAGEVERSION_H
0008 #define KPACKAGEVERSION_H
0009 
0010 /**
0011  *@file kpackage/version.h <KPackage/Version>
0012  *@deprecated Deprecated for lack of usage, use equivalents from plasma-framework instead
0013  */
0014 
0015 #include <kpackage/package_export.h>
0016 #include <kpackage_version.h>
0017 
0018 #if KPACKAGE_ENABLE_DEPRECATED_SINCE(5, 84)
0019 
0020 #define PACKAGE_MAKE_VERSION(a, b, c) (((a) << 16) | ((b) << 8) | (c))
0021 
0022 /**
0023  * Compile-time macro for checking the kpackage version. Not useful for
0024  * detecting the version of kpackage at runtime.
0025  */
0026 #define PACKAGE_IS_VERSION(a, b, c) (PACKAGE_VERSION >= PACKAGE_MAKE_VERSION(a, b, c))
0027 
0028 /**
0029  * Namespace for everything in kpackage
0030  */
0031 namespace KPackage
0032 {
0033 /**
0034  * The runtime version of libkpackage
0035  */
0036 KPACKAGE_EXPORT unsigned int version();
0037 
0038 /**
0039  * The runtime major version of libkpackage
0040  */
0041 KPACKAGE_EXPORT unsigned int versionMajor();
0042 
0043 /**
0044  * The runtime major version of libkpackage
0045  */
0046 KPACKAGE_EXPORT unsigned int versionMinor();
0047 
0048 /**
0049  * The runtime major version of libkpackage
0050  */
0051 KPACKAGE_EXPORT unsigned int versionRelease();
0052 
0053 /**
0054  * The runtime version string of libkpackage
0055  */
0056 KPACKAGE_EXPORT const char *versionString();
0057 
0058 /**
0059  * Verifies that a plugin is compatible with plasma
0060  */
0061 KPACKAGE_EXPORT bool isPluginVersionCompatible(unsigned int version);
0062 
0063 } // Plasma namespace
0064 
0065 #endif
0066 
0067 #endif // multiple inclusion guard