[couchdb-glib] Added couchdb_get_hostname function
- From: Rodrigo Moya <rodrigo src gnome org>
- To: svn-commits-list gnome org
- Subject: [couchdb-glib] Added couchdb_get_hostname function
- Date: Mon, 22 Jun 2009 11:33:12 -0400 (EDT)
commit 6f9a6c038f37e4cd4757eb9f71861b2de3b3e384
Author: Rodrigo Moya <rodrigo gnome-db org>
Date: Mon Jun 22 17:33:01 2009 +0200
Added couchdb_get_hostname function
couchdb-glib/couchdb-glib.h | 6 ++++--
couchdb-glib/couchdb.c | 8 ++++++++
2 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/couchdb-glib/couchdb-glib.h b/couchdb-glib/couchdb-glib.h
index cfd142b..ee3795f 100644
--- a/couchdb-glib/couchdb-glib.h
+++ b/couchdb-glib/couchdb-glib.h
@@ -36,8 +36,10 @@ typedef struct {
GObjectClass parent_class;
} CouchDBClass;
-GType couchdb_get_type (void);
-CouchDB *couchdb_new (const char *hostname);
+GType couchdb_get_type (void);
+CouchDB *couchdb_new (const char *hostname);
+
+const char *couchdb_get_hostname (CouchDB *couchdb);
/*
* Databases API
diff --git a/couchdb-glib/couchdb.c b/couchdb-glib/couchdb.c
index 5b9acd7..cb0c159 100644
--- a/couchdb-glib/couchdb.c
+++ b/couchdb-glib/couchdb.c
@@ -66,6 +66,14 @@ couchdb_new (const char *hostname)
return couchdb;
}
+const char *
+couchdb_get_hostname (CouchDB *couchdb)
+{
+ g_return_val_if_fail (COUCHDB_IS (couchdb), NULL);
+
+ return (const char *) couchdb->hostname;
+}
+
GSList *
couchdb_list_databases (CouchDB *couchdb, GError **error)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]