00001 /******************************************************************** 00002 * qoferror.h 00003 * 00004 * Sun Sep 10 19:55:48 2006 00005 * Copyright 2006 Neil Williams 00006 * linux@codehelp.co.uk 00007 *******************************************************************/ 00008 /* 00009 * This program is free software; you can redistribute it and/or modify 00010 * it under the terms of the GNU General Public License as published by 00011 * the Free Software Foundation; either version 2 of the License, or 00012 * (at your option) any later version. 00013 * 00014 * This program is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 * GNU General Public License for more details. 00018 * 00019 * You should have received a copy of the GNU General Public License 00020 * along with this program; if not, write to the Free Software 00021 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00022 */ 00023 00024 #ifndef _QOFERROR_H 00025 #define _QOFERROR_H 00026 00027 #include "qofsession.h" 00028 00118 typedef struct QofError_s QofError; 00119 00121 #define QOF_MOD_ERROR "qof-error-module" 00122 00124 #define QOF_SUCCESS 0 00125 00131 #define QOF_FATAL -1 00132 00157 QofErrorId 00158 qof_error_register (const gchar * err_message, gboolean use_file); 00159 00167 void 00168 qof_error_unregister (QofErrorId id); 00169 00175 void 00176 qof_error_set (QofSession * session, QofErrorId error); 00177 00178 void 00179 qof_error_set_be (QofBackend * be, QofErrorId error); 00180 00186 void 00187 qof_error_clear (QofSession * session); 00188 00196 QofErrorId 00197 qof_error_check_be (QofBackend * be); 00198 00200 QofErrorId 00201 qof_error_check (QofSession * session); 00202 00213 QofTime * 00214 qof_error_get_time_be (QofBackend * be); 00215 00217 QofTime * 00218 qof_error_get_time (QofSession * session); 00219 00230 QofErrorId 00231 qof_error_get_id_be (QofBackend * be); 00232 00234 QofErrorId 00235 qof_error_get_id (QofSession * session); 00236 00247 const gchar * 00248 qof_error_get_message_be (QofBackend * be); 00249 00251 const gchar * 00252 qof_error_get_message (QofSession * session); 00253 00255 #endif /* _QOFERROR_H */