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.URIHandlerIF; 26 27 private import glib.ErrorG; 28 private import glib.GException; 29 private import glib.Str; 30 private import gstreamerc.gstreamer; 31 public import gstreamerc.gstreamertypes; 32 33 34 /** 35 * The #GstURIHandler is an interface that is implemented by Source and Sink 36 * #GstElement to unify handling of URI. 37 * 38 * An application can use the following functions to quickly get an element 39 * that handles the given URI for reading or writing 40 * (gst_element_make_from_uri()). 41 * 42 * Source and Sink plugins should implement this interface when possible. 43 */ 44 public interface URIHandlerIF{ 45 /** Get the main Gtk struct */ 46 public GstURIHandler* getURIHandlerStruct(); 47 48 /** the main Gtk struct as a void* */ 49 protected void* getStruct(); 50 51 52 /** 53 * Gets the list of protocols supported by @handler. This list may not be 54 * modified. 55 * 56 * Return: the 57 * supported protocols. Returns %NULL if the @handler isn't 58 * implemented properly, or the @handler doesn't support any 59 * protocols. 60 */ 61 public string[] getProtocols(); 62 63 /** 64 * Gets the currently handled URI. 65 * 66 * Return: the URI currently handled by 67 * the @handler. Returns %NULL if there are no URI currently 68 * handled. The returned string must be freed with g_free() when no 69 * longer needed. 70 */ 71 public string getUri(); 72 73 /** 74 * Gets the type of the given URI handler 75 * 76 * Return: the #GstURIType of the URI handler. 77 * Returns #GST_URI_UNKNOWN if the @handler isn't implemented correctly. 78 */ 79 public GstURIType getUriType(); 80 81 /** 82 * Tries to set the URI of the given handler. 83 * 84 * Params: 85 * uri = URI to set 86 * 87 * Return: %TRUE if the URI was set successfully, else %FALSE. 88 * 89 * Throws: GException on failure. 90 */ 91 public bool setUri(string uri); 92 }