00001
00002
00003 #ifndef _GCONFMM_CHANGESET_H
00004 #define _GCONFMM_CHANGESET_H
00005
00006
00007 #include <glibmm.h>
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #include <glibmm/ustring.h>
00032 #include <gconfmm/value.h>
00033 #include <gconfmm/setinterface.h>
00034 #include <sigc++/slot.h>
00035
00036
00037 extern "C" {
00038 typedef struct _GConfChangeSet GConfChangeSet;
00039 }
00040
00041 namespace Gnome
00042 {
00043 namespace Conf
00044 {
00045
00046
00057 class ChangeSet : public SetInterface
00058 {
00059 public:
00060 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00061 typedef ChangeSet CppObjectType;
00062 typedef GConfChangeSet BaseObjectType;
00063 #endif
00064
00065 private:
00066
00067
00068 public:
00069 ChangeSet();
00070 explicit ChangeSet(GConfChangeSet* castitem, bool make_a_copy = false);
00071
00072 ChangeSet(const ChangeSet& src);
00073 ChangeSet& operator=(const ChangeSet& src);
00074 virtual ~ChangeSet();
00075
00076 GConfChangeSet* gobj() { return gobject_; }
00077 const GConfChangeSet* gobj() const { return gobject_; }
00078 GConfChangeSet* gobj_copy() const;
00079
00080 protected:
00081 GConfChangeSet* gobject_;
00082
00083 public:
00087 void clear();
00088
00091 unsigned int size() const;
00092
00096 void remove(const Glib::ustring& key);
00097
00101 Value* exists(const Glib::ustring& key) const;
00102
00103
00107 void unset(const Glib::ustring& key);
00108
00109
00110 void set(const Glib::ustring& key, bool what);
00111
00112 void set(const Glib::ustring& key, int what);
00113
00114 void set(const Glib::ustring& key, double what);
00115
00116 void set(const Glib::ustring& key, const Glib::ustring& what);
00117
00118 void set(const Glib::ustring& key, const Schema& val);
00119
00120
00121 void set(const Glib::ustring& key, const Value& what);
00122
00123
00124 typedef sigc::slot<void, const Glib::ustring&, const Value&> ForeachSlot;
00129 void for_each(const ForeachSlot& slot);
00130
00131 private:
00132 static GConfChangeSet* do_ref(GConfChangeSet*);
00133
00134
00135 };
00136
00137
00138 }
00139 }
00140
00141
00142 #endif
00143