2006-09-03 10:39:10 +03:00
|
|
|
/*
|
2008-03-05 18:39:51 +02:00
|
|
|
Copyright (C) 2005 Grame
|
2006-09-03 10:39:10 +03:00
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
2007-10-07 16:14:15 +03:00
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
2006-09-03 10:39:10 +03:00
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __JackServerGlobals__
|
|
|
|
#define __JackServerGlobals__
|
|
|
|
|
|
|
|
#include "driver_interface.h"
|
|
|
|
#include "JackDriverLoader.h"
|
2009-05-05 17:49:59 +03:00
|
|
|
#include "JackCompilerDeps.h"
|
2006-09-03 10:39:10 +03:00
|
|
|
#include "JackServer.h"
|
2011-03-13 14:56:30 +02:00
|
|
|
#include <map>
|
2006-09-03 10:39:10 +03:00
|
|
|
|
|
|
|
namespace Jack
|
|
|
|
{
|
|
|
|
|
|
|
|
class JackClient;
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\brief Global server static structure: singleton kind of pattern.
|
|
|
|
*/
|
|
|
|
|
2009-01-14 17:01:58 +02:00
|
|
|
struct SERVER_EXPORT JackServerGlobals
|
2006-09-03 10:39:10 +03:00
|
|
|
{
|
2009-01-14 17:01:58 +02:00
|
|
|
static JackServer* fInstance;
|
|
|
|
static unsigned int fUserCount;
|
2011-03-13 14:56:30 +02:00
|
|
|
static std::map<std::string, JackDriverInfo*> fSlavesList;
|
|
|
|
static std::map<std::string, int> fInternalsList;
|
|
|
|
|
2011-03-09 23:45:34 +02:00
|
|
|
static bool (* on_device_acquire)(const char* device_name);
|
|
|
|
static void (* on_device_release)(const char* device_name);
|
2019-10-28 12:16:09 +02:00
|
|
|
static void (* on_device_reservation_loop)(void);
|
2011-03-04 13:02:25 +02:00
|
|
|
|
2006-09-03 10:39:10 +03:00
|
|
|
JackServerGlobals();
|
2008-06-12 16:09:59 +03:00
|
|
|
~JackServerGlobals();
|
2006-09-03 10:39:10 +03:00
|
|
|
|
2007-10-04 17:23:35 +03:00
|
|
|
static bool Init();
|
2006-09-03 10:39:10 +03:00
|
|
|
static void Destroy();
|
2009-10-25 11:36:36 +02:00
|
|
|
static int Start(const char* server_name,
|
2008-03-05 18:39:51 +02:00
|
|
|
jack_driver_desc_t* driver_desc,
|
|
|
|
JSList* driver_params,
|
|
|
|
int sync,
|
|
|
|
int temporary,
|
|
|
|
int time_out_ms,
|
|
|
|
int rt,
|
|
|
|
int priority,
|
2009-11-24 18:52:22 +02:00
|
|
|
int port_max,
|
2009-04-20 17:01:41 +03:00
|
|
|
int verbose,
|
2009-05-26 14:05:34 +03:00
|
|
|
jack_timer_type_t clock,
|
2014-03-10 03:31:23 +02:00
|
|
|
char self_connect_mode);
|
2009-01-14 17:01:58 +02:00
|
|
|
static void Stop();
|
|
|
|
static void Delete();
|
2006-09-03 10:39:10 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
} // end of namespace
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|