00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _GSTREAMERMM_OBJECT_H
00021 #define _GSTREAMERMM_OBJECT_H
00022
00023
00024 #include <glibmm.h>
00025 #include <glibmm/object.h>
00026 #include <libxml++/nodes/node.h>
00027
00028
00029 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00030 typedef struct _GstObject GstObject;
00031 typedef struct _GstObjectClass GstObjectClass;
00032 #endif
00033
00034
00035 namespace Gst
00036 {
00037 class Object_Class;
00038 }
00039
00040 namespace Gst
00041 {
00042
00043
00044
00045
00046
00047
00048
00049
00050
00068 class Object : public Glib::Object
00069 {
00070
00071 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00072
00073 public:
00074 typedef Object CppObjectType;
00075 typedef Object_Class CppClassType;
00076 typedef GstObject BaseObjectType;
00077 typedef GstObjectClass BaseClassType;
00078
00079 private: friend class Object_Class;
00080 static CppClassType object_class_;
00081
00082 private:
00083
00084 Object(const Object&);
00085 Object& operator=(const Object&);
00086
00087 protected:
00088 explicit Object(const Glib::ConstructParams& construct_params);
00089 explicit Object(GstObject* castitem);
00090
00091 #endif
00092
00093 public:
00094 virtual ~Object();
00095
00096 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00097 static GType get_type() G_GNUC_CONST;
00098 static GType get_base_type() G_GNUC_CONST;
00099 #endif
00100
00102 GstObject* gobj() { return reinterpret_cast<GstObject*>(gobject_); }
00103
00105 const GstObject* gobj() const { return reinterpret_cast<GstObject*>(gobject_); }
00106
00108 GstObject* gobj_copy();
00109
00110 protected:
00111 Object();
00112
00113 public:
00114
00115
00116 void reference() const;
00117 void unreference() const;
00118
00128 bool set_name(const Glib::ustring& name);
00129
00136 bool set_name();
00137
00144 Glib::ustring get_name() const;
00145
00146
00147
00159 bool set_parent(const Glib::RefPtr<Object>& parent);
00160
00166 Glib::RefPtr<Object> get_parent();
00167
00173 Glib::RefPtr<const Object> get_parent() const;
00174
00180 void unparent();
00181
00188 Glib::ustring get_name_prefix() const;
00189
00199 void set_name_prefix(const Glib::ustring& prefix);
00200
00201
00202
00203
00204
00205
00210 xmlpp::Node* save(xmlpp::Node* parent) const;
00211
00215 void restore(xmlpp::Node* self);
00216
00217 #ifdef GLIBMM_PROPERTIES_ENABLED
00218
00224 Glib::PropertyProxy<Glib::ustring> property_name() ;
00225 #endif //#GLIBMM_PROPERTIES_ENABLED
00226
00227 #ifdef GLIBMM_PROPERTIES_ENABLED
00228
00234 Glib::PropertyProxy_ReadOnly<Glib::ustring> property_name() const;
00235 #endif //#GLIBMM_PROPERTIES_ENABLED
00236
00237
00238 };
00239
00240 }
00241
00242
00243 namespace Glib
00244 {
00253 Glib::RefPtr<Gst::Object> wrap(GstObject* object, bool take_copy = false);
00254 }
00255
00256
00257 #endif
00258