[couchdb-glib] Added basic CouchdbAuth object
- From: Rodrigo Moya <rodrigo src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [couchdb-glib] Added basic CouchdbAuth object
- Date: Thu, 14 Jan 2010 14:58:10 +0000 (UTC)
commit a00fea9354424604154c7859bd6336e89c1cb505
Author: Rodrigo Moya <rodrigo gnome-db org>
Date: Thu Jan 14 15:57:54 2010 +0100
Added basic CouchdbAuth object
couchdb-glib/Makefile.am | 9 +++++--
couchdb-glib/couchdb-auth.c | 43 +++++++++++++++++++++++++++++++++++++
couchdb-glib/couchdb-auth.h | 50 +++++++++++++++++++++++++++++++++++++++++++
couchdb-glib/couchdb-glib.h | 1 +
4 files changed, 100 insertions(+), 3 deletions(-)
---
diff --git a/couchdb-glib/Makefile.am b/couchdb-glib/Makefile.am
index cbeb5ca..1e639e1 100644
--- a/couchdb-glib/Makefile.am
+++ b/couchdb-glib/Makefile.am
@@ -25,23 +25,25 @@ couchdb-marshal.c: couchdb-marshal.list $(GLIB_GENMARSHAL)
$(GLIB_GENMARSHAL) $< --body --prefix=_couchdb_marshal > $@
libcouchdb_glib_1_0_la_headers = \
- couchdb-session.h \
+ couchdb-auth.h \
couchdb-database-info.h \
couchdb-document.h \
couchdb-document-contact.h \
couchdb-document-info.h \
couchdb-glib.h \
+ couchdb-session.h \
couchdb-struct-field.h \
couchdb-types.h \
dbwatch.h \
utils.h
libcouchdb_glib_1_0_la_sources = \
- couchdb-session.c \
+ couchdb-auth.c \
couchdb-database-info.c \
couchdb-document.c \
couchdb-document-contact.c \
couchdb-document-info.c \
+ couchdb-session.c \
couchdb-struct-field.c \
dbwatch.c \
utils.c \
@@ -64,12 +66,13 @@ libcouchdb_glib_1_0_la_LDFLAGS = \
hdir = $(includedir)/couchdb-glib-1.0
h_DATA = \
- couchdb-session.h \
couchdb-glib.h \
+ couchdb-auth.h \
couchdb-database-info.h \
couchdb-document-contact.h \
couchdb-document.h \
couchdb-document-info.h \
+ couchdb-session.h \
couchdb-struct-field.h \
couchdb-types.h
diff --git a/couchdb-glib/couchdb-auth.c b/couchdb-glib/couchdb-auth.c
new file mode 100644
index 0000000..b25acf0
--- /dev/null
+++ b/couchdb-glib/couchdb-auth.c
@@ -0,0 +1,43 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * Copyright (C) 2010 Canonical Services Ltd (www.canonical.com)
+ *
+ * Authors: Rodrigo Moya <rodrigo moya canonical com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU Lesser General Public
+ * License as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "couchdb-auth.h"
+
+G_DEFINE_TYPE(CouchdbAuth, couchdb_auth, G_TYPE_OBJECT)
+
+static void
+couchdb_auth_finalize (GObject *object)
+{
+ G_OBJECT_CLASS (couchdb_auth_parent_class)->finalize (object);
+}
+
+static void
+couchdb_auth_class_init (CouchdbAuthClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ object_class->finalize = couchdb_auth_finalize;
+}
+
+static void
+couchdb_auth_init (CouchdbAuth *auth)
+{
+}
diff --git a/couchdb-glib/couchdb-auth.h b/couchdb-glib/couchdb-auth.h
new file mode 100644
index 0000000..3a67d8e
--- /dev/null
+++ b/couchdb-glib/couchdb-auth.h
@@ -0,0 +1,50 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * Copyright (C) 2009 Canonical Services Ltd (www.canonical.com)
+ *
+ * Authors: Rodrigo Moya <rodrigo moya canonical com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU Lesser General Public
+ * License as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __COUCHDB_AUTH_H__
+#define __COUCHDB_AUTH_H__
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define COUCHDB_TYPE_AUTH (couchdb_auth_get_type ())
+#define COUCHDB_AUTH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), COUCHDB_TYPE_AUTH, CouchdbAuth))
+#define COUCHDB_IS_AUTH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), COUCHDB_TYPE_AUTH))
+#define COUCHDB_AUTH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), COUCHDB_TYPE_AUTH, CouchdbAuthClass))
+#define COUCHDB_IS_AUTH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), COUCHDB_TYPE_AUTH))
+#define COUCHDB_AUTH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), COUCHDB_TYPE_AUTH, CouchdbAuthClass))
+
+typedef struct {
+ GObject parent;
+} CouchdbAuth;
+
+typedef struct {
+ GObjectClass parent_class;
+
+ /* Virtual methods */
+} CouchdbAuthClass;
+
+GType couchdb_auth_get_type (void);
+
+G_END_DECLS
+
+#endif
diff --git a/couchdb-glib/couchdb-glib.h b/couchdb-glib/couchdb-glib.h
index e466b0d..de227fc 100644
--- a/couchdb-glib/couchdb-glib.h
+++ b/couchdb-glib/couchdb-glib.h
@@ -26,6 +26,7 @@
#include <couchdb-types.h>
#include <couchdb-session.h>
+#include <couchdb-auth.h>
#include <couchdb-database-info.h>
#include <couchdb-document.h>
#include <couchdb-document-contact.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]