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.

74 lines
2.0KB

  1. /*
  2. Copyright (C) 2005 Grame
  3. This program is free software; you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation; either version 2 of the License, or
  6. (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program; if not, write to the Free Software
  13. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  14. */
  15. #ifndef __JackServerGlobals__
  16. #define __JackServerGlobals__
  17. #include "driver_interface.h"
  18. #include "JackDriverLoader.h"
  19. #include "JackCompilerDeps.h"
  20. #include "JackServer.h"
  21. #include <map>
  22. namespace Jack
  23. {
  24. class JackClient;
  25. /*!
  26. \brief Global server static structure: singleton kind of pattern.
  27. */
  28. struct SERVER_EXPORT JackServerGlobals
  29. {
  30. static JackServer* fInstance;
  31. static unsigned int fUserCount;
  32. static std::map<std::string, JackDriverInfo*> fSlavesList;
  33. static std::map<std::string, int> fInternalsList;
  34. static bool (* on_device_acquire)(const char* device_name);
  35. static void (* on_device_release)(const char* device_name);
  36. static void (* on_device_reservation_loop)(void);
  37. JackServerGlobals();
  38. ~JackServerGlobals();
  39. static bool Init();
  40. static void Destroy();
  41. static int Start(const char* server_name,
  42. jack_driver_desc_t* driver_desc,
  43. JSList* driver_params,
  44. int sync,
  45. int temporary,
  46. int time_out_ms,
  47. int rt,
  48. int priority,
  49. int port_max,
  50. int verbose,
  51. jack_timer_type_t clock,
  52. char self_connect_mode);
  53. static void Stop();
  54. static void Delete();
  55. };
  56. } // end of namespace
  57. #endif