tagsetter.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 // Generated by gtkmmproc -- DO NOT MODIFY!
00003 #ifndef _GSTREAMERMM_TAGSETTER_H
00004 #define _GSTREAMERMM_TAGSETTER_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/gsttagsetter.h>
00031 #include <glibmm/interface.h>
00032 #include <gstreamermm/enums.h>
00033 #include <gstreamermm/taglist.h>
00034 #include <gstreamermm/structurevalue.h>
00035 
00036 
00037 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00038 typedef struct _GstTagSetter GstTagSetter;
00039 typedef struct _GstTagSetterClass GstTagSetterClass;
00040 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00041 
00042 
00043 namespace Gst
00044 { class TagSetter_Class; } // namespace Gst
00045 namespace Gst
00046 {
00047 
00063 class TagSetter : public Glib::Interface
00064 {
00065   
00066 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00067 
00068 public:
00069   typedef TagSetter CppObjectType;
00070   typedef TagSetter_Class CppClassType;
00071   typedef GstTagSetter BaseObjectType;
00072   typedef GstTagSetterIFace BaseClassType;
00073 
00074 private:
00075   friend class TagSetter_Class;
00076   static CppClassType tagsetter_class_;
00077 
00078   // noncopyable
00079   TagSetter(const TagSetter&);
00080   TagSetter& operator=(const TagSetter&);
00081 
00082 protected:
00083   TagSetter(); // you must derive from this class
00084 
00091   explicit TagSetter(const Glib::Interface_Class& interface_class);
00092 
00093 public:
00094   // This is public so that C++ wrapper instances can be
00095   // created for C instances of unwrapped types.
00096   // For instance, if an unexpected C type implements the C interface. 
00097   explicit TagSetter(GstTagSetter* castitem);
00098 
00099 protected:
00100 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00101 
00102 public:
00103   virtual ~TagSetter();
00104 
00105   static void add_interface(GType gtype_implementer);
00106 
00107 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00108   static GType get_type()      G_GNUC_CONST;
00109   static GType get_base_type() G_GNUC_CONST;
00110 #endif
00111 
00113   GstTagSetter*       gobj()       { return reinterpret_cast<GstTagSetter*>(gobject_); }
00114 
00116   const GstTagSetter* gobj() const { return reinterpret_cast<GstTagSetter*>(gobject_); }
00117 
00118 private:
00119 
00120 
00121 public:
00122   
00127   void merge_tags(const TagList& list, TagMergeMode mode=TAG_MERGE_PREPEND);
00128 
00135    void add_tag(const Glib::ustring& tag, const Glib::ValueBase& value, TagMergeMode mode=TAG_MERGE_PREPEND);
00136 
00143    template <class DataType>
00144    void add_tag(const Glib::ustring& tag, const DataType& data, TagMergeMode mode=TAG_MERGE_PREPEND);
00145 
00146    
00151   TagList get_tag_list();
00152    
00158   void set_tag_merge_mode(TagMergeMode mode);
00159    
00164   TagMergeMode qet_tag_merge_mode();
00165 
00166 
00167 public:
00168 
00169 public:
00170   //C++ methods used to invoke GTK+ virtual functions:
00171 #ifdef GLIBMM_VFUNCS_ENABLED
00172 #endif //GLIBMM_VFUNCS_ENABLED
00173 
00174 protected:
00175   //GTK+ Virtual Functions (override these to change behaviour):
00176 #ifdef GLIBMM_VFUNCS_ENABLED
00177 #endif //GLIBMM_VFUNCS_ENABLED
00178 
00179   //Default Signal Handlers::
00180 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00181 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00182 
00183 
00184 };
00185 
00186 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00187 
00188 /************************** Gst::TagSetter ***************************/
00189 
00190 template <class DataType>
00191 void TagSetter::add_tag(const Glib::ustring& tag, const DataType& data, TagMergeMode mode)
00192 {
00193   typedef typename Gst::StructureValue<DataType> type_cppdata;
00194   typedef typename type_cppdata::ValueType ValueType;
00195 
00196   ValueType value;
00197   value.init(ValueType::value_type());
00198   value.set(data);
00199   this->add_tag(tag, (Glib::ValueBase)(value), mode);
00200 }
00201 
00202 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00203 
00204 } // namespace Gst
00205 
00206 
00207 namespace Glib
00208 {
00217   Glib::RefPtr<Gst::TagSetter> wrap(GstTagSetter* object, bool take_copy = false);
00218 
00219 } // namespace Glib
00220 
00221 
00222 #endif /* _GSTREAMERMM_TAGSETTER_H */
00223 

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