DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
-SUBDIRS = src docs tests
+SUBDIRS = src data docs tests
ACLOCAL_AMFLAGS = -I m4
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
-AC_INIT([libgdaex], [0.2.2], [azagli@libero.it])
+AC_INIT([libgdaex], [0.3.0], [azagli@libero.it])
AC_CONFIG_SRCDIR([src/gdaex.c])
AM_CONFIG_HEADER([config.h])
# Checks for libraries.
PKG_CHECK_MODULES(GDAEX, [libgda-4.0 >= 4
- gio-2.0 >= 2.24])
+ gio-2.0 >= 2.24
+ gtk+-2.0 >= 2.20])
AC_SUBST(GDAEX_CFLAGS)
AC_SUBST(GDAEX_LIBS)
AC_CHECK_FUNCS([strchr strcasecmp])
AC_CONFIG_FILES([
- libgdaex.pc
- Makefile
- src/Makefile
- docs/Makefile
- docs/reference/Makefile
- docs/reference/version.xml
- tests/Makefile
+ libgdaex.pc
+ Makefile
+ src/Makefile
+ data/Makefile
+ data/libgdaex/Makefile
+ data/libgdaex/gui/Makefile
+ docs/Makefile
+ docs/reference/Makefile
+ docs/reference/version.xml
+ tests/Makefile
])
AC_OUTPUT
lib_LTLIBRARIES = libgdaex.la
-libgdaex_la_SOURCES = gdaex.c
+libgdaex_la_SOURCES = gdaex.c \
+ queryeditor.c
libgdaex_la_LDFLAGS = -no-undefined
-include_HEADERS = libgdaex.h
+include_HEADERS = libgdaex.h \
+ gdaex.h \
+ queryeditor.h
+
+libgdaex_includedir = $(includedir)/libgdaex
/*
* gdaex.c
*
- * Copyright (C) 2005-2010 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2005-2011 Andrea Zagli <azagli@libero.it>
*
* This file is part of libgdaex.
*
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with libgdaexbj; if not, write to the Free Software
+ * along with libgdaex; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#include <gio/gio.h>
#include <libgda/sql-parser/gda-sql-parser.h>
-#include "libgdaex.h"
+#include "gdaex.h"
static guint debug;
static gchar *log_file;
--- /dev/null
+/*
+ * gdaex.h
+ *
+ * Copyright (C) 2005-2011 Andrea Zagli <azagli@libero.it>
+ *
+ * This file is part of libgdaex.
+ *
+ * libgdaex is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * libgdaex 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 General Public License
+ * along with libgdaex; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include <time.h>
+#include <glib.h>
+#include <glib-object.h>
+#include <libgda/libgda.h>
+
+#ifndef __GDAEX_H__
+#define __GDAEX_H__
+
+G_BEGIN_DECLS
+
+
+#define TYPE_GDAEX (gdaex_get_type ())
+#define GDAEX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GDAEX, GdaEx))
+#define GDAEX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GDAEX, GdaExClass))
+#define IS_GDAEX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_GDAEX))
+#define IS_GDAEX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_GDAEX))
+#define GDAEX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_GDAEX, GdaExClass))
+
+
+typedef struct _GdaEx GdaEx;
+typedef struct _GdaExClass GdaExClass;
+
+struct _GdaEx
+ {
+ GObject parent;
+ };
+
+struct _GdaExClass
+ {
+ GObjectClass parent_class;
+
+ guint before_execute_signal_id;
+ guint after_execute_signal_id;
+ };
+
+GType gdaex_get_type (void) G_GNUC_CONST;
+
+
+GdaEx *gdaex_new_from_dsn (const gchar *dsn,
+ const gchar *username,
+ const gchar *password);
+GdaEx *gdaex_new_from_string (const gchar *cnc_string);
+GdaEx *gdaex_new_from_connection (GdaConnection *conn);
+
+GOptionGroup *gdaex_get_option_group (GdaEx *gdaex);
+
+const GdaConnection *gdaex_get_gdaconnection (GdaEx *gdaex);
+const gchar *gdaex_get_provider (GdaEx *gdaex);
+
+const gchar *gdaex_get_tables_name_prefix (GdaEx *gdaex);
+void gdaex_set_tables_name_prefix (GdaEx *gdaex, const gchar *tables_name_prefix);
+
+GdaDataModel *gdaex_query (GdaEx *gdaex, const gchar *sql);
+
+gchar *gdaex_data_model_get_field_value_stringify_at (GdaDataModel *data_model,
+ gint row,
+ const gchar *field_name);
+gint gdaex_data_model_get_field_value_integer_at (GdaDataModel *data_model,
+ gint row,
+ const gchar *field_name);
+gfloat gdaex_data_model_get_field_value_float_at (GdaDataModel *data_model,
+ gint row,
+ const gchar *field_name);
+gdouble gdaex_data_model_get_field_value_double_at (GdaDataModel *data_model,
+ gint row,
+ const gchar *field_name);
+gboolean gdaex_data_model_get_field_value_boolean_at (GdaDataModel *data_model,
+ gint row,
+ const gchar *field_name);
+GdaTimestamp *gdaex_data_model_get_field_value_gdatimestamp_at (GdaDataModel *data_model,
+ gint row,
+ const gchar *field_name);
+GDate *gdaex_data_model_get_field_value_gdate_at (GdaDataModel *data_model,
+ gint row,
+ const gchar *field_name);
+struct tm *gdaex_data_model_get_field_value_tm_at (GdaDataModel *data_model,
+ gint row,
+ const gchar *field_name);
+
+gchar *gdaex_data_model_get_value_stringify_at (GdaDataModel *data_model,
+ gint row,
+ gint col);
+gint gdaex_data_model_get_value_integer_at (GdaDataModel *data_model,
+ gint row,
+ gint col);
+gfloat gdaex_data_model_get_value_float_at (GdaDataModel *data_model,
+ gint row,
+ gint col);
+gdouble gdaex_data_model_get_value_double_at (GdaDataModel *data_model,
+ gint row,
+ gint col);
+gboolean gdaex_data_model_get_value_boolean_at (GdaDataModel *data_model,
+ gint row,
+ gint col);
+GdaTimestamp *gdaex_data_model_get_value_gdatimestamp_at (GdaDataModel *data_model,
+ gint row,
+ gint col);
+GDate *gdaex_data_model_get_value_gdate_at (GdaDataModel *data_model,
+ gint row,
+ gint col);
+struct tm *gdaex_data_model_get_value_tm_at (GdaDataModel *data_model,
+ gint row,
+ gint col);
+
+gboolean gdaex_begin (GdaEx *gdaex);
+
+gint gdaex_execute (GdaEx *gdaex, const gchar *sql);
+
+gboolean gdaex_commit (GdaEx *gdaex);
+gboolean gdaex_rollback (GdaEx *gdaex);
+
+void gdaex_free (GdaEx *gdaex);
+
+gchar *gdaex_strescape (const gchar *source, const gchar *exceptions);
+
+gchar gdaex_get_chr_quoting (GdaEx *gdaex);
+
+
+G_END_DECLS
+
+#endif /* __GDAEX_H__ */
/*
* libgdaex.h
*
- * Copyright (C) 2005-2010 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2005-2011 Andrea Zagli <azagli@libero.it>
*
* This file is part of libgdaex.
- *
+ *
* libgdaex is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* libgdaex 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 General Public License
* along with libgdaexbj; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
*/
-#include <time.h>
-#include <glib.h>
-#include <glib-object.h>
-#include <libgda/libgda.h>
-
-#ifndef __GDAEX_H__
-#define __GDAEX_H__
-
-G_BEGIN_DECLS
-
-
-#define TYPE_GDAEX (gdaex_get_type ())
-#define GDAEX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GDAEX, GdaEx))
-#define GDAEX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GDAEX, GdaExClass))
-#define IS_GDAEX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_GDAEX))
-#define IS_GDAEX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_GDAEX))
-#define GDAEX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_GDAEX, GdaExClass))
-
-
-typedef struct _GdaEx GdaEx;
-typedef struct _GdaExClass GdaExClass;
-
-struct _GdaEx
- {
- GObject parent;
- };
-
-struct _GdaExClass
- {
- GObjectClass parent_class;
-
- guint before_execute_signal_id;
- guint after_execute_signal_id;
- };
-
-GType gdaex_get_type (void) G_GNUC_CONST;
-
-
-GdaEx *gdaex_new_from_dsn (const gchar *dsn,
- const gchar *username,
- const gchar *password);
-GdaEx *gdaex_new_from_string (const gchar *cnc_string);
-GdaEx *gdaex_new_from_connection (GdaConnection *conn);
-
-GOptionGroup *gdaex_get_option_group (GdaEx *gdaex);
-
-const GdaConnection *gdaex_get_gdaconnection (GdaEx *gdaex);
-const gchar *gdaex_get_provider (GdaEx *gdaex);
-
-const gchar *gdaex_get_tables_name_prefix (GdaEx *gdaex);
-void gdaex_set_tables_name_prefix (GdaEx *gdaex, const gchar *tables_name_prefix);
-
-GdaDataModel *gdaex_query (GdaEx *gdaex, const gchar *sql);
-
-gchar *gdaex_data_model_get_field_value_stringify_at (GdaDataModel *data_model,
- gint row,
- const gchar *field_name);
-gint gdaex_data_model_get_field_value_integer_at (GdaDataModel *data_model,
- gint row,
- const gchar *field_name);
-gfloat gdaex_data_model_get_field_value_float_at (GdaDataModel *data_model,
- gint row,
- const gchar *field_name);
-gdouble gdaex_data_model_get_field_value_double_at (GdaDataModel *data_model,
- gint row,
- const gchar *field_name);
-gboolean gdaex_data_model_get_field_value_boolean_at (GdaDataModel *data_model,
- gint row,
- const gchar *field_name);
-GdaTimestamp *gdaex_data_model_get_field_value_gdatimestamp_at (GdaDataModel *data_model,
- gint row,
- const gchar *field_name);
-GDate *gdaex_data_model_get_field_value_gdate_at (GdaDataModel *data_model,
- gint row,
- const gchar *field_name);
-struct tm *gdaex_data_model_get_field_value_tm_at (GdaDataModel *data_model,
- gint row,
- const gchar *field_name);
-
-gchar *gdaex_data_model_get_value_stringify_at (GdaDataModel *data_model,
- gint row,
- gint col);
-gint gdaex_data_model_get_value_integer_at (GdaDataModel *data_model,
- gint row,
- gint col);
-gfloat gdaex_data_model_get_value_float_at (GdaDataModel *data_model,
- gint row,
- gint col);
-gdouble gdaex_data_model_get_value_double_at (GdaDataModel *data_model,
- gint row,
- gint col);
-gboolean gdaex_data_model_get_value_boolean_at (GdaDataModel *data_model,
- gint row,
- gint col);
-GdaTimestamp *gdaex_data_model_get_value_gdatimestamp_at (GdaDataModel *data_model,
- gint row,
- gint col);
-GDate *gdaex_data_model_get_value_gdate_at (GdaDataModel *data_model,
- gint row,
- gint col);
-struct tm *gdaex_data_model_get_value_tm_at (GdaDataModel *data_model,
- gint row,
- gint col);
-
-gboolean gdaex_begin (GdaEx *gdaex);
-
-gint gdaex_execute (GdaEx *gdaex, const gchar *sql);
-
-gboolean gdaex_commit (GdaEx *gdaex);
-gboolean gdaex_rollback (GdaEx *gdaex);
-
-void gdaex_free (GdaEx *gdaex);
-
-gchar *gdaex_strescape (const gchar *source, const gchar *exceptions);
+#ifndef __LIBGDAEX_H__
+#define __LIBGDAEX_H__
-gchar gdaex_get_chr_quoting (GdaEx *gdaex);
+#include "gdaex.h"
+#include "queryeditor.h"
-G_END_DECLS
-#endif /* __GDAEX_H__ */
+#endif /* __LIBGDAEX_H__ */
#include <glib.h>
#include <glib-object.h>
+#include <gtk/gtk.h>
+
#include <libgdaex.h>