![]() |
libsigrok
0.3.0
sigrok hardware access and backend library
|
00001 /* 00002 * This file is part of the libsigrok project. 00003 * 00004 * Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de> 00005 * 00006 * This program is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation; either version 2 of the License, or 00009 * (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00019 */ 00020 00021 #include "libsigrok.h" 00022 00023 /** 00024 * @file 00025 * 00026 * Version number querying functions, definitions, and macros. 00027 */ 00028 00029 /** 00030 * @defgroup grp_versions Versions 00031 * 00032 * Version number querying functions, definitions, and macros. 00033 * 00034 * This set of API calls returns two different version numbers related 00035 * to libsigrok. The "package version" is the release version number of the 00036 * libsigrok tarball in the usual "major.minor.micro" format, e.g. "0.1.0". 00037 * 00038 * The "library version" is independent of that; it is the libtool version 00039 * number in the "current:revision:age" format, e.g. "2:0:0". 00040 * See http://www.gnu.org/software/libtool/manual/libtool.html#Libtool-versioning for details. 00041 * 00042 * Both version numbers (and/or individual components of them) can be 00043 * retrieved via the API calls at runtime, and/or they can be checked at 00044 * compile/preprocessor time using the respective macros. 00045 * 00046 * @{ 00047 */ 00048 00049 /** 00050 * Get the major libsigrok package version number. 00051 * 00052 * @return The major package version number. 00053 * 00054 * @since 0.1.0 00055 */ 00056 SR_API int sr_package_version_major_get(void) 00057 { 00058 return SR_PACKAGE_VERSION_MAJOR; 00059 } 00060 00061 /** 00062 * Get the minor libsigrok package version number. 00063 * 00064 * @return The minor package version number. 00065 * 00066 * @since 0.1.0 00067 */ 00068 SR_API int sr_package_version_minor_get(void) 00069 { 00070 return SR_PACKAGE_VERSION_MINOR; 00071 } 00072 00073 /** 00074 * Get the micro libsigrok package version number. 00075 * 00076 * @return The micro package version number. 00077 * 00078 * @since 0.1.0 00079 */ 00080 SR_API int sr_package_version_micro_get(void) 00081 { 00082 return SR_PACKAGE_VERSION_MICRO; 00083 } 00084 00085 /** 00086 * Get the libsigrok package version number as a string. 00087 * 00088 * @return The package version number string. The returned string is 00089 * static and thus should NOT be free'd by the caller. 00090 * 00091 * @since 0.1.0 00092 */ 00093 SR_API const char *sr_package_version_string_get(void) 00094 { 00095 return SR_PACKAGE_VERSION_STRING; 00096 } 00097 00098 /** 00099 * Get the "current" part of the libsigrok library version number. 00100 * 00101 * @return The "current" library version number. 00102 * 00103 * @since 0.1.0 00104 */ 00105 SR_API int sr_lib_version_current_get(void) 00106 { 00107 return SR_LIB_VERSION_CURRENT; 00108 } 00109 00110 /** 00111 * Get the "revision" part of the libsigrok library version number. 00112 * 00113 * @return The "revision" library version number. 00114 * 00115 * @since 0.1.0 00116 */ 00117 SR_API int sr_lib_version_revision_get(void) 00118 { 00119 return SR_LIB_VERSION_REVISION; 00120 } 00121 00122 /** 00123 * Get the "age" part of the libsigrok library version number. 00124 * 00125 * @return The "age" library version number. 00126 * 00127 * @since 0.1.0 00128 */ 00129 SR_API int sr_lib_version_age_get(void) 00130 { 00131 return SR_LIB_VERSION_AGE; 00132 } 00133 00134 /** 00135 * Get the libsigrok library version number as a string. 00136 * 00137 * @return The library version number string. The returned string is 00138 * static and thus should NOT be free'd by the caller. 00139 * 00140 * @since 0.1.0 00141 */ 00142 SR_API const char *sr_lib_version_string_get(void) 00143 { 00144 return SR_LIB_VERSION_STRING; 00145 } 00146 00147 /** @} */
1.7.6.1