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 module gstreamer.DeviceProviderClass;
26 
27 private import glib.Str;
28 private import gstreamer.c.functions;
29 public  import gstreamer.c.types;
30 public  import gstreamerc.gstreamertypes;
31 
32 
33 /**
34  * The structure of the base #GstDeviceProviderClass
35  *
36  * Since: 1.4
37  */
38 public class DeviceProviderClass
39 {
40 	/** the main Gtk struct */
41 	protected GstDeviceProviderClass* gstDeviceProviderClass;
42 	protected bool ownedRef;
43 
44 	/** Get the main Gtk struct */
45 	public GstDeviceProviderClass* getDeviceProviderClassStruct(bool transferOwnership = false)
46 	{
47 		if (transferOwnership)
48 			ownedRef = false;
49 		return gstDeviceProviderClass;
50 	}
51 
52 	/** the main Gtk struct as a void* */
53 	protected void* getStruct()
54 	{
55 		return cast(void*)gstDeviceProviderClass;
56 	}
57 
58 	/**
59 	 * Sets our main struct and passes it to the parent class.
60 	 */
61 	public this (GstDeviceProviderClass* gstDeviceProviderClass, bool ownedRef = false)
62 	{
63 		this.gstDeviceProviderClass = gstDeviceProviderClass;
64 		this.ownedRef = ownedRef;
65 	}
66 
67 
68 	/**
69 	 * Set @key with @value as metadata in @klass.
70 	 *
71 	 * Params:
72 	 *     key = the key to set
73 	 *     value = the value to set
74 	 *
75 	 * Since: 1.4
76 	 */
77 	public void addMetadata(string key, string value)
78 	{
79 		gst_device_provider_class_add_metadata(gstDeviceProviderClass, Str.toStringz(key), Str.toStringz(value));
80 	}
81 
82 	/**
83 	 * Set @key with @value as metadata in @klass.
84 	 *
85 	 * Same as gst_device_provider_class_add_metadata(), but @value must be a static string
86 	 * or an inlined string, as it will not be copied. (GStreamer plugins will
87 	 * be made resident once loaded, so this function can be used even from
88 	 * dynamically loaded plugins.)
89 	 *
90 	 * Params:
91 	 *     key = the key to set
92 	 *     value = the value to set
93 	 *
94 	 * Since: 1.4
95 	 */
96 	public void addStaticMetadata(string key, string value)
97 	{
98 		gst_device_provider_class_add_static_metadata(gstDeviceProviderClass, Str.toStringz(key), Str.toStringz(value));
99 	}
100 
101 	/**
102 	 * Get metadata with @key in @klass.
103 	 *
104 	 * Params:
105 	 *     key = the key to get
106 	 *
107 	 * Returns: the metadata for @key.
108 	 *
109 	 * Since: 1.4
110 	 */
111 	public string getMetadata(string key)
112 	{
113 		return Str.toString(gst_device_provider_class_get_metadata(gstDeviceProviderClass, Str.toStringz(key)));
114 	}
115 
116 	/**
117 	 * Sets the detailed information for a #GstDeviceProviderClass.
118 	 *
119 	 * > This function is for use in _class_init functions only.
120 	 *
121 	 * Params:
122 	 *     longname = The long English name of the device provider. E.g. "File Sink"
123 	 *     classification = String describing the type of device provider, as an
124 	 *         unordered list separated with slashes ('/'). See draft-klass.txt of the
125 	 *         design docs
126 	 *         for more details and common types. E.g: "Sink/File"
127 	 *     description = Sentence describing the purpose of the device provider.
128 	 *         E.g: "Write stream to a file"
129 	 *     author = Name and contact details of the author(s). Use \n to separate
130 	 *         multiple author metadata. E.g: "Joe Bloggs <joe.blogs at foo.com>"
131 	 *
132 	 * Since: 1.4
133 	 */
134 	public void setMetadata(string longname, string classification, string description, string author)
135 	{
136 		gst_device_provider_class_set_metadata(gstDeviceProviderClass, Str.toStringz(longname), Str.toStringz(classification), Str.toStringz(description), Str.toStringz(author));
137 	}
138 
139 	/**
140 	 * Sets the detailed information for a #GstDeviceProviderClass.
141 	 *
142 	 * > This function is for use in _class_init functions only.
143 	 *
144 	 * Same as gst_device_provider_class_set_metadata(), but @longname, @classification,
145 	 * @description, and @author must be static strings or inlined strings, as
146 	 * they will not be copied. (GStreamer plugins will be made resident once
147 	 * loaded, so this function can be used even from dynamically loaded plugins.)
148 	 *
149 	 * Params:
150 	 *     longname = The long English name of the element. E.g. "File Sink"
151 	 *     classification = String describing the type of element, as
152 	 *         an unordered list separated with slashes ('/'). See draft-klass.txt of the
153 	 *         design docs for more details and common types. E.g: "Sink/File"
154 	 *     description = Sentence describing the purpose of the
155 	 *         element.  E.g: "Write stream to a file"
156 	 *     author = Name and contact details of the author(s). Use \n
157 	 *         to separate multiple author metadata. E.g: "Joe Bloggs <joe.blogs at
158 	 *         foo.com>"
159 	 *
160 	 * Since: 1.4
161 	 */
162 	public void setStaticMetadata(string longname, string classification, string description, string author)
163 	{
164 		gst_device_provider_class_set_static_metadata(gstDeviceProviderClass, Str.toStringz(longname), Str.toStringz(classification), Str.toStringz(description), Str.toStringz(author));
165 	}
166 }