00001
00002
00003 #ifndef _GSTREAMERMM_URIHANDLER_H
00004 #define _GSTREAMERMM_URIHANDLER_H
00005
00006
00007 #include <glibmm.h>
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #include <gst/gsturi.h>
00029 #include <glibmm/interface.h>
00030 #include <gstreamermm/enums.h>
00031
00032
00033 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00034 typedef struct _GstURIHandler GstURIHandler;
00035 typedef struct _GstURIHandlerClass GstURIHandlerClass;
00036 #endif
00037
00038
00039 namespace Gst
00040 { class URIHandler_Class; }
00041 namespace Gst
00042 {
00043
00044 enum URIType
00045 {
00046 URI_UNKNOWN = GST_URI_UNKNOWN,
00047 URI_SINK = GST_URI_SINK,
00048 URI_SRC = GST_URI_SRC
00049 };
00050
00051 class Element;
00052
00066 class URIHandler : public Glib::Interface
00067 {
00068
00069 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00070
00071 public:
00072 typedef URIHandler CppObjectType;
00073 typedef URIHandler_Class CppClassType;
00074 typedef GstURIHandler BaseObjectType;
00075 typedef GstURIHandlerInterface BaseClassType;
00076
00077 private:
00078 friend class URIHandler_Class;
00079 static CppClassType urihandler_class_;
00080
00081
00082 URIHandler(const URIHandler&);
00083 URIHandler& operator=(const URIHandler&);
00084
00085 protected:
00086 URIHandler();
00087
00094 explicit URIHandler(const Glib::Interface_Class& interface_class);
00095
00096 public:
00097
00098
00099
00100 explicit URIHandler(GstURIHandler* castitem);
00101
00102 protected:
00103 #endif
00104
00105 public:
00106 virtual ~URIHandler();
00107
00108 static void add_interface(GType gtype_implementer);
00109
00110 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00111 static GType get_type() G_GNUC_CONST;
00112 static GType get_base_type() G_GNUC_CONST;
00113 #endif
00114
00116 GstURIHandler* gobj() { return reinterpret_cast<GstURIHandler*>(gobject_); }
00117
00119 const GstURIHandler* gobj() const { return reinterpret_cast<GstURIHandler*>(gobject_); }
00120
00121 private:
00122
00123
00124 public:
00125
00132 static bool protocol_is_valid(const Glib::ustring& protocol);
00133
00143 static bool protocol_is_supported(const URIType type, const Glib::ustring& protocol);
00144
00150 static bool uri_is_valid(const Glib::ustring& uri);
00151
00159 static bool uri_has_protocol(const Glib::ustring& uri, const Glib::ustring& protocol);
00160
00166 static Glib::ustring get_protocol(const Glib::ustring& uri);
00167
00176 static Glib::ustring get_location(const Glib::ustring& uri);
00177
00184 static Glib::ustring construct_uri(const Glib::ustring& protocol, const Glib::ustring& location);
00185
00192 static Glib::RefPtr<Gst::Element> make_element_from_uri(const URIType type, const Glib::ustring& uri, const Glib::ustring& name);
00193
00194
00200 guint get_uri_type() const;
00201
00202
00210 Glib::StringArrayHandle get_protocols() const;
00211
00212
00219 Glib::ustring get_uri() const;
00220
00225 bool set_uri(const Glib::ustring& uri);
00226
00231 void new_uri(const Glib::ustring& uri);
00232
00239 Glib::SignalProxy1< void,const Glib::ustring& > signal_new_uri();
00240
00241
00242
00243
00244
00245 public:
00246
00247 public:
00248
00249 #ifdef GLIBMM_VFUNCS_ENABLED
00250 #endif //GLIBMM_VFUNCS_ENABLED
00251
00252 protected:
00253
00254 #ifdef GLIBMM_VFUNCS_ENABLED
00255 #endif //GLIBMM_VFUNCS_ENABLED
00256
00257
00258 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00259 virtual void on_new_uri(const Glib::ustring& uri);
00260 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00261
00262
00263 };
00264
00265 }
00266
00267
00268 namespace Glib
00269 {
00278 Glib::RefPtr<Gst::URIHandler> wrap(GstURIHandler* object, bool take_copy = false);
00279
00280 }
00281
00282
00283 #endif
00284