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