Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

rtosc-version.h 2.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*
  2. * Copyright (c) 2017 Johannes Lorenz
  3. *
  4. * Permission is hereby granted, free of charge, to any person obtaining a
  5. * copy of this software and associated documentation files (the "Software"),
  6. * to deal in the Software without restriction, including without limitation
  7. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  8. * and/or sell copies of the Software, and to permit persons to whom the
  9. * Software is furnished to do so, subject to the following conditions:
  10. *
  11. * The above copyright notice and this permission notice (including the next
  12. * paragraph) shall be included in all copies or substantial portions of the
  13. * Software.
  14. *
  15. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  16. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  17. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  18. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  19. * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  20. * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  21. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  22. * DEALINGS IN THE SOFTWARE.
  23. */
  24. /**
  25. * @file rtosc-version.h
  26. * Definition of rtosc's version struct
  27. * @note the implementation is in version.c.in
  28. */
  29. #ifndef RTOSC_VERSION_H
  30. #define RTOSC_VERSION_H
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34. //! @brief struct containing an rtosc version
  35. typedef struct
  36. {
  37. unsigned char major;
  38. unsigned char minor;
  39. unsigned char revision;
  40. } rtosc_version;
  41. //! @brief memcmp-like version compare
  42. //! @return an integer greater than, equal to, or less than 0, if
  43. //! v1 is greater than, equal to, or less than v2, respectively
  44. int rtosc_version_cmp(const rtosc_version v1,
  45. const rtosc_version v2);
  46. //! @brief Return the version RT OSC has been compiled with
  47. rtosc_version rtosc_current_version();
  48. //! @brief Print the version pointed to by @p v to the buffer @p _12bytes
  49. //!
  50. //! The format "<major>.<minor>.<revision>" is being used
  51. //! @param v Pointer to the version that shall be printed
  52. //! @param _12bytes A buffer with a size of at least 12 bytes
  53. void rtosc_version_print_to_12byte_str(const rtosc_version* v,
  54. char* _12bytes);
  55. #ifdef __cplusplus
  56. };
  57. #endif
  58. #endif