00001 #ifdef WIN32 00002 #include <windows.h> 00003 #undef GetClassName 00004 #else 00005 #include <dlfcn.h> 00006 #endif 00007 #include <dirent.h> 00008 #include <iostream> 00009 #include "RunTimeLibraryLoader.hxx" 00010 00011 class RunTimeProcessingLibraryLoader : public RunTimeLibraryLoader 00012 { 00013 00014 protected: 00015 00016 const bool needReleaseHandlerOnReload() const { return true; } 00017 const char ** standardPaths() const 00018 { 00019 static const char * result[] = 00020 { 00021 "/usr/local/lib/clam", 00022 "/usr/lib/clam", 00023 "/opt/lib/clam", 00024 "c:/Program Files/CLAM/NetworkEditor/lib/clam", 00025 0 00026 }; 00027 return result; 00028 } 00029 00030 const char * homePath() const { return "/.clam/plugins"; } 00031 const char * pathEnvironmentVar() const { return "CLAM_PLUGIN_PATH"; } 00032 const char * libraryType() const { return "CLAM"; } 00033 }; 00034 00035 class AutomaticRunTimeProcessingLibraryLoader 00036 { 00037 public: 00038 AutomaticRunTimeProcessingLibraryLoader() 00039 { 00040 RunTimeProcessingLibraryLoader loader; 00041 loader.Load(); 00042 } 00043 }; 00044 00045 static AutomaticRunTimeProcessingLibraryLoader dllLoader; 00046