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.

66 lines
2.0KB

  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 Lesser General Public License as published by
  7. the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details.
  13. You should have received a copy of the GNU Lesser General Public License
  14. along with this program; if not, write to the Free Software
  15. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  16. */
  17. #ifndef __JackError__
  18. #define __JackError__
  19. #include <string.h>
  20. #include <errno.h>
  21. #include "JackCompilerDeps.h"
  22. #include "types.h"
  23. #ifdef __cplusplus
  24. extern "C"
  25. {
  26. #endif
  27. #define LOG_LEVEL_INFO 1
  28. #define LOG_LEVEL_ERROR 2
  29. SERVER_EXPORT void jack_error(const char *fmt, ...);
  30. SERVER_EXPORT void jack_info(const char *fmt, ...);
  31. // like jack_info() but only if verbose mode is enabled
  32. SERVER_EXPORT void jack_log(const char *fmt, ...);
  33. SERVER_EXPORT extern void (*jack_error_callback)(const char *desc);
  34. SERVER_EXPORT extern void (*jack_info_callback)(const char *desc);
  35. SERVER_EXPORT extern void default_jack_error_callback(const char *desc);
  36. SERVER_EXPORT extern void default_jack_info_callback(const char *desc);
  37. SERVER_EXPORT extern void silent_jack_error_callback(const char *desc);
  38. SERVER_EXPORT extern void silent_jack_info_callback(const char *desc);
  39. typedef void (* jack_log_function_t)(int level, const char *message);
  40. void change_thread_log_function(jack_log_function_t log_function);
  41. void jack_log_function(int level, const char *message);
  42. SERVER_EXPORT void set_threaded_log_function();
  43. #ifdef __cplusplus
  44. }
  45. #endif
  46. #endif