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 class Element;
00045
00051 enum URIType
00052 {
00053 URI_UNKNOWN,
00054 URI_SINK,
00055 URI_SRC
00056 };
00057
00058 }
00059
00060
00061 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00062 namespace Glib
00063 {
00064
00065 template <>
00066 class Value<Gst::URIType> : public Glib::Value_Enum<Gst::URIType>
00067 {
00068 public:
00069 static GType value_type() G_GNUC_CONST;
00070 };
00071
00072 }
00073 #endif
00074
00075
00076 namespace Gst
00077 {
00078
00079
00093 class URIHandler : public Glib::Interface
00094 {
00095
00096 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00097
00098 public:
00099 typedef URIHandler CppObjectType;
00100 typedef URIHandler_Class CppClassType;
00101 typedef GstURIHandler BaseObjectType;
00102 typedef GstURIHandlerInterface BaseClassType;
00103
00104 private:
00105 friend class URIHandler_Class;
00106 static CppClassType urihandler_class_;
00107
00108
00109 URIHandler(const URIHandler&);
00110 URIHandler& operator=(const URIHandler&);
00111
00112 protected:
00113 URIHandler();
00114
00121 explicit URIHandler(const Glib::Interface_Class& interface_class);
00122
00123 public:
00124
00125
00126
00127 explicit URIHandler(GstURIHandler* castitem);
00128
00129 protected:
00130 #endif
00131
00132 public:
00133 virtual ~URIHandler();
00134
00135 static void add_interface(GType gtype_implementer);
00136
00137 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00138 static GType get_type() G_GNUC_CONST;
00139 static GType get_base_type() G_GNUC_CONST;
00140 #endif
00141
00143 GstURIHandler* gobj() { return reinterpret_cast<GstURIHandler*>(gobject_); }
00144
00146 const GstURIHandler* gobj() const { return reinterpret_cast<GstURIHandler*>(gobject_); }
00147
00148 private:
00149
00150
00151 public:
00152
00159 static bool protocol_is_valid(const Glib::ustring& protocol);
00160
00170 static bool protocol_is_supported(const URIType type, const Glib::ustring& protocol);
00171
00177 static bool uri_is_valid(const Glib::ustring& uri);
00178
00186 static bool uri_has_protocol(const Glib::ustring& uri, const Glib::ustring& protocol);
00187
00193 static Glib::ustring get_protocol(const Glib::ustring& uri);
00194
00203 static Glib::ustring get_location(const Glib::ustring& uri);
00204
00211 static Glib::ustring construct_uri(const Glib::ustring& protocol, const Glib::ustring& location);
00212
00219 static Glib::RefPtr<Gst::Element> make_element_from_uri(const URIType type, const Glib::ustring& uri, const Glib::ustring& name);
00220
00221
00227 guint get_uri_type() const;
00228
00229
00237 Glib::StringArrayHandle get_protocols() const;
00238
00239
00246 Glib::ustring get_uri() const;
00247
00252 bool set_uri(const Glib::ustring& uri);
00253
00258 void new_uri(const Glib::ustring& uri);
00259
00266 Glib::SignalProxy1< void,const Glib::ustring& > signal_new_uri();
00267
00268
00272 #ifdef GLIBMM_VFUNCS_ENABLED
00273 virtual Glib::ustring get_uri_vfunc() const;
00274 #endif //GLIBMM_VFUNCS_ENABLED
00275
00276
00279 #ifdef GLIBMM_VFUNCS_ENABLED
00280 virtual bool set_uri_vfunc(const Glib::ustring& uri);
00281 #endif //GLIBMM_VFUNCS_ENABLED
00282
00283
00284
00285
00286
00287
00288
00289
00290
00291 public:
00292
00293 public:
00294
00295 #ifdef GLIBMM_VFUNCS_ENABLED
00296 #endif //GLIBMM_VFUNCS_ENABLED
00297
00298 protected:
00299
00300 #ifdef GLIBMM_VFUNCS_ENABLED
00301 #endif //GLIBMM_VFUNCS_ENABLED
00302
00303
00304 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00305 virtual void on_new_uri(const Glib::ustring& uri);
00306 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00307
00308
00309 };
00310
00311 }
00312
00313
00314 namespace Glib
00315 {
00324 Glib::RefPtr<Gst::URIHandler> wrap(GstURIHandler* object, bool take_copy = false);
00325
00326 }
00327
00328
00329 #endif
00330