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.

72 lines
1.9KB

  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. JackServerGlobals();
  37. ~JackServerGlobals();
  38. static bool Init();
  39. static void Destroy();
  40. static int Start(const char* server_name,
  41. jack_driver_desc_t* driver_desc,
  42. JSList* driver_params,
  43. int sync,
  44. int temporary,
  45. int time_out_ms,
  46. int rt,
  47. int priority,
  48. int port_max,
  49. int verbose,
  50. jack_timer_type_t clock);
  51. static void Stop();
  52. static void Delete();
  53. };
  54. } // end of namespace
  55. #endif