deprecated.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *            deprecated.h
00003  *
00004  *  Mon Nov 21 14:08:25 2005
00005  *  Copyright  2005  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., 59 Temple Place - Suite 330, Boston, MA 02110-1301, USA.
00022  */
00023 #ifndef QOF_DISABLE_DEPRECATED 
00024  
00025 #ifndef _DEPRECATED_H
00026 #define _DEPRECATED_H
00027 #include "qof.h"
00028 
00034 #define gncLogLevel QofLogLevel
00035 
00037 void gnc_log_init (void);
00038 
00040 void gnc_set_log_level(QofLogModule module, gncLogLevel level);
00041 
00043 void gnc_set_log_level_global(gncLogLevel level);
00044 
00057 void qof_log_set_level_global(QofLogLevel level);
00058 
00060 void gnc_set_logfile (FILE *outfile);
00061 
00063 const char * gnc_log_prettify (const char *name);
00064 
00066 gboolean gnc_should_log(QofLogModule log_module, gncLogLevel log_level);
00067 
00069 #define GNC_LOG_FATAL   QOF_LOG_FATAL
00070 
00071 #define GNC_LOG_ERROR   QOF_LOG_ERROR
00072 
00073 #define GNC_LOG_WARNING QOF_LOG_WARNING
00074 
00075 #define GNC_LOG_INFO    QOF_LOG_INFO
00076 
00077 #define GNC_LOG_DEBUG   QOF_LOG_DEBUG
00078 
00079 #define GNC_LOG_DETAIL  QOF_LOG_DETAIL
00080 
00081 #define GNC_LOG_TRACE   QOF_LOG_TRACE
00082 
00084 void gnc_start_clock (int, QofLogModule, gncLogLevel, const char*, const char*, ...);
00086 void gnc_report_clock (int, QofLogModule, gncLogLevel, const char*, const char*, ...);
00088 void gnc_report_clock_total (int, QofLogModule, gncLogLevel, const char*, const char*, ...);
00089 
00091 #define  GNC_EVENT_NONE   QOF_EVENT_NONE
00092 
00093 #define  GNC_EVENT_CREATE QOF_EVENT_CREATE
00094 
00095 #define  GNC_EVENT_MODIFY QOF_EVENT_MODIFY
00096 
00097 #define  GNC_EVENT_DESTROY QOF_EVENT_DESTROY
00098 
00099 #define  GNC_EVENT_ADD    QOF_EVENT_ADD
00100 
00101 #define GNC_EVENT_REMOVE  QOF_EVENT_REMOVE
00102 
00103 #define GNC_EVENT_ALL     QOF_EVENT_ALL
00104 
00105 #define GNCEngineEventType QofEventId
00106 
00107 typedef void (*GNCEngineEventHandler) (GUID *entity, QofIdType type,
00108                                        GNCEngineEventType event_type,
00109                                        gpointer user_data);
00113 gint qof_event_register_old_handler(GNCEngineEventHandler old_handler,
00114                                                                         gpointer user_data);
00116 gint gnc_engine_register_event_handler (GNCEngineEventHandler handler,
00117                                    gpointer user_data);
00119 void gnc_engine_unregister_event_handler (gint handler_id);
00121 void gnc_engine_gen_event (QofEntity *entity, GNCEngineEventType event_type);
00123 void gnc_engine_suspend_events (void);
00125 void gnc_engine_resume_events (void);
00127 void gnc_engine_generate_event (const GUID *guid, QofIdType e_type, 
00128          GNCEngineEventType event_type);
00130 #define qof_book_mergeResult QofBookMergeResult
00131 
00132 #define qof_book_mergeRule QofBookMergeRule
00133 
00134 #define qof_book_mergeData QofBookMergeData
00135 
00136 QofBookMergeData* qof_book_mergeInit( QofBook *importBook, QofBook *targetBook);
00138 typedef void (* qof_book_mergeRuleForeachCB)(QofBookMergeData*, QofBookMergeRule*, guint);
00140 void qof_book_mergeRuleForeach(QofBookMergeData* mergeData,
00141                                QofBookMergeRuleForeachCB callback , 
00142                                QofBookMergeResult mergeResult);
00144 QofBookMergeData* qof_book_mergeUpdateResult(QofBookMergeData *mergeData,
00145                                 QofBookMergeResult tag);
00147 gint qof_book_mergeCommit(QofBookMergeData *mergeData );
00150 #define SAFE_STRCMP_REAL(fcn,da,db) {    \
00151   if ((da) && (db)) {                    \
00152     if ((da) != (db)) {                  \
00153       gint retval = fcn ((da), (db));    \
00154       /* if strings differ, return */    \
00155       if (retval) return retval;         \
00156     }                                    \
00157   } else                                 \
00158   if ((!(da)) && (db)) {                 \
00159     return -1;                           \
00160   } else                                 \
00161   if ((da) && (!(db))) {                 \
00162     return +1;                           \
00163   }                                      \
00164 }
00165 
00166 #define SAFE_STRCMP(da,db) SAFE_STRCMP_REAL(strcmp,(da),(db))
00167 
00168 #define SAFE_STRCASECMP(da,db) SAFE_STRCMP_REAL(strcasecmp,(da),(db))
00169 
00170 gpointer gnc_string_cache_insert(gconstpointer key);
00171 #define GNC_SCANF_LLD QOF_SCANF_LLD 
00173 gchar * gnc_stpcpy (gchar *dest, const gchar *src);
00174 
00175 GCache* gnc_engine_get_string_cache(void);
00177 GCache* qof_util_get_string_cache(void);
00179 void gnc_engine_string_cache_destroy (void);
00181 void gnc_string_cache_remove(gconstpointer key);
00183 void qof_book_set_schedxactions( QofBook *book, GList *newList );
00184 #endif /* _DEPRECATED_H */
00185 #endif /* QOF_DISABLE_DEPRECATED */

Generated on Fri May 12 18:00:32 2006 for QOF by  doxygen 1.4.4