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