summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-02-04 18:21:52 +0100
committerJay Berkenbilt <ejb@ql.org>2022-02-04 19:41:01 +0100
commit8eab616d6232099d9ad49af7be1f2e2d6b4c8d0f (patch)
treeb730cd5b41933271f15507ebb2750791ade08df5 /include
parentabc300f05c00de72081203d89d9065b25f1ccb3c (diff)
downloadqpdf-8eab616d6232099d9ad49af7be1f2e2d6b4c8d0f.tar.zst
Add qpdf version macros to qpdf/DLL.h
Diffstat (limited to 'include')
-rw-r--r--include/qpdf/DLL.h6
-rw-r--r--include/qpdf/QPDF.hh3
-rw-r--r--include/qpdf/Version.h34
3 files changed, 42 insertions, 1 deletions
diff --git a/include/qpdf/DLL.h b/include/qpdf/DLL.h
index 9c38f8a9..21ae2b88 100644
--- a/include/qpdf/DLL.h
+++ b/include/qpdf/DLL.h
@@ -23,6 +23,12 @@
#ifndef QPDF_DLL_HH
#define QPDF_DLL_HH
+/* The first version of qpdf to include the version constants is 10.6.0. */
+#define QPDF_MAJOR_VERSION 10
+#define QPDF_MINOR_VERSION 5
+#define QPDF_PATCH_VERSION 0
+#define QPDF_VERSION "10.5.0"
+
#if (defined _WIN32 || defined __CYGWIN__) && defined(DLL_EXPORT)
# define QPDF_DLL __declspec(dllexport)
# define QPDF_DLL_CLASS
diff --git a/include/qpdf/QPDF.hh b/include/qpdf/QPDF.hh
index ac395358..c19d5683 100644
--- a/include/qpdf/QPDF.hh
+++ b/include/qpdf/QPDF.hh
@@ -52,7 +52,8 @@ class BitWriter;
class QPDF
{
public:
- // Get the current version of the QPDF software
+ // Get the current version of the QPDF software. See also
+ // qpdf/Version.h
QPDF_DLL
static std::string const& QPDFVersion();
diff --git a/include/qpdf/Version.h b/include/qpdf/Version.h
new file mode 100644
index 00000000..54063f0a
--- /dev/null
+++ b/include/qpdf/Version.h
@@ -0,0 +1,34 @@
+/* Copyright (c) 2005-2021 Jay Berkenbilt
+ *
+ * This file is part of qpdf.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Versions of qpdf prior to version 7 were released under the terms
+ * of version 2.0 of the Artistic License. At your option, you may
+ * continue to consider qpdf to be licensed under those terms. Please
+ * see the manual for additional information.
+ */
+
+#ifndef QPDF_VERSION_H
+#define QPDF_VERSION_H
+
+/* The first version of qpdf to have these constants was 10.6.0. This
+ * file is included by qpdf/DLL.h, which is included by everything
+ * that adds to the public API, so you can test for these values
+ * without explicitly including this file in code that has to work
+ * with older qpdf than 10.6.0.
+ */
+
+
+#endif /* QPDF_VERSION_H */