# 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)
lib_LTLIBRARIES = libgdaex.la
-libgdaex_la_SOURCES = gdaex.c
+libgdaex_la_SOURCES = gdaex.c \
+ grid.c \
+ gridcolumn.c
libgdaex_la_LDFLAGS = -no-undefined
-include_HEADERS = libgdaex.h
+include_HEADERS = libgdaex.h \
+ gdaex.h \
+ grid.h \
+ gridcolumn.h
+
+libgdaex_includedir = $(includedir)/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-2010 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__ */
--- /dev/null
+/*
+ * grid.c
+ *
+ * Copyright (C) 2005-2010 Andrea Zagli <azagli@libero.it>
+ *
+ * This file is part of libgdaex_grid.
+ *
+ * libgdaex_grid 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_grid 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
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+ #include <config.h>
+#endif
+
+#include "grid.h"
+
+static void gdaex_grid_class_init (GdaExGridClass *klass);
+static void gdaex_grid_init (GdaExGrid *gdaex_grid);
+
+static void gdaex_grid_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec);
+static void gdaex_grid_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec);
+
+#define GDAEX_GRID_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TYPE_GDAEX_GRID, GdaExGridPrivate))
+
+typedef struct
+ {
+ GtkTreeViewColumn *view_col;
+ GdaExGridColumn *grid_col;
+ } _Column;
+
+typedef struct _GdaExGridPrivate GdaExGridPrivate;
+struct _GdaExGridPrivate
+ {
+ GPtrArray *colums; /* _Column */
+ };
+
+G_DEFINE_TYPE (GdaExGrid, gdaex_grid, G_TYPE_OBJECT)
+
+static void
+gdaex_grid_class_init (GdaExGridClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ g_type_class_add_private (object_class, sizeof (GdaExGridPrivate));
+
+ object_class->set_property = gdaex_grid_set_property;
+ object_class->get_property = gdaex_grid_get_property;
+}
+
+static void
+gdaex_grid_init (GdaExGrid *gdaex_grid)
+{
+ GdaExGridPrivate *priv = GDAEX_GRID_GET_PRIVATE (gdaex_grid);
+}
+
+GdaExGrid
+*gdaex_grid_new ()
+{
+ GdaExGrid *gdaex_grid = GDAEX_GRID (g_object_new (gdaex_grid_get_type (), NULL));
+
+ GdaExGridPrivate *priv = GDAEX_GRID_GET_PRIVATE (gdaex_grid);
+
+ return gdaex_grid;
+}
+
+/* PRIVATE */
+static void
+gdaex_grid_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GdaExGrid *gdaex_grid = GDAEX_GRID (object);
+
+ GdaExGridPrivate *priv = GDAEX_GRID_GET_PRIVATE (gdaex_grid);
+
+ switch (property_id)
+ {
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdaex_grid_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GdaExGrid *gdaex_grid = GDAEX_GRID (object);
+
+ GdaExGridPrivate *priv = GDAEX_GRID_GET_PRIVATE (gdaex_grid);
+
+ switch (property_id)
+ {
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
--- /dev/null
+/*
+ * grid.h
+ *
+ * Copyright (C) 2010 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
+ *
+ */
+
+#ifndef __GDAEX_GRID_H__
+#define __GDAEX_GRID_H__
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include "gridcolumn.h"
+
+G_BEGIN_DECLS
+
+
+#define TYPE_GDAEX_GRID (gdaex_get_type ())
+#define GDAEX_GRID(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GDAEX_GRID, GdaExGrid))
+#define GDAEX_GRID_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GDAEX_GRID, GdaExGridClass))
+#define IS_GDAEX_GRID(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_GDAEX_GRID))
+#define IS_GDAEX_GRID_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_GDAEX_GRID))
+#define GDAEX_GRID_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_GDAEX_GRID, GdaExGridClass))
+
+
+typedef struct _GdaExGrid GdaExGrid;
+typedef struct _GdaExGridClass GdaExGridClass;
+
+struct _GdaExGrid
+ {
+ GObject parent;
+ };
+
+struct _GdaExGridClass
+ {
+ GObjectClass parent_class;
+ };
+
+GType gdaex_grid_get_type (void) G_GNUC_CONST;
+
+
+GdaExGrid *gdaex_grid_new (void);
+
+void gdaex_grid_add_column (GdaExGrid *grid, GdaExGridColumn *column);
+void gdaex_grid_add_columns (GdaExGrid *grid, GSList *columns);
+
+void gdaex_grid_clear (GdaExGrid *grid);
+
+
+G_END_DECLS
+
+#endif /* __GDAEX_GRID_H__ */
--- /dev/null
+/*
+ * gridcolumn.c
+ *
+ * Copyright (C) 2005-2010 Andrea Zagli <azagli@libero.it>
+ *
+ * This file is part of libgdaex_grid_column.
+ *
+ * libgdaex_grid_column 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_grid_column 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
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+ #include <config.h>
+#endif
+
+#include "gridcolumn.h"
+
+static void gdaex_grid_column_class_init (GdaExGridColumnClass *klass);
+static void gdaex_grid_column_init (GdaExGridColumn *gdaex_grid_column);
+
+static void gdaex_grid_column_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec);
+static void gdaex_grid_column_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec);
+
+#define GDAEX_GRID_COLUMN_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TYPE_GDAEX_GRID_COLUMN, GdaExGridColumnPrivate))
+
+typedef struct _GdaExGridColumnPrivate GdaExGridColumnPrivate;
+struct _GdaExGridColumnPrivate
+ {
+ gchar *title;
+ gchar *field_name;
+ gboolean visible;
+ gboolean resizable;
+ gboolean sortable;
+ gboolean reorderable;
+ };
+
+G_DEFINE_TYPE (GdaExGridColumn, gdaex_grid_column, G_TYPE_OBJECT)
+
+static void
+gdaex_grid_column_class_init (GdaExGridColumnClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ g_type_class_add_private (object_class, sizeof (GdaExGridColumnPrivate));
+
+ object_class->set_property = gdaex_grid_column_set_property;
+ object_class->get_property = gdaex_grid_column_get_property;
+}
+
+static void
+gdaex_grid_column_init (GdaExGridColumn *gdaex_grid_column)
+{
+ GdaExGridColumnPrivate *priv = GDAEX_GRID_COLUMN_GET_PRIVATE (gdaex_grid_column);
+}
+
+GdaExGridColumn
+*gdaex_grid_column_new (const gchar *title,
+ const gchar *field_name,
+ gboolean visible,
+ gboolean resizable,
+ gboolean sortable,
+ gboolean reorderable)
+{
+ GdaExGridColumn *gdaex_grid_column = GDAEX_GRID_COLUMN (g_object_new (gdaex_grid_column_get_type (), NULL));
+
+ GdaExGridColumnPrivate *priv = GDAEX_GRID_COLUMN_GET_PRIVATE (gdaex_grid_column);
+
+ gdaex_grid_column_set_title (gdaex_grid_column, title);
+ gdaex_grid_column_set_field_name (gdaex_grid_column, field_name);
+ gdaex_grid_column_set_visible (gdaex_grid_column, visible);
+ gdaex_grid_column_set_resizable (gdaex_grid_column, resizable);
+ gdaex_grid_column_set_sortable (gdaex_grid_column, sortable);
+ gdaex_grid_column_set_reorderable (gdaex_grid_column, reorderable);
+
+ return gdaex_grid_column;
+}
+
+void
+gdaex_grid_column_set_title (GdaExGridColumn *column, const gchar *title)
+{
+
+}
+
+const gchar
+*gdaex_grid_column_get_title (GdaExGridColumn *column)
+{
+
+}
+
+void
+gdaex_grid_column_set_field_name (GdaExGridColumn *column, const gchar *field_name)
+{
+
+}
+
+const gchar
+*gdaex_grid_column_get_field_name (GdaExGridColumn *column)
+{
+
+}
+
+void
+gdaex_grid_column_set_visible (GdaExGridColumn *column, gboolean visible)
+{
+
+}
+
+gboolean
+gdaex_grid_column_get_visible (GdaExGridColumn *column)
+{
+
+}
+
+void
+gdaex_grid_column_set_resizable (GdaExGridColumn *column, gboolean resizable)
+{
+
+}
+
+gboolean
+gdaex_grid_column_get_resizable (GdaExGridColumn *column)
+{
+
+}
+
+void
+gdaex_grid_column_set_sortable (GdaExGridColumn *column, gboolean sortable)
+{
+
+}
+
+gboolean
+gdaex_grid_column_get_sortable (GdaExGridColumn *column)
+{
+
+}
+
+void
+gdaex_grid_column_set_reorderable (GdaExGridColumn *column, gboolean reorderable)
+{
+
+}
+
+gboolean
+gdaex_grid_column_get_reorderable (GdaExGridColumn *column)
+{
+
+}
+
+/* PRIVATE */
+static void
+gdaex_grid_column_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+ GdaExGridColumn *gdaex_grid_column = GDAEX_GRID_COLUMN (object);
+
+ GdaExGridColumnPrivate *priv = GDAEX_GRID_COLUMN_GET_PRIVATE (gdaex_grid_column);
+
+ switch (property_id)
+ {
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gdaex_grid_column_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+ GdaExGridColumn *gdaex_grid_column = GDAEX_GRID_COLUMN (object);
+
+ GdaExGridColumnPrivate *priv = GDAEX_GRID_COLUMN_GET_PRIVATE (gdaex_grid_column);
+
+ switch (property_id)
+ {
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
--- /dev/null
+/*
+ * gridcolumn.h
+ *
+ * Copyright (C) 2010 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
+ *
+ */
+
+#ifndef __GDAEX_GRID_COLUMN_H__
+#define __GDAEX_GRID_COLUMN_H__
+
+#include <glib.h>
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+
+#define TYPE_GDAEX_GRID_COLUMN (gdaex_get_type ())
+#define GDAEX_GRID_COLUMN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GDAEX_GRID_COLUMN, GdaExGridColumn))
+#define GDAEX_GRID_COLUMN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GDAEX_GRID_COLUMN, GdaExGridColumnClass))
+#define IS_GDAEX_GRID_COLUMN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_GDAEX_GRID_COLUMN))
+#define IS_GDAEX_GRID_COLUMN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_GDAEX_GRID_COLUMN))
+#define GDAEX_GRID_COLUMN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_GDAEX_GRID_COLUMN, GdaExGridColumnClass))
+
+
+typedef struct _GdaExGridColumn GdaExGridColumn;
+typedef struct _GdaExGridColumnClass GdaExGridColumnClass;
+
+struct _GdaExGridColumn
+ {
+ GObject parent;
+ };
+
+struct _GdaExGridColumnClass
+ {
+ GObjectClass parent_class;
+ };
+
+GType gdaex_grid_column_get_type (void) G_GNUC_CONST;
+
+
+GdaExGridColumn *gdaex_grid_column_new (const gchar *title,
+ const gchar *field_name,
+ gboolean visible,
+ gboolean resizable,
+ gboolean sortable,
+ gboolean reorderable);
+
+void gdaex_grid_column_set_title (GdaExGridColumn *column, const gchar *title);
+const gchar *gdaex_grid_column_get_title (GdaExGridColumn *column);
+
+void gdaex_grid_column_set_field_name (GdaExGridColumn *column, const gchar *field_name);
+const gchar *gdaex_grid_column_get_field_name (GdaExGridColumn *column);
+
+void gdaex_grid_column_set_visible (GdaExGridColumn *column, gboolean visible);
+gboolean gdaex_grid_column_get_visible (GdaExGridColumn *column);
+
+void gdaex_grid_column_set_resizable (GdaExGridColumn *column, gboolean resizable);
+gboolean gdaex_grid_column_get_resizable (GdaExGridColumn *column);
+
+void gdaex_grid_column_set_sortable (GdaExGridColumn *column, gboolean sortable);
+gboolean gdaex_grid_column_get_sortable (GdaExGridColumn *column);
+
+void gdaex_grid_column_set_reorderable (GdaExGridColumn *column, gboolean reorderable);
+gboolean gdaex_grid_column_get_reorderable (GdaExGridColumn *column);
+
+
+G_END_DECLS
+
+#endif /* __GDAEX_GRID_COLUMN_H__ */
* Copyright (C) 2005-2010 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 "grid.h"
+#include "gridcolumn.h"
-G_END_DECLS
-#endif /* __GDAEX_H__ */
+#endif /* __LIBGDAEX_H__ */