diff --git a/common/JackDriverInfo.h b/common/JackDriverInfo.h new file mode 100644 index 00000000..42b084f9 --- /dev/null +++ b/common/JackDriverInfo.h @@ -0,0 +1,57 @@ +/* +Copyright (C) 2001-2005 Paul Davis +Copyright (C) 2004-2008 Grame + +This program is free software; you can redistribute it and/or modify +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. + +*/ + +#ifndef __JackDriverInfo__ +#define __JackDriverInfo__ + +#include "driver_interface.h" +//#include "JackControlAPI.h" +//#include "JackPlatformPlug.h" +#include "JackDriver.h" +#include "JackSystemDeps.h" + +typedef Jack::JackDriverClientInterface* (*driverInitialize) (Jack::JackLockedEngine*, Jack::JackSynchro*, const JSList*); + +class SERVER_EXPORT JackDriverInfo +{ + + private: + + driverInitialize fInitialize; + DRIVER_HANDLE fHandle; + Jack::JackDriverClientInterface* fBackend; + + public: + + JackDriverInfo():fInitialize(NULL),fHandle(NULL),fBackend(NULL) + {} + ~JackDriverInfo(); + + Jack::JackDriverClientInterface* Open(jack_driver_desc_t* driver_desc, Jack::JackLockedEngine*, Jack::JackSynchro*, const JSList*); + + Jack::JackDriverClientInterface* GetBackend() + { + return fBackend; + } + +}; + +#endif + diff --git a/common/JackDriverLoader.cpp b/common/JackDriverLoader.cpp index f7de89ee..034c1426 100644 --- a/common/JackDriverLoader.cpp +++ b/common/JackDriverLoader.cpp @@ -20,6 +20,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #include "JackSystemDeps.h" #include "JackDriverLoader.h" +#include "JackDriverInfo.h" #include "JackConstants.h" #include "JackError.h" #include diff --git a/common/JackDriverLoader.h b/common/JackDriverLoader.h index dc8cc701..0adde288 100644 --- a/common/JackDriverLoader.h +++ b/common/JackDriverLoader.h @@ -24,38 +24,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #include "driver_interface.h" #include "JackControlAPI.h" #include "JackPlatformPlug.h" -#include "JackDriver.h" -#include "JackSystemDeps.h" - -typedef jack_driver_desc_t* (*JackDriverDescFunction) (); -typedef Jack::JackDriverClientInterface* (*driverInitialize) (Jack::JackLockedEngine*, Jack::JackSynchro*, const JSList*); - -class SERVER_EXPORT JackDriverInfo -{ - - private: - - driverInitialize fInitialize; - DRIVER_HANDLE fHandle; - Jack::JackDriverClientInterface* fBackend; - - public: - - JackDriverInfo():fInitialize(NULL),fHandle(NULL),fBackend(NULL) - {} - ~JackDriverInfo(); - - Jack::JackDriverClientInterface* Open(jack_driver_desc_t* driver_desc, Jack::JackLockedEngine*, Jack::JackSynchro*, const JSList*); - - Jack::JackDriverClientInterface* GetBackend() - { - return fBackend; - } - -}; +//#include "JackDriver.h" +//#include "JackSystemDeps.h" jack_driver_desc_t* jack_find_driver_descriptor(JSList* drivers, const char* name); - JSList* jack_drivers_load(JSList* drivers); JSList* jack_internals_load(JSList* internals); diff --git a/common/JackInternalClient.h b/common/JackInternalClient.h index 19885c8b..d8479271 100644 --- a/common/JackInternalClient.h +++ b/common/JackInternalClient.h @@ -63,7 +63,6 @@ class JackInternalClient : public JackClient typedef int (*InitializeCallback)(jack_client_t*, const char*); typedef int (*InternalInitializeCallback)(jack_client_t*, const JSList* params); typedef void (*FinishCallback)(void *); -typedef jack_driver_desc_t * (*JackDriverDescFunction) (); class JackLoadableInternalClient : public JackInternalClient { @@ -92,7 +91,7 @@ class JackLoadableInternalClient1 : public JackLoadableInternalClient InitializeCallback fInitialize; char fObjectData[JACK_LOAD_INIT_LIMIT]; - + public: JackLoadableInternalClient1(JackServer* server, JackSynchro* table, const char* object_data); @@ -111,7 +110,7 @@ class JackLoadableInternalClient2 : public JackLoadableInternalClient InternalInitializeCallback fInitialize; const JSList* fParameters; - + public: JackLoadableInternalClient2(JackServer* server, JackSynchro* table, const JSList* parameters); diff --git a/common/JackServer.h b/common/JackServer.h index bdbd8ea8..04032721 100644 --- a/common/JackServer.h +++ b/common/JackServer.h @@ -24,6 +24,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #include "JackCompilerDeps.h" #include "driver_interface.h" #include "JackDriverLoader.h" +#include "JackDriverInfo.h" #include "JackConnectionManager.h" #include "JackGlobals.h" #include "JackPlatformPlug.h" diff --git a/common/driver_interface.h b/common/driver_interface.h index b67a2546..0ea06214 100644 --- a/common/driver_interface.h +++ b/common/driver_interface.h @@ -146,6 +146,8 @@ jack_driver_descriptor_add_parameter( const char * short_desc, /* A short (~30 chars) description for the user */ const char * long_desc); /* A longer description for the user, if NULL short_desc will be used */ +typedef jack_driver_desc_t * (*JackDriverDescFunction) (); + #ifdef __cplusplus } #endif