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