4 * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
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.
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.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 #include "arraylist.h"
27 #include "filexml.inc"
28 #include "keyframe.inc"
31 // Front end for a DB of presets for all plugins
34 class PresetsDBKeyframe
37 PresetsDBKeyframe(const char *title);
40 void set_data(char *data);
46 // Presets for a single plugin
50 PresetsDBPlugin(const char *title);
54 void load(FileXML *file);
55 void save(FileXML *file);
57 // Get a preset by name
58 PresetsDBKeyframe* get_keyframe(const char *title);
59 // Create a new keyframe
60 PresetsDBKeyframe* new_keyframe(const char *title);
61 void delete_keyframe(const char *title);
62 // Load a preset into the keyframe
63 void load_preset(const char *preset_title, KeyFrame *keyframe);
64 int preset_exists(const char *preset_title);
66 ArrayList<PresetsDBKeyframe*> keyframes;
75 // Load the database from the file.
77 // Save the database to the file.
80 // Get the total number of presets for a plugin
81 int get_total_presets(char *plugin_title);
82 // Get the title of a preset
83 char* get_preset_title(char *plugin_title, int number);
84 // Get the data for a preset
85 char* get_preset_data(char *plugin_title, int number);
86 // Get a pluginDB by name
87 PresetsDBPlugin* get_plugin(const char *plugin_title);
89 PresetsDBPlugin* new_plugin(const char *plugin_title);
90 void save_preset(const char *plugin_title, const char *preset_title, char *data);
91 void delete_preset(const char *plugin_title, const char *preset_title);
92 // Load a preset into the keyframe
93 void load_preset(const char *plugin_title, const char *preset_title, KeyFrame *keyframe);
94 int preset_exists(const char *plugin_title, const char *preset_title);
97 // Remove all plugin data
100 ArrayList<PresetsDBPlugin*> plugins;