]> saetta.ns0.it Git - libzakdbt/commitdiff
Starting to change name and namespace.
authorAndrea Zagli <azagli@libero.it>
Sat, 20 Jan 2018 08:32:09 +0000 (09:32 +0100)
committerAndrea Zagli <azagli@libero.it>
Sat, 20 Jan 2018 08:32:09 +0000 (09:32 +0100)
13 files changed:
Makefile.am
configure.ac
docs/dbtransformer.dtd [deleted file]
docs/reference/Makefile.am
docs/zakdbt.dtd [new file with mode: 0644]
libdbtransformer.pc.in [deleted file]
libzakdbt.pc.in [new file with mode: 0644]
src/Makefile.am
src/dbtransformer.c
src/libdbtransformer.h [deleted file]
src/libzakdbt.h [new file with mode: 0644]
tests/Makefile.am
tests/test.c

index 2d6bb2d59f65c3eb938a28a8f6c66716c2114a93..87239262b46e5dcbfe02dab2dfb31f5ba906d363 100644 (file)
@@ -4,10 +4,10 @@ SUBDIRS = src tests docs
 
 ACLOCAL_AMFLAGS = -I m4
 
-EXTRA_DIST = libdbtransformer.pc.in
+EXTRA_DIST = libzakdbt.pc.in
 
 pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = libdbtransformer.pc
+pkgconfig_DATA = libzakdbt.pc
 
 distclean-local:
        if test "$(srcdir)" = "."; then :; else \
index 64e8829cc46483965eba9a5aad5d113fe197f7fc..40980dc04940c870d7f29d0b1548b5df06c8ae92 100644 (file)
@@ -2,7 +2,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ(2.65)
-AC_INIT([libdbtransformers], [0.0.1], [azagli@libero.it])
+AC_INIT([libzakdbt], [0.0.1], [azagli@libero.it])
 AC_CONFIG_SRCDIR([src/dbtransformer.c])
 AC_CONFIG_HEADER([config.h])
 
@@ -48,7 +48,7 @@ AC_C_CONST
 
 # Checks for library functions.
 AC_CONFIG_FILES([
-  libdbtransformer.pc
+  libzakdbt.pc
   Makefile
   src/Makefile
   tests/Makefile
diff --git a/docs/dbtransformer.dtd b/docs/dbtransformer.dtd
deleted file mode 100644 (file)
index 3f5feca..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-<!ELEMENT dbtransformer (dbtransformation+)>
-
-<!ELEMENT dbtransformation (comment?,
-                          gda_op*,
-                          sql*,
-                          drop_table*,
-                          rename_table*,
-                          drop_view*,
-                          rename_view*,
-                          create_index*,
-                          drop_index*)>
-
-<!ATTLIST dbtransformation
-       id CDATA #REQUIRED
->
-
-<!ELEMENT comment (#PCDATA)>
-
-<!ELEMENT gda_op (#PCDATA)>
-
-<!ELEMENT sql (#PCDATA)>
-
-<!ELEMENT drop_table (table_name)>
-
-<!ELEMENT rename_table (table_name, new_table_name)>
-
-<!ELEMENT table_name (#PCDATA)>
-
-<!ELEMENT new_table_name (#PCDATA)>
-
-<!ELEMENT drop_view (view_name)>
-
-<!ELEMENT rename_view (view_name, new_view_name)>
-
-<!ELEMENT view_name (#PCDATA)>
-
-<!ELEMENT new_view_name (#PCDATA)>
-
-<!ELEMENT create_index (index_name, table_name, column_name+)>
-
-<!ELEMENT column_name (#PCDATA)>
-
-<!ELEMENT drop_index (index_name)>
index 8d64f7914728bed87759dad112d2733f6005ceef..7c6bdf99cf725cf9381f34407b2488b1d7359385 100644 (file)
@@ -9,7 +9,7 @@ AUTOMAKE_OPTIONS = 1.6
 # of using the various options.
 
 # The name of the module, e.g. 'glib'.
-DOC_MODULE=dbtransformer
+DOC_MODULE=zakdbt
 
 # Uncomment for versioned docs and specify the version of the module, e.g. '2'.
 #DOC_MODULE_VERSION=2
@@ -79,7 +79,7 @@ expand_content_files=
 # e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS)
 # e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib)
 GTKDOC_CFLAGS=-I$(top_srcdir)/src $(DBT_CFLAGS)
-GTKDOC_LIBS=$(top_builddir)/src/libdbtransformer.la $(DBT_LIBS)
+GTKDOC_LIBS=$(top_builddir)/src/libzakdbt.la $(DBT_LIBS)
 
 # This includes the standard gtk-doc make rules, copied by gtkdocize.
 include $(top_srcdir)/gtk-doc.make
diff --git a/docs/zakdbt.dtd b/docs/zakdbt.dtd
new file mode 100644 (file)
index 0000000..3f5feca
--- /dev/null
@@ -0,0 +1,43 @@
+<!ELEMENT dbtransformer (dbtransformation+)>
+
+<!ELEMENT dbtransformation (comment?,
+                          gda_op*,
+                          sql*,
+                          drop_table*,
+                          rename_table*,
+                          drop_view*,
+                          rename_view*,
+                          create_index*,
+                          drop_index*)>
+
+<!ATTLIST dbtransformation
+       id CDATA #REQUIRED
+>
+
+<!ELEMENT comment (#PCDATA)>
+
+<!ELEMENT gda_op (#PCDATA)>
+
+<!ELEMENT sql (#PCDATA)>
+
+<!ELEMENT drop_table (table_name)>
+
+<!ELEMENT rename_table (table_name, new_table_name)>
+
+<!ELEMENT table_name (#PCDATA)>
+
+<!ELEMENT new_table_name (#PCDATA)>
+
+<!ELEMENT drop_view (view_name)>
+
+<!ELEMENT rename_view (view_name, new_view_name)>
+
+<!ELEMENT view_name (#PCDATA)>
+
+<!ELEMENT new_view_name (#PCDATA)>
+
+<!ELEMENT create_index (index_name, table_name, column_name+)>
+
+<!ELEMENT column_name (#PCDATA)>
+
+<!ELEMENT drop_index (index_name)>
diff --git a/libdbtransformer.pc.in b/libdbtransformer.pc.in
deleted file mode 100644 (file)
index da9a23f..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-
-Name: @PACKAGE_NAME@
-Description: Class to manage authorizations.
-Version: @PACKAGE_VERSION@
-Requires: glib-2.0
-Libs: -L${libdir} -lautoz
-Cflags: -I${includedir}
diff --git a/libzakdbt.pc.in b/libzakdbt.pc.in
new file mode 100644 (file)
index 0000000..89ba036
--- /dev/null
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: @PACKAGE_NAME@
+Description: Class to manage db changes.
+Version: @PACKAGE_VERSION@
+Requires: libgda-5.0 libxslt
+Libs: -L${libdir} -lzakdbt
+Cflags: -I${includedir}
index 41a3c7b14f2b09b240a1049f1741993ee896d5b5..a9d7518447bfc3e4dced4c6b44d2f4d3b0af912d 100644 (file)
@@ -2,12 +2,12 @@ LIBS = $(DBT_LIBS)
 
 AM_CPPFLAGS = $(DBT_CFLAGS)
 
-lib_LTLIBRARIES = libdbtransformer.la
+lib_LTLIBRARIES = libzakdbt.la
 
-libdbtransformer_la_SOURCES = dbtransformer.c
+libzakdbt_la_SOURCES = dbtransformer.c
 
-libdbtransformer_la_LDFLAGS = -no-undefined
+libzakdbt_la_LDFLAGS = -no-undefined
 
-libdbtransformer_include_HEADERS = libdbtransformer.h
+libzakdbt_include_HEADERS = libzakdbt.h
 
-libdbtransformer_includedir = $(includedir)
+libzakdbt_includedir = $(includedir)/$(PACKAGE)
index 717323550c8cd892381b55ff18267b9e5295a7a3..23157727ff6727dc2a476dfaa46dbd3f98b8be99 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2010-2018 Andrea Zagli <azagli@libero.it>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -31,7 +31,7 @@
 
 #include <sql-parser/gda-sql-parser.h>
 
-#include "libdbtransformer.h"
+#include "libzakdbt.h"
 
 static gchar *str_xslt_doc =
 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
@@ -332,7 +332,7 @@ dbt_set_xml_from_filename (Dbt *dbt, const gchar *filename)
 
        filen = g_strstrip (g_strdup (filename));
 
-       g_return_if_fail (g_strcmp0 (filen, "") != 0);  
+       g_return_if_fail (g_strcmp0 (filen, "") != 0);
 
        /* TODO validate against DTD */
 
@@ -503,7 +503,7 @@ dbt_check_db (Dbt *dbt, gboolean create_tables)
                                                {
                                                        return ret;
                                                }
-                                       
+
                                        /* table doesn't exist */
                                        GdaServerOperation *op;
                                        gint i;
@@ -520,7 +520,7 @@ dbt_check_db (Dbt *dbt, gboolean create_tables)
                                        /* Set parameter's values */
                                        /* table name */
                                        gda_server_operation_set_value_at (op, "dbt_transformations", &error, "/TABLE_DEF_P/TABLE_NAME");
-               
+
                                        /* "id" field */
                                        i = 0;
                                        gda_server_operation_set_value_at (op, "id", &error, "/FIELDS_A/@COLUMN_NAME/%d", i);
@@ -546,7 +546,7 @@ dbt_check_db (Dbt *dbt, gboolean create_tables)
                                                                   error != NULL && error->message != NULL ? error->message : "no detail");
                                                        return ret;
                                                }
-                                       g_object_unref (op);                    
+                                       g_object_unref (op);
                                }
                }
 
@@ -918,7 +918,7 @@ dbt_parse_rename_table (Dbt *dbt, xmlNodePtr xnode)
                                                         error != NULL && error->message != NULL ? error->message : "No detail");
                                        ret = FALSE;
                                }
-                       g_object_unref (op);                    
+                       g_object_unref (op);
                }
        else
                {
@@ -1178,7 +1178,7 @@ g_debug("%s",gda_server_provider_render_operation(priv->gda_provider, priv->gda_
                                                   error != NULL && error->message != NULL ? error->message : "no detail");
                                        ret = FALSE;
                                }
-                       g_object_unref (op);                    
+                       g_object_unref (op);
                }
        else
                {
@@ -1240,7 +1240,7 @@ dbt_parse_drop_index (Dbt *dbt, xmlNodePtr xnode)
                                                   error != NULL && error->message != NULL ? error->message : "No detail");
                                        ret = FALSE;
                                }
-                       g_object_unref (op);                    
+                       g_object_unref (op);
                }
        else
                {
diff --git a/src/libdbtransformer.h b/src/libdbtransformer.h
deleted file mode 100644 (file)
index c9aeaeb..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (C) 2010 Andrea Zagli <azagli@libero.it>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser 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 __LIBDBT_H__
-#define __LIBDBT_H__
-
-#include <glib.h>
-#include <glib-object.h>
-#include <libgda/libgda.h>
-
-
-G_BEGIN_DECLS
-
-
-#define TYPE_DBT                 (dbt_get_type ())
-#define DBT(obj)                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DBT, Dbt))
-#define DBT_CLASS(klass)         (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DBT, DbtClass))
-#define IS_DBT(obj)              (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DBT))
-#define IS_DBT_CLASS(klass)      (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DBT))
-#define DBT_GET_CLASS(obj)       (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DBT, DbtClass))
-
-
-typedef struct _Dbt Dbt;
-typedef struct _DbtClass DbtClass;
-
-struct _Dbt
-       {
-               GObject parent;
-       };
-
-struct _DbtClass
-       {
-               GObjectClass parent_class;
-       };
-
-GType dbt_get_type (void) G_GNUC_CONST;
-
-
-Dbt *dbt_new (void);
-
-void dbt_set_db_connection (Dbt *dbt, GdaConnection *gda_conn);
-void dbt_set_db_connection_from_string (Dbt *dbt, const gchar *cnc_string);
-
-void dbt_set_xml (Dbt *dbt, xmlNodePtr xml_root);
-void dbt_set_xml_from_filename (Dbt *dbt, const gchar *filename);
-
-gboolean dbt_db_is_updated (Dbt *dbt);
-
-void dbt_transform (Dbt *dbt);
-
-
-G_END_DECLS
-
-
-#endif /* __LIBDBT_H__ */
diff --git a/src/libzakdbt.h b/src/libzakdbt.h
new file mode 100644 (file)
index 0000000..c9aeaeb
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2010 Andrea Zagli <azagli@libero.it>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser 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 __LIBDBT_H__
+#define __LIBDBT_H__
+
+#include <glib.h>
+#include <glib-object.h>
+#include <libgda/libgda.h>
+
+
+G_BEGIN_DECLS
+
+
+#define TYPE_DBT                 (dbt_get_type ())
+#define DBT(obj)                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DBT, Dbt))
+#define DBT_CLASS(klass)         (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DBT, DbtClass))
+#define IS_DBT(obj)              (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DBT))
+#define IS_DBT_CLASS(klass)      (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DBT))
+#define DBT_GET_CLASS(obj)       (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DBT, DbtClass))
+
+
+typedef struct _Dbt Dbt;
+typedef struct _DbtClass DbtClass;
+
+struct _Dbt
+       {
+               GObject parent;
+       };
+
+struct _DbtClass
+       {
+               GObjectClass parent_class;
+       };
+
+GType dbt_get_type (void) G_GNUC_CONST;
+
+
+Dbt *dbt_new (void);
+
+void dbt_set_db_connection (Dbt *dbt, GdaConnection *gda_conn);
+void dbt_set_db_connection_from_string (Dbt *dbt, const gchar *cnc_string);
+
+void dbt_set_xml (Dbt *dbt, xmlNodePtr xml_root);
+void dbt_set_xml_from_filename (Dbt *dbt, const gchar *filename);
+
+gboolean dbt_db_is_updated (Dbt *dbt);
+
+void dbt_transform (Dbt *dbt);
+
+
+G_END_DECLS
+
+
+#endif /* __LIBDBT_H__ */
index f54f87184edacd44aacee3f0e10e4688b9f55ac8..6d61596c998faae60a87a34185a8ac8fc93bb357 100644 (file)
@@ -6,6 +6,6 @@ AM_CPPFLAGS = $(DBT_CFLAGS) \
 
 noinst_PROGRAMS = test
 
-LDADD = $(top_builddir)/src/libdbtransformer.la
+LDADD = $(top_builddir)/src/libzakdbt.la
 
-EXTRA_DIST = 
+EXTRA_DIST =
index 41bccca17fe88043866738ce181125e3e8b317e3..98a8620feb608b5e27e98049b57557002c6a1666 100644 (file)
@@ -16,7 +16,7 @@
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
-#include "libdbtransformer.h"
+#include "libzakdbt.h"
 
 Dbt *dbt;