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.

77 lines
2.1KB

  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. class SERVER_EXPORT JackServerGlobals
  29. {
  30. public:
  31. static JackServer* fInstance;
  32. static unsigned int fUserCount;
  33. static std::map<std::string, JackDriverInfo*> fSlavesList;
  34. static std::map<std::string, int> fInternalsList;
  35. static bool (* on_device_acquire)(const char* device_name);
  36. static void (* on_device_release)(const char* device_name);
  37. static void (* on_device_reservation_loop)(void);
  38. JackServerGlobals();
  39. ~JackServerGlobals();
  40. static bool Init();
  41. static void Destroy();
  42. static int Start(const char* server_name,
  43. jack_driver_desc_t* driver_desc,
  44. JSList* driver_params,
  45. int sync,
  46. int temporary,
  47. int time_out_ms,
  48. int rt,
  49. int priority,
  50. int port_max,
  51. int verbose,
  52. jack_timer_type_t clock,
  53. char self_connect_mode);
  54. static void Stop();
  55. static void Delete();
  56. };
  57. } // end of namespace
  58. #endif