1 /*
2     MPEG Maaate: An Australian MPEG audio analysis toolkit
3     Copyright (C) 2000 Commonwealth Scientific and Industrial Research Organisation
4     (CSIRO), Australia.
5 
6     This program is free software; you can redistribute it and/or modify
7     it under the terms of the GNU General Public License as published by
8     the Free Software Foundation; either version 2 of the License, or
9     (at your option) any later version.
10 
11     This program is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14     GNU General Public License for more details.
15 
16     You should have received a copy of the GNU General Public License
17     along with this program; if not, write to the Free Software
18     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 */
20 
21 #include <cmath>
22 #include "plugins.H"
23 
24 CSAPI_TIER2 Plugins *
maaateA_new_plugins()25 maaateA_new_plugins()
26 {
27   return new Plugins();
28 }
29 
30 CSAPI_TIER2 void
maaateA_delete_plugins(Plugins * plugin)31 maaateA_delete_plugins(Plugins * plugin)
32 {
33   delete plugin;
34 }
35 
36 CSAPI_TIER2 void
maaateA_add_libraries_maaate_path(Plugins * plugin)37 maaateA_add_libraries_maaate_path (Plugins * plugin)
38 {
39   plugin->AddLibrariesMaaatePath ();
40 }
41 
42 CSAPI_TIER2 void
maaateA_add_static_modules(Plugins * plugin)43 maaateA_add_static_modules(Plugins * plugin)
44 {
45   plugin->AddStaticModules();
46 }
47 
48 CSAPI_TIER2 int
maaateA_add_library(Plugins * plugin,char * filename)49 maaateA_add_library(Plugins * plugin, char * filename)
50 {
51   return plugin->AddLibrary(string(filename));
52 }
53 
54 CSAPI_TIER2 void
maaateA_add_libraries(Plugins * plugin,char * dirname)55 maaateA_add_libraries(Plugins * plugin, char * dirname)
56 {
57   plugin->AddLibraries(string(dirname));
58 }
59 
60 CSAPI_TIER2 void
maaateA_add_libraries_path(Plugins * plugin,char * pathlist)61 maaateA_add_libraries_path(Plugins * plugin, char * pathlist)
62 {
63   plugin->AddLibrariesPath(string(pathlist));
64 }
65 
66 CSAPI_TIER2 void
maaateA_add_module(Plugins * plugin,Module * module)67 maaateA_add_module(Plugins * plugin, Module * module)
68 {
69   plugin->AddModule(module);
70 }
71 
72 CSAPI_TIER2 void
maaateA_remove_library(Plugins * plugin,char * name)73 maaateA_remove_library(Plugins * plugin, char * name)
74 {
75   plugin->RemoveLibrary(string(name));
76 }
77 
78 CSAPI_TIER2 void
maaateA_remove_module(Plugins * plugin,Module * module)79 maaateA_remove_module(Plugins * plugin, Module * module)
80 {
81   plugin->RemoveModule(module);
82 }
83 
84 CSAPI_TIER2 ModuleList *
maaateA_modules(Plugins * plugin)85 maaateA_modules(Plugins * plugin)
86 {
87   return plugin->Modules();
88 }
89 
90 CSAPI_TIER2 Module *
maaateA_get_module(Plugins * plugin,char * name)91 maaateA_get_module(Plugins * plugin, char * name)
92 {
93   return plugin->GetModule(string(name));
94 }
95 
96 CSAPI_TIER2 ModuleList *
maaateA_library_modules(Plugins * plugin,char * name)97 maaateA_library_modules(Plugins * plugin, char * name)
98 {
99   return plugin->LibraryModules(string(name));
100 }
101 
102