[libgda/LIBGDA_4.2] Modified headers of skeleton implementation for providers
- From: Vivien Malerba <vivien src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda/LIBGDA_4.2] Modified headers of skeleton implementation for providers
- Date: Sat, 9 Apr 2011 14:03:11 +0000 (UTC)
commit 71e701c70c192948607a0bc5c963cafcebe71423
Author: Vivien Malerba <malerba gnome-db org>
Date: Sat Apr 9 15:37:02 2011 +0200
Modified headers of skeleton implementation for providers
doc/C/libgda-4.0-docs.sgml | 2 +-
providers/prepare_provider_sources.sh | 15 ++++++++++-----
.../skel-implementation/capi/gda-capi-blob-op.c | 5 +++--
.../skel-implementation/capi/gda-capi-blob-op.h | 5 +++--
providers/skel-implementation/capi/gda-capi-ddl.c | 5 +++--
providers/skel-implementation/capi/gda-capi-ddl.h | 5 +++--
providers/skel-implementation/capi/gda-capi-meta.c | 5 +++--
providers/skel-implementation/capi/gda-capi-meta.h | 5 +++--
.../skel-implementation/capi/gda-capi-parser.c | 5 +++--
.../skel-implementation/capi/gda-capi-parser.h | 5 +++--
.../skel-implementation/capi/gda-capi-provider.c | 5 +++--
.../skel-implementation/capi/gda-capi-provider.h | 5 +++--
.../skel-implementation/capi/gda-capi-pstmt.c | 5 +++--
.../skel-implementation/capi/gda-capi-pstmt.h | 5 +++--
.../skel-implementation/capi/gda-capi-recordset.c | 5 +++--
.../skel-implementation/capi/gda-capi-recordset.h | 5 +++--
providers/skel-implementation/capi/gda-capi.h | 5 +++--
providers/skel-implementation/capi/gen_def.c | 6 +++++-
providers/skel-implementation/capi/libmain.c | 5 +++--
.../models/gda-models-provider.c | 11 ++++++-----
.../models/gda-models-provider.h | 5 +++--
providers/skel-implementation/models/gda-models.h | 5 +++--
.../models/libgda-models-4.0.pc.in | 2 +-
providers/skel-implementation/models/libmain.c | 5 +++--
24 files changed, 80 insertions(+), 51 deletions(-)
---
diff --git a/doc/C/libgda-4.0-docs.sgml b/doc/C/libgda-4.0-docs.sgml
index 55c17b6..67fb94d 100644
--- a/doc/C/libgda-4.0-docs.sgml
+++ b/doc/C/libgda-4.0-docs.sgml
@@ -1796,7 +1796,7 @@ g_object_unref (eng);
<filename class="directory">dummydb</filename></para></listitem>
<listitem><para>From inside that new directory, run the
<filename class="directory">providers/prepare_provider_sources.sh</filename> script with the name
- of the provider as sole argument ("dummydb" here), which replaces
+ of the provider ("dummydb" here), the author's name and the author's email adress, which replaces
all the class and object names with the name of the provider and renames the files correctly. These
new sources should be compilable without any modification.</para></listitem>
<listitem><para>Edit the <filename>Makefile.am</filename> to add provider specific compilation and link
diff --git a/providers/prepare_provider_sources.sh b/providers/prepare_provider_sources.sh
index 3ac5c64..8b1d0cb 100755
--- a/providers/prepare_provider_sources.sh
+++ b/providers/prepare_provider_sources.sh
@@ -8,16 +8,21 @@
# Usage:
# 1 - Copy the ./skel-implementation/capi or ./skel-implementation/models to another directory (for example MySQL)
# 2 - go into the new directory (MySQL/ in this case)
-# 3 - execute this script with the name of the provider to create (mysql in this case)
-# ../prepare_provider_sources.sh mysql
+# 3 - execute this script with the name of the provider to create (mysql in this case),
+# the name of the author and his/her email adress, for example:
+# ../prepare_provider_sources.sh mysql 'Vivien Malerba' malerba gnome-db org
#
-if [ $# != 1 ]
+if [ $# != 3 ]
then
- echo "Usage: `basename $0` <provider name>"
+ echo "Usage: $0 <provider name> <author' name> <author's email>"
+ echo "example: $0 MySQL 'Vivien Malerba' malerba gnome-db org"
exit 1
fi
provname=$1
+username=$2
+email=$3
+thisyear=`date +%Y`
#
# compute what to rename from ("capi", "models")
@@ -50,7 +55,7 @@ ballupname=$(echo $base | tr a-z A-Z)
for file in *
do
mv $file $file.1
- cat $file.1 | sed -e "s/$base/$provname/g" -e "s/$bupname/$upname/g" -e "s/$ballupname/$allupname/g" -e "s/skel-implementation\///g" > $file
+ cat $file.1 | sed -e "s/$base/$provname/g" -e "s/$bupname/$upname/g" -e "s/$ballupname/$allupname/g" -e "s/skel-implementation\///g" -e "s/TO_ADD: your name and email/$username <$email>/g" -e "s/YEAR/2008 - $thisyear/g"> $file
rm -f $file.1
done
diff --git a/providers/skel-implementation/capi/gda-capi-blob-op.c b/providers/skel-implementation/capi/gda-capi-blob-op.c
index 7f2d012..ffea00c 100644
--- a/providers/skel-implementation/capi/gda-capi-blob-op.c
+++ b/providers/skel-implementation/capi/gda-capi-blob-op.c
@@ -1,8 +1,9 @@
-/* GDA Capi provider
- * Copyright (C) 2008 The GNOME Foundation
+/*
+ * Copyright (C) YEAR The GNOME Foundation
*
* AUTHORS:
* TO_ADD: your name and email
+ * Vivien Malerba <malerba gnome-db org>
*
* This Library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public License as
diff --git a/providers/skel-implementation/capi/gda-capi-blob-op.h b/providers/skel-implementation/capi/gda-capi-blob-op.h
index 708d152..6e83d1a 100644
--- a/providers/skel-implementation/capi/gda-capi-blob-op.h
+++ b/providers/skel-implementation/capi/gda-capi-blob-op.h
@@ -1,8 +1,9 @@
-/* GDA Capi provider
- * Copyright (C) 2008 The GNOME Foundation
+/*
+ * Copyright (C) YEAR The GNOME Foundation
*
* AUTHORS:
* TO_ADD: your name and email
+ * Vivien Malerba <malerba gnome-db org>
*
* This Library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public License as
diff --git a/providers/skel-implementation/capi/gda-capi-ddl.c b/providers/skel-implementation/capi/gda-capi-ddl.c
index 76d4139..accb6ec 100644
--- a/providers/skel-implementation/capi/gda-capi-ddl.c
+++ b/providers/skel-implementation/capi/gda-capi-ddl.c
@@ -1,8 +1,9 @@
-/* GDA Capi Provider
- * Copyright (C) 2008 The GNOME Foundation
+/*
+ * Copyright (C) YEAR The GNOME Foundation
*
* AUTHORS:
* TO_ADD: your name and email
+ * Vivien Malerba <malerba gnome-db org>
*
* This Library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public License as
diff --git a/providers/skel-implementation/capi/gda-capi-ddl.h b/providers/skel-implementation/capi/gda-capi-ddl.h
index 2dd7baf..3c72713 100644
--- a/providers/skel-implementation/capi/gda-capi-ddl.h
+++ b/providers/skel-implementation/capi/gda-capi-ddl.h
@@ -1,8 +1,9 @@
-/* GDA Capi provider
- * Copyright (C) 2008 The GNOME Foundation
+/*
+ * Copyright (C) YEAR The GNOME Foundation
*
* AUTHORS:
* TO_ADD: your name and email
+ * Vivien Malerba <malerba gnome-db org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
diff --git a/providers/skel-implementation/capi/gda-capi-meta.c b/providers/skel-implementation/capi/gda-capi-meta.c
index 328f162..59b2d8b 100644
--- a/providers/skel-implementation/capi/gda-capi-meta.c
+++ b/providers/skel-implementation/capi/gda-capi-meta.c
@@ -1,8 +1,9 @@
-/* GDA capi provider
- * Copyright (C) 2008 - 2009 The GNOME Foundation.
+/*
+ * Copyright (C) YEAR The GNOME Foundation.
*
* AUTHORS:
* TO_ADD: your name and email
+ * Vivien Malerba <malerba gnome-db org>
*
* This Library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public License as
diff --git a/providers/skel-implementation/capi/gda-capi-meta.h b/providers/skel-implementation/capi/gda-capi-meta.h
index 797c923..343462c 100644
--- a/providers/skel-implementation/capi/gda-capi-meta.h
+++ b/providers/skel-implementation/capi/gda-capi-meta.h
@@ -1,8 +1,9 @@
-/* GDA capi provider
- * Copyright (C) 2008 - 2009 The GNOME Foundation.
+/*
+ * Copyright (C) YEAR The GNOME Foundation.
*
* AUTHORS:
* TO_ADD: your name and email
+ * Vivien Malerba <malerba gnome-db org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
diff --git a/providers/skel-implementation/capi/gda-capi-parser.c b/providers/skel-implementation/capi/gda-capi-parser.c
index 4c8ee83..b9f0a99 100644
--- a/providers/skel-implementation/capi/gda-capi-parser.c
+++ b/providers/skel-implementation/capi/gda-capi-parser.c
@@ -1,9 +1,10 @@
-/* GDA Capi provider
+/*
*
- * Copyright (C) 2008 The GNOME Foundation
+ * Copyright (C) YEAR The GNOME Foundation
*
* AUTHORS:
* TO_ADD: your name and email
+ * Vivien Malerba <malerba gnome-db org>
*
* This Library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public License as
diff --git a/providers/skel-implementation/capi/gda-capi-parser.h b/providers/skel-implementation/capi/gda-capi-parser.h
index 9dba096..4ed079c 100644
--- a/providers/skel-implementation/capi/gda-capi-parser.h
+++ b/providers/skel-implementation/capi/gda-capi-parser.h
@@ -1,9 +1,10 @@
-/* GDA Capi provider
+/*
*
- * Copyright (C) 2008 The GNOME Foundation
+ * Copyright (C) YEAR The GNOME Foundation
*
* AUTHORS:
* TO_ADD: your name and email
+ * Vivien Malerba <malerba gnome-db org>
*
* This Library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public License as
diff --git a/providers/skel-implementation/capi/gda-capi-provider.c b/providers/skel-implementation/capi/gda-capi-provider.c
index 2732b89..53684e1 100644
--- a/providers/skel-implementation/capi/gda-capi-provider.c
+++ b/providers/skel-implementation/capi/gda-capi-provider.c
@@ -1,8 +1,9 @@
-/* GDA Capi provider
- * Copyright (C) 2008 - 2010 The GNOME Foundation.
+/*
+ * Copyright (C) YEAR The GNOME Foundation.
*
* AUTHORS:
* TO_ADD: your name and email
+ * Vivien Malerba <malerba gnome-db org>
*
* This Library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public License as
diff --git a/providers/skel-implementation/capi/gda-capi-provider.h b/providers/skel-implementation/capi/gda-capi-provider.h
index f52d3fe..0058010 100644
--- a/providers/skel-implementation/capi/gda-capi-provider.h
+++ b/providers/skel-implementation/capi/gda-capi-provider.h
@@ -1,8 +1,9 @@
-/* GDA capi provider
- * Copyright (C) 2008 The GNOME Foundation.
+/*
+ * Copyright (C) YEAR The GNOME Foundation.
*
* AUTHORS:
* TO_ADD: your name and email
+ * Vivien Malerba <malerba gnome-db org>
*
* This Library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public License as
diff --git a/providers/skel-implementation/capi/gda-capi-pstmt.c b/providers/skel-implementation/capi/gda-capi-pstmt.c
index a5cea4e..ac9d4de 100644
--- a/providers/skel-implementation/capi/gda-capi-pstmt.c
+++ b/providers/skel-implementation/capi/gda-capi-pstmt.c
@@ -1,8 +1,9 @@
-/* GDA Capi provider
- * Copyright (C) 2008 The GNOME Foundation.
+/*
+ * Copyright (C) YEAR The GNOME Foundation.
*
* AUTHORS:
* TO_ADD: your name and email
+ * Vivien Malerba <malerba gnome-db org>
*
* This Library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public License as
diff --git a/providers/skel-implementation/capi/gda-capi-pstmt.h b/providers/skel-implementation/capi/gda-capi-pstmt.h
index f26ee93..f90a077 100644
--- a/providers/skel-implementation/capi/gda-capi-pstmt.h
+++ b/providers/skel-implementation/capi/gda-capi-pstmt.h
@@ -1,8 +1,9 @@
-/* GDA Capi library
- * Copyright (C) 2008 The GNOME Foundation.
+/*
+ * Copyright (C) YEAR The GNOME Foundation.
*
* AUTHORS:
* TO_ADD: your name and email
+ * Vivien Malerba <malerba gnome-db org>
*
* This Library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public License as
diff --git a/providers/skel-implementation/capi/gda-capi-recordset.c b/providers/skel-implementation/capi/gda-capi-recordset.c
index a33c43d..8cdfd54 100644
--- a/providers/skel-implementation/capi/gda-capi-recordset.c
+++ b/providers/skel-implementation/capi/gda-capi-recordset.c
@@ -1,8 +1,9 @@
-/* GDA Capi provider
- * Copyright (C) 2008 The GNOME Foundation.
+/*
+ * Copyright (C) YEAR The GNOME Foundation.
*
* AUTHORS:
* TO_ADD: your name and email
+ * Vivien Malerba <malerba gnome-db org>
*
* This Library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public License as
diff --git a/providers/skel-implementation/capi/gda-capi-recordset.h b/providers/skel-implementation/capi/gda-capi-recordset.h
index 90b9231..8885315 100644
--- a/providers/skel-implementation/capi/gda-capi-recordset.h
+++ b/providers/skel-implementation/capi/gda-capi-recordset.h
@@ -1,8 +1,9 @@
-/* GDA Capi provider
- * Copyright (C) 2008 The GNOME Foundation.
+/*
+ * Copyright (C) YEAR The GNOME Foundation.
*
* AUTHORS:
* TO_ADD: your name and email
+ * Vivien Malerba <malerba gnome-db org>
*
* This Library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public License as
diff --git a/providers/skel-implementation/capi/gda-capi.h b/providers/skel-implementation/capi/gda-capi.h
index 61cc874..b3fef31 100644
--- a/providers/skel-implementation/capi/gda-capi.h
+++ b/providers/skel-implementation/capi/gda-capi.h
@@ -1,8 +1,9 @@
-/* GDA capi provider
- * Copyright (C) 2008 The GNOME Foundation.
+/*
+ * Copyright (C) YEAR The GNOME Foundation.
*
* AUTHORS:
* TO_ADD: your name and email
+ * Vivien Malerba <malerba gnome-db org>
*
* This Library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public License as
diff --git a/providers/skel-implementation/capi/gen_def.c b/providers/skel-implementation/capi/gen_def.c
index 8667072..d074fe6 100644
--- a/providers/skel-implementation/capi/gen_def.c
+++ b/providers/skel-implementation/capi/gen_def.c
@@ -1,5 +1,9 @@
/*
- * Copyright (C) 2007 Vivien Malerba
+ * Copyright (C) YEAR The GNOME Foundation
+ *
+ * AUTHORS:
+ * TO_ADD: your name and email
+ * Vivien Malerba <malerba gnome-db org>
*
* This Library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public License as
diff --git a/providers/skel-implementation/capi/libmain.c b/providers/skel-implementation/capi/libmain.c
index 9f55a54..142cfeb 100644
--- a/providers/skel-implementation/capi/libmain.c
+++ b/providers/skel-implementation/capi/libmain.c
@@ -1,8 +1,9 @@
-/* GDA Capi Provider
- * Copyright (C) 2008 The GNOME Foundation
+/*
+ * Copyright (C) YEAR The GNOME Foundation
*
* AUTHORS:
* TO_ADD: your name and email
+ * Vivien Malerba <malerba gnome-db org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
diff --git a/providers/skel-implementation/models/gda-models-provider.c b/providers/skel-implementation/models/gda-models-provider.c
index f77e70f..f3d9d11 100644
--- a/providers/skel-implementation/models/gda-models-provider.c
+++ b/providers/skel-implementation/models/gda-models-provider.c
@@ -1,8 +1,9 @@
-/* GDA Models provider
- * Copyright (C) 2008 The GNOME Foundation
+/*
+ * Copyright (C) YEAR The GNOME Foundation
*
* AUTHORS:
* TO_ADD: your name and email
+ * Vivien Malerba <malerba gnome-db org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -141,9 +142,9 @@ gda_models_provider_get_version (G_GNUC_UNUSED GdaServerProvider *provider)
* - open the real connection to the database using the parameters previously checked, create one or
* more GdaDataModel objects and declare them to the virtual connection with table names
* - open virtual (SQLite) connection
- * - create a CapiConnectionData structure and associate it to @cnc
+ * - create a ModelsConnectionData structure and associate it to @cnc
*
- * Returns: TRUE if no error occurred, or FALSE otherwise (and an ERROR gonnection event must be added to @cnc)
+ * Returns: TRUE if no error occurred, or FALSE otherwise (and an ERROR connection event must be added to @cnc)
*/
static gboolean
gda_models_provider_open_connection (GdaServerProvider *provider, GdaConnection *cnc,
@@ -166,7 +167,7 @@ gda_models_provider_open_connection (GdaServerProvider *provider, GdaConnection
db_name = gda_quark_list_find (params, "DB_NAME");
if (!db_name) {
gda_connection_add_event_string (cnc,
- _("The connection string must contain the DB_NAME values"));
+ _("The connection string must contain the DB_NAME value"));
return FALSE;
}
diff --git a/providers/skel-implementation/models/gda-models-provider.h b/providers/skel-implementation/models/gda-models-provider.h
index 606760d..b3c9d46 100644
--- a/providers/skel-implementation/models/gda-models-provider.h
+++ b/providers/skel-implementation/models/gda-models-provider.h
@@ -1,8 +1,9 @@
-/* GDA Models provider
- * Copyright (C) 2008 The GNOME Foundation
+/*
+ * Copyright (C) YEAR The GNOME Foundation
*
* AUTHORS:
* TO_ADD: your name and email
+ * Vivien Malerba <malerba gnome-db org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
diff --git a/providers/skel-implementation/models/gda-models.h b/providers/skel-implementation/models/gda-models.h
index 887e51b..28adfc6 100644
--- a/providers/skel-implementation/models/gda-models.h
+++ b/providers/skel-implementation/models/gda-models.h
@@ -1,8 +1,9 @@
-/* GDA Models provider
- * Copyright (C) 2008 The GNOME Foundation
+/*
+ * Copyright (C) YEAR The GNOME Foundation
*
* AUTHORS:
* TO_ADD: your name and email
+ * Vivien Malerba <malerba gnome-db org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
diff --git a/providers/skel-implementation/models/libgda-models-4.0.pc.in b/providers/skel-implementation/models/libgda-models-4.0.pc.in
index 2a4698b..929e71b 100644
--- a/providers/skel-implementation/models/libgda-models-4.0.pc.in
+++ b/providers/skel-implementation/models/libgda-models-4.0.pc.in
@@ -4,6 +4,6 @@ libdir= libdir@
includedir= includedir@
Name: libgda-models- GDA_ABI_MAJOR_VERSION@ GDA_ABI_MINOR_VERSION@
-Description: GDA Models provider
+Description:
Requires: libgda- GDA_ABI_MAJOR_VERSION@ GDA_ABI_MINOR_VERSION@
Version: @VERSION@
diff --git a/providers/skel-implementation/models/libmain.c b/providers/skel-implementation/models/libmain.c
index 64edf1a..9267e4d 100644
--- a/providers/skel-implementation/models/libmain.c
+++ b/providers/skel-implementation/models/libmain.c
@@ -1,8 +1,9 @@
-/* GDA Models provider
- * Copyright (C) 2008 The GNOME Foundation
+/*
+ * Copyright (C) YEAR The GNOME Foundation
*
* AUTHORS:
* TO_ADD: your name and email
+ * Vivien Malerba <malerba gnome-db org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]