2 * Copyright (C) 2006 Stefan Kost <ensonic@users.sf.net>
4 * gstpreset.h: helper interface header for element presets
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library 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 GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library; if not, write to the
18 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
22 #ifndef __GST_PRESET_H__
23 #define __GST_PRESET_H__
25 #include <glib-object.h>
26 #include <gst/gstconfig.h>
30 #define GST_TYPE_PRESET (gst_preset_get_type())
31 #define GST_PRESET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PRESET, GstPreset))
32 #define GST_IS_PRESET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PRESET))
33 #define GST_PRESET_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GST_TYPE_PRESET, GstPresetInterface))
38 * Opaque #GstPreset data structure.
40 typedef struct _GstPreset GstPreset; /* dummy object */
41 typedef struct _GstPresetInterface GstPresetInterface;
45 * @parent: parent interface type.
46 * @get_preset_names: virtual method to get list of presets
47 * @get_property_names: virtual methods to get properties that are persistent
48 * @load_preset: virtual methods to load a preset into properties
49 * @save_preset: virtual methods to save properties into a preset
50 * @rename_preset: virtual methods to rename a preset
51 * @delete_preset: virtual methods to remove a preset
52 * @set_meta: virtual methods to set textual meta data to a preset
53 * @get_meta: virtual methods to get textual meta data from a preset
55 * #GstPreset interface.
57 struct _GstPresetInterface
59 GTypeInterface parent;
62 gchar** (*get_preset_names) (GstPreset *preset);
64 gchar** (*get_property_names) (GstPreset *preset);
66 gboolean (*load_preset) (GstPreset *preset, const gchar *name);
67 gboolean (*save_preset) (GstPreset *preset, const gchar *name);
68 gboolean (*rename_preset) (GstPreset *preset, const gchar *old_name,
69 const gchar *new_name);
70 gboolean (*delete_preset) (GstPreset *preset, const gchar *name);
72 gboolean (*set_meta) (GstPreset *preset, const gchar *name,
73 const gchar *tag, const gchar *value);
74 gboolean (*get_meta) (GstPreset *preset, const gchar *name,
75 const gchar *tag, gchar **value);
77 gpointer _gst_reserved[GST_PADDING];
80 GType gst_preset_get_type(void);
82 gchar** gst_preset_get_preset_names (GstPreset *preset) G_GNUC_MALLOC;
84 gchar** gst_preset_get_property_names (GstPreset *preset) G_GNUC_MALLOC;
86 gboolean gst_preset_load_preset (GstPreset *preset, const gchar *name);
87 gboolean gst_preset_save_preset (GstPreset *preset, const gchar *name);
88 gboolean gst_preset_rename_preset (GstPreset *preset, const gchar *old_name,
89 const gchar *new_name);
90 gboolean gst_preset_delete_preset (GstPreset *preset, const gchar *name);
92 gboolean gst_preset_set_meta (GstPreset *preset, const gchar *name,
93 const gchar *tag, const gchar *value);
94 gboolean gst_preset_get_meta (GstPreset *preset, const gchar *name,
95 const gchar *tag, gchar **value);
97 gboolean gst_preset_set_app_dir (const gchar *app_dir);
98 const gchar *gst_preset_get_app_dir (void);
102 #endif /* __GST_PRESET_H__ */