JackDriverLoader.h

00001 /*
00002 Copyright (C) 2001-2005 Paul Davis
00003 Copyright (C) 2004-2008 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 #ifdef WIN32
00029 
00030 #include <windows.h>
00031 #define DRIVER_HANDLE HINSTANCE
00032 #define LoadDriverModule(name) LoadLibrary((name))
00033 #define UnloadDriverModule(handle) (FreeLibrary(((HMODULE)handle)))
00034 #define GetProc(handle, name) GetProcAddress(((HMODULE)handle),(name))
00035 
00036 #else
00037 
00038 #include <dlfcn.h>
00039 #define DRIVER_HANDLE void*
00040 #define LoadDriverModule(name) dlopen((name), RTLD_NOW | RTLD_GLOBAL)
00041 #define UnloadDriverModule(handle) dlclose((handle))
00042 #define GetProc(handle, name) dlsym((handle), (name))
00043 
00044 #endif
00045 
00046 typedef jack_driver_desc_t * (*JackDriverDescFunction) ();
00047 typedef Jack::JackDriverClientInterface* (*initialize) (Jack::JackEngine*, Jack::JackSynchro**, const JSList *);
00048 
00049 typedef struct _jack_driver_info
00050 {
00051     Jack::JackDriverClientInterface* (*initialize)(Jack::JackEngine*, Jack::JackSynchro**, const JSList *);
00052     DRIVER_HANDLE handle;
00053 }
00054 jack_driver_info_t;
00055 
00056 EXPORT jack_driver_desc_t * jack_find_driver_descriptor (JSList * drivers, const char * name);
00057 
00058 jack_driver_desc_t * jack_drivers_get_descriptor (JSList * drivers, const char * sofile);
00059 
00060 EXPORT JSList * jack_drivers_load (JSList * drivers);
00061 
00062 jack_driver_info_t * jack_load_driver (jack_driver_desc_t * driver_desc);
00063 
00064 #endif
00065 

Generated on Thu Feb 14 11:16:01 2008 for Jackdmp by  doxygen 1.5.1