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
00069 class Object : public Glib::Object
00070 {
00071
00072 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00073
00074 public:
00075 typedef Object CppObjectType;
00076 typedef Object_Class CppClassType;
00077 typedef GstObject BaseObjectType;
00078 typedef GstObjectClass BaseClassType;
00079
00080 private: friend class Object_Class;
00081 static CppClassType object_class_;
00082
00083 private:
00084
00085 Object(const Object&);
00086 Object& operator=(const Object&);
00087
00088 protected:
00089 explicit Object(const Glib::ConstructParams& construct_params);
00090 explicit Object(GstObject* castitem);
00091
00092 #endif
00093
00094 public:
00095 virtual ~Object();
00096
00097 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00098 static GType get_type() G_GNUC_CONST;
00099 static GType get_base_type() G_GNUC_CONST;
00100 #endif
00101
00103 GstObject* gobj() { return reinterpret_cast<GstObject*>(gobject_); }
00104
00106 const GstObject* gobj() const { return reinterpret_cast<GstObject*>(gobject_); }
00107
00109 GstObject* gobj_copy();
00110
00111 protected:
00112 Object();
00113
00114 public:
00115
00116
00117 void reference() const;
00118 void unreference() const;
00119
00129 bool set_name(const Glib::ustring& name);
00130
00137 bool set_name();
00138
00145 Glib::ustring get_name() const;
00146
00147
00148
00160 bool set_parent(const Glib::RefPtr<Object>& parent);
00161
00167 Glib::RefPtr<Object> get_parent();
00168
00174 Glib::RefPtr<const Object> get_parent() const;
00175
00181 void unparent();
00182
00189 Glib::ustring get_name_prefix() const;
00190
00200 void set_name_prefix(const Glib::ustring& prefix);
00201
00202
00203
00204
00205
00206
00211 xmlpp::Node* save(xmlpp::Node* parent) const;
00212
00216 void restore(xmlpp::Node* self);
00217
00218 #ifdef GLIBMM_PROPERTIES_ENABLED
00219
00225 Glib::PropertyProxy<Glib::ustring> property_name() ;
00226 #endif //#GLIBMM_PROPERTIES_ENABLED
00227
00228 #ifdef GLIBMM_PROPERTIES_ENABLED
00229
00235 Glib::PropertyProxy_ReadOnly<Glib::ustring> property_name() const;
00236 #endif //#GLIBMM_PROPERTIES_ENABLED
00237
00238
00239 };
00240
00241 }
00242
00243
00244 namespace Glib
00245 {
00254 Glib::RefPtr<Gst::Object> wrap(GstObject* object, bool take_copy = false);
00255 }
00256
00257
00258 #endif
00259