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