JackDriverLoader.h

00001 /*
00002 Copyright (C) 2001-2005 Paul Davis
00003 Copyright (C) 2004-2006 Grame  
00004 
00005 This program is free software; you can redistribute it and/or modify
00006 it under the terms of the GNU General Public License as published by
00007 the Free Software Foundation; either version 2 of the License, or
00008 (at your option) any later version.
00009 
00010 This program is distributed in the hope that it will be useful,
00011 but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 GNU General Public License for more details.
00014 
00015 You should have received a copy of the GNU General Public License
00016 along with this program; if not, write to the Free Software
00017 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00018 
00019 */
00020 
00021 #ifndef __JackDriverLoader__
00022 #define __JackDriverLoader__
00023 
00024 #include "jslist.h"
00025 #include "driver_interface.h"
00026 #include "JackDriver.h"
00027 
00028 
00029 #ifdef WIN32
00030 
00031 #include <windows.h>
00032 #define DRIVER_HANDLE HINSTANCE
00033 #define LoadDriverModule(name) LoadLibrary((name))
00034 #define UnloadDriverModule(handle) (FreeLibrary(((HMODULE)handle)))
00035 #define GetProc(handle, name) GetProcAddress(((HMODULE)handle),(name))
00036 
00037 #else
00038 
00039 #include <dlfcn.h>
00040 #define DRIVER_HANDLE void*
00041 #define LoadDriverModule(name) dlopen((name), RTLD_NOW | RTLD_GLOBAL)
00042 #define UnloadDriverModule(handle) dlclose((handle))
00043 #define GetProc(handle, name) dlsym((handle), (name))
00044 
00045 #endif
00046 
00047 typedef jack_driver_desc_t * (*JackDriverDescFunction) ();
00048 typedef Jack::JackDriverClientInterface* (*initialize) (Jack::JackEngine*, Jack::JackSynchro**, const JSList *);
00049 
00050 typedef struct _jack_driver_info
00051 {
00052     Jack::JackDriverClientInterface* (*initialize)(Jack::JackEngine*, Jack::JackSynchro**, const JSList *);
00053     DRIVER_HANDLE handle;
00054 }
00055 jack_driver_info_t;
00056 
00057 EXPORT jack_driver_desc_t * jack_find_driver_descriptor (JSList * drivers, const char * name);
00058 
00059 jack_driver_desc_t * jack_drivers_get_descriptor (JSList * drivers, const char * sofile);
00060 
00061 EXPORT JSList * jack_drivers_load (JSList * drivers);
00062 
00063 jack_driver_info_t * jack_load_driver (jack_driver_desc_t * driver_desc);
00064 
00065 #endif
00066 

Generated on Wed Jan 10 11:42:45 2007 for Jackdmp by  doxygen 1.4.5