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