- Main Page
- Modules
- Namespaces
- Classes
- Files

# urihandler.h

Go to the documentation of this file.

    00001 // -*- c++ -*-
    00002 // Generated by gtkmmproc -- DO NOT MODIFY!
    00003 #ifndef _GSTREAMERMM_URIHANDLER_H
    00004 #define _GSTREAMERMM_URIHANDLER_H
    00005
    00006
    00007 #include <glibmm.h>
    00008
    00009 /* gstreamermm - a C++ wrapper for gstreamer
    00010  *
    00011  * Copyright 2008 The gstreamermm Development Team
    00012  *
    00013  * This library is free software; you can redistribute it and/or
    00014  * modify it under the terms of the GNU Lesser General Public
    00015  * License as published by the Free Software Foundation; either
    00016  * version 2.1 of the License, or (at your option) any later version.
    00017  *
    00018  * This library is distributed in the hope that it will be useful,
    00019  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    00020  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00021  * Lesser General Public License for more details.
    00022  *
    00023  * You should have received a copy of the GNU Lesser General Public
    00024  * License along with this library; if not, write to the Free
    00025  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    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 /* DOXYGEN_SHOULD_SKIP_THIS */
    00037
    00038
    00039 namespace Gst
    00040 { class URIHandler_Class; } // namespace Gst
    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   // noncopyable
    00082   URIHandler(const URIHandler&);
    00083   URIHandler& operator=(const URIHandler&);
    00084
    00085 protected:
    00086   URIHandler(); // you must derive from this class
    00087
    00094   explicit URIHandler(const Glib::Interface_Class& interface_class);
    00095
    00096 public:
    00097   // This is public so that C++ wrapper instances can be
    00098   // created for C instances of unwrapped types.
    00099   // For instance, if an unexpected C type implements the C interface.
    00100   explicit URIHandler(GstURIHandler* castitem);
    00101
    00102 protected:
    00103 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
    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   //TODO: Wrap vfuncs.
    00243
    00244
    00245 public:
    00246
    00247 public:
    00248   //C++ methods used to invoke GTK+ virtual functions:
    00249 #ifdef GLIBMM_VFUNCS_ENABLED
    00250 #endif //GLIBMM_VFUNCS_ENABLED
    00251
    00252 protected:
    00253   //GTK+ Virtual Functions (override these to change behaviour):
    00254 #ifdef GLIBMM_VFUNCS_ENABLED
    00255 #endif //GLIBMM_VFUNCS_ENABLED
    00256
    00257   //Default Signal Handlers::
    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 } // namespace Gst
    00266
    00267
    00268 namespace Glib
    00269 {
    00278   Glib::RefPtr<Gst::URIHandler> wrap(GstURIHandler* object, bool take_copy = false);
    00279
    00280 } // namespace Glib
    00281
    00282
    00283 #endif /* _GSTREAMERMM_URIHANDLER_H */
    00284