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 private import glib.Str;
62 
63 
64 
65 /**
66  * This interface offers methods to query and manipulate parameter preset sets.
67  * A preset is a bunch of property settings, together with meta data and a name.
68  * The name of a preset serves as key for subsequent method calls to manipulate
69  * single presets.
70  * All instances of one type will share the list of presets. The list is created
71  * on demand, if presets are not used, the list is not created.
72  *
73  * The interface comes with a default implementation that serves most plugins.
74  * Wrapper plugins will override most methods to implement support for the
75  * native preset format of those wrapped plugins.
76  * One method that is useful to be overridden is gst_preset_get_property_names().
77  * With that one can control which properties are saved and in which order.
78  *
79  * The default implementation supports presets located in a system directory,
80  * application specific directory and in the users home directory. When getting
81  * a list of presets individual presets are read and overlaid in 1) system,
82  * 2) application and 3) user order. Whenever an earlier entry is newer, the
83  * later entries will be updated.
84  */
85 public interface PresetIF
86 {
87 	
88 	
89 	/** Get the main Gtk struct */
90 	public GstPreset* getPresetTStruct();
91 	
92 	/** the main Gtk struct as a void* */
93 	protected void* getStruct();
94 	
95 	
96 	/**
97 	 */
98 	
99 	/**
100 	 * Get a copy of preset names as a NULL terminated string array.
101 	 * Returns: list with names, ue g_strfreev() after usage. [transfer full][array zero-terminated=1][element-type gchar*]
102 	 */
103 	public string[] getPresetNames();
104 	
105 	/**
106 	 * Get a the names of the GObject properties that can be used for presets.
107 	 * Returns: an array of property names which should be freed with g_strfreev() after use. [transfer full][array zero-terminated=1][element-type gchar*]
108 	 */
109 	public string[] getPropertyNames();
110 	
111 	/**
112 	 * Load the given preset.
113 	 * Params:
114 	 * name = preset name to load
115 	 * Returns: TRUE for success, FALSE if e.g. there is no preset with that name
116 	 */
117 	public int loadPreset(string name);
118 	
119 	/**
120 	 * Save the current object settings as a preset under the given name. If there
121 	 * is already a preset by this name it will be overwritten.
122 	 * Params:
123 	 * name = preset name to save
124 	 * Returns: TRUE for success, FALSE
125 	 */
126 	public int savePreset(string name);
127 	
128 	/**
129 	 * Renames a preset. If there is already a preset by the new_name it will be
130 	 * overwritten.
131 	 * Params:
132 	 * oldName = current preset name
133 	 * newName = new preset name
134 	 * Returns: TRUE for success, FALSE if e.g. there is no preset with old_name
135 	 */
136 	public int renamePreset(string oldName, string newName);
137 	
138 	/**
139 	 * Delete the given preset.
140 	 * Params:
141 	 * name = preset name to remove
142 	 * Returns: TRUE for success, FALSE if e.g. there is no preset with that name
143 	 */
144 	public int deletePreset(string name);
145 	
146 	/**
147 	 * Sets a new value for an existing meta data item or adds a new item. Meta
148 	 * data tag names can be something like e.g. "comment". Supplying NULL for the
149 	 * value will unset an existing value.
150 	 * Params:
151 	 * name = preset name
152 	 * tag = meta data item name
153 	 * value = new value
154 	 * Returns: TRUE for success, FALSE if e.g. there is no preset with that name
155 	 */
156 	public int setMeta(string name, string tag, string value);
157 	
158 	/**
159 	 * Gets the value for an existing meta data tag. Meta data tag names can be
160 	 * something like e.g. "comment". Returned values need to be released when done.
161 	 * Params:
162 	 * name = preset name
163 	 * tag = meta data item name
164 	 * value = value. [out callee-allocates]
165 	 * Returns: TRUE for success, FALSE if e.g. there is no preset with that name or no value for the given tag
166 	 */
167 	public int getMeta(string name, string tag, out string value);
168 	
169 	/**
170 	 * Sets an extra directory as an absolute path that should be considered when
171 	 * looking for presets. Any presets in the application dir will shadow the
172 	 * system presets.
173 	 * Params:
174 	 * appDir = the application specific preset dir
175 	 * Returns: TRUE for success, FALSE if the dir already has been set
176 	 */
177 	public static int setAppDir(string appDir);
178 	
179 	/**
180 	 * Gets the directory for application specific presets if set by the
181 	 * application.
182 	 * Returns: the directory or NULL, don't free or modify the string
183 	 */
184 	public static string getAppDir();
185 }