00001 // -*- c++ -*- 00002 // Generated by gtkmmproc -- DO NOT MODIFY! 00003 #ifndef _LIBGDAMM_DATASOURCEINFO_H 00004 #define _LIBGDAMM_DATASOURCEINFO_H 00005 00006 #include <glibmm.h> 00007 00008 /* $Id: datasourceinfo.hg,v 1.2 2004/04/04 20:40:00 murrayc Exp $ */ 00009 // -*- C++ -*- // 00010 00011 /* datasourceinfo.h 00012 * 00013 * Copyright 2003 libgdamm Development Team 00014 * 00015 * This library is free software; you can redistribute it and/or 00016 * modify it under the terms of the GNU Library General Public 00017 * License as published by the Free Software Foundation; either 00018 * version 2 of the License, or (at your option) any later version. 00019 * 00020 * This library is distributed in the hope that it will be useful, 00021 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00022 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00023 * Library General Public License for more details. 00024 * 00025 * You should have received a copy of the GNU Library General Public 00026 * License along with this library; if not, write to the Free 00027 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00028 */ 00029 00030 #include <glibmm/object.h> 00031 #include <libgda/gda-config.h> //TODO: Patch libgda to use the struct _ technique. 00032 00033 00034 namespace Gnome 00035 { 00036 00037 namespace Gda 00038 { 00039 00040 class DataSourceInfo 00041 { 00042 public: 00043 #ifndef DOXYGEN_SHOULD_SKIP_THIS 00044 typedef DataSourceInfo CppObjectType; 00045 typedef GdaDataSourceInfo BaseObjectType; 00046 #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 00047 00048 00049 // Use make_a_copy=true when getting it directly from a struct. 00050 explicit DataSourceInfo(GdaDataSourceInfo* castitem, bool make_a_copy = false); 00051 00052 DataSourceInfo(const DataSourceInfo& src); 00053 DataSourceInfo& operator=(const DataSourceInfo& src); 00054 00055 ~DataSourceInfo(); 00056 00057 GdaDataSourceInfo* gobj() { return gobject_; } 00058 const GdaDataSourceInfo* gobj() const { return gobject_; } 00059 00061 GdaDataSourceInfo* gobj_copy() const; 00062 00063 protected: 00064 GdaDataSourceInfo* gobject_; 00065 00066 private: 00067 00068 00069 public: 00070 00071 DataSourceInfo(); 00072 00073 operator bool() const; 00074 00075 00076 Glib::ustring get_name() const; 00077 Glib::ustring get_provider() const; 00078 Glib::ustring get_cnc_string() const; 00079 Glib::ustring get_description() const; 00080 Glib::ustring get_username() const; 00081 Glib::ustring get_password() const; 00082 00083 void set_name(const Glib::ustring& value); 00084 void set_provider(const Glib::ustring& value); 00085 void set_cnc_string(const Glib::ustring& value); 00086 void set_description(const Glib::ustring& value); 00087 void set_username(const Glib::ustring& value); 00088 void set_password(const Glib::ustring& value); 00089 00090 00091 }; 00092 00093 } // namespace Gda 00094 } // namespace Gnome 00095 00096 00097 namespace Glib 00098 { 00099 00105 Gnome::Gda::DataSourceInfo wrap(GdaDataSourceInfo* object, bool take_copy = false); 00106 00107 } // namespace Glib 00108 00109 #endif /* _LIBGDAMM_DATASOURCEINFO_H */ 00110