/usr/include/libgda-5.0/libgda/gda-connection-event.h is in libgda-5.0-dev 5.2.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | /*
* Copyright (C) 2005 - 2011 Vivien Malerba <malerba@gnome-db.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 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 St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef __GDA_CONNECTION_EVENT_H__
#define __GDA_CONNECTION_EVENT_H__
#include <glib-object.h>
#include <libgda/gda-decl.h>
G_BEGIN_DECLS
#define GDA_TYPE_CONNECTION_EVENT (gda_connection_event_get_type())
#define GDA_CONNECTION_EVENT(obj) (G_TYPE_CHECK_INSTANCE_CAST (obj, GDA_TYPE_CONNECTION_EVENT, GdaConnectionEvent))
#define GDA_CONNECTION_EVENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST (klass, GDA_TYPE_CONNECTION_EVENT, GdaConnectionEventClass))
#define GDA_IS_CONNECTION_EVENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE(obj, GDA_TYPE_CONNECTION_EVENT))
#define GDA_IS_CONNECTION_EVENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GDA_TYPE_CONNECTION_EVENT))
struct _GdaConnectionEvent {
GObject object;
GdaConnectionEventPrivate *priv;
};
struct _GdaConnectionEventClass {
GObjectClass parent_class;
/*< private >*/
/* Padding for future expansion */
void (*_gda_reserved1) (void);
void (*_gda_reserved2) (void);
void (*_gda_reserved3) (void);
void (*_gda_reserved4) (void);
};
typedef enum {
GDA_CONNECTION_EVENT_NOTICE,
GDA_CONNECTION_EVENT_WARNING,
GDA_CONNECTION_EVENT_ERROR,
GDA_CONNECTION_EVENT_COMMAND
} GdaConnectionEventType;
typedef enum
{
GDA_CONNECTION_EVENT_CODE_CONSTRAINT_VIOLATION,
GDA_CONNECTION_EVENT_CODE_RESTRICT_VIOLATION,
GDA_CONNECTION_EVENT_CODE_NOT_NULL_VIOLATION,
GDA_CONNECTION_EVENT_CODE_FOREIGN_KEY_VIOLATION,
GDA_CONNECTION_EVENT_CODE_UNIQUE_VIOLATION,
GDA_CONNECTION_EVENT_CODE_CHECK_VIOLATION,
GDA_CONNECTION_EVENT_CODE_INSUFFICIENT_PRIVILEGES,
GDA_CONNECTION_EVENT_CODE_UNDEFINED_COLUMN,
GDA_CONNECTION_EVENT_CODE_UNDEFINED_FUNCTION,
GDA_CONNECTION_EVENT_CODE_UNDEFINED_TABLE,
GDA_CONNECTION_EVENT_CODE_DUPLICATE_COLUMN,
GDA_CONNECTION_EVENT_CODE_DUPLICATE_DATABASE,
GDA_CONNECTION_EVENT_CODE_DUPLICATE_FUNCTION,
GDA_CONNECTION_EVENT_CODE_DUPLICATE_SCHEMA,
GDA_CONNECTION_EVENT_CODE_DUPLICATE_TABLE,
GDA_CONNECTION_EVENT_CODE_DUPLICATE_ALIAS,
GDA_CONNECTION_EVENT_CODE_DUPLICATE_OBJECT,
GDA_CONNECTION_EVENT_CODE_SYNTAX_ERROR,
GDA_CONNECTION_EVENT_CODE_UNKNOWN
} GdaConnectionEventCode;
#define GDA_SQLSTATE_NO_ERROR "00000"
#define GDA_SQLSTATE_GENERAL_ERROR "HY000"
/**
* SECTION:gda-connection-event
* @short_description: Any event which has occurred on a #GdaConnection
* @title: GdaConnectionEvent
* @stability: Stable
* @see_also: #GdaConnection
*
* Events occurring on a connection are each represented as a #GdaConnectionEvent object. Each #GdaConnection
* is responsible for keeping a list of past events; that list can be consulted using the
* gda_connection_get_events() function.
*/
GType gda_connection_event_get_type (void) G_GNUC_CONST;
void gda_connection_event_set_event_type (GdaConnectionEvent *event, GdaConnectionEventType type);
GdaConnectionEventType gda_connection_event_get_event_type (GdaConnectionEvent *event);
const gchar *gda_connection_event_get_description (GdaConnectionEvent *event);
void gda_connection_event_set_description (GdaConnectionEvent *event, const gchar *description);
glong gda_connection_event_get_code (GdaConnectionEvent *event);
void gda_connection_event_set_code (GdaConnectionEvent *event, glong code);
GdaConnectionEventCode gda_connection_event_get_gda_code (GdaConnectionEvent *event);
void gda_connection_event_set_gda_code (GdaConnectionEvent *event, GdaConnectionEventCode code);
const gchar *gda_connection_event_get_source (GdaConnectionEvent *event);
void gda_connection_event_set_source (GdaConnectionEvent *event, const gchar *source);
const gchar *gda_connection_event_get_sqlstate (GdaConnectionEvent *event);
void gda_connection_event_set_sqlstate (GdaConnectionEvent *event, const gchar *sqlstate);
G_END_DECLS
#endif
|