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., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
22 #ifndef __GST_PRESET_H__
23 #define __GST_PRESET_H__
25 #include <glib-object.h>
27 #include <gst/controller/gstcontroller.h>
31 #define GST_TYPE_PRESET (gst_preset_get_type())
32 #define GST_PRESET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PRESET, GstPreset))
33 #define GST_IS_PRESET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PRESET))
34 #define GST_PRESET_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GST_TYPE_PRESET, GstPresetInterface))
37 typedef struct _GstPreset GstPreset; /* dummy object */
38 typedef struct _GstPresetInterface GstPresetInterface;
40 struct _GstPresetInterface
42 GTypeInterface parent;
44 GList* (*get_preset_names) (GstPreset *self);
46 gboolean (*load_preset) (GstPreset *self, const gchar *name);
47 gboolean (*save_preset) (GstPreset *self, const gchar *name);
48 gboolean (*rename_preset) (GstPreset *self, const gchar *old_name, const gchar *new_name);
49 gboolean (*delete_preset) (GstPreset *self, const gchar *name);
51 gboolean (*set_meta) (GstPreset *self,const gchar *name, const gchar *tag, gchar *value);
52 gboolean (*get_meta) (GstPreset *self,const gchar *name, const gchar *tag, gchar **value);
54 void (*create_preset) (GstPreset *self);
58 * need a presets-changed signal, to notify of changes in preset list
60 * need a way to sync class instances, we want to keep only one list for all
61 * instances of a type and if the list changes, we trigger the signal for all
66 gpointer _gst_reserved[GST_PADDING];
69 GType gst_preset_get_type(void);
71 GList* gst_preset_get_preset_names (GstPreset *self);
73 gboolean gst_preset_load_preset (GstPreset *self, const gchar *name);
74 gboolean gst_preset_save_preset (GstPreset *self, const gchar *name);
75 gboolean gst_preset_rename_preset (GstPreset *self, const gchar *old_name, const gchar *new_name);
76 gboolean gst_preset_delete_preset (GstPreset *self, const gchar *name);
78 gboolean gst_preset_set_meta (GstPreset *self,const gchar *name, const gchar *tag, gchar *value);
79 gboolean gst_preset_get_meta (GstPreset *self,const gchar *name, const gchar *tag, gchar **value);
81 void gst_preset_create_preset (GstPreset *self);
85 #endif /* __GST_PRESET_H__ */