version.h 2.5 KB

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