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
00064 class Object : public Glib::Object
00065 {
00066
00067 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00068
00069 public:
00070 typedef Object CppObjectType;
00071 typedef Object_Class CppClassType;
00072 typedef GstObject BaseObjectType;
00073 typedef GstObjectClass BaseClassType;
00074
00075 private: friend class Object_Class;
00076 static CppClassType object_class_;
00077
00078 private:
00079
00080 Object(const Object&);
00081 Object& operator=(const Object&);
00082
00083 protected:
00084 explicit Object(const Glib::ConstructParams& construct_params);
00085 explicit Object(GstObject* castitem);
00086
00087 #endif
00088
00089 public:
00090 virtual ~Object();
00091
00092 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00093 static GType get_type() G_GNUC_CONST;
00094 static GType get_base_type() G_GNUC_CONST;
00095 #endif
00096
00098 GstObject* gobj() { return reinterpret_cast<GstObject*>(gobject_); }
00099
00101 const GstObject* gobj() const { return reinterpret_cast<GstObject*>(gobject_); }
00102
00104 GstObject* gobj_copy();
00105
00106 protected:
00107 Object();
00108
00109 public:
00110
00111
00112 void reference() const;
00113 void unreference() const;
00114
00124 bool set_name(const Glib::ustring& name);
00125
00132 bool set_name();
00133
00140 Glib::ustring get_name() const;
00141
00153 bool set_parent(const Glib::RefPtr<Object>& parent);
00154
00160 Glib::RefPtr<Object> get_parent();
00161
00167 Glib::RefPtr<const Object> get_parent() const;
00168
00174 void unparent();
00175
00182 Glib::ustring get_name_prefix() const;
00183
00193 void set_name_prefix(const Glib::ustring& prefix);
00194
00195
00196
00197
00198
00199
00204 xmlpp::Node* save(xmlpp::Node* parent) const;
00205
00209 void restore(xmlpp::Node* self);
00210
00211 #ifdef GLIBMM_PROPERTIES_ENABLED
00212
00218 Glib::PropertyProxy<Glib::ustring> property_name() ;
00219 #endif //#GLIBMM_PROPERTIES_ENABLED
00220
00221 #ifdef GLIBMM_PROPERTIES_ENABLED
00222
00228 Glib::PropertyProxy_ReadOnly<Glib::ustring> property_name() const;
00229 #endif //#GLIBMM_PROPERTIES_ENABLED
00230
00231
00232 };
00233
00234 }
00235
00236
00237 namespace Glib
00238 {
00247 Glib::RefPtr<Gst::Object> wrap(GstObject* object, bool take_copy = false);
00248 }
00249
00250
00251 #endif