00001
00002
00003 #ifndef _LIBGDAMM_CONNECTIONEVENT_H
00004 #define _LIBGDAMM_CONNECTIONEVENT_H
00005
00006
00007 #include <glibmm.h>
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #include <glibmm/object.h>
00032 #include <libgda/gda-connection-event.h>
00033
00034
00035 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00036 typedef struct _GdaConnectionEvent GdaConnectionEvent;
00037 typedef struct _GdaConnectionEventClass GdaConnectionEventClass;
00038 #endif
00039
00040
00041 namespace Gnome
00042 {
00043
00044 namespace Gda
00045 { class ConnectionEvent_Class; }
00046
00047 }
00048 namespace Gnome
00049 {
00050
00056 enum ConnectionEventCode
00057 {
00058 CONNECTION_EVENT_CODE_CONSTRAINT_VIOLATION,
00059 CONNECTION_EVENT_CODE_RESTRICT_VIOLATION,
00060 CONNECTION_EVENT_CODE_NOT_NULL_VIOLATION,
00061 CONNECTION_EVENT_CODE_FOREIGN_KEY_VIOLATION,
00062 CONNECTION_EVENT_CODE_UNIQUE_VIOLATION,
00063 CONNECTION_EVENT_CODE_CHECK_VIOLATION,
00064 CONNECTION_EVENT_CODE_INSUFFICIENT_PRIVILEGES,
00065 CONNECTION_EVENT_CODE_UNDEFINED_COLUMN,
00066 CONNECTION_EVENT_CODE_UNDEFINED_FUNCTION,
00067 CONNECTION_EVENT_CODE_UNDEFINED_TABLE,
00068 CONNECTION_EVENT_CODE_DUPLICATE_COLUMN,
00069 CONNECTION_EVENT_CODE_DUPLICATE_DATABASE,
00070 CONNECTION_EVENT_CODE_DUPLICATE_FUNCTION,
00071 CONNECTION_EVENT_CODE_DUPLICATE_SCHEMA,
00072 CONNECTION_EVENT_CODE_DUPLICATE_TABLE,
00073 CONNECTION_EVENT_CODE_DUPLICATE_ALIAS,
00074 CONNECTION_EVENT_CODE_DUPLICATE_OBJECT,
00075 CONNECTION_EVENT_CODE_SYNTAX_ERROR,
00076 CONNECTION_EVENT_CODE_UNKNOWN
00077 };
00078
00079 }
00080
00081
00082 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00083 namespace Glib
00084 {
00085
00086 template <>
00087 class Value<Gnome::ConnectionEventCode> : public Glib::Value_Enum<Gnome::ConnectionEventCode>
00088 {
00089 public:
00090 static GType value_type() G_GNUC_CONST;
00091 };
00092
00093 }
00094 #endif
00095
00096
00097 namespace Gnome
00098 {
00099
00103 enum ConnectionEventType
00104 {
00105 CONNECTION_EVENT_NOTICE,
00106 CONNECTION_EVENT_WARNING,
00107 CONNECTION_EVENT_ERROR
00108 };
00109
00110 }
00111
00112
00113 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00114 namespace Glib
00115 {
00116
00117 template <>
00118 class Value<Gnome::ConnectionEventType> : public Glib::Value_Enum<Gnome::ConnectionEventType>
00119 {
00120 public:
00121 static GType value_type() G_GNUC_CONST;
00122 };
00123
00124 }
00125 #endif
00126
00127
00128 namespace Gnome
00129 {
00130
00131
00132 namespace Gda
00133 {
00134
00140 class ConnectionEvent : public Glib::Object
00141 {
00142
00143 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00144
00145 public:
00146 typedef ConnectionEvent CppObjectType;
00147 typedef ConnectionEvent_Class CppClassType;
00148 typedef GdaConnectionEvent BaseObjectType;
00149 typedef GdaConnectionEventClass BaseClassType;
00150
00151 private: friend class ConnectionEvent_Class;
00152 static CppClassType connectionevent_class_;
00153
00154 private:
00155
00156 ConnectionEvent(const ConnectionEvent&);
00157 ConnectionEvent& operator=(const ConnectionEvent&);
00158
00159 protected:
00160 explicit ConnectionEvent(const Glib::ConstructParams& construct_params);
00161 explicit ConnectionEvent(GdaConnectionEvent* castitem);
00162
00163 #endif
00164
00165 public:
00166 virtual ~ConnectionEvent();
00167
00168 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00169 static GType get_type() G_GNUC_CONST;
00170 static GType get_base_type() G_GNUC_CONST;
00171 #endif
00172
00174 GdaConnectionEvent* gobj() { return reinterpret_cast<GdaConnectionEvent*>(gobject_); }
00175
00177 const GdaConnectionEvent* gobj() const { return reinterpret_cast<GdaConnectionEvent*>(gobject_); }
00178
00180 GdaConnectionEvent* gobj_copy();
00181
00182 private:
00183
00184
00185 protected:
00186
00187 ConnectionEvent();
00188
00189 public:
00190
00191 static Glib::RefPtr<ConnectionEvent> create();
00192
00193
00197 void set_event_type(ConnectionEventType type);
00198
00202 ConnectionEventType get_event_type() const;
00203
00207 Glib::ustring get_description() const;
00208
00212 void set_description(const Glib::ustring& description);
00213
00217 glong get_code() const;
00218
00224 void set_code(glong code);
00225
00229 ConnectionEventCode get_gda_code() const;
00230
00236 void set_gda_code(ConnectionEventCode code);
00237
00241 Glib::ustring get_source() const;
00242
00246 void set_source(const Glib::ustring& source);
00247
00251 Glib::ustring get_sqlstate() const;
00252
00256 void set_sqlstate(const Glib::ustring& sqlstate);
00257
00258 #ifdef GLIBMM_PROPERTIES_ENABLED
00259
00265 Glib::PropertyProxy<ConnectionEventType> property_type() ;
00266 #endif //#GLIBMM_PROPERTIES_ENABLED
00267
00268 #ifdef GLIBMM_PROPERTIES_ENABLED
00269
00275 Glib::PropertyProxy_ReadOnly<ConnectionEventType> property_type() const;
00276 #endif //#GLIBMM_PROPERTIES_ENABLED
00277
00278
00279 public:
00280
00281 public:
00282
00283 #ifdef GLIBMM_VFUNCS_ENABLED
00284 #endif //GLIBMM_VFUNCS_ENABLED
00285
00286 protected:
00287
00288 #ifdef GLIBMM_VFUNCS_ENABLED
00289 #endif //GLIBMM_VFUNCS_ENABLED
00290
00291
00292 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00293 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00294
00295
00296 };
00297
00298 }
00299 }
00300
00301
00302 namespace Glib
00303 {
00309 Glib::RefPtr<Gnome::Gda::ConnectionEvent> wrap(GdaConnectionEvent* object, bool take_copy = false);
00310 }
00311
00312
00313 #endif
00314