jack2 codebase
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.

64 lines
1.6KB

  1. /*
  2. Copyright (C) 2001 Paul Davis
  3. Copyright (C) 2004-2008 Grame
  4. Copyright (C) 2008 Nedko Arnaudov
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 2 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program; if not, write to the Free Software
  15. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  16. */
  17. #ifndef __JackError__
  18. #define __JackError__
  19. #include <string.h>
  20. #include <errno.h>
  21. #include <stdio.h>
  22. #include "JackExports.h"
  23. #include "types.h"
  24. #ifdef __cplusplus
  25. extern "C"
  26. {
  27. #endif
  28. #define LOG_LEVEL_INFO 1
  29. #define LOG_LEVEL_ERROR 2
  30. EXPORT void jack_error(const char *fmt, ...);
  31. EXPORT void jack_info(const char *fmt, ...);
  32. // like jack_info() but only if verbose mode is enabled
  33. EXPORT void jack_log(const char *fmt, ...);
  34. extern void (*jack_error_callback)(const char *desc);
  35. extern void (*jack_info_callback)(const char *desc);
  36. typedef void (* jack_log_function_t)(int level, const char *message);
  37. void change_thread_log_function(jack_log_function_t log_function);
  38. void jack_log_function(int level, const char *message);
  39. EXPORT void set_threaded_log_function();
  40. extern int jack_verbose;
  41. #ifdef __cplusplus
  42. }
  43. #endif
  44. #endif