gstreamer_core/gst/gstpreset.h
branchRCL_3
changeset 30 7e817e7e631c
parent 29 567bb019e3e3
equal deleted inserted replaced
29:567bb019e3e3 30:7e817e7e631c
     1 /* GStreamer
       
     2  * Copyright (C) 2006 Stefan Kost <ensonic@users.sf.net>
       
     3  *
       
     4  * gstpreset.h: helper interface header for element presets
       
     5  *
       
     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.
       
    10  *
       
    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.
       
    15  *
       
    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.
       
    20  */
       
    21 
       
    22 #ifndef __GST_PRESET_H__
       
    23 #define __GST_PRESET_H__
       
    24 
       
    25 #include <glib-object.h>
       
    26 #include <gst/gst.h>
       
    27 
       
    28 G_BEGIN_DECLS
       
    29 
       
    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))
       
    34 
       
    35 /**
       
    36  * GstPreset:
       
    37  *
       
    38  * Opaque #GstPreset data structure.
       
    39  */
       
    40 typedef struct _GstPreset GstPreset; /* dummy object */
       
    41 typedef struct _GstPresetInterface GstPresetInterface;
       
    42 
       
    43 /**
       
    44  * 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
       
    54  *
       
    55  * #GstPreset interface.
       
    56  */
       
    57 struct _GstPresetInterface
       
    58 {
       
    59   GTypeInterface parent;
       
    60 
       
    61   /* methods */
       
    62   gchar**      (*get_preset_names)    (GstPreset *preset);
       
    63 
       
    64   gchar**      (*get_property_names)  (GstPreset *preset);
       
    65 
       
    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);
       
    71   
       
    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);
       
    76   /*< private >*/
       
    77   gpointer _gst_reserved[GST_PADDING];
       
    78 };
       
    79 #ifdef __SYMBIAN32__
       
    80 IMPORT_C
       
    81 #endif
       
    82 
       
    83 
       
    84 GType gst_preset_get_type(void);
       
    85 #ifdef __SYMBIAN32__
       
    86 IMPORT_C
       
    87 #endif
       
    88 
       
    89 
       
    90 gchar**      gst_preset_get_preset_names   (GstPreset *preset);
       
    91 #ifdef __SYMBIAN32__
       
    92 IMPORT_C
       
    93 #endif
       
    94 
       
    95 
       
    96 gchar**      gst_preset_get_property_names (GstPreset *preset);
       
    97 #ifdef __SYMBIAN32__
       
    98 IMPORT_C
       
    99 #endif
       
   100 
       
   101 
       
   102 gboolean     gst_preset_load_preset        (GstPreset *preset, const gchar *name);
       
   103 #ifdef __SYMBIAN32__
       
   104 IMPORT_C
       
   105 #endif
       
   106 
       
   107 gboolean     gst_preset_save_preset        (GstPreset *preset, const gchar *name);
       
   108 #ifdef __SYMBIAN32__
       
   109 IMPORT_C
       
   110 #endif
       
   111 
       
   112 gboolean     gst_preset_rename_preset      (GstPreset *preset, const gchar *old_name,
       
   113                                             const gchar *new_name);
       
   114 #ifdef __SYMBIAN32__
       
   115 IMPORT_C
       
   116 #endif
       
   117 
       
   118 gboolean     gst_preset_delete_preset      (GstPreset *preset, const gchar *name);
       
   119 #ifdef __SYMBIAN32__
       
   120 IMPORT_C
       
   121 #endif
       
   122 
       
   123 
       
   124 gboolean     gst_preset_set_meta           (GstPreset *preset, const gchar *name,
       
   125                                             const gchar *tag, const gchar *value);
       
   126 #ifdef __SYMBIAN32__
       
   127 IMPORT_C
       
   128 #endif
       
   129 
       
   130 gboolean     gst_preset_get_meta           (GstPreset *preset, const gchar *name,
       
   131                                             const gchar *tag, gchar **value);
       
   132 
       
   133 G_END_DECLS
       
   134 
       
   135 #endif /* __GST_PRESET_H__ */