1 /* 2 * Copyright (C) 2009 - 2011 Vivien Malerba <malerba@gnome-db.org> 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License 6 * as published by the Free Software Foundation; either version 2 7 * of the License, or (at your option) any later version. main()8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 */ 18 19 #ifndef ___MGR_COLUMNS_H__ 20 #define ___MGR_COLUMNS_H__ 21 22 #include <libgda/gda-tree-manager.h> 23 #include "browser-connection.h" 24 25 G_BEGIN_DECLS 26 27 #define MGR_COLUMNS_TYPE (mgr_columns_get_type()) 28 #define MGR_COLUMNS(obj) (G_TYPE_CHECK_INSTANCE_CAST (obj, MGR_COLUMNS_TYPE, MgrColumns)) 29 #define MGR_COLUMNS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST (klass, MGR_COLUMNS_TYPE, MgrColumnsClass)) 30 #define IS_MGR_COLUMNS(obj) (G_TYPE_CHECK_INSTANCE_TYPE(obj, MGR_COLUMNS_TYPE)) 31 #define IS_MGR_COLUMNS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), MGR_COLUMNS_TYPE)) 32 33 typedef struct _MgrColumns MgrColumns; 34 typedef struct _MgrColumnsPriv MgrColumnsPriv; 35 typedef struct _MgrColumnsClass MgrColumnsClass; 36 37 /* error reporting */ 38 extern GQuark mgr_columns_error_quark (void); 39 #define MGR_COLUMNS_ERROR mgr_columns_error_quark () 40 41 typedef enum 42 { 43 MGR_COLUMNS_TABLE_NOT_FOUND, 44 MGR_COLUMNS_WRONG_OBJ_TYPE, 45 MGR_COLUMNS_NO_META_STRUCT 46 } MgrColumnsError; 47 48 struct _MgrColumns { 49 GdaTreeManager object; 50 MgrColumnsPriv *priv; 51 }; 52 53 struct _MgrColumnsClass { 54 GdaTreeManagerClass object_class; 55 }; 56 57 GType mgr_columns_get_type (void) G_GNUC_CONST; 58 GdaTreeManager* mgr_columns_new (BrowserConnection *bcnc, const gchar *schema, const gchar *table); 59 60 #define MGR_COLUMNS_COL_NAME_ATT_NAME "markup" 61 #define MGR_COLUMNS_COL_TYPE_ATT_NAME "type" 62 #define MGR_COLUMNS_COL_NOTNULL_ATT_NAME "notnull" 63 #define MGR_COLUMNS_COL_DEFAULT_ATT_NAME "default" 64 #define MGR_COLUMNS_COL_DETAILS "details" 65 66 G_END_DECLS 67 68 #endif 69