| gda-blob.h | | gda-blob.h | |
| /* GDA Common Library | | /* GDA Common Library | |
| * Copyright (C) 1998-2003 The GNOME Foundation. | | * Copyright (C) 1998-2003 The GNOME Foundation. | |
|
| | | * Copyright (C) 1998 - 2005 The GNOME Foundation. | |
| * | | * | |
| * Authors: | | * Authors: | |
| * Juan-Mariano de Goyeneche <jmseyas@dit.upm.es> | | * Juan-Mariano de Goyeneche <jmseyas@dit.upm.es> | |
|
| | | * Daniel Espinosa Ortiz <esodan@gmail.com> (GdaBlob based on GObject) | |
| * | | * | |
| * This Library is free software; you can redistribute it and/or | | * This Library is free software; you can redistribute it and/or | |
| * modify it under the terms of the GNU Library General Public License as | | * modify it under the terms of the GNU Library General Public License as | |
| * published by the Free Software Foundation; either version 2 of the | | * published by the Free Software Foundation; either version 2 of the | |
| * License, or (at your option) any later version. | | * License, or (at your option) any later version. | |
| * | | * | |
| * This Library is distributed in the hope that it will be useful, | | * This Library is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| * Library General Public License for more details. | | * Library General Public License for more details. | |
| | | | |
| skipping to change at line 27 | | skipping to change at line 29 | |
| * You should have received a copy of the GNU Library General Public | | * You should have received a copy of the GNU Library General Public | |
| * License along with this Library; see the file COPYING.LIB. If not, | | * License along with this Library; see the file COPYING.LIB. If not, | |
| * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330
, | | * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330
, | |
| * Boston, MA 02111-1307, USA. | | * Boston, MA 02111-1307, USA. | |
| */ | | */ | |
| | | | |
| #if !defined(__gda_blob_h__) | | #if !defined(__gda_blob_h__) | |
| # define __gda_blob_h__ | | # define __gda_blob_h__ | |
| | | | |
| #include <glib.h> | | #include <glib.h> | |
|
| | | #include <glib-object.h> | |
| | | | |
| G_BEGIN_DECLS | | G_BEGIN_DECLS | |
| | | | |
| typedef enum { | | typedef enum { | |
| GDA_BLOB_MODE_READ = 1, | | GDA_BLOB_MODE_READ = 1, | |
| GDA_BLOB_MODE_WRITE = 1 << 1, | | GDA_BLOB_MODE_WRITE = 1 << 1, | |
| GDA_BLOB_MODE_RDWR = 0x03 | | GDA_BLOB_MODE_RDWR = 0x03 | |
| } GdaBlobMode; | | } GdaBlobMode; | |
| | | | |
|
| | | /* --- type macros --- */ | |
| | | #define G_VALUE_TYPE_BLOB (gda_blob_get_type()) | |
| | | #define G_TYPE_IS_GDABLOB(type) (G_TYPE_FUNDAMENTAL (type) == GDA_VALUE | |
| | | _TYPE_BLOB) | |
| | | #define GDA_VALUE_BLOB(object) (G_TYPE_CHECK_INSTANCE_CAST ((obj | |
| | | ect), G_VALUE_TYPE_BLOB, GdaDate)) | |
| | | #define GDA_VALUE_BLOB_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class) | |
| | | , G_VALUE_TYPE_BLOB, GdaDateClass)) | |
| | | #define GDA_VALUE_IS_BLOB(object) (G_TYPE_CHECK_INSTANCE_TYPE ((obj | |
| | | ect), G_VALUE_TYPE_BLOB)) | |
| | | #define GDA_VALUE_IS_BLOB_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class) | |
| | | , G_VALUE_TYPE_BLOB)) | |
| | | #define GDA_VALUE_BLOB_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((obje | |
| | | ct), G_VALUE_TYPE_BLOB,GdaTimeClass)) | |
| | | #define GDA_VALUE_BLOB_TYPE(object) (G_TYPE_FROM_INSTANCE (object)) | |
| | | #define GDA_VALUE_BLOB_TYPE_NAME(object) (g_type_name (GDA_VALUE_BLOB_TYPE | |
| | | (object))) | |
| | | #define GDA_VALUE_BLOB_CLASS_TYPE(class) (G_TYPE_FROM_CLASS (class)) | |
| | | #define GDA_VALUE_BLOB_CLASS_NAME(class) (g_type_name (GDA_VALUE_BLOB_CLAS | |
| | | S_TYPE (class))) | |
| | | #define G_VALUE_HOLDS_GDABLOB(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_V | |
| | | ALUE_TYPE_BLOB)) | |
| | | | |
| | | typedef struct _GdaBlobClass GdaBlobClass; | |
| | | struct _GdaBlobClass { | |
| | | GObjectClass parent_class; | |
| | | }; | |
| | | | |
| typedef struct _GdaBlob GdaBlob; | | typedef struct _GdaBlob GdaBlob; | |
| | | | |
| struct _GdaBlob { | | struct _GdaBlob { | |
| /* Private */ | | /* Private */ | |
| gint (* open) (GdaBlob *blob, GdaBlobMode mode); | | gint (* open) (GdaBlob *blob, GdaBlobMode mode); | |
| | | | |
| gint (* read) (GdaBlob *blob, gpointer buf, gint size, | | gint (* read) (GdaBlob *blob, gpointer buf, gint size, | |
| gint *bytes_read); | | gint *bytes_read); | |
| | | | |
| gint (* write) (GdaBlob *blob, gpointer buf, gint size, | | gint (* write) (GdaBlob *blob, gpointer buf, gint size, | |
| | | | |
| skipping to change at line 65 | | skipping to change at line 87 | |
| | | | |
| void (* free_data) (GdaBlob *blob); | | void (* free_data) (GdaBlob *blob); | |
| | | | |
| gpointer priv_data; | | gpointer priv_data; | |
| /* */ | | /* */ | |
| | | | |
| /* Public */ | | /* Public */ | |
| gpointer user_data; | | gpointer user_data; | |
| }; | | }; | |
| | | | |
|
| gint gda_blob_open (GdaBlob *blob, GdaBlobMode mode); | | gint gda_blob_open (GdaBlob *blob, GdaBlobMode mode); | |
| gint gda_blob_read (GdaBlob *blob, gpointer buf, gint size, gint *bytes_rea | | gint gda_blob_read (GdaBlob *blob, gpointer buf, gint size, gint *bytes_r | |
| d); | | ead); | |
| gint gda_blob_write (GdaBlob *blob, gpointer buf, gint size, | | gint gda_blob_write (GdaBlob *blob, gpointer buf, gint size, gint *bytes_ | |
| gint *bytes_written); | | written); | |
| | | | |
|
| gint gda_blob_lseek (GdaBlob *blob, gint offset, gint whence); | | gint gda_blob_lseek (GdaBlob *blob, gint offset, gint whence); | |
| gint gda_blob_close (GdaBlob *blob); | | gint gda_blob_close (GdaBlob *blob); | |
| | | | |
|
| gint gda_blob_remove (GdaBlob *blob); | | gint gda_blob_remove (GdaBlob *blob); | |
| void gda_blob_free_data (GdaBlob *blob); | | void gda_blob_free_data (GdaBlob *blob); | |
| | | gchar *gda_blob_stringify(GdaBlob *blob); | |
| | | | |
| G_END_DECLS | | G_END_DECLS | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 7 change blocks. |
| 9 lines changed or deleted | | 41 lines changed or added | |
|
| gda-client.h | | gda-client.h | |
| /* GDA library | | /* GDA library | |
|
| * Copyright (C) 1998-2002 The GNOME Foundation. | | * Copyright (C) 1998 - 2005 The GNOME Foundation. | |
| * | | * | |
| * AUTHORS: | | * AUTHORS: | |
| * Michael Lausch <michael@lausch.at> | | * Michael Lausch <michael@lausch.at> | |
| * Rodrigo Moya <rodrigo@gnome-db.org> | | * Rodrigo Moya <rodrigo@gnome-db.org> | |
|
| | | * Vivien Malerba <malerba@gnome-db.org> | |
| * | | * | |
| * This Library is free software; you can redistribute it and/or | | * This Library is free software; you can redistribute it and/or | |
| * modify it under the terms of the GNU Library General Public License as | | * modify it under the terms of the GNU Library General Public License as | |
| * published by the Free Software Foundation; either version 2 of the | | * published by the Free Software Foundation; either version 2 of the | |
| * License, or (at your option) any later version. | | * License, or (at your option) any later version. | |
| * | | * | |
| * This Library is distributed in the hope that it will be useful, | | * This Library is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| * Library General Public License for more details. | | * Library General Public License for more details. | |
| | | | |
| skipping to change at line 52 | | skipping to change at line 53 | |
| or committed via a BEGIN/COMMIT command directly sent to the | | or committed via a BEGIN/COMMIT command directly sent to the | |
| execute_command method on the provider */ | | execute_command method on the provider */ | |
| GDA_CLIENT_EVENT_ERROR, /* params: "error" */ | | GDA_CLIENT_EVENT_ERROR, /* params: "error" */ | |
| GDA_CLIENT_EVENT_CONNECTION_OPENED, /* params: */ | | GDA_CLIENT_EVENT_CONNECTION_OPENED, /* params: */ | |
| GDA_CLIENT_EVENT_CONNECTION_CLOSED, /* params: */ | | GDA_CLIENT_EVENT_CONNECTION_CLOSED, /* params: */ | |
| GDA_CLIENT_EVENT_TRANSACTION_STARTED, /* params: "transaction" */ | | GDA_CLIENT_EVENT_TRANSACTION_STARTED, /* params: "transaction" */ | |
| GDA_CLIENT_EVENT_TRANSACTION_COMMITTED, /* params: "transaction" */ | | GDA_CLIENT_EVENT_TRANSACTION_COMMITTED, /* params: "transaction" */ | |
| GDA_CLIENT_EVENT_TRANSACTION_CANCELLED, /* params: "transaction" */ | | GDA_CLIENT_EVENT_TRANSACTION_CANCELLED, /* params: "transaction" */ | |
| } GdaClientEvent; | | } GdaClientEvent; | |
| | | | |
|
| | | typedef enum { | |
| | | GDA_CLIENT_SPECS_CREATE_DATABASE, | |
| | | GDA_CLIENT_SPECS_DROP_DATABASE | |
| | | } GdaClientSpecsType; | |
| | | | |
| typedef struct _GdaClientClass GdaClientClass; | | typedef struct _GdaClientClass GdaClientClass; | |
| typedef struct _GdaClientPrivate GdaClientPrivate; | | typedef struct _GdaClientPrivate GdaClientPrivate; | |
| | | | |
| struct _GdaClient { | | struct _GdaClient { | |
| GObject object; | | GObject object; | |
| GdaClientPrivate *priv; | | GdaClientPrivate *priv; | |
| }; | | }; | |
| | | | |
| struct _GdaClientClass { | | struct _GdaClientClass { | |
| GObjectClass parent_class; | | GObjectClass parent_class; | |
| | | | |
| /* signals */ | | /* signals */ | |
| void (* event_notification) (GdaClient *client, | | void (* event_notification) (GdaClient *client, | |
| GdaConnection *cnc, | | GdaConnection *cnc, | |
| GdaClientEvent event, | | GdaClientEvent event, | |
| GdaParameterList *params); | | GdaParameterList *params); | |
| }; | | }; | |
| | | | |
|
| | | /* error reporting */ | |
| | | extern GQuark gda_client_error_quark (void); | |
| | | #define GDA_CLIENT_ERROR gda_client_error_quark () | |
| | | | |
| GType gda_client_get_type (void); | | GType gda_client_get_type (void); | |
| GdaClient *gda_client_new (void); | | GdaClient *gda_client_new (void); | |
| | | | |
| GdaConnection *gda_client_open_connection (GdaClient *cl
ient, | | GdaConnection *gda_client_open_connection (GdaClient *cl
ient, | |
| const gchar *d
sn, | | const gchar *d
sn, | |
| const gchar *u
sername, | | const gchar *u
sername, | |
| const gchar *p
assword, | | const gchar *p
assword, | |
|
| GdaConnectionO | | GdaConnectionO | |
| ptions options); | | ptions options, | |
| | | GError **error | |
| | | ); | |
| GdaConnection *gda_client_open_connection_from_string (GdaClient *cl
ient, | | GdaConnection *gda_client_open_connection_from_string (GdaClient *cl
ient, | |
| const gchar *p
rovider_id, | | const gchar *p
rovider_id, | |
| const gchar *c
nc_string, | | const gchar *c
nc_string, | |
|
| GdaConnectionO | | GdaConnectionO | |
| ptions options); | | ptions options, | |
| const GList *gda_client_get_connection_list (GdaClient *cl | | GError **error | |
| ient); | | ); | |
| | | const GList *gda_client_get_connections (GdaClient *cl | |
| | | ient); | |
| GdaConnection *gda_client_find_connection (GdaClient *cl
ient, | | GdaConnection *gda_client_find_connection (GdaClient *cl
ient, | |
| const gchar *d
sn, | | const gchar *d
sn, | |
| const gchar *u
sername, | | const gchar *u
sername, | |
| const gchar *p
assword); | | const gchar *p
assword); | |
| void gda_client_close_all_connections (GdaClient *cl
ient); | | void gda_client_close_all_connections (GdaClient *cl
ient); | |
| | | | |
| void gda_client_notify_event (GdaClient *cl
ient, GdaConnection *cnc, | | void gda_client_notify_event (GdaClient *cl
ient, GdaConnection *cnc, | |
| GdaClientEvent
event, GdaParameterList *params); | | GdaClientEvent
event, GdaParameterList *params); | |
|
| void gda_client_notify_error_event (GdaClient *cl
ient, GdaConnection *cnc, GdaError *error); | | void gda_client_notify_error_event (GdaClient *cl
ient, GdaConnection *cnc, GdaConnectionEvent *error); | |
| void gda_client_notify_connection_opened_event (GdaClient *cl
ient, GdaConnection *cnc); | | void gda_client_notify_connection_opened_event (GdaClient *cl
ient, GdaConnection *cnc); | |
| void gda_client_notify_connection_closed_event (GdaClient *cl
ient, GdaConnection *cnc); | | void gda_client_notify_connection_closed_event (GdaClient *cl
ient, GdaConnection *cnc); | |
| void gda_client_notify_transaction_started_event (GdaClient *cl
ient, | | void gda_client_notify_transaction_started_event (GdaClient *cl
ient, | |
| GdaConnection
*cnc, | | GdaConnection
*cnc, | |
| GdaTransaction
*xaction); | | GdaTransaction
*xaction); | |
| void gda_client_notify_transaction_committed_event (GdaClient *cl
ient, | | void gda_client_notify_transaction_committed_event (GdaClient *cl
ient, | |
| GdaConnection
*cnc, | | GdaConnection
*cnc, | |
| GdaTransaction
*xaction); | | GdaTransaction
*xaction); | |
| void gda_client_notify_transaction_cancelled_event (GdaClient *cl
ient, | | void gda_client_notify_transaction_cancelled_event (GdaClient *cl
ient, | |
| GdaConnection
*cnc, | | GdaConnection
*cnc, | |
| GdaTransaction
*xaction); | | GdaTransaction
*xaction); | |
| | | | |
| /* | | /* | |
| * General provider information | | * General provider information | |
| */ | | */ | |
| gchar *gda_client_get_dsn_specs (GdaClient *cl
ient, const gchar *provider); | | gchar *gda_client_get_dsn_specs (GdaClient *cl
ient, const gchar *provider); | |
| | | | |
| /* | | /* | |
|
| * Database creation functions | | * Database creation and destruction functions | |
| */ | | */ | |
|
| gchar *gda_client_get_specs_to_create_database (GdaClient *cl | | gchar *gda_client_get_provider_specs (GdaClient *cl | |
| ient, const gchar *provider); | | ient, const gchar *provider, | |
| | | GdaClientSpecs | |
| | | Type type); | |
| gboolean gda_client_create_database (GdaClient *cl
ient, const gchar *provider, | | gboolean gda_client_create_database (GdaClient *cl
ient, const gchar *provider, | |
| GdaParameterLi
st *params, GError **error); | | GdaParameterLi
st *params, GError **error); | |
|
| | | gboolean gda_client_drop_database (GdaClient *cl | |
| | | ient, const gchar *provider, | |
| | | GdaParameterLi | |
| | | st *params, GError **error); | |
| | | | |
| /* | | /* | |
| * Connection stack functions | | * Connection stack functions | |
| */ | | */ | |
| | | | |
| gboolean gda_client_begin_transaction (GdaClient *cl
ient, GdaTransaction *xaction); | | gboolean gda_client_begin_transaction (GdaClient *cl
ient, GdaTransaction *xaction); | |
| gboolean gda_client_commit_transaction (GdaClient *cl
ient, GdaTransaction *xaction); | | gboolean gda_client_commit_transaction (GdaClient *cl
ient, GdaTransaction *xaction); | |
| gboolean gda_client_rollback_transaction (GdaClient *cl
ient, GdaTransaction *xaction); | | gboolean gda_client_rollback_transaction (GdaClient *cl
ient, GdaTransaction *xaction); | |
| | | | |
| G_END_DECLS | | G_END_DECLS | |
| | | | |
End of changes. 10 change blocks. |
| 11 lines changed or deleted | | 31 lines changed or added | |
|
| gda-connection.h | | gda-connection.h | |
| /* GDA client library | | /* GDA client library | |
|
| * Copyright (C) 1998-2005 The GNOME Foundation. | | * Copyright (C) 1998 - 2005 The GNOME Foundation. | |
| * | | * | |
| * AUTHORS: | | * AUTHORS: | |
| * Michael Lausch <michael@lausch.at> | | * Michael Lausch <michael@lausch.at> | |
| * Rodrigo Moya <rodrigo@gnome-db.org> | | * Rodrigo Moya <rodrigo@gnome-db.org> | |
| * Bas Driessen <bas.driessen@xobas.com> | | * Bas Driessen <bas.driessen@xobas.com> | |
|
| | | * Vivien Malerba <malerba@gnome-db.org> | |
| * | | * | |
| * This Library is free software; you can redistribute it and/or | | * This Library is free software; you can redistribute it and/or | |
| * modify it under the terms of the GNU Library General Public License as | | * modify it under the terms of the GNU Library General Public License as | |
| * published by the Free Software Foundation; either version 2 of the | | * published by the Free Software Foundation; either version 2 of the | |
| * License, or (at your option) any later version. | | * License, or (at your option) any later version. | |
| * | | * | |
| * This Library is distributed in the hope that it will be useful, | | * This Library is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| * Library General Public License for more details. | | * Library General Public License for more details. | |
| | | | |
| skipping to change at line 31 | | skipping to change at line 32 | |
| * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330
, | | * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330
, | |
| * Boston, MA 02111-1307, USA. | | * Boston, MA 02111-1307, USA. | |
| */ | | */ | |
| | | | |
| #if !defined(__gda_connection_h__) | | #if !defined(__gda_connection_h__) | |
| # define __gda_connection_h__ | | # define __gda_connection_h__ | |
| | | | |
| #include <libgda/gda-command.h> | | #include <libgda/gda-command.h> | |
| #include <libgda/gda-data-model.h> | | #include <libgda/gda-data-model.h> | |
| #include <libgda/gda-data-model-index.h> | | #include <libgda/gda-data-model-index.h> | |
|
| #include <libgda/gda-error.h> | | #include <libgda/gda-connection-event.h> | |
| #include <libgda/gda-parameter.h> | | #include <libgda/gda-parameter.h> | |
| #include <libgda/gda-transaction.h> | | #include <libgda/gda-transaction.h> | |
| | | | |
| G_BEGIN_DECLS | | G_BEGIN_DECLS | |
| | | | |
| #define GDA_TYPE_CONNECTION (gda_connection_get_type()) | | #define GDA_TYPE_CONNECTION (gda_connection_get_type()) | |
| #define GDA_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST (obj, GD
A_TYPE_CONNECTION, GdaConnection)) | | #define GDA_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST (obj, GD
A_TYPE_CONNECTION, GdaConnection)) | |
| #define GDA_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST (klass, GDA
_TYPE_CONNECTION, GdaConnectionClass)) | | #define GDA_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST (klass, GDA
_TYPE_CONNECTION, GdaConnectionClass)) | |
| #define GDA_IS_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE(obj, GDA
_TYPE_CONNECTION)) | | #define GDA_IS_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE(obj, GDA
_TYPE_CONNECTION)) | |
| #define GDA_IS_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GD
A_TYPE_CONNECTION)) | | #define GDA_IS_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GD
A_TYPE_CONNECTION)) | |
| | | | |
| typedef struct _GdaConnection GdaConnection; | | typedef struct _GdaConnection GdaConnection; | |
| typedef struct _GdaConnectionClass GdaConnectionClass; | | typedef struct _GdaConnectionClass GdaConnectionClass; | |
| typedef struct _GdaConnectionPrivate GdaConnectionPrivate; | | typedef struct _GdaConnectionPrivate GdaConnectionPrivate; | |
| | | | |
| typedef struct _GdaServerProvider GdaServerProvider; /* defined in gda-s
erver-provider.h */ | | typedef struct _GdaServerProvider GdaServerProvider; /* defined in gda-s
erver-provider.h */ | |
| typedef struct _GdaClient GdaClient; /* defined in gda-client.h */ | | typedef struct _GdaClient GdaClient; /* defined in gda-client.h */ | |
| | | | |
| struct _GdaConnection { | | struct _GdaConnection { | |
|
| GObject object; | | GObject object; | |
| GdaConnectionPrivate *priv; | | GdaConnectionPrivate *priv; | |
| }; | | }; | |
| | | | |
| struct _GdaConnectionClass { | | struct _GdaConnectionClass { | |
|
| GObjectClass object_class; | | GObjectClass object_class; | |
| | | | |
| /* signals */ | | /* signals */ | |
|
| void (* error) (GdaConnection *cnc, GList *error_list); | | void (* error) (GdaConnection *cnc, GdaConnectionEvent *error); | |
| }; | | }; | |
| | | | |
| GType gda_connection_get_type (void); | | GType gda_connection_get_type (void); | |
| | | | |
| typedef enum { | | typedef enum { | |
| GDA_CONNECTION_OPTIONS_READ_ONLY = 1 << 0, | | GDA_CONNECTION_OPTIONS_READ_ONLY = 1 << 0, | |
| GDA_CONNECTION_OPTIONS_DONT_SHARE = 2 << 0 | | GDA_CONNECTION_OPTIONS_DONT_SHARE = 2 << 0 | |
| } GdaConnectionOptions; | | } GdaConnectionOptions; | |
| | | | |
| GdaConnection *gda_connection_new (GdaClient *client, | | GdaConnection *gda_connection_new (GdaClient *client, | |
| GdaServerProvider *provider, | | GdaServerProvider *provider, | |
| const gchar *dsn, | | const gchar *dsn, | |
| const gchar *username, | | const gchar *username, | |
| const gchar *password, | | const gchar *password, | |
|
| GdaConnectionOptions options); | | GdaConnectionOptions options, | |
| | | GError **error); | |
| gboolean gda_connection_reset (GdaConnection *cnc); | | gboolean gda_connection_reset (GdaConnection *cnc); | |
| gboolean gda_connection_close (GdaConnection *cnc); | | gboolean gda_connection_close (GdaConnection *cnc); | |
| gboolean gda_connection_is_open (GdaConnection *cnc); | | gboolean gda_connection_is_open (GdaConnection *cnc); | |
| | | | |
| GdaClient *gda_connection_get_client (GdaConnection *cnc); | | GdaClient *gda_connection_get_client (GdaConnection *cnc); | |
| void gda_connection_set_client (GdaConnection *cnc, GdaClie
nt *client); | | void gda_connection_set_client (GdaConnection *cnc, GdaClie
nt *client); | |
| | | | |
| GdaConnectionOptions gda_connection_get_options (GdaConnection *cnc); | | GdaConnectionOptions gda_connection_get_options (GdaConnection *cnc); | |
| | | | |
| const gchar *gda_connection_get_server_version (GdaConnection *cnc)
; | | const gchar *gda_connection_get_server_version (GdaConnection *cnc)
; | |
| const gchar *gda_connection_get_database (GdaConnection *cnc); | | const gchar *gda_connection_get_database (GdaConnection *cnc); | |
| const gchar *gda_connection_get_dsn (GdaConnection *cnc); | | const gchar *gda_connection_get_dsn (GdaConnection *cnc); | |
| const gchar *gda_connection_get_cnc_string (GdaConnection *cnc); | | const gchar *gda_connection_get_cnc_string (GdaConnection *cnc); | |
| const gchar *gda_connection_get_provider (GdaConnection *cnc); | | const gchar *gda_connection_get_provider (GdaConnection *cnc); | |
| const gchar *gda_connection_get_username (GdaConnection *cnc); | | const gchar *gda_connection_get_username (GdaConnection *cnc); | |
| const gchar *gda_connection_get_password (GdaConnection *cnc); | | const gchar *gda_connection_get_password (GdaConnection *cnc); | |
| | | | |
|
| void gda_connection_add_error (GdaConnection *cnc, GdaError | | void gda_connection_add_event (GdaConnection *cnc, GdaConne | |
| *error); | | ctionEvent *error); | |
| void gda_connection_add_error_string (GdaConnection *cnc, c | | void gda_connection_add_event_string (GdaConnection *cnc, c | |
| onst gchar *str, ...); | | onst gchar *str, ...); | |
| void gda_connection_add_error_list (GdaConnection *cnc, GLi | | void gda_connection_add_events_list (GdaConnection *cnc, GL | |
| st *error_list); | | ist *events_list); | |
| void gda_connection_clear_error_list (GdaConnection *cnc); | | void gda_connection_clear_events_list (GdaConnection *cnc); | |
| | | const GList *gda_connection_get_events (GdaConnection *cnc); | |
| | | | |
| gboolean gda_connection_change_database (GdaConnection *cnc, co
nst gchar *name); | | gboolean gda_connection_change_database (GdaConnection *cnc, co
nst gchar *name); | |
|
| gboolean gda_connection_create_database (GdaConnection *cnc, co | | | |
| nst gchar *name); | | | |
| gboolean gda_connection_drop_database (GdaConnection *cnc, cons | | | |
| t gchar *name); | | | |
| gboolean gda_connection_create_table (GdaConnection *cnc, const
gchar *table_name, | | gboolean gda_connection_create_table (GdaConnection *cnc, const
gchar *table_name, | |
| const GList *attributes_li
st, | | const GList *attributes_li
st, | |
| const GList *index_list); | | const GList *index_list); | |
| gboolean gda_connection_drop_table (GdaConnection *cnc, const g
char *table_name); | | gboolean gda_connection_drop_table (GdaConnection *cnc, const g
char *table_name); | |
| gboolean gda_connection_create_index (GdaConnection *cnc, const
GdaDataModelIndex *index, | | gboolean gda_connection_create_index (GdaConnection *cnc, const
GdaDataModelIndex *index, | |
| const gchar *table_name); | | const gchar *table_name); | |
| gboolean gda_connection_drop_index (GdaConnection *cnc, const g
char *index_name, | | gboolean gda_connection_drop_index (GdaConnection *cnc, const g
char *index_name, | |
| gboolean primary_key, const
gchar *table_name); | | gboolean primary_key, const
gchar *table_name); | |
| | | | |
| GList *gda_connection_execute_command (GdaConnection *cnc, | | GList *gda_connection_execute_command (GdaConnection *cnc, | |
| GdaCommand *cmd, | | GdaCommand *cmd, | |
|
| GdaParameterList *param | | GdaParameterList *param | |
| s); | | s, | |
| | | GError **error); | |
| gchar *gda_connection_get_last_insert_id (GdaConnection *cnc,
GdaDataModel *recset); | | gchar *gda_connection_get_last_insert_id (GdaConnection *cnc,
GdaDataModel *recset); | |
| GdaDataModel *gda_connection_execute_single_command (GdaConnection *
cnc, | | GdaDataModel *gda_connection_execute_single_command (GdaConnection *
cnc, | |
| GdaCommand *cmd, | | GdaCommand *cmd, | |
|
| GdaParameterList | | GdaParameterList | |
| *params); | | *params, | |
| | | GError **error); | |
| gint gda_connection_execute_non_query (GdaConnection *cnc, | | gint gda_connection_execute_non_query (GdaConnection *cnc, | |
| GdaCommand *cmd, | | GdaCommand *cmd, | |
|
| GdaParameterList *par | | GdaParameterList *par | |
| ams); | | ams, | |
| | | GError **error); | |
| | | | |
| gboolean gda_connection_begin_transaction (GdaConnection *cnc,
GdaTransaction *xaction); | | gboolean gda_connection_begin_transaction (GdaConnection *cnc,
GdaTransaction *xaction); | |
| gboolean gda_connection_commit_transaction (GdaConnection *cnc,
GdaTransaction *xaction); | | gboolean gda_connection_commit_transaction (GdaConnection *cnc,
GdaTransaction *xaction); | |
| gboolean gda_connection_rollback_transaction (GdaConnection *cn
c, GdaTransaction *xaction); | | gboolean gda_connection_rollback_transaction (GdaConnection *cn
c, GdaTransaction *xaction); | |
| | | | |
| gboolean gda_connection_create_blob (GdaConnection *cnc, GdaBlo
b *blob); | | gboolean gda_connection_create_blob (GdaConnection *cnc, GdaBlo
b *blob); | |
| | | | |
|
| gchar * gda_connection_value_to_sql_string (GdaConne | | gchar *gda_connection_value_to_sql_string (GdaConnection *cnc | |
| ction *cnc, GdaValue *from); | | , GdaValue *from); | |
| const GList *gda_connection_get_errors (GdaConnection *cnc); | | | |
| | | | |
| typedef enum { | | typedef enum { | |
| GDA_CONNECTION_FEATURE_AGGREGATES, | | GDA_CONNECTION_FEATURE_AGGREGATES, | |
| GDA_CONNECTION_FEATURE_BLOBS, | | GDA_CONNECTION_FEATURE_BLOBS, | |
| GDA_CONNECTION_FEATURE_INDEXES, | | GDA_CONNECTION_FEATURE_INDEXES, | |
| GDA_CONNECTION_FEATURE_INHERITANCE, | | GDA_CONNECTION_FEATURE_INHERITANCE, | |
| GDA_CONNECTION_FEATURE_NAMESPACES, | | GDA_CONNECTION_FEATURE_NAMESPACES, | |
| GDA_CONNECTION_FEATURE_PROCEDURES, | | GDA_CONNECTION_FEATURE_PROCEDURES, | |
| GDA_CONNECTION_FEATURE_SEQUENCES, | | GDA_CONNECTION_FEATURE_SEQUENCES, | |
| GDA_CONNECTION_FEATURE_SQL, | | GDA_CONNECTION_FEATURE_SQL, | |
| | | | |
End of changes. 13 change blocks. |
| 26 lines changed or deleted | | 27 lines changed or added | |
|
| gda-server-provider.h | | gda-server-provider.h | |
| | | | |
| skipping to change at line 34 | | skipping to change at line 34 | |
| | | | |
| #if !defined(__gda_server_provider_h__) | | #if !defined(__gda_server_provider_h__) | |
| # define __gda_server_provider_h__ | | # define __gda_server_provider_h__ | |
| | | | |
| #include <libgda/gda-command.h> | | #include <libgda/gda-command.h> | |
| #include <libgda/gda-connection.h> | | #include <libgda/gda-connection.h> | |
| #include <libgda/gda-data-model.h> | | #include <libgda/gda-data-model.h> | |
| #include <libgda/gda-data-model-index.h> | | #include <libgda/gda-data-model-index.h> | |
| #include <libgda/gda-quark-list.h> | | #include <libgda/gda-quark-list.h> | |
| #include <libgda/gda-transaction.h> | | #include <libgda/gda-transaction.h> | |
|
| | | #include <libgda/gda-client.h> | |
| | | | |
| G_BEGIN_DECLS | | G_BEGIN_DECLS | |
| | | | |
| #define GDA_TYPE_SERVER_PROVIDER (gda_server_provider_get_type()
) | | #define GDA_TYPE_SERVER_PROVIDER (gda_server_provider_get_type()
) | |
| #define GDA_SERVER_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST (ob
j, GDA_TYPE_SERVER_PROVIDER, GdaServerProvider)) | | #define GDA_SERVER_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST (ob
j, GDA_TYPE_SERVER_PROVIDER, GdaServerProvider)) | |
| #define GDA_SERVER_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST (klass
, GDA_TYPE_SERVER_PROVIDER, GdaServerProviderClass)) | | #define GDA_SERVER_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST (klass
, GDA_TYPE_SERVER_PROVIDER, GdaServerProviderClass)) | |
| #define GDA_IS_SERVER_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE(obj
, GDA_TYPE_SERVER_PROVIDER)) | | #define GDA_IS_SERVER_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE(obj
, GDA_TYPE_SERVER_PROVIDER)) | |
| #define GDA_IS_SERVER_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass
), GDA_TYPE_SERVER_PROVIDER)) | | #define GDA_IS_SERVER_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass
), GDA_TYPE_SERVER_PROVIDER)) | |
| | | | |
| typedef struct _GdaServerProviderClass GdaServerProviderClass; | | typedef struct _GdaServerProviderClass GdaServerProviderClass; | |
| | | | |
| skipping to change at line 77 | | skipping to change at line 78 | |
| gboolean (* close_connection) (GdaServerProvider *provider, | | gboolean (* close_connection) (GdaServerProvider *provider, | |
| GdaConnection *cnc); | | GdaConnection *cnc); | |
| | | | |
| const gchar *(* get_server_version) (GdaServerProvider *provider, | | const gchar *(* get_server_version) (GdaServerProvider *provider, | |
| GdaConnection *cnc); | | GdaConnection *cnc); | |
| const gchar *(* get_database) (GdaServerProvider *provider, | | const gchar *(* get_database) (GdaServerProvider *provider, | |
| GdaConnection *cnc); | | GdaConnection *cnc); | |
| gboolean (* change_database) (GdaServerProvider *provider, | | gboolean (* change_database) (GdaServerProvider *provider, | |
| GdaConnection *cnc, | | GdaConnection *cnc, | |
| const gchar *name); | | const gchar *name); | |
|
| gboolean (* create_database_cnc) (GdaServerProvider *provider, | | /* actions with parameters */ | |
| /* deprecated */ | | gchar *(* get_specs) (GdaServerProvider *provider, GdaClientS | |
| GdaConnection *cnc, | | pecsType type); | |
| const gchar *name); | | gboolean (* perform_action_params) (GdaServerProvider *provider | |
| gchar *(* get_specs_create_database) (GdaServerProvider *pro | | , | |
| vider); | | GdaParameterList *params, G | |
| gboolean (* create_database_params) (GdaServerProvider *provide | | daClientSpecsType type, | |
| r, | | GError **error); | |
| GdaParameterList *params, | | | |
| GError **error); | | /* database creation and destruction */ | |
| gboolean (* drop_database) (GdaServerProvider *provider, | | gboolean (* create_database_cnc) (GdaServerProvider *provider, | |
| GdaConnection *cnc, | | GdaConnection *cnc, const gch | |
| const gchar *name); | | ar *name); | |
| | | gboolean (* drop_database_cnc) (GdaServerProvider *provider, | |
| | | GdaConnection *cnc, const gchar | |
| | | *name); | |
| | | | |
| | | /* tables creation and destroying */ | |
| gboolean (* create_table) (GdaServerProvider *provider, | | gboolean (* create_table) (GdaServerProvider *provider, | |
| GdaConnection *cnc, | | GdaConnection *cnc, | |
| const gchar *table_name, | | const gchar *table_name, | |
| const GList *attributes_list, | | const GList *attributes_list, | |
| const GList *index_list); | | const GList *index_list); | |
| gboolean (* drop_table) (GdaServerProvider *provider, | | gboolean (* drop_table) (GdaServerProvider *provider, | |
| GdaConnection *cnc, | | GdaConnection *cnc, | |
| const gchar *table_name); | | const gchar *table_name); | |
|
| | | | |
| | | /* index creation and destroying */ | |
| gboolean (* create_index) (GdaServerProvider *provider, | | gboolean (* create_index) (GdaServerProvider *provider, | |
| GdaConnection *cnc, | | GdaConnection *cnc, | |
| const GdaDataModelIndex *index, | | const GdaDataModelIndex *index, | |
| const gchar *table_name); | | const gchar *table_name); | |
| gboolean (* drop_index) (GdaServerProvider *provider, | | gboolean (* drop_index) (GdaServerProvider *provider, | |
| GdaConnection *cnc, | | GdaConnection *cnc, | |
| const gchar *index_name, | | const gchar *index_name, | |
| gboolean primary_key, | | gboolean primary_key, | |
| const gchar *table_name); | | const gchar *table_name); | |
| | | | |
| | | | |
| skipping to change at line 160 | | skipping to change at line 167 | |
| gboolean gda_server_provider_close_connection (GdaServerProvider *prov
ider, | | gboolean gda_server_provider_close_connection (GdaServerProvider *prov
ider, | |
| GdaConnection *cnc); | | GdaConnection *cnc); | |
| | | | |
| const gchar *gda_server_provider_get_server_version (GdaServerProvider *pr
ovider, | | const gchar *gda_server_provider_get_server_version (GdaServerProvider *pr
ovider, | |
| GdaConnection *cnc); | | GdaConnection *cnc); | |
| const gchar *gda_server_provider_get_database (GdaServerProvider *provider
, | | const gchar *gda_server_provider_get_database (GdaServerProvider *provider
, | |
| GdaConnection *cnc); | | GdaConnection *cnc); | |
| gboolean gda_server_provider_change_database (GdaServerProvider *provi
der, | | gboolean gda_server_provider_change_database (GdaServerProvider *provi
der, | |
| GdaConnection *cnc, | | GdaConnection *cnc, | |
| const gchar *name); | | const gchar *name); | |
|
| | | gchar *gda_server_provider_get_specs (GdaServerProvider *provider, | |
| | | GdaClientSpecsType action_type | |
| | | ); | |
| | | gboolean gda_server_provider_perform_action_params (GdaServerProvider | |
| | | *provider, | |
| | | GdaParameterList *p | |
| | | arams, | |
| | | GdaClientSpecsType | |
| | | action_type, | |
| | | GError **error); | |
| gboolean gda_server_provider_create_database_cnc (GdaServerProvider *p
rovider, | | gboolean gda_server_provider_create_database_cnc (GdaServerProvider *p
rovider, | |
|
| GdaConnection *cnc, | | GdaConnection *cnc, c | |
| const gchar *name); | | onst gchar *name); | |
| gchar *gda_server_provider_get_specs_to_create_database (GdaServerP | | gboolean gda_server_provider_drop_database_cnc (GdaServerProvider *pro | |
| rovider *provider); | | vider, | |
| gboolean gda_server_provider_create_database (GdaServerProvider *provi | | GdaConnection *cnc, con | |
| der, | | st gchar *name); | |
| GdaParameterList *params, | | | |
| GError **error); | | | |
| gboolean gda_server_provider_drop_database (GdaServerProvider *provide | | | |
| r, | | | |
| GdaConnection *cnc, | | | |
| const gchar *name); | | | |
| gboolean gda_server_provider_create_table (GdaServerProvider *provider
, | | gboolean gda_server_provider_create_table (GdaServerProvider *provider
, | |
| GdaConnection *cnc, | | GdaConnection *cnc, | |
| const gchar *table_name, | | const gchar *table_name, | |
| const GList *attributes_list
, | | const GList *attributes_list
, | |
| const GList *index_list); | | const GList *index_list); | |
| gboolean gda_server_provider_drop_table (GdaServerProvider *provider, | | gboolean gda_server_provider_drop_table (GdaServerProvider *provider, | |
| GdaConnection *cnc, | | GdaConnection *cnc, | |
| const gchar *table_name); | | const gchar *table_name); | |
| gboolean gda_server_provider_create_index (GdaServerProvider *provider
, | | gboolean gda_server_provider_create_index (GdaServerProvider *provider
, | |
| GdaConnection *cnc, | | GdaConnection *cnc, | |
| | | | |
End of changes. 5 change blocks. |
| 25 lines changed or deleted | | 37 lines changed or added | |
|
| gda-value.h | | gda-value.h | |
| /* GDA library | | /* GDA library | |
| * Copyright (C) 1998-2002 The GNOME Foundation. | | * Copyright (C) 1998-2002 The GNOME Foundation. | |
| * | | * | |
| * AUTHORS: | | * AUTHORS: | |
| * Michael Lausch <michael@lausch.at> | | * Michael Lausch <michael@lausch.at> | |
| * Rodrigo Moya <rodrigo@gnome-db.org> | | * Rodrigo Moya <rodrigo@gnome-db.org> | |
| * Juan-Mariano de Goyeneche <jmseyas@dit.upm.es> (BLOB issues) | | * Juan-Mariano de Goyeneche <jmseyas@dit.upm.es> (BLOB issues) | |
|
| | | * Daniel Espinosa Ortiz <esodan@gmail.com> (Port to GValue) | |
| * | | * | |
| * This Library is free software; you can redistribute it and/or | | * This Library is free software; you can redistribute it and/or | |
| * modify it under the terms of the GNU Library General Public License as | | * modify it under the terms of the GNU Library General Public License as | |
| * published by the Free Software Foundation; either version 2 of the | | * published by the Free Software Foundation; either version 2 of the | |
| * License, or (at your option) any later version. | | * License, or (at your option) any later version. | |
| * | | * | |
| * This Library is distributed in the hope that it will be useful, | | * This Library is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| * Library General Public License for more details. | | * Library General Public License for more details. | |
| | | | |
| skipping to change at line 39 | | skipping to change at line 40 | |
| #include <glib/glist.h> | | #include <glib/glist.h> | |
| #include <glib/gmacros.h> | | #include <glib/gmacros.h> | |
| #include <glib-object.h> | | #include <glib-object.h> | |
| #include <libxml/tree.h> | | #include <libxml/tree.h> | |
| #include <libgda/gda-blob.h> | | #include <libgda/gda-blob.h> | |
| | | | |
| G_BEGIN_DECLS | | G_BEGIN_DECLS | |
| | | | |
| #define TIMEZONE_INVALID (2*12*60*60) | | #define TIMEZONE_INVALID (2*12*60*60) | |
| | | | |
|
| | | /* Definition of the GType's values used in GdaValue*/ | |
| | | | |
| | | #define G_VALUE_TYPE_NULL G_TYPE_NONE | |
| | | #define G_VALUE_TYPE_BIGINT G_TYPE_INT64 | |
| | | #define G_VALUE_TYPE_BIGUINT G_TYPE_UINT64 | |
| | | #define G_VALUE_TYPE_BINARY (gda_binary_get_type()) | |
| | | // G_VALUE_TYPE_BLOB to be defined in gda-blob.h | |
| | | #define G_VALUE_TYPE_BOOLEAN G_TYPE_BOOLEAN | |
| | | #define G_VALUE_TYPE_DATE (gda_date_get_type()) | |
| | | #define G_VALUE_TYPE_DOUBLE G_TYPE_DOUBLE | |
| | | #define G_VALUE_TYPE_GEOMETRIC_POINT (gda_geometricpoint_get_type()) | |
| | | #define G_VALUE_TYPE_GOBJECT G_TYPE_OBJECT | |
| | | #define G_VALUE_TYPE_INTEGER G_TYPE_INT | |
| | | #define G_VALUE_TYPE_UINTEGER G_TYPE_UINT | |
| | | #define G_VALUE_TYPE_LIST (gda_value_list_get_type()) | |
| | | #define G_VALUE_TYPE_MONEY (gda_money_get_type()) | |
| | | #define G_VALUE_TYPE_NUMERIC (gda_numeric_get_type()) | |
| | | #define G_VALUE_TYPE_SINGLE G_TYPE_FLOAT | |
| | | #define G_VALUE_TYPE_SMALLINT (gda_smallint_get_type()) | |
| | | #define G_VALUE_TYPE_SMALLUINT (gda_smalluint_get_type()) | |
| | | #define G_VALUE_TYPE_STRING G_TYPE_STRING | |
| | | #define G_VALUE_TYPE_TINYINT G_TYPE_CHAR | |
| | | #define G_VALUE_TYPE_TINYUINT G_TYPE_UCHAR | |
| | | #define G_VALUE_TYPE_TIME (gda_time_get_type()) | |
| | | #define G_VALUE_TYPE_TIMESTAMP (gda_timestamp_get_type()) | |
| | | #define G_VALUE_TYPE_UNKNOWN G_TYPE_INVALID | |
| | | #define G_VALUE_TYPE_TYPE (gda_gdatype_get_type()) | |
| | | | |
| typedef enum { | | typedef enum { | |
| GDA_VALUE_TYPE_NULL, | | GDA_VALUE_TYPE_NULL, | |
| GDA_VALUE_TYPE_BIGINT, | | GDA_VALUE_TYPE_BIGINT, | |
| GDA_VALUE_TYPE_BIGUINT, | | GDA_VALUE_TYPE_BIGUINT, | |
| GDA_VALUE_TYPE_BINARY, | | GDA_VALUE_TYPE_BINARY, | |
| GDA_VALUE_TYPE_BLOB, | | GDA_VALUE_TYPE_BLOB, | |
| GDA_VALUE_TYPE_BOOLEAN, | | GDA_VALUE_TYPE_BOOLEAN, | |
| GDA_VALUE_TYPE_DATE, | | GDA_VALUE_TYPE_DATE, | |
| GDA_VALUE_TYPE_DOUBLE, | | GDA_VALUE_TYPE_DOUBLE, | |
| GDA_VALUE_TYPE_GEOMETRIC_POINT, | | GDA_VALUE_TYPE_GEOMETRIC_POINT, | |
| | | | |
| skipping to change at line 107 | | skipping to change at line 136 | |
| gshort year; | | gshort year; | |
| gushort month; | | gushort month; | |
| gushort day; | | gushort day; | |
| gushort hour; | | gushort hour; | |
| gushort minute; | | gushort minute; | |
| gushort second; | | gushort second; | |
| gulong fraction; | | gulong fraction; | |
| glong timezone; /* # of seconds to the east UTC */ | | glong timezone; /* # of seconds to the east UTC */ | |
| } GdaTimestamp; | | } GdaTimestamp; | |
| | | | |
|
| typedef GList GdaValueList; | | | |
| typedef struct { | | typedef struct { | |
|
| GdaValueType type; | | gpointer data; | |
| union { | | | |
| gint64 v_bigint; | | | |
| guint64 v_biguint; | | | |
| gpointer v_binary; | | | |
| GdaBlob v_blob; | | | |
| gboolean v_boolean; | | | |
| GdaDate v_date; | | | |
| gdouble v_double; | | | |
| GdaGeometricPoint v_point; | | | |
| GObject *v_gobj; | | | |
| gint v_integer; | | | |
| GdaValueList *v_list; | | | |
| GdaMoney v_money; | | | |
| GdaNumeric v_numeric; | | | |
| gfloat v_single; | | | |
| gshort v_smallint; | | | |
| gushort v_smalluint; | | | |
| gchar *v_string; | | | |
| GdaTime v_time; | | | |
| GdaTimestamp v_timestamp; | | | |
| gchar v_tinyint; | | | |
| guchar v_tinyuint; | | | |
| GdaValueType v_type; | | | |
| guint v_uinteger; | | | |
| } value; | | | |
| glong binary_length; | | glong binary_length; | |
|
| } GdaValue; | | } GdaBinary; | |
| | | | |
|
| /* Note: gda_value_get_type is already defined */ | | typedef GList GdaValueList; | |
| #define GDA_TYPE_VALUE (gda_value_get_gtype()) | | | |
| | | | |
|
| GType gda_value_get_gtype (void); | | typedef GValue GdaValue; | |
| GdaValue *gda_value_new_null (void); | | | |
| GdaValue *gda_value_new_bigint (gint64 val); | | | |
| GdaValue *gda_value_new_biguint(guint64 val); | | | |
| GdaValue *gda_value_new_binary (gconstpointer val, glong size | | | |
| ); | | | |
| GdaValue *gda_value_new_blob (const GdaBlob *val); | | | |
| GdaValue *gda_value_new_boolean (gboolean val); | | | |
| GdaValue *gda_value_new_date (const GdaDate *val); | | | |
| GdaValue *gda_value_new_double (gdouble val); | | | |
| GdaValue *gda_value_new_geometric_point (const GdaGeometricPo | | | |
| int *val); | | | |
| GdaValue *gda_value_new_gobject (const GObject *val); | | | |
| GdaValue *gda_value_new_integer (gint val); | | | |
| GdaValue *gda_value_new_list (const GdaValueList *val); | | | |
| GdaValue *gda_value_new_money (const GdaMoney *val); | | | |
| GdaValue *gda_value_new_numeric (const GdaNumeric *val); | | | |
| GdaValue *gda_value_new_single (gfloat val); | | | |
| GdaValue *gda_value_new_smallint (gshort val); | | | |
| GdaValue *gda_value_new_smalluint (gushort val); | | | |
| GdaValue *gda_value_new_string (const gchar *val); | | | |
| GdaValue *gda_value_new_time (const GdaTime *val); | | | |
| GdaValue *gda_value_new_timestamp (const GdaTimestamp *val); | | | |
| GdaValue *gda_value_new_timestamp_from_timet (time_t val); | | | |
| GdaValue *gda_value_new_tinyint (gchar val); | | | |
| GdaValue *gda_value_new_tinyuint (guchar val); | | | |
| GdaValue *gda_value_new_type (GdaValueType val); | | | |
| GdaValue *gda_value_new_uinteger(guint val); | | | |
| GdaValue *gda_value_new_from_string (const gchar *as_string, | | | |
| GdaValueType type); | | | |
| GdaValue *gda_value_new_from_xml (const xmlNodePtr node); | | | |
| | | | |
|
| void gda_value_free (GdaValue *value); | | #define GDA_TYPE_VALUE G_TYPE_VALUE | |
| | | #define GDA_VALUE_TYPE(value) (gda_value_get_type(value)) | |
| | | #define gda_value_isa(value, type) (gda_value_get_type (value) == type) | |
| | | | |
|
| GdaValueType gda_value_get_type (GdaValue *value); | | GdaValueType gda_value_get_type(GdaValue *value); | |
| #define gda_value_isa(value,type) (gda_value_get_type (valu | | | |
| e) == type) | | | |
| gboolean gda_value_is_null (GdaValue *value); | | | |
| gboolean gda_value_is_number (GdaValue *value); | | | |
| GdaValue *gda_value_copy (GdaValue *value); | | | |
| | | | |
|
| gint64 gda_value_get_bigint (GdaValue *value); | | GdaValue *gda_value_new_null (void); | |
| void gda_value_set_bigint (GdaValue *value, gint64 val); | | GdaValue *gda_value_new_bigint (gint64 val); | |
| guint64 gda_value_get_biguint (GdaValue *value); | | GdaValue *gda_value_new_biguint(guint64 val); | |
| void gda_value_set_biguint (GdaValue *value, guint64 val | | GdaValue *gda_value_new_binary (gconstpointer val, | |
| ); | | glong size); | |
| G_CONST_RETURN gpointer gda_value_get_binary (GdaValue *value, glong *size) | | GdaValue *gda_value_new_blob (const GdaBlob *val); | |
| ; | | GdaValue *gda_value_new_boolean (gboolean val); | |
| void gda_value_set_binary (GdaValue *value, gconstpointe | | GdaValue *gda_value_new_date (const GdaDate *val); | |
| r val, glong size); | | GdaValue *gda_value_new_double (gdouble val); | |
| G_CONST_RETURN GdaBlob *gda_value_get_blob (GdaValue *value); | | GdaValue *gda_value_new_geometric_point (const GdaG | |
| void gda_value_set_blob (GdaValue *value, const GdaBlob | | eometricPoint *val); | |
| *val); | | GdaValue *gda_value_new_gobject (const GObject *val | |
| gboolean gda_value_get_boolean (GdaValue *value); | | ); | |
| void gda_value_set_boolean (GdaValue *value, gboolean va | | GdaValue *gda_value_new_integer (gint val); | |
| l); | | GdaValue *gda_value_new_list (const GdaValueList *v | |
| G_CONST_RETURN GdaDate *gda_value_get_date (GdaValue *value); | | al); | |
| void gda_value_set_date (GdaValue *value, const GdaDate | | GdaValue *gda_value_new_money (const GdaMoney *val) | |
| *val); | | ; | |
| gdouble gda_value_get_double (GdaValue *value); | | GdaValue *gda_value_new_numeric (const GdaNumeric * | |
| void gda_value_set_double (GdaValue *value, gdouble val) | | val); | |
| ; | | GdaValue *gda_value_new_single (gfloat val); | |
| | | GdaValue *gda_value_new_smallint (gshort val); | |
| | | GdaValue *gda_value_new_smalluint (gushort val); | |
| | | GdaValue *gda_value_new_string (const gchar *val); | |
| | | GdaValue *gda_value_new_time (const GdaTime *val); | |
| | | GdaValue *gda_value_new_timestamp (const GdaTimesta | |
| | | mp *val); | |
| | | GdaValue *gda_value_new_timestamp_from_timet (time_ | |
| | | t val); | |
| | | GdaValue *gda_value_new_tinyint (gchar val); | |
| | | GdaValue *gda_value_new_tinyuint (guchar val); | |
| | | GdaValue *gda_value_new_uinteger(guint val); | |
| | | GdaValue *gda_value_new_gdatype (GdaValueType val); | |
| | | | |
| | | GdaValue *gda_value_new_from_string (const gchar *a | |
| | | s_string, GdaValueType type); | |
| | | GdaValue *gda_value_new_from_xml (const xmlNodePtr | |
| | | node); | |
| | | | |
| | | void gda_value_free (GdaValue *value); | |
| | | void gda_value_reset_with_type (GdaValue *valu | |
| | | e, GdaValueType type); | |
| | | | |
| | | gboolean gda_value_is_null (GdaValue *value); | |
| | | gboolean gda_value_is_number (GdaValue *value); | |
| | | GdaValue *gda_value_copy (GdaValue *value); | |
| | | | |
| | | gint64 gda_value_get_bigint (GdaValue *value); | |
| | | void gda_value_set_bigint (GdaValue *value, gi | |
| | | nt64 val); | |
| | | guint64 gda_value_get_biguint (GdaValue *value); | |
| | | void gda_value_set_biguint (GdaValue *value, g | |
| | | uint64 val); | |
| | | G_CONST_RETURN GdaBinary *gda_value_get_binary (GdaValue *value, gl | |
| | | ong *size); | |
| | | void gda_value_set_binary (GdaValue *value, gc | |
| | | onstpointer val, glong size); | |
| | | G_CONST_RETURN GdaBlob *gda_value_get_blob (GdaValue *value); | |
| | | void gda_value_set_blob (GdaValue *value, cons | |
| | | t GdaBlob *val); | |
| | | gboolean gda_value_get_boolean (GdaValue *value); | |
| | | void gda_value_set_boolean (GdaValue *value, g | |
| | | boolean val); | |
| | | G_CONST_RETURN GdaDate *gda_value_get_date (GdaValue *value); | |
| | | void gda_value_set_date (GdaValue *value, cons | |
| | | t GdaDate *val); | |
| | | gdouble gda_value_get_double (GdaValue *value); | |
| | | void gda_value_set_double (GdaValue *value, gd | |
| | | ouble val); | |
| G_CONST_RETURN GdaGeometricPoint *gda_value_get_geometric_point (GdaValue *
value); | | G_CONST_RETURN GdaGeometricPoint *gda_value_get_geometric_point (GdaValue *
value); | |
|
| void gda_value_set_geometric_point (GdaValue *value, con | | void gda_value_set_geometric_point (GdaValue * | |
| st GdaGeometricPoint *val); | | value, const GdaGeometricPoint *val); | |
| G_CONST_RETURN GObject *gda_value_get_gobject (GdaValue *value); | | G_CONST_RETURN GObject *gda_value_get_gobject (GdaValue *value); | |
| void gda_value_set_gobject (GdaValue *value, const GObje | | void gda_value_set_gobject (GdaValue *value, c | |
| ct *val); | | onst GObject *val); | |
| gint gda_value_get_integer (GdaValue *value); | | gint gda_value_get_integer (GdaValue *value); | |
| void gda_value_set_integer (GdaValue *value, gint val); | | void gda_value_set_integer (GdaValue *value, g | |
| G_CONST_RETURN GdaValueList *gda_value_get_list (GdaValue *value); | | int val); | |
| void gda_value_set_list (GdaValue *value, const GdaValue | | G_CONST_RETURN GdaValueList *gda_value_get_list (GdaValue *value); | |
| List *val); | | void gda_value_set_list (GdaValue *value, cons | |
| void gda_value_set_null (GdaValue *value); | | t GdaValueList *val); | |
| G_CONST_RETURN GdaMoney *gda_value_get_money (GdaValue *value); | | void gda_value_set_null (GdaValue *value); | |
| void gda_value_set_money (GdaValue *value, const GdaMone | | G_CONST_RETURN GdaMoney *gda_value_get_money (GdaValue *value); | |
| y *val); | | void gda_value_set_money (GdaValue *value, con | |
| G_CONST_RETURN GdaNumeric *gda_value_get_numeric (GdaValue *value); | | st GdaMoney *val); | |
| void gda_value_set_numeric (GdaValue *value, const GdaNu | | G_CONST_RETURN GdaNumeric *gda_value_get_numeric (GdaValue *value); | |
| meric *val); | | void gda_value_set_numeric (GdaValue *value, c | |
| gfloat gda_value_get_single (GdaValue *value); | | onst GdaNumeric *val); | |
| void gda_value_set_single (GdaValue *value, gfloat val); | | gfloat gda_value_get_single (GdaValue *value); | |
| gshort gda_value_get_smallint (GdaValue *value); | | void gda_value_set_single (GdaValue *value, gf | |
| void gda_value_set_smallint (GdaValue *value, gshort val | | loat val); | |
| ); | | gshort gda_value_get_smallint (GdaValue *value); | |
| gushort gda_value_get_smalluint (GdaValue *value); | | void gda_value_set_smallint (GdaValue *value, | |
| void gda_value_set_smalluint (GdaValue *value, gushort v | | gshort val); | |
| al); | | gushort gda_value_get_smalluint (GdaValue *value) | |
| G_CONST_RETURN gchar *gda_value_get_string (GdaValue *value); | | ; | |
| void gda_value_set_string (GdaValue *value, const gchar | | void gda_value_set_smalluint (GdaValue *value, | |
| *val); | | gushort val); | |
| G_CONST_RETURN GdaTime *gda_value_get_time (GdaValue *value); | | G_CONST_RETURN gchar *gda_value_get_string (GdaValue *value); | |
| void gda_value_set_time (GdaValue *value, const GdaTime | | void gda_value_set_string (GdaValue *value, co | |
| *val); | | nst gchar *val); | |
| G_CONST_RETURN GdaTimestamp *gda_value_get_timestamp (GdaValue *value); | | G_CONST_RETURN GdaTime *gda_value_get_time (GdaValue *value); | |
| void gda_value_set_timestamp (GdaValue *value, const Gda | | void gda_value_set_time (GdaValue *value, cons | |
| Timestamp *val); | | t GdaTime *val); | |
| gchar gda_value_get_tinyint (GdaValue *value); | | G_CONST_RETURN GdaTimestamp *gda_value_get_timestamp (GdaValue *value) | |
| void gda_value_set_tinyint (GdaValue *value, gchar val); | | ; | |
| guchar gda_value_get_tinyuint (GdaValue *value); | | void gda_value_set_timestamp (GdaValue *value, | |
| void gda_value_set_tinyuint (GdaValue *value, guchar val | | const GdaTimestamp *val); | |
| ); | | gchar gda_value_get_tinyint (GdaValue *value); | |
| guint gda_value_get_uinteger (GdaValue *value); | | void gda_value_set_tinyint (GdaValue *value, g | |
| void gda_value_set_uinteger (GdaValue *value, guint val) | | char val); | |
| ; | | guchar gda_value_get_tinyuint (GdaValue *value); | |
| GdaValueType gda_value_get_vtype (GdaValue *value); | | void gda_value_set_tinyuint (GdaValue *value, | |
| void gda_value_set_vtype (GdaValue *value, GdaValueType | | guchar val); | |
| type); | | guint gda_value_get_uinteger (GdaValue *value); | |
| gboolean gda_value_set_from_string (GdaValue *value, | | void gda_value_set_uinteger (GdaValue *value, | |
| const gchar *as_string, | | guint val); | |
| GdaValueType type); | | void gda_value_set_gdatype (GValue *value, Gda | |
| gboolean gda_value_set_from_value (GdaValue *value, const Gd | | ValueType val); | |
| aValue *from); | | GdaValueType gda_value_get_gdatype (GValue *value); | |
| | | | |
|
| gint gda_value_compare (GdaValue *value1, GdaValue *valu | | void gda_value_set_type (GdaValue *value, GTyp | |
| e2); | | e type); | |
| gint gda_value_compare_ext (GdaValue *value1, GdaValue * | | gboolean gda_value_set_from_string (GdaValue *valu | |
| value2); | | e, | |
| gchar *gda_value_stringify (GdaValue *value); | | | |
| xmlNodePtr gda_value_to_xml (GdaValue *value); | | const gchar *as_string, | |
| | | | |
| | | GdaValueType type); | |
| | | gboolean gda_value_set_from_value (GdaValue *value | |
| | | , const GdaValue *from); | |
| | | | |
|
| GType gda_money_get_type (void); | | gint gda_value_compare (GdaValue *value1, GdaV | |
| GdaMoney* gda_money_copy (GdaMoney *src); | | alue *value2); | |
| void gda_money_free (GdaMoney *money); | | gint gda_value_compare_ext (GdaValue *value1, | |
| | | GdaValue *value2); | |
| | | gchar *gda_value_stringify (GdaValue *value); | |
| | | xmlNodePtr gda_value_to_xml (GdaValue *value); | |
| | | | |
|
| GType gda_numeric_get_type (void); | | /* Custom data types */ | |
| GdaNumeric* gda_numeric_copy (GdaNumeric *src); | | GType gda_money_get_type (void); | |
| void gda_numeric_free (GdaNumeric *money); | | gpointer gda_money_copy (gpointer boxed); | |
| | | void gda_money_free (gpointer boxed); | |
| | | | |
| | | GType gda_numeric_get_type (void); | |
| | | gpointer gda_numeric_copy (gpointer boxed); | |
| | | void gda_numeric_free (gpointer boxed); | |
| | | | |
| | | GType gda_time_get_type(void); | |
| | | gpointer gda_time_copy (gpointer boxed); | |
| | | void gda_time_free (gpointer boxed); | |
| | | | |
| | | GType gda_timestamp_get_type(void); | |
| | | gpointer gda_timestamp_copy (gpointer boxed); | |
| | | void gda_timestamp_free (gpointer boxed); | |
| | | | |
| | | GType gda_date_get_type(void); | |
| | | gpointer gda_date_copy (gpointer boxed); | |
| | | void gda_date_free (gpointer boxed); | |
| | | | |
| | | GType gda_geometricpoint_get_type(void); | |
| | | gpointer gda_geometricpoint_copy (gpointer boxed); | |
| | | void gda_geometricpoint_free (gpointer boxed); | |
| | | | |
| | | GType gda_binary_get_type(void); | |
| | | gpointer gda_binary_copy (gpointer boxed); | |
| | | void gda_binary_free (gpointer boxed); | |
| | | | |
| | | GType gda_value_list_get_type (void); | |
| | | GType gda_smallint_get_type (void); | |
| | | GType gda_smalluint_get_type (void); | |
| | | GType gda_gdatype_get_type (void); | |
| | | | |
| G_END_DECLS | | G_END_DECLS | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 14 change blocks. |
| 151 lines changed or deleted | | 205 lines changed or added | |
|