deprecated.c

00001 /* *****************************************************************\
00002  * deprecated.c -- QOF deprecated function replacements            *
00003  * Copyright (c) 2005 Neil Williams <linux@codehelp.co.uk>          *
00004  *                                                                  *
00005  * This program is free software; you can redistribute it and/or    *
00006  * modify it under the terms of the GNU General Public License as   *
00007  * published by the Free Software Foundation; either version 2 of   *
00008  * the License, or (at your option) any later version.              *
00009  *                                                                  *
00010  * This program is distributed in the hope that it will be useful,  *
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
00013  * GNU General Public License for more details.                     *
00014  *                                                                  *
00015  * You should have received a copy of the GNU General Public License*
00016  * along with this program; if not, contact:                        *
00017  *                                                                  *
00018  * Free Software Foundation           Voice:  +1-617-542-5942       *
00019  * 51 Franklin Street, Fifth Floor    Fax:    +1-617-542-2652       *
00020  * Boston, MA  02110-1301,  USA       gnu@gnu.org                   *
00021  *                                                                  *
00022 \********************************************************************/
00023 
00024 #include "config.h"
00025 #ifndef QOF_DISABLE_DEPRECATED
00026 #include <glib.h>
00027 #include "qof.h"
00028 
00029 /* Don't be fooled: gnc_trace_num_spaces has external linkage and
00030    static storage, but can't be defined with 'extern' because it has
00031    an initializer, and can't be declared with 'static' because that
00032    would give it internal linkage. (this is why it is deprecated) */
00033 gint __attribute__ ((unused)) gnc_trace_num_spaces = 0;
00034 void  gnc_log_init (void) { qof_log_init(); }
00035 void gnc_set_log_level(QofLogModule log_module, gncLogLevel level)
00036 {
00037         qof_log_set_level(log_module, (QofLogLevel)level);
00038 }
00039 void gnc_set_log_level_global(gncLogLevel level)
00040 {
00041         qof_log_set_level_registered((QofLogLevel)level);
00042 }
00043 void qof_log_set_level_global(QofLogLevel level)
00044 {
00045         qof_log_set_level_registered((QofLogLevel)level);
00046 }
00047 void gnc_set_logfile (FILE *outfile)
00048 {
00049         qof_log_set_file(outfile);
00050 }
00051 const char * gnc_log_prettify (const char *name)
00052 {
00053         return qof_log_prettify(name);
00054 }
00055 void gnc_start_clock (int a, QofLogModule b, gncLogLevel c,  const char *d, const char *e, ...) { }
00056 void gnc_report_clock (int a, QofLogModule b, gncLogLevel c, const char *d, const char *e, ...) { }
00057 void gnc_report_clock_total (int a, QofLogModule b, gncLogLevel c, const char *d, const char *e, ...) { }
00058 gboolean gnc_should_log(QofLogModule log_module, gncLogLevel log_level)
00059 {
00060         return qof_log_check(log_module, log_level);
00061 }
00062 gint
00063 gnc_engine_register_event_handler (GNCEngineEventHandler handler,
00064                                    gpointer user_data)
00065 {
00066         return qof_event_register_old_handler(handler, user_data);
00067 }
00068 void gnc_engine_unregister_event_handler (gint handler_id)
00069 {
00070         qof_event_unregister_handler(handler_id);
00071 }
00072 void gnc_engine_suspend_events (void)
00073 {
00074         qof_event_suspend();
00075 }
00076 void gnc_engine_resume_events (void)
00077 {
00078         qof_event_resume();
00079 }
00080 void gnc_engine_gen_event (QofEntity *entity, GNCEngineEventType event_type)
00081 {
00082         qof_event_gen(entity, event_type, NULL);
00083 }
00084 QofBookMergeData*
00085 qof_book_mergeInit(QofBook *importBook, QofBook *targetBook)
00086 {
00087         return qof_book_merge_init(importBook, targetBook);
00088 }
00089 QofBookMergeData*
00090 qof_book_mergeUpdateResult(QofBookMergeData *mergeData,
00091                                                 QofBookMergeResult tag)
00092 {
00093         return qof_book_merge_update_result(mergeData, tag);
00094 }
00095 gint
00096 qof_book_mergeCommit(QofBookMergeData *mergeData )
00097 {
00098         return qof_book_merge_commit(mergeData);
00099 }
00100 void 
00101 qof_book_mergeRuleForeach(QofBookMergeData *mergeData, 
00102                                                   QofBookMergeRuleForeachCB cb, 
00103                                                   QofBookMergeResult mergeResult )
00104 {
00105     qof_book_merge_rule_foreach(mergeData, cb, mergeResult);
00106 }
00107 gpointer gnc_string_cache_insert(gconstpointer key)
00108 {
00109     return (gpointer)qof_util_string_cache_insert(key);
00110 }
00111 gchar * gnc_stpcpy (gchar *dest, const gchar *src)
00112 {
00113     return g_stpcpy(dest, src);
00114 }
00115 GCache* gnc_engine_get_string_cache(void)
00116 {
00117     return qof_util_get_string_cache();
00118 }
00119 void gnc_engine_string_cache_destroy (void)
00120 {
00121     qof_util_string_cache_destroy();
00122 }
00123 void gnc_string_cache_remove(gconstpointer key)
00124 {
00125     qof_util_string_cache_remove(key);
00126 }
00127 
00128 /* ==================================================================== */
00129 #endif /* QOF_DISABLE_DEPRECATED */

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