[libgdamm] Added ConfigError and Config::get_provider().
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgdamm] Added ConfigError and Config::get_provider().
- Date: Tue, 31 Aug 2010 12:58:06 +0000 (UTC)
commit 876791d9eadad796adac3d472f734152124c3e85
Author: Murray Cumming <murrayc murrayc com>
Date: Tue Aug 31 14:57:59 2010 +0200
Added ConfigError and Config::get_provider().
* libgda/src/config.[hg|ccg]: Add the ConfigError exception, which is
also thrown by some Connection methods.
Add get_provider() and use _WRAP_METHOD() for the existing methods instead
of hand-coding them.
ChangeLog | 9 +++++++++
libgda/src/config.ccg | 35 ++---------------------------------
libgda/src/config.hg | 31 ++++++++++++++-----------------
3 files changed, 25 insertions(+), 50 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index f13cce8..bcd73a0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2010-08-31 Murray Cumming <murrayc murrayc com>
+
+ Added ConfigError and Config::get_provider().
+
+ * libgda/src/config.[hg|ccg]: Add the ConfigError exception, which is
+ also thrown by some Connection methods.
+ Add get_provider() and use _WRAP_METHOD() for the existing methods instead
+ of hand-coding them.
+
3.99.21:
2010-06-21 Murray Cumming <murrayc murrayc com>
diff --git a/libgda/src/config.ccg b/libgda/src/config.ccg
index 9f7a074..65988b3 100644
--- a/libgda/src/config.ccg
+++ b/libgda/src/config.ccg
@@ -1,7 +1,7 @@
// -*- C++ -*- // this is for the .ccg, I realize gensig puts one in
/* config.cc
- *
+ *
* Copyright 2003 libgdamm Development Team
*
* This library is free software; you can redistribute it and/or
@@ -21,6 +21,7 @@
#include <libgdamm/config.h>
#include <libgda/gda-config.h>
+#include <libgda/gda-enum-types.h>
namespace Gnome
{
@@ -28,38 +29,6 @@ namespace Gnome
namespace Gda
{
-GdaDsnInfo* Config::get_dsn_info (const Glib::ustring& dsn_name)
-{
- return gda_config_get_dsn_info (dsn_name.c_str());
-}
-
-
-bool Config::dsn_needs_authentication(const Glib::ustring& dsn_name)
-{
- return gda_config_dsn_needs_authentication(dsn_name.c_str());
-}
-
-Glib::RefPtr<DataModel> Config::list_dsn()
-{
- return Glib::wrap(gda_config_list_dsn());
-}
-
-Glib::RefPtr<DataModel> Config::list_providers()
-{
- return Glib::wrap(gda_config_list_providers());
-}
-
-int Config::get_nb_dsn()
-{
- return gda_config_get_nb_dsn();
-}
-
-bool Config::can_modify_system_config()
-{
- return gda_config_can_modify_system_config();
-}
-
} // namespace Gda
} /* namespace Gnome */
-
diff --git a/libgda/src/config.hg b/libgda/src/config.hg
index 05cd979..6e9fafc 100644
--- a/libgda/src/config.hg
+++ b/libgda/src/config.hg
@@ -32,7 +32,10 @@ namespace Gnome
namespace Gda
{
-
+
+_WRAP_GERROR(ConfigError, GdaConfigError, GDA_CONFIG_ERROR)
+
+
/** Configuration â?? Access/Management of libgda configuration.
*
* @ingroup Configuration
@@ -44,25 +47,20 @@ protected:
_CTOR_DEFAULT;
public:
_WRAP_METHOD(static Glib::RefPtr<Config> get(), gda_config_get, refreturn)
-
- _WRAP_METHOD_DOCS_ONLY(gda_config_get_dsn_info)
- static GdaDsnInfo* get_dsn_info(const Glib::ustring& dsn_name);
-
- _WRAP_METHOD_DOCS_ONLY(gda_config_dsn_needs_authentication)
- static bool dsn_needs_authentication(const Glib::ustring& dsn_name);
- _WRAP_METHOD_DOCS_ONLY(gda_config_list_dsn)
- static Glib::RefPtr<DataModel> list_dsn();
+ _WRAP_METHOD(static GdaDsnInfo* get_dsn_info(const Glib::ustring& dsn_name), gda_config_get_dsn_info)
+ _WRAP_METHOD(static bool dsn_needs_authentication(const Glib::ustring& dsn_name), gda_config_dsn_needs_authentication)
+
+ _WRAP_METHOD(static Glib::RefPtr<DataModel> list_dsn(), gda_config_list_dsn)
- _WRAP_METHOD_DOCS_ONLY(gda_config_list_providers)
- static Glib::RefPtr<DataModel> list_providers();
+ _WRAP_METHOD(static Glib::RefPtr<ServerProvider> get_provider(const Glib::ustring& provider_name), gda_config_get_provider, errthrow)
- _WRAP_METHOD_DOCS_ONLY(gda_config_get_nb_dsn)
- static int get_nb_dsn();
+ _WRAP_METHOD(static Glib::RefPtr<DataModel> list_providers(), gda_config_list_providers)
+
+ _WRAP_METHOD(static int get_nb_dsn(), gda_config_get_nb_dsn)
+
+ _WRAP_METHOD(static bool can_modify_system_config(), gda_config_can_modify_system_config)
- _WRAP_METHOD_DOCS_ONLY(gda_config_can_modify_system_config)
- static bool can_modify_system_config();
-
#m4 _CONVERSION(`gpointer',`GdaDsnInfo*',`(GdaDsnInfo*)($3)')
_WRAP_SIGNAL(void dsn_added(GdaDsnInfo* info), "dsn-added", no_default_handler)
_WRAP_SIGNAL(void dsn_changed(GdaDsnInfo* info), "dsn-changed", no_default_handler)
@@ -75,4 +73,3 @@ public:
} // namespace Gda
} // namespace Gnome
-
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]