Debian Codegraph @

gstreamer/gstreamermm/urihandler.h

raw symbols SCIP
1 // Generated by gmmproc 2.50.1 -- DO NOT MODIFY!cxx . . $ `<file>/gstreamer/gstreamermm/urihandler.h`/
2 #ifndef _GSTREAMERMM_URIHANDLER_H
3 #define _GSTREAMERMM_URIHANDLER_Hcxx . . $ `gstreamer/gstreamermm/urihandler.h:3:9`!
4
5
6 #include <glibmm/ustring.h>
7 #include <sigc++/sigc++.h>
8
9 /* gstreamermm - a C++ wrapper for gstreamer
10 *
11 * Copyright 2008-2016 The gstreamermm Development Team
12 *
13 * This library is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU Lesser General Public
15 * License as published by the Free Software Foundation; either
16 * version 2.1 of the License, or (at your option) any later version.
17 *
18 * This library is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 * Lesser General Public License for more details.
22 *
23 * You should have received a copy of the GNU Lesser General Public
24 * License along with this library; if not, write to the Free
25 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 */
27
28 #include <gst/gst.h>
29 #include <glibmm/interface.h>
30 #include <gstreamermm/enums.h>cxx . . $ `<file>/gstreamer/gstreamermm/enums.h`/
31 #include <glibmm/arrayhandle.h>
32 #include <cstdio>
33
34
35 #ifndef DOXYGEN_SHOULD_SKIP_THIS
36 using GstURIHandlercxx . . $ GstURIHandler# = struct _GstURIHandlercxx . . $ _GstURIHandler#;
37 using GstURIHandlerClasscxx . . $ GstURIHandlerClass# = struct _GstURIHandlerClasscxx . . $ _GstURIHandlerClass#;
38 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
39
40
41 #ifndef DOXYGEN_SHOULD_SKIP_THIS
42 namespace Gstcxx . . $ Gst/
43 { class URIHandler_Classcxx . . $ Gst/URIHandler_Class#; } // namespace Gst
44 #endif // DOXYGEN_SHOULD_SKIP_THIS
45
46 namespace Gstcxx . . $ Gst/
47 {
48
49 class Elementcxx . . $ Gst/Element#;
50
51 /** @addtogroup gstreamermmEnums gstreamermm Enums and Flags */
52
53 /**
54 * @var URIType URI_UNKNOWN
55 * The URI direction is unknown.
56 *
57 * @var URIType URI_SINK
58 * The URI is a consumer.
59 *
60 * @var URIType URI_SRC
61 * The URI is a producer.
62 *
63 * @enum URIType
64 *
65 * The different types of URI direction.
66 *
67 * @ingroup gstreamermmEnums
68 */
69 enum URITypecxx . . $ Gst/URIType#
70 {
71 URI_UNKNOWNcxx . . $ Gst/URI_UNKNOWN.,
72 URI_SINKcxx . . $ Gst/URI_SINK.,
73 URI_SRCcxx . . $ Gst/URI_SRC.
74 };
75
76 } // namespace Gst
77
78 #ifndef DOXYGEN_SHOULD_SKIP_THIS
79 namespace Glibcxx . . $ Glib/
80 {
81
82 template <>
83 class Valuecxx . . $ Glib/Value#<Gstcxx . . $ Gst/::URITypecxx . . $ Gst/URIType#> : public Glibcxx . . $ Glib/::Value_Enumcxx . . $ Glib/Value_Enum#<Gstcxx . . $ Gst/::URITypecxx . . $ Gst/URIType#>
84 {
85 public:
86 static GType value_typecxx . . $ Glib/Value#value_type(f708dce9a8856c70).() G_GNUC_CONSTcxx . . $ `<external>/12741050725406041920/gmacros.h:640:9`!;
87 };
88
89 } // namespace Glib
90 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
91
92 namespace Gstcxx . . $ Gst/
93 {
94
95 /**
96 * @var URIError URI_ERROR_UNSUPPORTED_PROTOCOL
97 * The protocol is not supported.
98 *
99 * @var URIError URI_ERROR_BAD_URI
100 * There was a problem with the URI.
101 *
102 * @var URIError URI_ERROR_BAD_STATE
103 * Could not set or change the URI because the
104 * URI handler was in a state where that is not possible or not permitted.
105 *
106 * @var URIError URI_ERROR_BAD_REFERENCE
107 * There was a problem with the entity that
108 * the URI references.
109 *
110 * @enum URIError
111 *
112 * Different URI-related errors that can occur.
113 *
114 * @ingroup gstreamermmEnums
115 */
116 enum URIErrorcxx . . $ Gst/URIError#
117 {
118 URI_ERROR_UNSUPPORTED_PROTOCOLcxx . . $ Gst/URI_ERROR_UNSUPPORTED_PROTOCOL.,
119 URI_ERROR_BAD_URIcxx . . $ Gst/URI_ERROR_BAD_URI.,
120 URI_ERROR_BAD_STATEcxx . . $ Gst/URI_ERROR_BAD_STATE.,
121 URI_ERROR_BAD_REFERENCEcxx . . $ Gst/URI_ERROR_BAD_REFERENCE.
122 };
123
124 } // namespace Gst
125
126 #ifndef DOXYGEN_SHOULD_SKIP_THIS
127 namespace Glibcxx . . $ Glib/
128 {
129
130 template <>
131 class Valuecxx . . $ Glib/Value#<Gstcxx . . $ Gst/::URIErrorcxx . . $ Gst/URIError#> : public Glibcxx . . $ Glib/::Value_Enumcxx . . $ Glib/Value_Enum#<Gstcxx . . $ Gst/::URIErrorcxx . . $ Gst/URIError#>
132 {
133 public:
134 static GType value_typecxx . . $ Glib/Value#value_type(f708dce9a8856c70).() G_GNUC_CONSTcxx . . $ `<external>/12741050725406041920/gmacros.h:640:9`!;
135 };
136
137 } // namespace Glib
138 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
139
140 namespace Gstcxx . . $ Gst/
141 {
142
143
144 /** An interface to ease URI handling in plugins.
145 * The Gst::URIHandler is an interface that is implemented by Source and Sink
146 * Gst::Element to simplify then handling of URI.
147 *
148 * An application can use the following functions to quickly get an element
149 * that handles the given URI for reading or writing (make_element_from_uri()).
150 *
151 * Source and Sink plugins should implement this interface when possible.
152 *
153 * Last reviewed on 2016-08-27 (1.8.0)
154 * @ingroup GstInterfaces
155 */
156
157 class URIHandlercxx . . $ Gst/URIHandler# : public Glibcxx . . $ Glib/::Interfacecxx . . $ Glib/Interface#
158 {
159
160 #ifndef DOXYGEN_SHOULD_SKIP_THIS
161
162 public:
163 using CppObjectTypecxx . . $ Gst/URIHandler#CppObjectType# = URIHandlercxx . . $ Gst/URIHandler#;
164 using CppClassTypecxx . . $ Gst/URIHandler#CppClassType# = URIHandler_Classcxx . . $ Gst/URIHandler_Class#;
165 using BaseObjectTypecxx . . $ Gst/URIHandler#BaseObjectType# = GstURIHandlercxx . . $ GstURIHandler#;
166 using BaseClassTypecxx . . $ Gst/URIHandler#BaseClassType# = GstURIHandlerInterface;
167
168 // noncopyable
169 URIHandlercxx . . $ Gst/URIHandler#URIHandler(7d6969f24615cd20).(const URIHandlercxx . . $ Gst/URIHandler#&) = delete;
170 URIHandlercxx . . $ Gst/URIHandler#& operatorcxx . . $ Gst/URIHandler#`operator=`(8fd34bdd4c7891db).=(const URIHandlercxx . . $ Gst/URIHandler#&) = delete;
171
172 private:
173 friend class URIHandler_Classcxx . . $ Gst/URIHandler_Class#;
174 static CppClassTypecxx . . $ Gst/URIHandler#CppClassType# urihandler_class_cxx . . $ Gst/URIHandler#urihandler_class_.;
175
176 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
177 protected:
178 /**
179 * You should derive from this class to use it.
180 */
181 URIHandlercxx . . $ Gst/URIHandler#URIHandler(49f6e7a06ebc5aa8).();
182
183 #ifndef DOXYGEN_SHOULD_SKIP_THIS
184 /** Called by constructors of derived classes. Provide the result of
185 * the Class init() function to ensure that it is properly
186 * initialized.
187 *
188 * @param interface_class The Class object for the derived type.
189 */
190 explicit URIHandlercxx . . $ Gst/URIHandler#URIHandler(2ae54c1e3e0dc4a8).(const Glibcxx . . $ Glib/::Interface_Classcxx . . $ Glib/Interface_Class#& interface_class);
191
192 public:
193 // This is public so that C++ wrapper instances can be
194 // created for C instances of unwrapped types.
195 // For instance, if an unexpected C type implements the C interface.
196 explicit URIHandlercxx . . $ Gst/URIHandler#URIHandler(e0e7a9df62fa4608).(GstURIHandlercxx . . $ GstURIHandler#* castitem);
197
198 protected:
199 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
200
201 public:
202
203 URIHandlercxx . . $ Gst/URIHandler#URIHandler(c52ae2c6b3aa780f).(URIHandlercxx . . $ Gst/URIHandler#&& src) noexcept;
204 URIHandlercxx . . $ Gst/URIHandler#& operatorcxx . . $ Gst/URIHandler#`operator=`(4900caa8fea3cdc6).=(URIHandlercxx . . $ Gst/URIHandler#&& src) noexcept;
205
206 ~cxx . . $ Gst/URIHandler#`~URIHandler`(ced63f7c635d850d).URIHandlercxx . . $ Gst/URIHandler#() noexcept override;
207
208 static void add_interfacecxx . . $ Gst/URIHandler#add_interface(2c44cd906ae4e829).(GType gtype_implementer);
209
210 /** Get the GType for this class, for use with the underlying GObject type system.
211 */
212 static GType get_typecxx . . $ Gst/URIHandler#get_type(f708dce9a8856c70).() G_GNUC_CONSTcxx . . $ `<external>/12741050725406041920/gmacros.h:640:9`!;
213
214 #ifndef DOXYGEN_SHOULD_SKIP_THIS
215 static GType get_base_typecxx . . $ Gst/URIHandler#get_base_type(f708dce9a8856c70).() G_GNUC_CONSTcxx . . $ `<external>/12741050725406041920/gmacros.h:640:9`!;
216 #endif
217
218 ///Provides access to the underlying C GObject.
219 GstURIHandlercxx . . $ GstURIHandler#* gobjcxx . . $ Gst/URIHandler#gobj(8a793203d3a54a9b).() { return reinterpret_cast<GstURIHandlercxx . . $ GstURIHandler#*>(gobject_cxx . . $ Glib/ObjectBase#gobject_.); }
220
221 ///Provides access to the underlying C GObject.
222 const GstURIHandlercxx . . $ GstURIHandler#* gobjcxx . . $ Gst/URIHandler#gobj(8fafff96c7fb89f2).() const { return reinterpret_cast<GstURIHandlercxx . . $ GstURIHandler#*>(gobject_cxx . . $ Glib/ObjectBase#gobject_.); }
223
224 private:
225
226
227 public:
228
229 /** Tests if the given string is a valid protocol identifier. Protocols
230 * must consist of alphanumeric characters, '+', '-' and '.' and must
231 * start with a alphabetic character. See RFC 3986 Section 3.1.
232 *
233 * @param protocol A string.
234 * @return <tt>true</tt> if the string is a valid protocol identifier, <tt>false</tt> otherwise.
235 */
236 static bool protocol_is_validcxx . . $ Gst/URIHandler#protocol_is_valid(7186ea5d16af43ac).(const Glibcxx . . $ Glib/::ustringcxx . . $ Glib/ustring#& protocol);
237
238 /** Checks if an element exists that supports the given URI protocol. Note
239 * that a positive return value does not imply that a subsequent call to
240 * Gst::Element::make_from_uri() is guaranteed to work.
241 *
242 * @param type Whether to check for a source or a sink.
243 * @param protocol Protocol that should be checked for (e.g. "http" or "smb").
244 * @return <tt>true</tt>.
245 */
246 static bool protocol_is_supportedcxx . . $ Gst/URIHandler#protocol_is_supported(78d2ac3fd91491f6).(const Gstcxx . . $ Gst/::URITypecxx . . $ Gst/URIType# type, const Glibcxx . . $ Glib/::ustringcxx . . $ Glib/ustring#& protocol);
247
248 /** Tests if the given string is a valid URI identifier. URIs start with a valid
249 * scheme followed by ":" and maybe a string identifying the location.
250 *
251 * @param uri A URI string.
252 * @return <tt>true</tt> if the string is a valid URI.
253 */
254 static bool uri_is_validcxx . . $ Gst/URIHandler#uri_is_valid(7186ea5d16af43ac).(const Glibcxx . . $ Glib/::ustringcxx . . $ Glib/ustring#& uri);
255
256 /** Checks if the protocol of a given valid URI matches @a protocol.
257 *
258 * @param uri A URI string.
259 * @param protocol A protocol string (e.g. "http").
260 * @return <tt>true</tt> if the protocol matches.
261 */
262 static bool uri_has_protocolcxx . . $ Gst/URIHandler#uri_has_protocol(395448000f6db32c).(const Glibcxx . . $ Glib/::ustringcxx . . $ Glib/ustring#& uri, const Glibcxx . . $ Glib/::ustringcxx . . $ Glib/ustring#& protocol);
263
264 /** Extracts the protocol out of a given valid URI.
265 *
266 * @param uri A URI string.
267 * @return The protocol for this URI.
268 */
269 static Glibcxx . . $ Glib/::ustringcxx . . $ Glib/ustring# get_protocolcxx . . $ Gst/URIHandler#get_protocol(f09497d1ca15336f).(const Glibcxx . . $ Glib/::ustringcxx . . $ Glib/ustring#& uri);
270
271 /** Extracts the location out of a given valid URI, ie. the protocol and "://"
272 * are stripped from the URI, which means that the location returned includes
273 * the hostname if one is specified.
274 *
275 * Free-function: g_free
276 *
277 * @param uri A URI string.
278 * @return The location for this URI. Returns <tt>nullptr</tt> if the
279 * URI isn't valid. If the URI does not contain a location, an empty
280 * string is returned.
281 */
282 static Glibcxx . . $ Glib/::ustringcxx . . $ Glib/ustring# get_locationcxx . . $ Gst/URIHandler#get_location(f09497d1ca15336f).(const Glibcxx . . $ Glib/::ustringcxx . . $ Glib/ustring#& uri);
283
284 /** Constructs a URI for a given valid protocol and location.
285 *
286 * @param protocol Protocol for URI.
287 * @param location Location for URI.
288 * @return A new string for this URI. Returns <tt>nullptr</tt> if the
289 * given URI protocol is not valid, or the given location is <tt>nullptr</tt>.
290 */
291 static Glibcxx . . $ Glib/::ustringcxx . . $ Glib/ustring# construct_uricxx . . $ Gst/URIHandler#construct_uri(a085081755b563c5).(const Glibcxx . . $ Glib/::ustringcxx . . $ Glib/ustring#& protocol, const Glibcxx . . $ Glib/::ustringcxx . . $ Glib/ustring#& location);
292
293 /** Similar to Glib::filename_to_uri(), but attempts to handle relative file paths
294 * as well. Before converting @a filename into an URI, it will be prefixed by
295 * the current working directory if it is a relative path, and then the path
296 * will be canonicalised so that it doesn't contain any './' or '../' segments.
297 *
298 * On Windows #filename should be in UTF-8 encoding.
299 *
300 * @param filename Absolute or relative file name path.
301 * @return Newly-allocated URI string, or <tt>nullptr</tt> on error.
302 */
303 static Glibcxx . . $ Glib/::ustringcxx . . $ Glib/ustring# filename_to_uricxx . . $ Gst/URIHandler#filename_to_uri(f09497d1ca15336f).(const Glibcxx . . $ Glib/::ustringcxx . . $ Glib/ustring#& filename);
304
305 /** Creates an element for handling the given URI.
306 *
307 * @param type Whether to create a source or a sink.
308 * @param uri URI to create an element for.
309 * @param name Name of created element, can be <tt>nullptr</tt>.
310 * @return A new element or <tt>nullptr</tt> if none could be created.
311 */
312 static Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::Elementcxx . . $ Gst/Element#> make_element_from_uricxx . . $ Gst/URIHandler#make_element_from_uri(bbbbf6d5e6bfcea1).(const Gstcxx . . $ Gst/::URITypecxx . . $ Gst/URIType# type, const Glibcxx . . $ Glib/::ustringcxx . . $ Glib/ustring#& uri, const Glibcxx . . $ Glib/::ustringcxx . . $ Glib/ustring#& name);
313
314
315 /** Gets the type of the given URI handler
316 *
317 * @return The Gst::URIType of the URI handler.
318 * Returns Gst::URI_UNKNOWN if the @a handler isn't implemented correctly.
319 */
320 URITypecxx . . $ Gst/URIType# get_uri_typecxx . . $ Gst/URIHandler#get_uri_type(6b76c8292462901e).() const;
321
322
323 /** Gets the list of protocols supported by @a handler. This list may not be
324 * modified.
325 *
326 * @return The
327 * supported protocols. Returns <tt>nullptr</tt> if the @a handler isn't
328 * implemented properly, or the @a handler doesn't support any
329 * protocols.
330 */
331 stdcxx . . $ std/::vectorcxx . . $ std/vector#<Glibcxx . . $ Glib/::ustringcxx . . $ Glib/ustring#> get_protocolscxx . . $ Gst/URIHandler#get_protocols(875676e3b2759068).() const;
332
333
334 /** Gets the currently handled URI.
335 *
336 * @return The URI currently handled by
337 * the @a handler. Returns <tt>nullptr</tt> if there are no URI currently
338 * handled.
339 */
340 Glibcxx . . $ Glib/::ustringcxx . . $ Glib/ustring# get_uricxx . . $ Gst/URIHandler#get_uri(fff0f585954e56f3).() const;
341
342 /** Tries to set the URI of the given handler.
343 *
344 * @param uri URI to set.
345 * @return <tt>true</tt> if the URI was set successfully, else <tt>false</tt>.
346 */
347 bool set_uricxx . . $ Gst/URIHandler#set_uri(7186ea5d16af43ac).(const Glibcxx . . $ Glib/::ustringcxx . . $ Glib/ustring#& uri);
348
349
350 /** Virtual method which should be implemented to return the URI currently
351 * handled by the element.
352 */
353 virtual Glibcxx . . $ Glib/::ustringcxx . . $ Glib/ustring# get_uri_vfunccxx . . $ Gst/URIHandler#get_uri_vfunc(fff0f585954e56f3).() const;
354
355
356 /** Virtual method which should be implemented to set a new URI.
357 */
358 virtual bool set_uri_vfunccxx . . $ Gst/URIHandler#set_uri_vfunc(e4aba70b79f269f1).(const Glibcxx . . $ Glib/::ustringcxx . . $ Glib/ustring#& uri, GError** error);
359
360
361 /**
362 * Method to return the list of protocols handled by the element.
363 */
364 virtual const gchar * const * get_protocols_vfunccxx . . $ Gst/URIHandler#get_protocols_vfunc(69503a37793e448d).() const;
365
366 /**
367 * Method to tell whether the element handles source or sink URI.
368 */
369 virtual URITypecxx . . $ Gst/URIType# get_type_vfunccxx . . $ Gst/URIHandler#get_type_vfunc(fdb346bd718ba3ff).();
370
371
372 protected:
373
374
375 public:
376
377 public:
378 //C++ methods used to invoke GTK+ virtual functions:
379
380 protected:
381 //GTK+ Virtual Functions (override these to change behaviour):
382
383 //Default Signal Handlers::
384
385
386 };
387
388 } // namespace Gst
389
390
391 namespace Glibcxx . . $ Glib/
392 {
393 /** A Glib::wrap() method for this object.
394 *
395 * @param object The C instance.
396 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
397 * @result A C++ instance that wraps this C instance.
398 *
399 * @relates Gst::URIHandler
400 */
401 Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::URIHandlercxx . . $ Gst/URIHandler#> wrapcxx . . $ Glib/wrap(161c240fd3d234bc).(GstURIHandlercxx . . $ GstURIHandler#* object, bool take_copy = false);
402
403 } // namespace Glib
404
405
406 #endif /* _GSTREAMERMM_URIHANDLER_H */
407