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  = GstPluginFeature.html
27  * outPack = gstreamer
28  * outFile = PluginFeature
29  * strct   = GstPluginFeature
30  * realStrct=
31  * ctorStrct=
32  * clss    = PluginFeature
33  * interf  = 
34  * class Code: No
35  * interface Code: No
36  * template for:
37  * extend  = 
38  * implements:
39  * prefixes:
40  * 	- gst_plugin_feature_
41  * 	- gst_
42  * omit structs:
43  * omit prefixes:
44  * omit code:
45  * omit signals:
46  * imports:
47  * 	- glib.Str
48  * 	- glib.ListG
49  * structWrap:
50  * 	- GList* -> ListG
51  * 	- GstPluginFeature* -> PluginFeature
52  * module aliases:
53  * local aliases:
54  * 	- setName -> setFeatureName
55  * overrides:
56  * 	- getName
57  */
58 
59 module gstreamer.PluginFeature;
60 
61 public  import gstreamerc.gstreamertypes;
62 
63 private import gstreamerc.gstreamer;
64 private import glib.ConstructionException;
65 private import gobject.ObjectG;
66 
67 
68 private import glib.Str;
69 private import glib.ListG;
70 
71 
72 
73 private import gstreamer.ObjectGst;
74 
75 /**
76  * Description
77  * This is a base class for anything that can be added to a GstPlugin.
78  */
79 public class PluginFeature : ObjectGst
80 {
81 	
82 	/** the main Gtk struct */
83 	protected GstPluginFeature* gstPluginFeature;
84 	
85 	
86 	public GstPluginFeature* getPluginFeatureStruct()
87 	{
88 		return gstPluginFeature;
89 	}
90 	
91 	
92 	/** the main Gtk struct as a void* */
93 	protected override void* getStruct()
94 	{
95 		return cast(void*)gstPluginFeature;
96 	}
97 	
98 	/**
99 	 * Sets our main struct and passes it to the parent class
100 	 */
101 	public this (GstPluginFeature* gstPluginFeature)
102 	{
103 		super(cast(GstObject*)gstPluginFeature);
104 		this.gstPluginFeature = gstPluginFeature;
105 	}
106 	
107 	protected override void setStruct(GObject* obj)
108 	{
109 		super.setStruct(obj);
110 		gstPluginFeature = cast(GstPluginFeature*)obj;
111 	}
112 	
113 	/**
114 	 */
115 	
116 	/**
117 	 * Compares type and name of plugin feature. Can be used with gst_filter_run().
118 	 * Params:
119 	 * data = the type and name to check against
120 	 * Returns: TRUE if equal.
121 	 */
122 	public int typeNameFilter(GstTypeNameData* data)
123 	{
124 		// gboolean gst_plugin_feature_type_name_filter (GstPluginFeature *feature,  GstTypeNameData *data);
125 		return gst_plugin_feature_type_name_filter(gstPluginFeature, data);
126 	}
127 	
128 	/**
129 	 * Specifies a rank for a plugin feature, so that autoplugging uses
130 	 * the most appropriate feature.
131 	 * Params:
132 	 * rank = rank value - higher number means more priority rank
133 	 */
134 	public void setRank(uint rank)
135 	{
136 		// void gst_plugin_feature_set_rank (GstPluginFeature *feature,  guint rank);
137 		gst_plugin_feature_set_rank(gstPluginFeature, rank);
138 	}
139 	
140 	/**
141 	 * Sets the name of a plugin feature. The name uniquely identifies a feature
142 	 * within all features of the same type. Renaming a plugin feature is not
143 	 * allowed. A copy is made of the name so you should free the supplied name
144 	 * after calling this function.
145 	 * Params:
146 	 * name = the name to set
147 	 */
148 	public void setFeatureName(string name)
149 	{
150 		// void gst_plugin_feature_set_name (GstPluginFeature *feature,  const gchar *name);
151 		gst_plugin_feature_set_name(gstPluginFeature, Str.toStringz(name));
152 	}
153 	
154 	/**
155 	 * Gets the rank of a plugin feature.
156 	 * Returns: The rank of the feature
157 	 */
158 	public uint getRank()
159 	{
160 		// guint gst_plugin_feature_get_rank (GstPluginFeature *feature);
161 		return gst_plugin_feature_get_rank(gstPluginFeature);
162 	}
163 	
164 	/**
165 	 * Gets the name of a plugin feature.
166 	 * Returns: the name
167 	 */
168 	public override string getName()
169 	{
170 		// const gchar* gst_plugin_feature_get_name (GstPluginFeature *feature);
171 		return Str.toString(gst_plugin_feature_get_name(gstPluginFeature));
172 	}
173 	
174 	/**
175 	 * Loads the plugin containing feature if it's not already loaded. feature is
176 	 * unaffected; use the return value instead.
177 	 * Returns: A reference to the loaded feature, or NULL on error.
178 	 */
179 	public PluginFeature load()
180 	{
181 		// GstPluginFeature* gst_plugin_feature_load (GstPluginFeature *feature);
182 		auto p = gst_plugin_feature_load(gstPluginFeature);
183 		
184 		if(p is null)
185 		{
186 			return null;
187 		}
188 		
189 		return ObjectG.getDObject!(PluginFeature)(cast(GstPluginFeature*) p);
190 	}
191 	
192 	/**
193 	 * Unrefs each member of list, then frees the list.
194 	 * Params:
195 	 * list = list of GstPluginFeature
196 	 */
197 	public static void listFree(ListG list)
198 	{
199 		// void gst_plugin_feature_list_free (GList *list);
200 		gst_plugin_feature_list_free((list is null) ? null : list.getListGStruct());
201 	}
202 	
203 	/**
204 	 * Checks whether the given plugin feature is at least
205 	 *  the required version
206 	 * Params:
207 	 * minMajor = minimum required major version
208 	 * minMinor = minimum required minor version
209 	 * minMicro = minimum required micro version
210 	 * Returns: TRUE if the plugin feature has at least the required version, otherwise FALSE.
211 	 */
212 	public int checkVersion(uint minMajor, uint minMinor, uint minMicro)
213 	{
214 		// gboolean gst_plugin_feature_check_version (GstPluginFeature *feature,  guint min_major,  guint min_minor,  guint min_micro);
215 		return gst_plugin_feature_check_version(gstPluginFeature, minMajor, minMinor, minMicro);
216 	}
217 }