- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List

# 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 class Element;
    00045
    00051 enum URIType
    00052 {
    00053   URI_UNKNOWN,
    00054   URI_SINK,
    00055   URI_SRC
    00056 };
    00057
    00058 } // namespace Gst
    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 } // namespace Glib
    00073 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
    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   // noncopyable
    00109   URIHandler(const URIHandler&);
    00110   URIHandler& operator=(const URIHandler&);
    00111
    00112 protected:
    00113   URIHandler(); // you must derive from this class
    00114
    00121   explicit URIHandler(const Glib::Interface_Class& interface_class);
    00122
    00123 public:
    00124   // This is public so that C++ wrapper instances can be
    00125   // created for C instances of unwrapped types.
    00126   // For instance, if an unexpected C type implements the C interface.
    00127   explicit URIHandler(GstURIHandler* castitem);
    00128
    00129 protected:
    00130 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
    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   //TODO: The GstURIHandler vfuncs get_type(), get_protocols(), get_type_full()
    00285   //and get_protocols_full() don't have a GstURIHandler as an argument declared
    00286   //in the Interface structure so those seem impossible to wrap because the C++
    00287   //callback would have no way of knowing which object's virtual function
    00288   //should be called.
    00289
    00290
    00291 public:
    00292
    00293 public:
    00294   //C++ methods used to invoke GTK+ virtual functions:
    00295 #ifdef GLIBMM_VFUNCS_ENABLED
    00296 #endif //GLIBMM_VFUNCS_ENABLED
    00297
    00298 protected:
    00299   //GTK+ Virtual Functions (override these to change behaviour):
    00300 #ifdef GLIBMM_VFUNCS_ENABLED
    00301 #endif //GLIBMM_VFUNCS_ENABLED
    00302
    00303   //Default Signal Handlers::
    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 } // namespace Gst
    00312
    00313
    00314 namespace Glib
    00315 {
    00324   Glib::RefPtr<Gst::URIHandler> wrap(GstURIHandler* object, bool take_copy = false);
    00325
    00326 } // namespace Glib
    00327
    00328
    00329 #endif /* _GSTREAMERMM_URIHANDLER_H */
    00330