- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

# 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 /* 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/gsttagsetter.h>
    00029 #include <glibmm/interface.h>
    00030 #include <gstreamermm/enums.h>
    00031 #include <gstreamermm/taglist.h>
    00032
    00033
    00034 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00035 typedef struct _GstTagSetter GstTagSetter;
    00036 typedef struct _GstTagSetterClass GstTagSetterClass;
    00037 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
    00038
    00039
    00040 namespace Gst
    00041 { class TagSetter_Class; } // namespace Gst
    00042 namespace Gst
    00043 {
    00044
    00061 class TagSetter : public Glib::Interface
    00062 {
    00063
    00064 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00065
    00066 public:
    00067   typedef TagSetter CppObjectType;
    00068   typedef TagSetter_Class CppClassType;
    00069   typedef GstTagSetter BaseObjectType;
    00070   typedef GstTagSetterIFace BaseClassType;
    00071
    00072 private:
    00073   friend class TagSetter_Class;
    00074   static CppClassType tagsetter_class_;
    00075
    00076   // noncopyable
    00077   TagSetter(const TagSetter&);
    00078   TagSetter& operator=(const TagSetter&);
    00079
    00080 protected:
    00081   TagSetter(); // you must derive from this class
    00082
    00089   explicit TagSetter(const Glib::Interface_Class& interface_class);
    00090
    00091 public:
    00092   // This is public so that C++ wrapper instances can be
    00093   // created for C instances of unwrapped types.
    00094   // For instance, if an unexpected C type implements the C interface.
    00095   explicit TagSetter(GstTagSetter* castitem);
    00096
    00097 protected:
    00098 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
    00099
    00100 public:
    00101   virtual ~TagSetter();
    00102
    00103   static void add_interface(GType gtype_implementer);
    00104
    00105 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00106   static GType get_type()      G_GNUC_CONST;
    00107   static GType get_base_type() G_GNUC_CONST;
    00108 #endif
    00109
    00111   GstTagSetter*       gobj()       { return reinterpret_cast<GstTagSetter*>(gobject_); }
    00112
    00114   const GstTagSetter* gobj() const { return reinterpret_cast<GstTagSetter*>(gobject_); }
    00115
    00116 private:
    00117
    00118
    00119 public:
    00120
    00126   void reset_tags();
    00127
    00132   void merge_tags(const Gst::TagList& list, TagMergeMode mode=TAG_MERGE_PREPEND);
    00133
    00140   void add_tag(Tag tag, const Glib::ValueBase& value, TagMergeMode mode=TAG_MERGE_PREPEND);
    00141
    00142
    00149   void add_tag(const Glib::ustring& tag, const Glib::ValueBase& value,
    00150     TagMergeMode mode=TAG_MERGE_PREPEND);
    00151
    00159   template <class DataType>
    00160   void add_tag(Tag tag, const DataType& data, TagMergeMode mode=TAG_MERGE_PREPEND);
    00161
    00169   template <class DataType>
    00170     void add_tag(const Glib::ustring& tag, const DataType& data,
    00171     TagMergeMode mode=TAG_MERGE_PREPEND);
    00172
    00179   void add_tag(Tag tag, const char* data, TagMergeMode mode=TAG_MERGE_PREPEND);
    00180
    00187   void add_tag(const Glib::ustring& tag, const char* data,
    00188     TagMergeMode mode=TAG_MERGE_PREPEND);
    00189
    00190 // A copy is taken so that the original is not freed by the wrapper.
    00191
    00192
    00197   const Gst::TagList get_tag_list() const;
    00198
    00199
    00205   void set_tag_merge_mode(TagMergeMode mode);
    00206
    00211   TagMergeMode get_tag_merge_mode() const;
    00212
    00213   //Variable argument functions are ignored.
    00214
    00215
    00216 public:
    00217
    00218 public:
    00219   //C++ methods used to invoke GTK+ virtual functions:
    00220 #ifdef GLIBMM_VFUNCS_ENABLED
    00221 #endif //GLIBMM_VFUNCS_ENABLED
    00222
    00223 protected:
    00224   //GTK+ Virtual Functions (override these to change behaviour):
    00225 #ifdef GLIBMM_VFUNCS_ENABLED
    00226 #endif //GLIBMM_VFUNCS_ENABLED
    00227
    00228   //Default Signal Handlers::
    00229 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
    00230 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
    00231
    00232
    00233 };
    00234
    00235 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00236
    00237 /************************** Gst::TagSetter ***************************/
    00238
    00239 template <class DataType>
    00240 void TagSetter::add_tag(Tag tag, const DataType& data, TagMergeMode mode)
    00241 {
    00242   typedef Glib::Value<DataType> ValueType;
    00243
    00244   ValueType value;
    00245   value.init(ValueType::value_type());
    00246   value.set(data);
    00247   this->add_tag(tag, (Glib::ValueBase)(value), mode);
    00248 }
    00249
    00250 template <class DataType>
    00251   void TagSetter::add_tag(const Glib::ustring& tag, const DataType& data,
    00252   TagMergeMode mode)
    00253 {
    00254   typedef Glib::Value<DataType> ValueType;
    00255
    00256   ValueType value;
    00257   value.init(ValueType::value_type());
    00258   value.set(data);
    00259   this->add_tag(tag, (Glib::ValueBase)(value), mode);
    00260 }
    00261
    00262 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
    00263
    00264 } // namespace Gst
    00265
    00266
    00267 namespace Glib
    00268 {
    00277   Glib::RefPtr<Gst::TagSetter> wrap(GstTagSetter* object, bool take_copy = false);
    00278
    00279 } // namespace Glib
    00280
    00281
    00282 #endif /* _GSTREAMERMM_TAGSETTER_H */
    00283