QOF  0.7.5
deprecated.h
Go to the documentation of this file.
1 /********************************************************************
2  * deprecated.h
3  *
4  * Mon Nov 21 14:08:25 2005
5  * Copyright 2005 Neil Williams
6  * linux@codehelp.co.uk
7  ********************************************************************/
8 /*
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22  */
23 #ifndef QOF_DISABLE_DEPRECATED
24 
25 #ifndef _DEPRECATED_H
26 #define _DEPRECATED_H
27 #include "qof.h"
28 
34 #define gncLogLevel QofLogLevel
35 
37 void gnc_log_init (void);
38 
40 void gnc_set_log_level (QofLogModule module, gncLogLevel level);
41 
43 void gnc_set_log_level_global (gncLogLevel level);
44 
57 void qof_log_set_level_global (QofLogLevel level);
58 
60 void gnc_set_logfile (FILE * outfile);
61 
63 const char *gnc_log_prettify (const char *name);
64 
66 gboolean gnc_should_log (QofLogModule log_module, gncLogLevel log_level);
67 
69 #define GNC_LOG_FATAL QOF_LOG_FATAL
70 
71 #define GNC_LOG_ERROR QOF_LOG_ERROR
72 
73 #define GNC_LOG_WARNING QOF_LOG_WARNING
74 
75 #define GNC_LOG_INFO QOF_LOG_INFO
76 
77 #define GNC_LOG_DEBUG QOF_LOG_DEBUG
78 
79 #define GNC_LOG_DETAIL QOF_LOG_DETAIL
80 
81 #define GNC_LOG_TRACE QOF_LOG_TRACE
82 
84 void gnc_start_clock (int, QofLogModule, gncLogLevel, const char *,
85  const char *, ...);
87 void gnc_report_clock (int, QofLogModule, gncLogLevel, const char *,
88  const char *, ...);
90 void gnc_report_clock_total (int, QofLogModule, gncLogLevel, const char *,
91  const char *, ...);
92 
94 #define GNC_EVENT_NONE QOF_EVENT_NONE
95 
96 #define GNC_EVENT_CREATE QOF_EVENT_CREATE
97 
98 #define GNC_EVENT_MODIFY QOF_EVENT_MODIFY
99 
100 #define GNC_EVENT_DESTROY QOF_EVENT_DESTROY
101 
102 #define GNC_EVENT_ADD QOF_EVENT_ADD
103 
104 #define GNC_EVENT_REMOVE QOF_EVENT_REMOVE
105 
106 #define GNC_EVENT_ALL QOF_EVENT_ALL
107 
108 #define GNCEngineEventType QofEventId
109 
110 typedef void (*GNCEngineEventHandler) (GUID * entity, QofIdType type,
111  GNCEngineEventType event_type,
112  gpointer user_data);
117  gpointer user_data);
119 gint gnc_engine_register_event_handler (GNCEngineEventHandler handler,
120  gpointer user_data);
122 void gnc_engine_unregister_event_handler (gint handler_id);
124 void gnc_engine_gen_event (QofEntity * entity, GNCEngineEventType event_type);
126 void gnc_engine_suspend_events (void);
128 void gnc_engine_resume_events (void);
130 void gnc_engine_generate_event (const GUID * guid, QofIdType e_type,
131  GNCEngineEventType event_type);
133 #define qof_book_mergeResult QofBookMergeResult
134 
135 #define qof_book_mergeRule QofBookMergeRule
136 
137 #define qof_book_mergeData QofBookMergeData
138 
139 QofBookMergeData *qof_book_mergeInit (QofBook * importBook,
140  QofBook * targetBook);
143  QofBookMergeRule *, guint);
145 void qof_book_mergeRuleForeach (QofBookMergeData * mergeData,
146  QofBookMergeRuleForeachCB callback,
147  QofBookMergeResult mergeResult);
149 QofBookMergeData *qof_book_mergeUpdateResult (QofBookMergeData * mergeData,
150  QofBookMergeResult tag);
152 gint qof_book_mergeCommit (QofBookMergeData * mergeData);
155 #define SAFE_STRCMP_REAL(fcn,da,db) { \
156  if ((da) && (db)) { \
157  if ((da) != (db)) { \
158  gint retval = fcn ((da), (db)); \
159  /* if strings differ, return */ \
160  if (retval) return retval; \
161  } \
162  } else \
163  if ((!(da)) && (db)) { \
164  return -1; \
165  } else \
166  if ((da) && (!(db))) { \
167  return +1; \
168  } \
169 }
170 
171 #define SAFE_STRCMP(da,db) SAFE_STRCMP_REAL(strcmp,(da),(db))
172 
173 #define SAFE_STRCASECMP(da,db) SAFE_STRCMP_REAL(strcasecmp,(da),(db))
174 
175 gpointer gnc_string_cache_insert (gconstpointer key);
177 #define GNC_SCANF_LLD QOF_SCANF_LLD
178 
179 gchar *gnc_stpcpy (gchar * dest, const gchar * src);
181 GCache *gnc_engine_get_string_cache (void);
183 GCache *qof_util_get_string_cache (void);
185 void gnc_engine_string_cache_destroy (void);
187 void gnc_string_cache_remove (gconstpointer key);
189 void qof_book_set_schedxactions (QofBook * book, GList * newList);
191 typedef enum
192 {
201 const gchar* gnc_date_dateformat_to_string(QofDateFormat format);
203 const gchar* gnc_date_monthformat_to_string(GNCDateMonthFormat format);
212 gboolean gnc_date_string_to_dateformat (const gchar * format_string,
213  QofDateFormat * format);
215 gboolean gnc_date_string_to_monthformat (const gchar * format_string,
216  GNCDateMonthFormat * format);
218 gboolean timespec_equal (const Timespec * ta, const Timespec * tb);
220 gint timespec_cmp (const Timespec * ta, const Timespec * tb);
222 Timespec timespec_diff (const Timespec * ta, const Timespec * tb);
224 Timespec timespec_abs (const Timespec * t);
226 Timespec timespecCanonicalDayTime (Timespec t);
228 time_t timespecToTime_t (Timespec ts);
230 void timespecFromTime_t (Timespec * ts, time_t t);
232 Timespec gnc_dmy2timespec (gint day, gint month, gint year);
234 Timespec gnc_dmy2timespec_end (gint day, gint month, gint year);
236 Timespec gnc_iso8601_to_timespec_gmt (const gchar *);
238 gchar *gnc_timespec_to_iso8601_buff (Timespec ts, gchar * buff);
240 void gnc_timespec2dmy (Timespec ts, gint * day, gint * month, gint * year);
242 void date_add_months (struct tm *tm, gint months, gboolean track_last_day);
244 gboolean qof_date_add_days(Timespec *ts, gint days);
246 gboolean qof_date_add_months(Timespec *ts, gint months, gboolean track_last_day);
248 const gchar *qof_date_format_get_string(QofDateFormat df);
250 time_t xaccDMYToSec (gint day, gint month, gint year);
252 glong gnc_timezone (struct tm *tm);
254 QofDateFormat qof_date_format_get(void);
256 void qof_date_format_set(QofDateFormat df);
258 const gchar *qof_date_text_format_get_string(QofDateFormat df);
260 char dateSeparator (void);
263 time_t qof_date_dmy_to_sec (gint day, gint month, gint year);
265 size_t qof_print_hours_elapsed_buff (char *buff, size_t len, int secs,
266  gboolean show_secs);
268 size_t qof_print_minutes_elapsed_buff (char *buff, size_t len, int secs,
269  gboolean show_secs);
271 size_t qof_print_time_buff (char *buff, size_t len, time_t secs);
273 size_t qof_print_date_time_buff (char *buff, size_t len, time_t secs);
275 gboolean qof_is_same_day (time_t, time_t);
277 void gnc_tm_get_day_start (struct tm *tm, time_t time_val);
279 void gnc_tm_set_day_start (struct tm *tm);
281 void gnc_tm_set_day_middle (struct tm *tm);
283 void gnc_tm_set_day_end (struct tm *tm);
285 void gnc_tm_get_day_end (struct tm *tm, time_t time_val);
287 time_t gnc_timet_get_day_start (time_t time_val);
289 time_t gnc_timet_get_day_end (time_t time_val);
291 void gnc_tm_get_today_start (struct tm *tm);
293 void gnc_tm_get_today_end (struct tm *tm);
295 time_t gnc_timet_get_today_start (void);
297 time_t gnc_timet_get_today_end (void);
298 #ifndef GNUCASH_MAJOR_VERSION
299 
300 time_t gnc_timet_get_day_start_gdate (GDate * date);
302 time_t gnc_timet_get_day_end_gdate (GDate * date);
303 #endif /* GNUCASH_MAJOR_VERSION */
304 
305 int date_get_last_mday (struct tm *tm);
307 gboolean date_is_last_mday (struct tm *tm);
309 int gnc_date_my_last_mday (int month, int year);
311 int gnc_timespec_last_mday (Timespec ts);
313 char * xaccDateUtilGetStampNow (void);
315 char *xaccDateUtilGetStamp (time_t thyme);
317 size_t qof_print_date_dmy_buff (gchar * buff, size_t buflen,
318  gint day, gint month, gint year);
320 size_t qof_print_date_buff (char *buff, size_t buflen, time_t secs);
322 size_t qof_print_gdate (char *buf, size_t bufflen, GDate * gd);
324 char *qof_print_date (time_t secs);
326 const char *gnc_print_date (Timespec ts);
328 gboolean qof_scan_date (const char *buff, int *day, int *month, int *year);
330 gboolean qof_scan_date_secs (const char *buff, time_t * secs);
333 #define qof_book_set_guid(book,guid) \
334  qof_entity_set_guid(QOF_ENTITY(book), guid)
335 
336 #define QOF_TYPE_DATE "date"
337 
338 Timespec qof_instance_get_last_update (QofInstance * inst);
339 void qof_instance_set_last_update (QofInstance * inst, Timespec ts);
341 void kvp_frame_set_timespec (KvpFrame * frame, const gchar * path,
342  Timespec ts);
344 void kvp_frame_add_timespec (KvpFrame * frame, const gchar * path,
345  Timespec ts);
347 Timespec kvp_value_get_timespec (const KvpValue * value);
349 Timespec kvp_frame_get_timespec (const KvpFrame * frame, const gchar * path);
351 KvpValue *kvp_value_new_timespec (Timespec timespec);
353 #define qof_book_get_guid(X) qof_entity_get_guid (QOF_ENTITY(X))
354 
355 void qof_start_clock (gint clockno, QofLogModule log_module,
356  QofLogLevel log_level, const gchar * function_name,
357  const gchar * format, ...);
359 void qof_report_clock (gint clockno,
360  QofLogModule log_module,
361  QofLogLevel log_level,
362  const gchar * function_name,
363  const gchar * format, ...);
365 void qof_report_clock_total (gint clockno,
366  QofLogModule log_module,
367  QofLogLevel log_level,
368  const gchar * function_name,
369  const gchar * format, ...);
371 #define START_CLOCK(clockno,format, args...) do { \
372  if (qof_log_check (log_module, QOF_LOG_INFO)) \
373  qof_start_clock (clockno, log_module, QOF_LOG_INFO, \
374  __FUNCTION__, format , ## args); \
375 } while (0)
376 
377 #define REPORT_CLOCK(clockno,format, args...) do { \
378  if (qof_log_check (log_module, QOF_LOG_INFO)) \
379  qof_report_clock (clockno, log_module, QOF_LOG_INFO, \
380  __FUNCTION__, format , ## args); \
381 } while (0)
382 
383 #define REPORT_CLOCK_TOTAL(clockno,format, args...) do { \
384  if (qof_log_check (log_module, QOF_LOG_INFO)) \
385  qof_report_clock_total (clockno, log_module, QOF_LOG_INFO, \
386  __FUNCTION__, format , ## args); \
387 } while (0)
388 
390 void qof_query_print (QofQuery * query);
392 typedef struct
393 {
394  QofQueryPredData pd;
395  QofDateMatch options;
396  Timespec date;
401  QofDateMatch options,
402  Timespec date);
404 gboolean
406  Timespec * date);
409 QofSession *qof_session_get_current_session (void);
412 void qof_session_set_current_session (QofSession * session);
415 void
416 qof_session_clear_current_session (void);
418 gboolean gnc_strisnum (const guchar * s);
420 KvpFrame *
421 gnc_kvp_bag_add (KvpFrame * pwd, const char *path,
422  time_t secs, const char *first_name, ...);
424 KvpFrame *
425 gnc_kvp_bag_find_by_guid (KvpFrame * root, const char *path,
426  const char *guid_name, GUID * desired_guid);
428 void
429 gnc_kvp_bag_remove_frame (KvpFrame * root, const char *path,
430  KvpFrame * fr);
432 void
433 gnc_kvp_bag_merge (KvpFrame * kvp_into, const char *intopath,
434  KvpFrame * kvp_from, const char *frompath);
445 #define QOF_BEGIN_EDIT(inst) qof_begin_edit (inst)
446 
458 gboolean qof_begin_edit (QofInstance * inst);
460 #define QOF_COMMIT_EDIT_PART1(inst) qof_commit_edit (inst)
461 
472 gboolean qof_commit_edit (QofInstance * inst);
473 
479 #define QOF_COMMIT_EDIT_PART2(inst,on_error,on_done,on_free) { \
480  QofBackend * be; \
481  \
482  be = qof_book_get_backend ((inst)->book); \
483  if (be) \
484  { \
485  QofBackendError errcode; \
486  \
487  errcode = qof_backend_get_error (be); \
488  if (ERR_BACKEND_NO_ERR != errcode) \
489  { \
490  (inst)->do_free = FALSE; \
491  qof_backend_set_error (be, errcode); \
492  (on_error)((inst), errcode); \
493  } \
494  (inst)->dirty = FALSE; \
495  } \
496  (on_done)(inst); \
497  \
498  if ((inst)->do_free) { \
499  (on_free)(inst); \
500  return; \
501  } \
502 }
503 
505 gchar *
506 qof_util_param_as_string (QofEntity * ent, QofParam * param);
508 typedef struct _QofNumeric gnc_numeric;
510 #define GNC_NUMERIC_RND_MASK QOF_NUMERIC_RND_MASK
511 
512 #define GNC_NUMERIC_DENOM_MASK QOF_NUMERIC_DENOM_MASK
513 
514 #define GNC_NUMERIC_SIGFIGS_MASK QOF_NUMERIC_SIGFIGS_MASK
515 
516 #define GNC_HOW_RND_FLOOR QOF_HOW_RND_FLOOR
517 
518 #define GNC_HOW_RND_CEIL QOF_HOW_RND_CEIL
519 
520 #define GNC_HOW_RND_TRUNC QOF_HOW_RND_TRUNC
521 
522 #define GNC_HOW_RND_PROMOTE QOF_HOW_RND_PROMOTE
523 
524 #define GNC_HOW_RND_ROUND_HALF_DOWN QOF_HOW_RND_ROUND_HALF_DOWN
525 
526 #define GNC_HOW_RND_ROUND_HALF_UP QOF_HOW_RND_ROUND_HALF_UP
527 
528 #define GNC_HOW_RND_ROUND QOF_HOW_RND_ROUND
529 
530 #define GNC_HOW_RND_NEVER QOF_HOW_RND_NEVER
531 
532 #define GNC_HOW_DENOM_EXACT QOF_HOW_DENOM_EXACT
533 
534 #define GNC_HOW_DENOM_REDUCE QOF_HOW_DENOM_REDUCE
535 
536 #define GNC_HOW_DENOM_LCD QOF_HOW_DENOM_LCD
537 
538 #define GNC_HOW_DENOM_FIXED QOF_HOW_DENOM_FIXED
539 
540 #define GNC_HOW_DENOM_SIGFIG QOF_HOW_DENOM_SIGFIG
541 
542 #define GNC_HOW_DENOM_SIGFIGS QOF_HOW_DENOM_SIGFIGS
543 
544 #define GNC_HOW_GET_SIGFIGS QOF_HOW_GET_SIGFIGS
545 
546 #define GNC_ERROR_OK QOF_ERROR_OK
547 
548 #define GNC_ERROR_ARG QOF_ERROR_ARG
549 
550 #define GNC_ERROR_OVERFLOW QOF_ERROR_OVERFLOW
551 
552 #define GNC_ERROR_DENOM_DIFF QOF_ERROR_DENOM_DIFF
553 
554 #define GNC_ERROR_REMAINDER QOF_ERROR_REMAINDER
555 
556 #define GNCNumericErrorCode QofNumericErrorCode
557 
558 #define GNC_DENOM_AUTO QOF_DENOM_AUTO
559 
560 #define GNC_DENOM_RECIPROCAL QOF_DENOM_RECIPROCAL
561 
562 static inline gnc_numeric
563 gnc_numeric_create (gint64 num, gint64 denom)
564 {
565  QofNumeric out;
566  out.num = num;
567  out.denom = denom;
568  return out;
569 }
571 static inline gnc_numeric
573 {
574  return qof_numeric_create (0, 1);
575 }
578 double_to_gnc_numeric (double in, gint64 denom, gint how);
580 gboolean
581 string_to_gnc_numeric (const gchar * str, gnc_numeric * n);
584 gnc_numeric_error (GNCNumericErrorCode error_code);
586 static inline gint64
588 {
589  return a.num;
590 }
592 static inline gint64
594 {
595  return a.denom;
596 }
598 gdouble
599 gnc_numeric_to_double (gnc_numeric in);
601 gchar *
602 gnc_numeric_to_string (gnc_numeric n);
604 gchar *
605 gnc_num_dbg_to_string (gnc_numeric n);
608 gnc_numeric_check (gnc_numeric a);
610 gint
611 gnc_numeric_compare (gnc_numeric a, gnc_numeric b);
613 gboolean
614 gnc_numeric_zero_p (gnc_numeric a);
616 gboolean
617 gnc_numeric_negative_p (gnc_numeric a);
619 gboolean
620 gnc_numeric_positive_p (gnc_numeric a);
622 gboolean
623 gnc_numeric_eq (gnc_numeric a, gnc_numeric b);
625 gboolean
626 gnc_numeric_equal (gnc_numeric a, gnc_numeric b);
628 gint
629 gnc_numeric_same (gnc_numeric a, gnc_numeric b,
630  gint64 denom, gint how);
633 gnc_numeric_add (gnc_numeric a, gnc_numeric b,
634  gint64 denom, gint how);
637 gnc_numeric_sub (gnc_numeric a, gnc_numeric b,
638  gint64 denom, gint how);
641 gnc_numeric_mul (gnc_numeric a, gnc_numeric b,
642  gint64 denom, gint how);
645 gnc_numeric_div (gnc_numeric x, gnc_numeric y,
646  gint64 denom, gint how);
648 gnc_numeric gnc_numeric_neg (gnc_numeric a);
650 gnc_numeric gnc_numeric_abs (gnc_numeric a);
652 static inline gnc_numeric
654 {
655  return qof_numeric_add (a, b, QOF_DENOM_AUTO,
657 }
659 static inline gnc_numeric
661 {
662  return gnc_numeric_sub (a, b, QOF_DENOM_AUTO,
664 }
667 gnc_numeric_add_with_error (gnc_numeric a, gnc_numeric b,
668  gint64 denom, gint how,
669  gnc_numeric * error);
672 gnc_numeric_sub_with_error (gnc_numeric a, gnc_numeric b,
673  gint64 denom, gint how,
674  gnc_numeric * error);
677 gnc_numeric_mul_with_error (gnc_numeric a, gnc_numeric b,
678  gint64 denom, gint how,
679  gnc_numeric * error);
682 gnc_numeric_div_with_error (gnc_numeric a, gnc_numeric b,
683  gint64 denom, gint how,
684  gnc_numeric * error);
687 gnc_numeric_convert (gnc_numeric in, gint64 denom, gint how);
691  gint how, gnc_numeric * error);
693 gnc_numeric gnc_numeric_reduce (gnc_numeric in);
695 #define GNC_RND_FLOOR QOF_HOW_RND_FLOOR
696 
697 #define GNC_RND_CEIL QOF_HOW_RND_CEIL
698 
699 #define GNC_RND_TRUNC QOF_HOW_RND_TRUNC
700 
701 #define GNC_RND_PROMOTE QOF_HOW_RND_PROMOTE
702 
703 #define GNC_RND_ROUND_HALF_DOWN QOF_HOW_RND_ROUND_HALF_DOWN
704 
705 #define GNC_RND_ROUND_HALF_UP QOF_HOW_RND_ROUND_HALF_UP
706 
707 #define GNC_RND_ROUND QOF_HOW_RND_ROUND
708 
709 #define GNC_RND_NEVER QOF_HOW_RND_NEVER
710 
711 #define GNC_DENOM_EXACT QOF_HOW_DENOM_EXACT
712 
713 #define GNC_DENOM_REDUCE QOF_HOW_DENOM_REDUCE
714 
715 #define GNC_DENOM_LCD QOF_HOW_DENOM_LCD
716 
717 #define GNC_DENOM_FIXED QOF_HOW_DENOM_FIXED
718 
719 #define GNC_DENOM_SIGFIG QOF_HOW_DENOM_SIGFIG
720 
721 #define GNC_DENOM_SIGFIGS(X) QOF_HOW_DENOM_SIGFIGS(X)
722 
723 #define GNC_NUMERIC_GET_SIGFIGS(X) QOF_HOW_GET_SIGFIGS(X)
724 
725 QofBackend *gncBackendInit_file (const char *book_id, void *data);
726 
731 #define ENUM_LIST_DEP(_) \
732  _(ERR_BACKEND_NO_ERR, =0) \
733  _(ERR_BACKEND_NO_HANDLER,) \
734  _(ERR_BACKEND_NO_BACKEND,) \
735  _(ERR_BACKEND_BAD_URL,) \
736  _(ERR_BACKEND_NO_SUCH_DB,) \
737  _(ERR_BACKEND_CANT_CONNECT,) \
738  _(ERR_BACKEND_CONN_LOST,) \
739  _(ERR_BACKEND_LOCKED,) \
740  _(ERR_BACKEND_READONLY,) \
741  _(ERR_BACKEND_TOO_NEW,) \
742  _(ERR_BACKEND_DATA_CORRUPT,) \
743  _(ERR_BACKEND_SERVER_ERR,) \
744  _(ERR_BACKEND_ALLOC,) \
745  _(ERR_BACKEND_PERM,) \
746  _(ERR_BACKEND_MODIFIED,) \
747  _(ERR_BACKEND_MOD_DESTROY,) \
748  _(ERR_BACKEND_MISC,) \
749  _(ERR_QSF_INVALID_OBJ,) \
750  _(ERR_QSF_INVALID_MAP,) \
751  _(ERR_QSF_BAD_OBJ_GUID,) \
752  _(ERR_QSF_BAD_QOF_VERSION,) \
753  _(ERR_QSF_BAD_MAP,) \
754  _(ERR_QSF_NO_MAP,) \
755  _(ERR_QSF_WRONG_MAP,) \
756  _(ERR_QSF_MAP_NOT_OBJ,) \
757  _(ERR_QSF_OVERFLOW,) \
758  _(ERR_QSF_OPEN_NOT_MERGE,) \
759  _(ERR_FILEIO_FILE_BAD_READ, =1000) \
760  _(ERR_FILEIO_FILE_EMPTY,) \
761  _(ERR_FILEIO_FILE_LOCKERR,) \
762  _(ERR_FILEIO_FILE_NOT_FOUND,) \
763  _(ERR_FILEIO_FILE_TOO_OLD,) \
764  _(ERR_FILEIO_UNKNOWN_FILE_TYPE,) \
765  _(ERR_FILEIO_PARSE_ERROR,) \
766  _(ERR_FILEIO_BACKUP_ERROR,) \
767  _(ERR_FILEIO_WRITE_ERROR,) \
768  _(ERR_FILEIO_READ_ERROR,) \
769  _(ERR_FILEIO_NO_ENCODING,) \
770  _(ERR_NETIO_SHORT_READ, =2000) \
771  _(ERR_NETIO_WRONG_CONTENT_TYPE,) \
772  _(ERR_NETIO_NOT_GNCXML,) \
773  _(ERR_SQL_MISSING_DATA, =3000) \
774  _(ERR_SQL_DB_TOO_OLD,) \
775  _(ERR_SQL_DB_BUSY,) \
776  _(ERR_RPC_HOST_UNK, =4000) \
777  _(ERR_RPC_CANT_BIND,) \
778  _(ERR_RPC_CANT_ACCEPT,) \
779  _(ERR_RPC_NO_CONNECTION,) \
780  _(ERR_RPC_BAD_VERSION,) \
781  _(ERR_RPC_FAILED,) \
782  _(ERR_RPC_NOT_ADDED,)
783 
784 DEFINE_ENUM(QofBackendError, ENUM_LIST_DEP)
785 
786 AS_STRING_DEC(QofBackendError, ENUM_LIST_DEP)
787 
789 gboolean
790 qof_commit_edit_part2 (QofInstance * inst,
791  void (*on_error) (QofInstance *, QofBackendError),
792  void (*on_done) (QofInstance *),
793  void (*on_free) (QofInstance *));
794 
796 void
797 qof_session_push_error (QofSession * session, QofBackendError err,
798  const gchar *message);
801 const gchar *
802 qof_session_get_error_message (QofSession * session);
805 QofErrorId
806 qof_session_pop_error (QofSession * session);
807 QofErrorId
808 qof_session_get_error (QofSession * session);
810 void
811 qof_backend_set_error (QofBackend * be, QofErrorId err);
813 QofErrorId
814 qof_backend_get_error (QofBackend * be);
816 void
817 qof_backend_set_message (QofBackend * be, const gchar * format, ...);
825 gchar *
826 qof_backend_get_message (QofBackend * be);
828 #define kvp_frame KvpFrame
829 
830 #define kvp_value KvpValue
831 
832 #define kvp_value_t KvpValueType
833 
834 #define kvp_frame_set_gnc_numeric kvp_frame_set_numeric
835 
836 #define kvp_frame_set_str kvp_frame_set_string
837 
838 #define kvp_frame_add_gnc_numeric kvp_frame_add_numeric
839 
840 #define kvp_frame_add_str kvp_frame_add_string
841 
842 #define kvp_value_new_gnc_numeric kvp_value_new_numeric
843 
844 gint double_compare (gdouble d1, gdouble d2);
845 
846 #endif /* _DEPRECATED_H */
847 #endif /* QOF_DISABLE_DEPRECATED */