registry.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 // Generated by gtkmmproc -- DO NOT MODIFY!
00003 #ifndef _GSTREAMERMM_REGISTRY_H
00004 #define _GSTREAMERMM_REGISTRY_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/gstregistry.h>
00031 #include <gstreamermm/object.h>
00032 #include <gstreamermm/plugin.h>
00033 #include <gstreamermm/pluginfeature.h>
00034 
00035 
00036 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00037 typedef struct _GstRegistry GstRegistry;
00038 typedef struct _GstRegistryClass GstRegistryClass;
00039 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00040 
00041 
00042 namespace Gst
00043 { class Registry_Class; } // namespace Gst
00044 namespace Gst
00045 {
00046 
00047 class Plugin;
00048 class PluginFeature;
00049 
00106 class Registry : public Object
00107 {
00108   
00109 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00110 
00111 public:
00112   typedef Registry CppObjectType;
00113   typedef Registry_Class CppClassType;
00114   typedef GstRegistry BaseObjectType;
00115   typedef GstRegistryClass BaseClassType;
00116 
00117 private:  friend class Registry_Class;
00118   static CppClassType registry_class_;
00119 
00120 private:
00121   // noncopyable
00122   Registry(const Registry&);
00123   Registry& operator=(const Registry&);
00124 
00125 protected:
00126   explicit Registry(const Glib::ConstructParams& construct_params);
00127   explicit Registry(GstRegistry* castitem);
00128 
00129 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00130 
00131 public:
00132   virtual ~Registry();
00133 
00134 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00135   static GType get_type()      G_GNUC_CONST;
00136   static GType get_base_type() G_GNUC_CONST;
00137 #endif
00138 
00140   GstRegistry*       gobj()       { return reinterpret_cast<GstRegistry*>(gobject_); }
00141 
00143   const GstRegistry* gobj() const { return reinterpret_cast<GstRegistry*>(gobject_); }
00144 
00146   GstRegistry* gobj_copy();
00147 
00148 private:
00149 
00150 
00151 public:
00152   
00157   static Glib::RefPtr<Registry> get_default();
00158 
00159  
00167   Glib::ListHandle< Glib::RefPtr<PluginFeature> > get_feature_list(GType type);
00168   
00174   Glib::ListHandle< Glib::RefPtr<PluginFeature> > get_feature_list(const Glib::ustring& name);
00175 
00176  
00182   Glib::ListHandle< Glib::ustring > get_path_list();
00183 
00184  
00191   Glib::ListHandle< Glib::RefPtr<Plugin> > get_plugin_list();
00192 
00193   
00201   bool add_plugin(const Glib::RefPtr<Plugin>& plugin);
00202   
00208   void remove_plugin(const Glib::RefPtr<Plugin>& plugin);
00209 
00219   Glib::ListHandle< Glib::RefPtr<Plugin> > get_plugin_list(const Plugin::SlotFilter& filter, bool first);
00220 
00230   Glib::ListHandle< Glib::RefPtr<PluginFeature> > get_feature_list(const PluginFeature::SlotFilter& filter, bool first);
00231 
00232   
00241   Glib::RefPtr<Plugin> find_plugin(const Glib::ustring& name);
00242   
00251   Glib::RefPtr<PluginFeature> find_feature(const Glib::ustring& name, GType type);
00252   
00260   Glib::RefPtr<PluginFeature> lookup_feature(const Glib::ustring& name);
00261   
00267   void add_path(const Glib::ustring& path);
00268   
00275   void scan_path(const Glib::ustring& path);
00276   // binary or xml registry cache depends on USE_BINARY_REGISTRY def in
00277   // gstregistry.h
00278 
00279 #ifdef USE_BINARY_REGISTRY
00280 
00285   bool binary_read_cache(const Glib::ustring& location);
00286 
00292   void binary_write_cache(const Glib::ustring& location);
00293 #else
00294 
00299   bool xml_read_cache(const Glib::ustring& location);
00300 
00307   bool xml_write_cache(const Glib::ustring& location);
00308 #endif
00309 
00310   
00317   Glib::RefPtr<Plugin> lookup(const Glib::ustring& filename);
00318   
00324   void remove_feature(const Glib::RefPtr<PluginFeature>& feature);
00325   
00333   void add_feature(const Glib::RefPtr<PluginFeature>& feature);
00334   
00345   static bool check_feature_version(const Glib::ustring& feature_name, guint min_major, guint min_minor, guint min_micro);
00346 
00347  
00355   Glib::SignalProxy1< void,const Glib::RefPtr<PluginFeature>& > signal_feature_added();
00356 
00357 
00365   Glib::SignalProxy1< void,const Glib::RefPtr<Plugin>& > signal_plugin_added();
00366 
00367 
00368 public:
00369 
00370 public:
00371   //C++ methods used to invoke GTK+ virtual functions:
00372 #ifdef GLIBMM_VFUNCS_ENABLED
00373 #endif //GLIBMM_VFUNCS_ENABLED
00374 
00375 protected:
00376   //GTK+ Virtual Functions (override these to change behaviour):
00377 #ifdef GLIBMM_VFUNCS_ENABLED
00378 #endif //GLIBMM_VFUNCS_ENABLED
00379 
00380   //Default Signal Handlers::
00381 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00382   virtual void on_feature_added(const Glib::RefPtr<PluginFeature>& feature);
00383   virtual void on_plugin_added(const Glib::RefPtr<Plugin>& plugin);
00384 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00385 
00386 
00387 };
00388 
00389 } // namespace Gst
00390 
00391 
00392 namespace Glib
00393 {
00402   Glib::RefPtr<Gst::Registry> wrap(GstRegistry* object, bool take_copy = false);
00403 }
00404 
00405 
00406 #endif /* _GSTREAMERMM_REGISTRY_H */
00407 

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