Commit f8f2fddb authored by sletz's avatar sletz
Browse files

Remove JackClientInterface class

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2452 0c269be4-1314-0410-8aa9-9f06e86f4224
parent ac10c8e9
......@@ -33,14 +33,14 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include "JackClientControl.h"
#include "JackPort.h"
#include "JackGraphManager.h"
#include "JackEngine.h"
#include "JackLockedEngine.h"
#include "JackException.h"
#include <assert.h>
namespace Jack
{
JackAudioDriver::JackAudioDriver(const char* name, const char* alias, JackEngineInterface* engine, JackSynchro* table)
JackAudioDriver::JackAudioDriver(const char* name, const char* alias, JackLockedEngine* engine, JackSynchro* table)
: JackDriver(name, alias, engine, table),
fCaptureChannels(0),
fPlaybackChannels(0),
......
......@@ -57,7 +57,7 @@ class EXPORT JackAudioDriver : public JackDriver
public:
JackAudioDriver(const char* name, const char* alias, JackEngineInterface* engine, JackSynchro* table);
JackAudioDriver(const char* name, const char* alias, JackLockedEngine* engine, JackSynchro* table);
virtual ~JackAudioDriver();
virtual int Process();
......
......@@ -34,7 +34,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include "JackGlobals.h"
#include "JackEngineControl.h"
#include "JackClientControl.h"
#include "JackEngine.h"
#include "JackLockedEngine.h"
#include <math.h>
#include <assert.h>
......@@ -43,7 +43,7 @@ using namespace std;
namespace Jack
{
JackDriver::JackDriver(const char* name, const char* alias, JackEngineInterface* engine, JackSynchro* table)
JackDriver::JackDriver(const char* name, const char* alias, JackLockedEngine* engine, JackSynchro* table)
{
assert(strlen(name) < JACK_CLIENT_NAME_SIZE);
fSynchroTable = table;
......
......@@ -30,7 +30,7 @@
namespace Jack
{
class JackEngineInterface;
class JackLockedEngine;
class JackGraphManager;
struct JackEngineControl;
struct JackClientControl;
......@@ -150,7 +150,7 @@ class EXPORT JackDriver : public JackDriverClient
jack_nframes_t fPlaybackLatency;
jack_time_t fLastWaitUst;
float fDelayedUsecs;
JackEngineInterface* fEngine;
JackLockedEngine* fEngine;
JackGraphManager* fGraphManager;
JackSynchro* fSynchroTable;
JackEngineControl* fEngineControl;
......@@ -163,7 +163,7 @@ class EXPORT JackDriver : public JackDriverClient
public:
JackDriver(const char* name, const char* alias, JackEngineInterface* engine, JackSynchro* table);
JackDriver(const char* name, const char* alias, JackLockedEngine* engine, JackSynchro* table);
JackDriver();
virtual ~JackDriver();
......
......@@ -45,11 +45,11 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#endif
typedef jack_driver_desc_t * (*JackDriverDescFunction) ();
typedef Jack::JackDriverClientInterface* (*initialize) (Jack::JackEngineInterface*, Jack::JackSynchro*, const JSList *);
typedef Jack::JackDriverClientInterface* (*initialize) (Jack::JackLockedEngine*, Jack::JackSynchro*, const JSList *);
typedef struct _jack_driver_info
{
Jack::JackDriverClientInterface* (*initialize)(Jack::JackEngineInterface*, Jack::JackSynchro*, const JSList *);
Jack::JackDriverClientInterface* (*initialize)(Jack::JackLockedEngine*, Jack::JackSynchro*, const JSList *);
DRIVER_HANDLE handle;
}
jack_driver_info_t;
......
......@@ -138,7 +138,7 @@ extern "C"
return desc;
}
Jack::JackDriverClientInterface* driver_initialize(Jack::JackEngineInterface* engine, Jack::JackSynchro* table, const JSList* params) {
Jack::JackDriverClientInterface* driver_initialize(Jack::JackLockedEngine* engine, Jack::JackSynchro* table, const JSList* params) {
jack_nframes_t sample_rate = 48000;
jack_nframes_t period_size = 1024;
unsigned int capture_ports = 2;
......
......@@ -38,7 +38,7 @@ class JackDummyDriver : public JackAudioDriver
public:
JackDummyDriver(const char* name, const char* alias, JackEngineInterface* engine, JackSynchro* table, unsigned long wait_time)
JackDummyDriver(const char* name, const char* alias, JackLockedEngine* engine, JackSynchro* table, unsigned long wait_time)
: JackAudioDriver(name, alias, engine, table), fWaitTime(wait_time)
{}
virtual ~JackDummyDriver()
......
......@@ -30,7 +30,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include <signal.h>
#endif
#include "JackEngine.h"
#include "JackLockedEngine.h"
#include "JackExternalClient.h"
#include "JackInternalClient.h"
#include "JackEngineControl.h"
......
......@@ -33,60 +33,6 @@ namespace Jack
class JackClientInterface;
struct JackEngineControl;
class JackExternalClient;
class JackEngineInterface
{
public:
JackEngineInterface()
{}
JackEngineInterface(JackGraphManager* manager, JackSynchro** table, JackEngineControl* controler)
{}
virtual ~JackEngineInterface()
{}
virtual int Open() = 0;
virtual int Close() = 0;
// Client management
virtual int ClientCheck(const char* name, char* name_res, int protocol, int options, int* status) = 0;
virtual int ClientExternalOpen(const char* name, int pid, int* ref, int* shared_engine, int* shared_client, int* shared_graph_manager) = 0;
virtual int ClientInternalOpen(const char* name, int* ref, JackEngineControl** shared_engine, JackGraphManager** shared_manager, JackClientInterface* client, bool wait) = 0;
virtual int ClientExternalClose(int refnum) = 0;
virtual int ClientInternalClose(int refnum, bool wait) = 0;
virtual int ClientActivate(int refnum, bool state) = 0;
virtual int ClientDeactivate(int refnum) = 0;
virtual int GetClientPID(const char* name) = 0;
// Internal client management
virtual int GetInternalClientName(int int_ref, char* name_res) = 0;
virtual int InternalClientHandle(const char* client_name, int* status, int* int_ref) = 0;
virtual int InternalClientUnload(int refnum, int* status) = 0;
// Port management
virtual int PortRegister(int refnum, const char* name, const char *type, unsigned int flags, unsigned int buffer_size, unsigned int* port) = 0;
virtual int PortUnRegister(int refnum, jack_port_id_t port) = 0;
virtual int PortConnect(int refnum, const char* src, const char* dst) = 0;
virtual int PortDisconnect(int refnum, const char* src, const char* dst) = 0;
virtual int PortConnect(int refnum, jack_port_id_t src, jack_port_id_t dst) = 0;
virtual int PortDisconnect(int refnum, jack_port_id_t src, jack_port_id_t dst) = 0;
// Graph
virtual bool Process(jack_time_t callback_usecs) = 0;
// Notifications
virtual void NotifyXRun(jack_time_t callback_usecs, float delayed_usecs) = 0;
virtual void NotifyXRun(int refnum) = 0;
virtual void NotifyGraphReorder() = 0;
virtual void NotifyBufferSize(jack_nframes_t nframes) = 0;
virtual void NotifyFreewheel(bool onoff) = 0;
};
/*!
\brief Engine description.
......
......@@ -28,7 +28,7 @@
#include "JackFreewheelDriver.h"
#include "JackEngineControl.h"
#include "JackEngine.h"
#include "JackLockedEngine.h"
namespace Jack
{
......
......@@ -35,7 +35,7 @@ class JackFreewheelDriver : public JackDriver
public:
JackFreewheelDriver(JackEngineInterface* engine, JackSynchro* table): JackDriver("freewheel", "", engine, table)
JackFreewheelDriver(JackLockedEngine* engine, JackSynchro* table): JackDriver("freewheel", "", engine, table)
{}
virtual ~JackFreewheelDriver()
{}
......
......@@ -34,7 +34,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include "JackGraphManager.h"
#include "JackInternalClient.h"
#include "JackEngine.h"
#include "JackLockedEngine.h"
#include "JackServer.h"
#include "JackEngineControl.h"
#include "JackClientControl.h"
......
......@@ -35,7 +35,7 @@ class JackInternalClientChannel : public detail::JackClientChannelInterface
private:
JackServer* fServer;
JackEngineInterface* fEngine;
JackLockedEngine* fEngine;
public:
......
......@@ -30,7 +30,7 @@ namespace Jack
\brief Locked Engine.
*/
class JackLockedEngine : public JackEngineInterface, public JackLockAble
class JackLockedEngine : public JackLockAble
{
private:
......@@ -188,7 +188,6 @@ class JackLockedEngine : public JackEngineInterface, public JackLockAble
};
} // end of namespace
#endif
......
......@@ -35,7 +35,7 @@ class JackLoopbackDriver : public JackAudioDriver
public:
JackLoopbackDriver(JackEngineInterface* engine, JackSynchro* table)
JackLoopbackDriver(JackLockedEngine* engine, JackSynchro* table)
: JackAudioDriver("loopback", "", engine, table)
{}
virtual ~JackLoopbackDriver()
......
......@@ -32,7 +32,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
namespace Jack
{
JackNetDriver::JackNetDriver ( const char* name, const char* alias, JackEngineInterface* engine, JackSynchro* table,
JackNetDriver::JackNetDriver ( const char* name, const char* alias, JackLockedEngine* engine, JackSynchro* table,
char* ip, size_t port, int midi_input_ports, int midi_output_ports, char* net_name )
: JackAudioDriver ( name, alias, engine, table )
{
......@@ -632,7 +632,7 @@ namespace Jack
return desc;
}
Jack::JackDriverClientInterface* driver_initialize ( Jack::JackEngineInterface* engine, Jack::JackSynchro* table, const JSList* params )
Jack::JackDriverClientInterface* driver_initialize ( Jack::JackLockedEngine* engine, Jack::JackSynchro* table, const JSList* params )
{
char* multicast_ip = DEFAULT_MULTICAST_IP;
char name[JACK_CLIENT_NAME_SIZE];
......
......@@ -75,7 +75,7 @@ namespace Jack
int Read();
int Write();
public:
JackNetDriver ( const char* name, const char* alias, JackEngineInterface* engine, JackSynchro* table,
JackNetDriver ( const char* name, const char* alias, JackLockedEngine* engine, JackSynchro* table,
char* ip, size_t port, int midi_input_ports, int midi_output_ports, char* master_name );
~JackNetDriver();
......
......@@ -291,7 +291,7 @@ int JackServer::SetTimebaseCallback(int refnum, int conditional)
return fEngineControl->fTransport.SetTimebase(refnum, conditional);
}
JackEngineInterface* JackServer::GetEngine()
JackLockedEngine* JackServer::GetEngine()
{
return fEngine;
}
......
......@@ -39,7 +39,7 @@ namespace Jack
class JackGraphManager;
class JackDriverClientInterface;
struct JackEngineControl;
class JackEngineInterface;
class JackLockedEngine;
/*!
\brief The Jack server.
......@@ -54,7 +54,7 @@ class EXPORT JackServer
JackDriverClientInterface* fAudioDriver;
JackDriverClientInterface* fFreewheelDriver;
JackDriverClientInterface* fLoopbackDriver;
JackEngineInterface* fEngine;
JackLockedEngine* fEngine;
JackEngineControl* fEngineControl;
JackGraphManager* fGraphManager;
JackServerChannel fChannel;
......@@ -88,7 +88,7 @@ class EXPORT JackServer
int SetTimebaseCallback(int refnum, int conditional);
// Object access
JackEngineInterface* GetEngine();
JackLockedEngine* GetEngine();
JackEngineControl* GetEngineControl();
JackSynchro* GetSynchroTable();
JackGraphManager* GetGraphManager();
......
......@@ -34,7 +34,7 @@ This program is free software; you can redistribute it and/or modify
#include "JackServerLaunch.h"
#include "JackTools.h"
#include "JackExports.h"
#include "JackEngine.h"
#include "JackLockedEngine.h"
#ifdef __cplusplus
extern "C"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment