Line data Source code
1 : // Copyright (c) 2011-2022 Made to Order Software Corp. All Rights Reserved
2 : //
3 : // https://snapwebsites.org/project/edhttp
4 : // contact@m2osw.com
5 : //
6 : // This program is free software: you can redistribute it and/or modify
7 : // it under the terms of the GNU General Public License as published by
8 : // the Free Software Foundation, either version 3 of the License, or
9 : // (at your option) any later version.
10 : //
11 : // This program is distributed in the hope that it will be useful,
12 : // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 : // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 : // GNU General Public License for more details.
15 : //
16 : // You should have received a copy of the GNU General Public License
17 : // along with this program. If not, see <https://www.gnu.org/licenses/>.
18 :
19 : /** \file
20 : * \brief The version of the event dispatcher at compile time.
21 : *
22 : * This file records the event dispatcher library version at compile time.
23 : *
24 : * The macros give you the library version at the time you are compiling.
25 : * The functions allow you to retrieve the version of a dynamically linked
26 : * library.
27 : */
28 :
29 : // self
30 : //
31 : #include "edhttp/version.h"
32 :
33 :
34 : // last include
35 : //
36 : #include <snapdev/poison.h>
37 :
38 :
39 :
40 : namespace edhttp
41 : {
42 :
43 :
44 :
45 : /** \brief Get the major version of the library
46 : *
47 : * This function returns the major version of the running library (the
48 : * one you are linked against at runtime).
49 : *
50 : * \return The major version.
51 : */
52 1 : int get_major_version()
53 : {
54 1 : return EDHTTP_VERSION_MAJOR;
55 : }
56 :
57 :
58 : /** \brief Get the minor version of the library.
59 : *
60 : * This function returns the minor version of the running library
61 : * (the one you are linked against at runtime).
62 : *
63 : * \return The release version.
64 : */
65 1 : int get_release_version()
66 : {
67 1 : return EDHTTP_VERSION_MINOR;
68 : }
69 :
70 :
71 : /** \brief Get the patch version of the library.
72 : *
73 : * This function returns the patch version of the running library
74 : * (the one you are linked against at runtime).
75 : *
76 : * \return The patch version.
77 : */
78 1 : int get_patch_version()
79 : {
80 1 : return EDHTTP_VERSION_PATCH;
81 : }
82 :
83 :
84 : /** \brief Get the full version of the library as a string.
85 : *
86 : * This function returns the major, minor, and patch versions of the
87 : * running library (the one you are linked against at runtime) in the
88 : * form of a string.
89 : *
90 : * The build version is not made available. In most cases we change
91 : * the build version only to run a new build, so not code will have
92 : * changed (some documentation and non-code files may changed between
93 : * build versions; but the code will work exactly the same way.)
94 : *
95 : * \return The library version.
96 : */
97 1 : char const * get_version_string()
98 : {
99 1 : return EDHTTP_VERSION_STRING;
100 : }
101 :
102 :
103 : } // namespace ed
104 : // vim: ts=4 sw=4 et
|