plugin.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 // Generated by gtkmmproc -- DO NOT MODIFY!
00003 #ifndef _GSTREAMERMM_PLUGIN_H
00004 #define _GSTREAMERMM_PLUGIN_H
00005 
00006 
00007 #include <glibmm.h>
00008 
00009 // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
00010 
00011 /* gstreamermm - a C++ wrapper for gstreamer
00012  *
00013  * Copyright 2008 The gstreamermm Development Team
00014  *
00015  * This library is free software; you can redistribute it and/or
00016  * modify it under the terms of the GNU Library General Public
00017  * License as published by the Free Software Foundation; either
00018  * version 2 of the License, or (at your option) any later version.
00019  *
00020  * This library is distributed in the hope that it will be useful,
00021  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00022  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00023  * Library General Public License for more details.
00024  *
00025  * You should have received a copy of the GNU Library General Public
00026  * License along with this library; if not, write to the Free
00027  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00028  */
00029 
00030 #include <gst/gstplugin.h>
00031 #include <gstreamermm/object.h>
00032 
00033 
00034 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00035 typedef struct _GstPlugin GstPlugin;
00036 typedef struct _GstPluginClass GstPluginClass;
00037 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00038 
00039 
00040 namespace Gst
00041 { class Plugin_Class; } // namespace Gst
00042 namespace Gst
00043 {
00044 
00051 class PluginError : public Glib::Error
00052 {
00053 public:
00054   enum Code
00055   {
00056     MODULE,
00057     DEPENDENCIES,
00058     NAME_MISMATCH
00059   };
00060 
00061   PluginError(Code error_code, const Glib::ustring& error_message);
00062   explicit PluginError(GError* gobject);
00063   Code code() const;
00064 
00065 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00066 private:
00067 
00068 #ifdef GLIBMM_EXCEPTIONS_ENABLED
00069   static void throw_func(GError* gobject);
00070 #else
00071   //When not using exceptions, we just pass the Exception object around without throwing it:
00072   static std::auto_ptr<Glib::Error> throw_func(GError* gobject);
00073 #endif //GLIBMM_EXCEPTIONS_ENABLED
00074 
00075   friend void wrap_init(); // uses throw_func()
00076 #endif
00077 };
00078 
00079 } // namespace Gst
00080 
00081 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00082 namespace Glib
00083 {
00084 
00085 template <>
00086 class Value<Gst::PluginError::Code> : public Glib::Value_Enum<Gst::PluginError::Code>
00087 {
00088 public:
00089   static GType value_type() G_GNUC_CONST;
00090 };
00091 
00092 } // namespace Glib
00093 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00094 
00095 
00096 namespace Gst
00097 {
00098 
00099 
00100 //TODO: Edit references below to use gstreamermm classes/methods
00101 
00125 class Plugin : public Object
00126 {
00127   
00128 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00129 
00130 public:
00131   typedef Plugin CppObjectType;
00132   typedef Plugin_Class CppClassType;
00133   typedef GstPlugin BaseObjectType;
00134   typedef GstPluginClass BaseClassType;
00135 
00136 private:  friend class Plugin_Class;
00137   static CppClassType plugin_class_;
00138 
00139 private:
00140   // noncopyable
00141   Plugin(const Plugin&);
00142   Plugin& operator=(const Plugin&);
00143 
00144 protected:
00145   explicit Plugin(const Glib::ConstructParams& construct_params);
00146   explicit Plugin(GstPlugin* castitem);
00147 
00148 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00149 
00150 public:
00151   virtual ~Plugin();
00152 
00153 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00154   static GType get_type()      G_GNUC_CONST;
00155   static GType get_base_type() G_GNUC_CONST;
00156 #endif
00157 
00159   GstPlugin*       gobj()       { return reinterpret_cast<GstPlugin*>(gobject_); }
00160 
00162   const GstPlugin* gobj() const { return reinterpret_cast<GstPlugin*>(gobject_); }
00163 
00165   GstPlugin* gobj_copy();
00166 
00167 private:
00168 
00169 
00170 public:
00176   typedef sigc::slot< bool, const Glib::RefPtr<Plugin>& > SlotFilter;
00177 
00178   
00179   static Glib::QueryQuark error_quark();
00180   
00184   Glib::ustring get_name() const;
00185   
00189   Glib::ustring get_description() const;
00190   
00194   Glib::ustring get_filename() const;
00195   
00199   Glib::ustring get_license() const;
00200   
00204   Glib::ustring get_package() const;
00205   
00209   Glib::ustring get_origin() const;
00210   
00214   Glib::ustring get_source() const;
00215   
00219   Glib::ustring get_version() const;
00220 
00221   
00227   GModule* get_module() const;
00228 
00229   
00233   bool is_loaded() const;
00234 
00243 #ifdef GLIBMM_EXCEPTIONS_ENABLED
00244   static Glib::RefPtr<Plugin> load_file(const Glib::ustring& filename);
00245 #else
00246   static Glib::RefPtr<Plugin> load_file(const Glib::ustring& filename, std::auto_ptr<Glib::Error>& error);
00247 #endif //GLIBMM_EXCEPTIONS_ENABLED
00248 
00249 
00262   Glib::RefPtr<Plugin> load();
00263   
00268   static Glib::RefPtr<Plugin> load_by_name(const Glib::ustring& name);
00269 
00270 
00274   static void free(Glib::ListHandle< Glib::RefPtr<Plugin> >);
00275 
00276   
00277 public:
00278 
00279 public:
00280   //C++ methods used to invoke GTK+ virtual functions:
00281 #ifdef GLIBMM_VFUNCS_ENABLED
00282 #endif //GLIBMM_VFUNCS_ENABLED
00283 
00284 protected:
00285   //GTK+ Virtual Functions (override these to change behaviour):
00286 #ifdef GLIBMM_VFUNCS_ENABLED
00287 #endif //GLIBMM_VFUNCS_ENABLED
00288 
00289   //Default Signal Handlers::
00290 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00291 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00292 
00293 
00294 };
00295 
00296 } // namespace Gst
00297 
00298 
00299 namespace Glib
00300 {
00309   Glib::RefPtr<Gst::Plugin> wrap(GstPlugin* object, bool take_copy = false);
00310 }
00311 
00312 
00313 #endif /* _GSTREAMERMM_PLUGIN_H */
00314 

Generated on Sun Jul 27 17:07:20 2008 for gstreamermm by  doxygen 1.5.4