1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version, with
8  * some exceptions, please read the COPYING file.
9  *
10  * gtkD is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with gtkD; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18  */
19  
20 // generated automatically - do not change
21 // find conversion definition on APILookup.txt
22 // implement new conversion functionalities on the wrap.utils pakage
23 
24 /*
25  * Conversion parameters:
26  * inFile  = GstPreset.html
27  * outPack = gstreamer
28  * outFile = PresetIF
29  * strct   = GstPreset
30  * realStrct=
31  * ctorStrct=
32  * clss    = PresetT
33  * interf  = PresetIF
34  * class Code: No
35  * interface Code: No
36  * template for:
37  * extend  = 
38  * implements:
39  * prefixes:
40  * 	- gst_preset_
41  * omit structs:
42  * omit prefixes:
43  * omit code:
44  * omit signals:
45  * imports:
46  * 	- glib.Str
47  * structWrap:
48  * module aliases:
49  * local aliases:
50  * overrides:
51  */
52 
53 module gstreamer.PresetIF;
54 
55 public  import gstreamerc.gstreamertypes;
56 
57 private import gstreamerc.gstreamer;
58 private import glib.ConstructionException;
59 private import gobject.ObjectG;
60 
61 
62 private import glib.Str;
63 
64 
65 
66 
67 /**
68  * This interface offers methods to query and manipulate parameter preset sets.
69  * A preset is a bunch of property settings, together with meta data and a name.
70  * The name of a preset serves as key for subsequent method calls to manipulate
71  * single presets.
72  * All instances of one type will share the list of presets. The list is created
73  * on demand, if presets are not used, the list is not created.
74  *
75  * The interface comes with a default implementation that serves most plugins.
76  * Wrapper plugins will override most methods to implement support for the
77  * native preset format of those wrapped plugins.
78  * One method that is useful to be overridden is gst_preset_get_property_names().
79  * With that one can control which properties are saved and in which order.
80  *
81  * The default implementation supports presets located in a system directory,
82  * application specific directory and in the users home directory. When getting
83  * a list of presets individual presets are read and overlaid in 1) system,
84  * 2) application and 3) user order. Whenever an earlier entry is newer, the
85  * later entries will be updated.
86  */
87 public interface PresetIF
88 {
89 	
90 	
91 	public GstPreset* getPresetTStruct();
92 	
93 	/** the main Gtk struct as a void* */
94 	protected void* getStruct();
95 	
96 	
97 	/**
98 	 */
99 	
100 	/**
101 	 * Get a copy of preset names as a NULL terminated string array.
102 	 * Returns: list with names, ue g_strfreev() after usage. [transfer full][array zero-terminated=1][element-type gchar*]
103 	 */
104 	public string[] getPresetNames();
105 	
106 	/**
107 	 * Get a the names of the GObject properties that can be used for presets.
108 	 * Returns: an array of property names which should be freed with g_strfreev() after use. [transfer full][array zero-terminated=1][element-type gchar*]
109 	 */
110 	public string[] getPropertyNames();
111 	
112 	/**
113 	 * Load the given preset.
114 	 * Params:
115 	 * name = preset name to load
116 	 * Returns: TRUE for success, FALSE if e.g. there is no preset with that name
117 	 */
118 	public int loadPreset(string name);
119 	
120 	/**
121 	 * Save the current object settings as a preset under the given name. If there
122 	 * is already a preset by this name it will be overwritten.
123 	 * Params:
124 	 * name = preset name to save
125 	 * Returns: TRUE for success, FALSE
126 	 */
127 	public int savePreset(string name);
128 	
129 	/**
130 	 * Renames a preset. If there is already a preset by the new_name it will be
131 	 * overwritten.
132 	 * Params:
133 	 * oldName = current preset name
134 	 * newName = new preset name
135 	 * Returns: TRUE for success, FALSE if e.g. there is no preset with old_name
136 	 */
137 	public int renamePreset(string oldName, string newName);
138 	
139 	/**
140 	 * Delete the given preset.
141 	 * Params:
142 	 * name = preset name to remove
143 	 * Returns: TRUE for success, FALSE if e.g. there is no preset with that name
144 	 */
145 	public int deletePreset(string name);
146 	
147 	/**
148 	 * Sets a new value for an existing meta data item or adds a new item. Meta
149 	 * data tag names can be something like e.g. "comment". Supplying NULL for the
150 	 * value will unset an existing value.
151 	 * Params:
152 	 * name = preset name
153 	 * tag = meta data item name
154 	 * value = new value
155 	 * Returns: TRUE for success, FALSE if e.g. there is no preset with that name
156 	 */
157 	public int setMeta(string name, string tag, string value);
158 	
159 	/**
160 	 * Gets the value for an existing meta data tag. Meta data tag names can be
161 	 * something like e.g. "comment". Returned values need to be released when done.
162 	 * Params:
163 	 * name = preset name
164 	 * tag = meta data item name
165 	 * value = value. [out callee-allocates]
166 	 * Returns: TRUE for success, FALSE if e.g. there is no preset with that name or no value for the given tag
167 	 */
168 	public int getMeta(string name, string tag, out string value);
169 	
170 	/**
171 	 * Sets an extra directory as an absolute path that should be considered when
172 	 * looking for presets. Any presets in the application dir will shadow the
173 	 * system presets.
174 	 * Params:
175 	 * appDir = the application specific preset dir
176 	 * Returns: TRUE for success, FALSE if the dir already has been set
177 	 */
178 	public static int setAppDir(string appDir);
179 	
180 	/**
181 	 * Gets the directory for application specific presets if set by the
182 	 * application.
183 	 * Returns: the directory or NULL, don't free or modify the string
184 	 */
185 	public static string getAppDir();
186 }