blob: 88cb6093b733f009b3ee4e3747b1f2d3b66cff11 [file] [log] [blame]
Paul Bakker3ac1b2d2010-06-18 22:47:29 +00001/**
2 * \file version.h
3 *
4 * Copyright (C) 2006-2010, Paul Bakker <polarssl_maintainer at polarssl.org>
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * This set of compile-time defines and run-time variables can be used to
22 * determine the version number of the PolarSSL library used.
23 */
24#ifndef POLARSSL_VERSION_H
25#define POLARSSL_VERSION_H
26
27#include "polarssl/config.h"
28
29/**
30 * The version number x.y.z is split into three parts.
31 * Major, Minor, Patchlevel
32 */
33#define POLARSSL_VERSION_MAJOR 0
34#define POLARSSL_VERSION_MINOR 13
35#define POLARSSL_VERSION_PATCH 1
36
37/**
38 * The single version number has the following structure:
39 * MMNNPP00
40 * Major version | Minor version | Patch version
41 */
42#define POLARSSL_VERSION_NUMBER 0x000D0100
43#define POLARSSL_VERSION_STRING "0.13.1"
44#define POLARSSL_VERSION_STRING_FULL "PolarSSL 0.13.1"
45
46#if defined(POLARSSL_VERSION_C)
47
48/**
49 * Get the version number.
50 *
51 * @return The constructed version number in the format
52 * MMNNPP00 (Major, Minor, Patch).
53 */
54unsigned int version_get_number();
55
56/**
57 * Get the version string ("x.y.z").
58 *
59 * @param string The string that will receive the value.
60 * (Should be at least 9 bytes in size)
61 */
62void version_get_string( char *string );
63
64/**
65 * Get the full version string ("PolarSSL x.y.z").
66 *
67 * @param string The string that will receive the value.
68 * (Should be at least 18 bytes in size)
69 */
70void version_get_string_full( char *string );
71
72#endif /* POLARSSL_VERSION_C */
73
74#endif /* version.h */