libsigrokdecode  0.4.0
sigrok protocol decoding library
version.c
Go to the documentation of this file.
1 /*
2  * This file is part of the libsigrokdecode project.
3  *
4  * Copyright (C) 2012-2013 Uwe Hermann <uwe@hermann-uwe.de>
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 2 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, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 #include <config.h>
22 #include "libsigrokdecode.h"
23 
24 /**
25  * @file
26  *
27  * Version number querying functions, definitions, and macros.
28  */
29 
30 /**
31  * @defgroup grp_versions Versions
32  *
33  * Version number querying functions, definitions, and macros.
34  *
35  * This set of API calls returns two different version numbers related
36  * to libsigrokdecode. The "package version" is the release version number
37  * of the libsigrokdecode tarball in the usual "major.minor.micro" format,
38  * e.g. "0.1.0".
39  *
40  * The "library version" is independent of that; it is the libtool version
41  * number in the "current:revision:age" format, e.g. "2:0:0".
42  * See http://www.gnu.org/software/libtool/manual/libtool.html#Libtool-versioning for details.
43  *
44  * Both version numbers (and/or individual components of them) can be
45  * retrieved via the API calls at runtime, and/or they can be checked at
46  * compile/preprocessor time using the respective macros.
47  *
48  * @{
49  */
50 
51 /**
52  * Get the major libsigrokdecode package version number.
53  *
54  * @return The major package version number.
55  *
56  * @since 0.1.0
57  */
59 {
61 }
62 
63 /**
64  * Get the minor libsigrokdecode package version number.
65  *
66  * @return The minor package version number.
67  *
68  * @since 0.1.0
69  */
71 {
73 }
74 
75 /**
76  * Get the micro libsigrokdecode package version number.
77  *
78  * @return The micro package version number.
79  *
80  * @since 0.1.0
81  */
83 {
85 }
86 
87 /**
88  * Get the libsigrokdecode package version number as a string.
89  *
90  * @return The package version number string. The returned string is
91  * static and thus should NOT be free'd by the caller.
92  *
93  * @since 0.1.0
94  */
96 {
98 }
99 
100 /**
101  * Get the "current" part of the libsigrokdecode library version number.
102  *
103  * @return The "current" library version number.
104  *
105  * @since 0.1.0
106  */
108 {
110 }
111 
112 /**
113  * Get the "revision" part of the libsigrokdecode library version number.
114  *
115  * @return The "revision" library version number.
116  *
117  * @since 0.1.0
118  */
120 {
122 }
123 
124 /**
125  * Get the "age" part of the libsigrokdecode library version number.
126  *
127  * @return The "age" library version number.
128  *
129  * @since 0.1.0
130  */
132 {
133  return SRD_LIB_VERSION_AGE;
134 }
135 
136 /**
137  * Get the libsigrokdecode library version number as a string.
138  *
139  * @return The library version number string. The returned string is
140  * static and thus should NOT be free'd by the caller.
141  *
142  * @since 0.1.0
143  */
145 {
146  return SRD_LIB_VERSION_STRING;
147 }
148 
149 /** @} */
#define SRD_LIB_VERSION_CURRENT
The libsigrokdecode libtool 'current' version number.
Definition: version.h:58
#define SRD_LIB_VERSION_REVISION
The libsigrokdecode libtool 'revision' version number.
Definition: version.h:61
#define SRD_PACKAGE_VERSION_STRING
The libsigrokdecode package version ("major.minor.micro") as string.
Definition: version.h:51
int srd_package_version_micro_get(void)
Get the micro libsigrokdecode package version number.
Definition: version.c:82
#define SRD_LIB_VERSION_AGE
The libsigrokdecode libtool 'age' version number.
Definition: version.h:64
#define SRD_LIB_VERSION_STRING
The libsigrokdecode libtool version ("current:revision:age") as string.
Definition: version.h:67
#define SRD_API
const char * srd_package_version_string_get(void)
Get the libsigrokdecode package version number as a string.
Definition: version.c:95
int srd_lib_version_age_get(void)
Get the "age" part of the libsigrokdecode library version number.
Definition: version.c:131
The public libsigrokdecode header file to be used by frontends.
int srd_lib_version_current_get(void)
Get the "current" part of the libsigrokdecode library version number.
Definition: version.c:107
#define SRD_PACKAGE_VERSION_MINOR
The libsigrokdecode package 'minor' version number.
Definition: version.h:45
#define SRD_PACKAGE_VERSION_MAJOR
The libsigrokdecode package 'major' version number.
Definition: version.h:42
const char * srd_lib_version_string_get(void)
Get the libsigrokdecode library version number as a string.
Definition: version.c:144
int srd_package_version_major_get(void)
Get the major libsigrokdecode package version number.
Definition: version.c:58
#define SRD_PACKAGE_VERSION_MICRO
The libsigrokdecode package 'micro' version number.
Definition: version.h:48
int srd_package_version_minor_get(void)
Get the minor libsigrokdecode package version number.
Definition: version.c:70
int srd_lib_version_revision_get(void)
Get the "revision" part of the libsigrokdecode library version number.
Definition: version.c:119