00001 // -*- c++ -*- 00002 // Generated by gtkmmproc -- DO NOT MODIFY! 00003 #ifndef _GCONFMM_SCHEMA_H 00004 #define _GCONFMM_SCHEMA_H 00005 00006 00007 #include <glibmm.h> 00008 00009 // -*- Mode: C++; c-basic-offset: 4 -*- 00010 /* $Id: schema.hg,v 1.5 2002/12/10 23:26:01 murrayc Exp $ */ 00011 00012 /* schema.hg 00013 * 00014 * Copyright (C) 2000-2002 GConfmm Development Team 00015 * 00016 * This library is free software; you can redistribute it and/or 00017 * modify it under the terms of the GNU Library General Public 00018 * License as published by the Free Software Foundation; either 00019 * version 2 of the License, or (at your option) any later version. 00020 * 00021 * This library is distributed in the hope that it will be useful, 00022 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00023 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00024 * Library General Public License for more details. 00025 * 00026 * You should have received a copy of the GNU Library General Public 00027 * License along with this library; if not, write to the Free 00028 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00029 */ 00030 00031 #include <gconfmm/value.h> 00032 00033 00034 extern "C" { 00035 // TODO: do not include this. 00036 #include <gconf/gconf-schema.h> 00037 } 00038 00039 namespace Gnome 00040 { 00041 00042 namespace Conf 00043 { 00044 00045 class Value; 00046 00047 class Schema 00048 { 00049 public: 00050 #ifndef DOXYGEN_SHOULD_SKIP_THIS 00051 typedef Schema CppObjectType; 00052 typedef GConfSchema BaseObjectType; 00053 #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 00054 00055 Schema(); 00056 00057 // Use make_a_copy=true when getting it directly from a struct. 00058 explicit Schema(GConfSchema* castitem, bool make_a_copy = false); 00059 00060 Schema(const Schema& src); 00061 Schema& operator=(const Schema& src); 00062 00063 ~Schema(); 00064 00065 GConfSchema* gobj() { return gobject_; } 00066 const GConfSchema* gobj() const { return gobject_; } 00067 00069 GConfSchema* gobj_copy() const; 00070 00071 protected: 00072 GConfSchema* gobject_; 00073 00074 private: 00075 00076 00077 public: 00078 00079 void set_type(ValueType type); 00080 00081 void set_list_type(ValueType type); 00082 00083 void set_car_type(ValueType type); 00084 00085 void set_cdr_type(ValueType type); 00086 00087 void set_locale(const std::string& locale); 00088 00089 void set_short_desc(const Glib::ustring& desc); 00090 00091 void set_long_desc(const Glib::ustring& desc); 00092 00093 void set_owner(const Glib::ustring& owner); 00094 00095 void set_default_value(const Value& value); 00096 00097 00098 ValueType get_type() const; 00099 00100 ValueType get_list_type() const; 00101 00102 ValueType get_car_type() const; 00103 00104 ValueType get_cdr_type() const; 00105 00106 std::string get_locale() const; 00107 00108 Glib::ustring get_short_desc() const; 00109 00110 Glib::ustring get_long_desc() const; 00111 00112 Glib::ustring get_owner() const; 00113 00114 Value get_default_value() const; 00115 00116 00117 }; 00118 00119 00120 } /* namespace Conf */ 00121 } /* namespace Gnome */ 00122 00123 00124 namespace Glib 00125 { 00126 00132 Gnome::Conf::Schema wrap(GConfSchema* object, bool take_copy = false); 00133 00134 } // namespace Glib 00135 00136 00137 #endif /* _GCONFMM_SCHEMA_H */ 00138