deprecated.h File Reference


Detailed Description

transitional header from libqof1 to libqof2

Definition in file deprecated.h.

#include "qof.h"

Go to the source code of this file.

Data Structures

struct  query_date_def

Defines

#define gncLogLevel   QofLogLevel
#define GNC_LOG_FATAL   QOF_LOG_FATAL
#define GNC_LOG_ERROR   QOF_LOG_ERROR
#define GNC_LOG_WARNING   QOF_LOG_WARNING
#define GNC_LOG_INFO   QOF_LOG_INFO
#define GNC_LOG_DEBUG   QOF_LOG_DEBUG
#define GNC_LOG_DETAIL   QOF_LOG_DETAIL
#define GNC_LOG_TRACE   QOF_LOG_TRACE
#define GNC_EVENT_NONE   QOF_EVENT_NONE
#define GNC_EVENT_CREATE   QOF_EVENT_CREATE
#define GNC_EVENT_MODIFY   QOF_EVENT_MODIFY
#define GNC_EVENT_DESTROY   QOF_EVENT_DESTROY
#define GNC_EVENT_ADD   QOF_EVENT_ADD
#define GNC_EVENT_REMOVE   QOF_EVENT_REMOVE
#define GNC_EVENT_ALL   QOF_EVENT_ALL
#define GNCEngineEventType   QofEventId
#define qof_book_mergeResult   QofBookMergeResult
#define qof_book_mergeRule   QofBookMergeRule
#define qof_book_mergeData   QofBookMergeData
#define SAFE_STRCMP_REAL(fcn, da, db)
#define SAFE_STRCMP(da, db)   SAFE_STRCMP_REAL(strcmp,(da),(db))
#define SAFE_STRCASECMP(da, db)   SAFE_STRCMP_REAL(strcasecmp,(da),(db))
#define GNC_SCANF_LLD   QOF_SCANF_LLD
#define qof_book_set_guid(book, guid)   qof_entity_set_guid(QOF_ENTITY(book), guid)
#define QOF_TYPE_DATE   "date"
#define qof_book_get_guid(X)   qof_entity_get_guid (QOF_ENTITY(X))
#define START_CLOCK(clockno, format, args...)
#define REPORT_CLOCK(clockno, format, args...)
#define REPORT_CLOCK_TOTAL(clockno, format, args...)
#define QOF_BEGIN_EDIT(inst)
#define QOF_COMMIT_EDIT_PART1(inst)
#define QOF_COMMIT_EDIT_PART2(inst, on_error, on_done, on_free)
#define GNC_NUMERIC_RND_MASK   QOF_NUMERIC_RND_MASK
#define GNC_NUMERIC_DENOM_MASK   QOF_NUMERIC_DENOM_MASK
#define GNC_NUMERIC_SIGFIGS_MASK   QOF_NUMERIC_SIGFIGS_MASK
#define GNC_HOW_RND_FLOOR   QOF_HOW_RND_FLOOR
#define GNC_HOW_RND_CEIL   QOF_HOW_RND_CEIL
#define GNC_HOW_RND_TRUNC   QOF_HOW_RND_TRUNC
#define GNC_HOW_RND_PROMOTE   QOF_HOW_RND_PROMOTE
#define GNC_HOW_RND_ROUND_HALF_DOWN   QOF_HOW_RND_ROUND_HALF_DOWN
#define GNC_HOW_RND_ROUND_HALF_UP   QOF_HOW_RND_ROUND_HALF_UP
#define GNC_HOW_RND_ROUND   QOF_HOW_RND_ROUND
#define GNC_HOW_RND_NEVER   QOF_HOW_RND_NEVER
#define GNC_HOW_DENOM_EXACT   QOF_HOW_DENOM_EXACT
#define GNC_HOW_DENOM_REDUCE   QOF_HOW_DENOM_REDUCE
#define GNC_HOW_DENOM_LCD   QOF_HOW_DENOM_LCD
#define GNC_HOW_DENOM_FIXED   QOF_HOW_DENOM_FIXED
#define GNC_HOW_DENOM_SIGFIG   QOF_HOW_DENOM_SIGFIG
#define GNC_HOW_DENOM_SIGFIGS   QOF_HOW_DENOM_SIGFIGS
#define GNC_HOW_GET_SIGFIGS   QOF_HOW_GET_SIGFIGS
#define GNC_ERROR_OK   QOF_ERROR_OK
#define GNC_ERROR_ARG   QOF_ERROR_ARG
#define GNC_ERROR_OVERFLOW   QOF_ERROR_OVERFLOW
#define GNC_ERROR_DENOM_DIFF   QOF_ERROR_DENOM_DIFF
#define GNC_ERROR_REMAINDER   QOF_ERROR_REMAINDER
#define GNCNumericErrorCode   QofNumericErrorCode
#define GNC_DENOM_AUTO   QOF_DENOM_AUTO
#define GNC_DENOM_RECIPROCAL   QOF_DENOM_RECIPROCAL
#define GNC_RND_FLOOR   QOF_HOW_RND_FLOOR
#define GNC_RND_CEIL   QOF_HOW_RND_CEIL
#define GNC_RND_TRUNC   QOF_HOW_RND_TRUNC
#define GNC_RND_PROMOTE   QOF_HOW_RND_PROMOTE
#define GNC_RND_ROUND_HALF_DOWN   QOF_HOW_RND_ROUND_HALF_DOWN
#define GNC_RND_ROUND_HALF_UP   QOF_HOW_RND_ROUND_HALF_UP
#define GNC_RND_ROUND   QOF_HOW_RND_ROUND
#define GNC_RND_NEVER   QOF_HOW_RND_NEVER
#define GNC_DENOM_EXACT   QOF_HOW_DENOM_EXACT
#define GNC_DENOM_REDUCE   QOF_HOW_DENOM_REDUCE
#define GNC_DENOM_LCD   QOF_HOW_DENOM_LCD
#define GNC_DENOM_FIXED   QOF_HOW_DENOM_FIXED
#define GNC_DENOM_SIGFIG   QOF_HOW_DENOM_SIGFIG
#define GNC_DENOM_SIGFIGS(X)   QOF_HOW_DENOM_SIGFIGS(X)
#define GNC_NUMERIC_GET_SIGFIGS(X)   QOF_HOW_GET_SIGFIGS(X)

Typedefs

typedef void(*) GNCEngineEventHandler (GUID *entity, QofIdType type, QofEventId event_type, gpointer user_data)
typedef void(*) qof_book_mergeRuleForeachCB (QofBookMergeData *, QofBookMergeRule *, guint)
typedef struct query_date_defquery_date_t
typedef _QofNumeric gnc_numeric

Enumerations

enum  GNCDateMonthFormat { GNCDATE_MONTH_NUMBER, GNCDATE_MONTH_ABBREV, GNCDATE_MONTH_NAME }

Functions

void gnc_log_init (void)
void gnc_set_log_level (QofLogModule module, QofLogLevel level)
void gnc_set_log_level_global (QofLogLevel level)
void qof_log_set_level_global (QofLogLevel level)
void gnc_set_logfile (FILE *outfile)
const char * gnc_log_prettify (const char *name)
gboolean gnc_should_log (QofLogModule log_module, QofLogLevel log_level)
void gnc_start_clock (int, QofLogModule, QofLogLevel, const char *, const char *,...)
void gnc_report_clock (int, QofLogModule, QofLogLevel, const char *, const char *,...)
void gnc_report_clock_total (int, QofLogModule, QofLogLevel, const char *, const char *,...)
gint qof_event_register_old_handler (GNCEngineEventHandler old_handler, gpointer user_data)
gint gnc_engine_register_event_handler (GNCEngineEventHandler handler, gpointer user_data)
void gnc_engine_unregister_event_handler (gint handler_id)
void gnc_engine_gen_event (QofEntity *entity, QofEventId event_type)
void gnc_engine_suspend_events (void)
void gnc_engine_resume_events (void)
void gnc_engine_generate_event (const GUID *guid, QofIdType e_type, QofEventId event_type)
QofBookMergeDataqof_book_mergeInit (QofBook *importBook, QofBook *targetBook)
void qof_book_mergeRuleForeach (QofBookMergeData *mergeData, QofBookMergeRuleForeachCB callback, QofBookMergeResult mergeResult)
QofBookMergeDataqof_book_mergeUpdateResult (QofBookMergeData *mergeData, QofBookMergeResult tag)
gint qof_book_mergeCommit (QofBookMergeData *mergeData)
gpointer gnc_string_cache_insert (gconstpointer key)
gchar * gnc_stpcpy (gchar *dest, const gchar *src)
GCache * gnc_engine_get_string_cache (void)
GCache * qof_util_get_string_cache (void)
void gnc_engine_string_cache_destroy (void)
void gnc_string_cache_remove (gconstpointer key)
void qof_book_set_schedxactions (QofBook *book, GList *newList)
const gchar * gnc_date_dateformat_to_string (QofDateFormat format)
const gchar * gnc_date_monthformat_to_string (GNCDateMonthFormat format)
gboolean gnc_date_string_to_dateformat (const gchar *format_string, QofDateFormat *format)
gboolean gnc_date_string_to_monthformat (const gchar *format_string, GNCDateMonthFormat *format)
gboolean timespec_equal (const Timespec *ta, const Timespec *tb)
gint timespec_cmp (const Timespec *ta, const Timespec *tb)
Timespec timespec_diff (const Timespec *ta, const Timespec *tb)
Timespec timespec_abs (const Timespec *t)
Timespec timespecCanonicalDayTime (Timespec t)
time_t timespecToTime_t (Timespec ts)
void timespecFromTime_t (Timespec *ts, time_t t)
Timespec gnc_dmy2timespec (gint day, gint month, gint year)
Timespec gnc_dmy2timespec_end (gint day, gint month, gint year)
Timespec gnc_iso8601_to_timespec_gmt (const gchar *)
gchar * gnc_timespec_to_iso8601_buff (Timespec ts, gchar *buff)
void gnc_timespec2dmy (Timespec ts, gint *day, gint *month, gint *year)
void date_add_months (struct tm *tm, gint months, gboolean track_last_day)
gboolean qof_date_add_days (Timespec *ts, gint days)
gboolean qof_date_add_months (Timespec *ts, gint months, gboolean track_last_day)
const gchar * qof_date_format_get_string (QofDateFormat df)
time_t xaccDMYToSec (gint day, gint month, gint year)
glong gnc_timezone (struct tm *tm)
QofDateFormat qof_date_format_get (void)
void qof_date_format_set (QofDateFormat df)
const gchar * qof_date_text_format_get_string (QofDateFormat df)
char dateSeparator (void)
time_t qof_date_dmy_to_sec (gint day, gint month, gint year)
size_t qof_print_hours_elapsed_buff (char *buff, size_t len, int secs, gboolean show_secs)
size_t qof_print_minutes_elapsed_buff (char *buff, size_t len, int secs, gboolean show_secs)
size_t qof_print_time_buff (char *buff, size_t len, time_t secs)
size_t qof_print_date_time_buff (char *buff, size_t len, time_t secs)
gboolean qof_is_same_day (time_t, time_t)
void gnc_tm_get_day_start (struct tm *tm, time_t time_val)
void gnc_tm_set_day_start (struct tm *tm)
void gnc_tm_set_day_middle (struct tm *tm)
void gnc_tm_set_day_end (struct tm *tm)
void gnc_tm_get_day_end (struct tm *tm, time_t time_val)
time_t gnc_timet_get_day_start (time_t time_val)
time_t gnc_timet_get_day_end (time_t time_val)
void gnc_tm_get_today_start (struct tm *tm)
void gnc_tm_get_today_end (struct tm *tm)
time_t gnc_timet_get_today_start (void)
time_t gnc_timet_get_today_end (void)
time_t gnc_timet_get_day_start_gdate (GDate *date)
time_t gnc_timet_get_day_end_gdate (GDate *date)
int date_get_last_mday (struct tm *tm)
gboolean date_is_last_mday (struct tm *tm)
int gnc_date_my_last_mday (int month, int year)
int gnc_timespec_last_mday (Timespec ts)
char * xaccDateUtilGetStampNow (void)
char * xaccDateUtilGetStamp (time_t thyme)
size_t qof_print_date_dmy_buff (gchar *buff, size_t buflen, gint day, gint month, gint year)
size_t qof_print_date_buff (char *buff, size_t buflen, time_t secs)
size_t qof_print_gdate (char *buf, size_t bufflen, GDate *gd)
char * qof_print_date (time_t secs)
const char * gnc_print_date (Timespec ts)
gboolean qof_scan_date (const char *buff, int *day, int *month, int *year)
gboolean qof_scan_date_secs (const char *buff, time_t *secs)
Timespec qof_instance_get_last_update (QofInstance *inst)
void qof_instance_set_last_update (QofInstance *inst, Timespec ts)
void kvp_frame_set_timespec (KvpFrame *frame, const gchar *path, Timespec ts)
void kvp_frame_add_timespec (KvpFrame *frame, const gchar *path, Timespec ts)
Timespec kvp_value_get_timespec (const KvpValue *value)
Timespec kvp_frame_get_timespec (const KvpFrame *frame, const gchar *path)
KvpValuekvp_value_new_timespec (Timespec timespec)
void qof_start_clock (gint clockno, QofLogModule log_module, QofLogLevel log_level, const gchar *function_name, const gchar *format,...)
void qof_report_clock (gint clockno, QofLogModule log_module, QofLogLevel log_level, const gchar *function_name, const gchar *format,...)
void qof_report_clock_total (gint clockno, QofLogModule log_module, QofLogLevel log_level, const gchar *function_name, const gchar *format,...)
void qof_query_print (QofQuery *query)
QofQueryPredDataqof_query_date_predicate (QofQueryCompare how, QofDateMatch options, Timespec date)
gboolean qof_query_date_predicate_get_date (QofQueryPredData *pd, Timespec *date)
QofSessionqof_session_get_current_session (void)
void qof_session_set_current_session (QofSession *session)
void qof_session_clear_current_session (void)
gboolean gnc_strisnum (const guchar *s)
KvpFramegnc_kvp_bag_add (KvpFrame *pwd, const char *path, time_t secs, const char *first_name,...)
KvpFramegnc_kvp_bag_find_by_guid (KvpFrame *root, const char *path, const char *guid_name, GUID *desired_guid)
void gnc_kvp_bag_remove_frame (KvpFrame *root, const char *path, KvpFrame *fr)
void gnc_kvp_bag_merge (KvpFrame *kvp_into, const char *intopath, KvpFrame *kvp_from, const char *frompath)
gboolean qof_begin_edit (QofInstance *inst)
gboolean qof_commit_edit (QofInstance *inst)
gboolean qof_commit_edit_part2 (QofInstance *inst, void(*on_error)(QofInstance *, QofBackendError), void(*on_done)(QofInstance *), void(*on_free)(QofInstance *))
gchar * qof_util_param_as_string (QofEntity *ent, QofParam *param)
gnc_numeric double_to_gnc_numeric (double in, gint64 denom, gint how)
gboolean string_to_gnc_numeric (const gchar *str, gnc_numeric *n)
gnc_numeric gnc_numeric_error (QofNumericErrorCode error_code)
gdouble gnc_numeric_to_double (gnc_numeric in)
gchar * gnc_numeric_to_string (gnc_numeric n)
gchar * gnc_num_dbg_to_string (gnc_numeric n)
QofNumericErrorCode gnc_numeric_check (gnc_numeric a)
gint gnc_numeric_compare (gnc_numeric a, gnc_numeric b)
gboolean gnc_numeric_zero_p (gnc_numeric a)
gboolean gnc_numeric_negative_p (gnc_numeric a)
gboolean gnc_numeric_positive_p (gnc_numeric a)
gboolean gnc_numeric_eq (gnc_numeric a, gnc_numeric b)
gboolean gnc_numeric_equal (gnc_numeric a, gnc_numeric b)
gint gnc_numeric_same (gnc_numeric a, gnc_numeric b, gint64 denom, gint how)
gnc_numeric gnc_numeric_add (gnc_numeric a, gnc_numeric b, gint64 denom, gint how)
gnc_numeric gnc_numeric_sub (gnc_numeric a, gnc_numeric b, gint64 denom, gint how)
gnc_numeric gnc_numeric_mul (gnc_numeric a, gnc_numeric b, gint64 denom, gint how)
gnc_numeric gnc_numeric_div (gnc_numeric x, gnc_numeric y, gint64 denom, gint how)
gnc_numeric gnc_numeric_neg (gnc_numeric a)
gnc_numeric gnc_numeric_abs (gnc_numeric a)
gnc_numeric gnc_numeric_add_with_error (gnc_numeric a, gnc_numeric b, gint64 denom, gint how, gnc_numeric *error)
gnc_numeric gnc_numeric_sub_with_error (gnc_numeric a, gnc_numeric b, gint64 denom, gint how, gnc_numeric *error)
gnc_numeric gnc_numeric_mul_with_error (gnc_numeric a, gnc_numeric b, gint64 denom, gint how, gnc_numeric *error)
gnc_numeric gnc_numeric_div_with_error (gnc_numeric a, gnc_numeric b, gint64 denom, gint how, gnc_numeric *error)
gnc_numeric gnc_numeric_convert (gnc_numeric in, gint64 denom, gint how)
gnc_numeric gnc_numeric_convert_with_error (gnc_numeric in, gint64 denom, gint how, gnc_numeric *error)
gnc_numeric gnc_numeric_reduce (gnc_numeric in)
QofBackendgncBackendInit_file (const char *book_id, void *data)


Define Documentation

#define GNC_DENOM_AUTO   QOF_DENOM_AUTO

Deprecated:
use QOF_DENOM_AUTO.

Definition at line 588 of file deprecated.h.

#define GNC_DENOM_EXACT   QOF_HOW_DENOM_EXACT

Deprecated:
use QOF_HOW_DENOM_EXACT.

Definition at line 741 of file deprecated.h.

#define GNC_DENOM_FIXED   QOF_HOW_DENOM_FIXED

Deprecated:
use QOF_HOW_DENOM_FIXED.

Definition at line 747 of file deprecated.h.

#define GNC_DENOM_LCD   QOF_HOW_DENOM_LCD

Deprecated:
use QOF_HOW_DENOM_LCD.

Definition at line 745 of file deprecated.h.

#define GNC_DENOM_RECIPROCAL   QOF_DENOM_RECIPROCAL

Deprecated:
use QOF_DENOM_RECIPROCAL.

Definition at line 590 of file deprecated.h.

#define GNC_DENOM_REDUCE   QOF_HOW_DENOM_REDUCE

Deprecated:
use QOF_HOW_DENOM_REDUCE.

Definition at line 743 of file deprecated.h.

#define GNC_DENOM_SIGFIG   QOF_HOW_DENOM_SIGFIG

Deprecated:
use QOF_HOW_DENOM_SIGFIG.

Definition at line 749 of file deprecated.h.

#define GNC_DENOM_SIGFIGS (  )     QOF_HOW_DENOM_SIGFIGS(X)

Deprecated:
use QOF_HOW_DENOM_SIGFIGS.

Definition at line 751 of file deprecated.h.

#define GNC_ERROR_ARG   QOF_ERROR_ARG

Deprecated:
use QOF_ERROR_ARG.

Definition at line 578 of file deprecated.h.

#define GNC_ERROR_DENOM_DIFF   QOF_ERROR_DENOM_DIFF

Deprecated:
use QOF_ERROR_DENOM_DIFF.

Definition at line 582 of file deprecated.h.

#define GNC_ERROR_OK   QOF_ERROR_OK

Deprecated:
use QOF_ERROR_OK.

Definition at line 576 of file deprecated.h.

#define GNC_ERROR_OVERFLOW   QOF_ERROR_OVERFLOW

Deprecated:
use QOF_ERROR_OVERFLOW.

Definition at line 580 of file deprecated.h.

#define GNC_ERROR_REMAINDER   QOF_ERROR_REMAINDER

Deprecated:
use QOF_ERROR_REMAINDER.

Definition at line 584 of file deprecated.h.

#define GNC_EVENT_ADD   QOF_EVENT_ADD

Deprecated:
use QOF_EVENT_ADD instead.

Definition at line 102 of file deprecated.h.

#define GNC_EVENT_ALL   QOF_EVENT_ALL

Deprecated:
use QOF_EVENT_ALL

Definition at line 106 of file deprecated.h.

#define GNC_EVENT_CREATE   QOF_EVENT_CREATE

Deprecated:
use QOF_EVENT_CREATE instead.

Definition at line 96 of file deprecated.h.

#define GNC_EVENT_DESTROY   QOF_EVENT_DESTROY

Deprecated:
use QOF_EVENT_DESTROY instead.

Definition at line 100 of file deprecated.h.

#define GNC_EVENT_MODIFY   QOF_EVENT_MODIFY

Deprecated:
use QOF_EVENT_MODIFY instead.

Definition at line 98 of file deprecated.h.

#define GNC_EVENT_NONE   QOF_EVENT_NONE

Deprecated:
use QOF_EVENT_NONE instead.

Definition at line 94 of file deprecated.h.

#define GNC_EVENT_REMOVE   QOF_EVENT_REMOVE

Deprecated:
use QOF_EVENT_REMOVE instead.

Definition at line 104 of file deprecated.h.

#define GNC_HOW_DENOM_EXACT   QOF_HOW_DENOM_EXACT

Deprecated:
use QOF_HOW_DENOM_EXACT.

Definition at line 562 of file deprecated.h.

#define GNC_HOW_DENOM_FIXED   QOF_HOW_DENOM_FIXED

Deprecated:
use QOF_HOW_DENOM_FIXED.

Definition at line 568 of file deprecated.h.

#define GNC_HOW_DENOM_LCD   QOF_HOW_DENOM_LCD

Deprecated:
use QOF_HOW_DENOM_LCD.

Definition at line 566 of file deprecated.h.

#define GNC_HOW_DENOM_REDUCE   QOF_HOW_DENOM_REDUCE

Deprecated:
use QOF_HOW_DENOM_REDUCE.

Definition at line 564 of file deprecated.h.

#define GNC_HOW_DENOM_SIGFIG   QOF_HOW_DENOM_SIGFIG

Deprecated:
use QOF_HOW_DENOM_SIGFIG.

Definition at line 570 of file deprecated.h.

#define GNC_HOW_DENOM_SIGFIGS   QOF_HOW_DENOM_SIGFIGS

Deprecated:
use QOF_HOW_DENOM_SIGFIGS.

Definition at line 572 of file deprecated.h.

#define GNC_HOW_GET_SIGFIGS   QOF_HOW_GET_SIGFIGS

Deprecated:
use QOF_HOW_GET_SIGFIGS.

Definition at line 574 of file deprecated.h.

#define GNC_HOW_RND_CEIL   QOF_HOW_RND_CEIL

Deprecated:
use QOF_HOW_RND_CEIL.

Definition at line 548 of file deprecated.h.

#define GNC_HOW_RND_FLOOR   QOF_HOW_RND_FLOOR

Deprecated:
use QOF_HOW_RND_FLOOR.

Definition at line 546 of file deprecated.h.

#define GNC_HOW_RND_NEVER   QOF_HOW_RND_NEVER

Deprecated:
use QOF_HOW_RND_NEVER.

Definition at line 560 of file deprecated.h.

#define GNC_HOW_RND_PROMOTE   QOF_HOW_RND_PROMOTE

Deprecated:
use QOF_HOW_RND_PROMOTE.

Definition at line 552 of file deprecated.h.

#define GNC_HOW_RND_ROUND   QOF_HOW_RND_ROUND

Deprecated:
use QOF_HOW_RND_ROUND.

Definition at line 558 of file deprecated.h.

#define GNC_HOW_RND_ROUND_HALF_DOWN   QOF_HOW_RND_ROUND_HALF_DOWN

Deprecated:
use QOF_HOW_RND_ROUND_HALF_DOWN.

Definition at line 554 of file deprecated.h.

#define GNC_HOW_RND_ROUND_HALF_UP   QOF_HOW_RND_ROUND_HALF_UP

Deprecated:
use QOF_HOW_RND_ROUND_HALF_UP.

Definition at line 556 of file deprecated.h.

#define GNC_HOW_RND_TRUNC   QOF_HOW_RND_TRUNC

Deprecated:
use QOF_HOW_RND_TRUNC.

Definition at line 550 of file deprecated.h.

#define GNC_LOG_DEBUG   QOF_LOG_DEBUG

Deprecated:
use QOF_LOG_DEBUG

Definition at line 77 of file deprecated.h.

#define GNC_LOG_DETAIL   QOF_LOG_DETAIL

Deprecated:
use QOF_LOG_DETAIL

Definition at line 79 of file deprecated.h.

#define GNC_LOG_ERROR   QOF_LOG_ERROR

Deprecated:
use QOF_LOG_ERROR

Definition at line 71 of file deprecated.h.

#define GNC_LOG_FATAL   QOF_LOG_FATAL

Deprecated:
use QOF_LOG_FATAL

Definition at line 69 of file deprecated.h.

#define GNC_LOG_INFO   QOF_LOG_INFO

Deprecated:
use QOF_LOG_INFO

Definition at line 75 of file deprecated.h.

#define GNC_LOG_TRACE   QOF_LOG_TRACE

Deprecated:
use QOF_LOG_TRACE

Definition at line 81 of file deprecated.h.

#define GNC_LOG_WARNING   QOF_LOG_WARNING

Deprecated:
use QOF_LOG_WARNING

Definition at line 73 of file deprecated.h.

#define GNC_NUMERIC_DENOM_MASK   QOF_NUMERIC_DENOM_MASK

Deprecated:
use QOF_NUMERIC_DENOM_MASK.

Definition at line 542 of file deprecated.h.

#define GNC_NUMERIC_GET_SIGFIGS (  )     QOF_HOW_GET_SIGFIGS(X)

Deprecated:
use QOF_HOW_GET_SIGFIGS.

Definition at line 753 of file deprecated.h.

#define GNC_NUMERIC_RND_MASK   QOF_NUMERIC_RND_MASK

Deprecated:
use QOF_NUMERIC_RND_MASK.

Definition at line 540 of file deprecated.h.

#define GNC_NUMERIC_SIGFIGS_MASK   QOF_NUMERIC_SIGFIGS_MASK

Deprecated:
use QOF_NUMERIC_SIGFIGS_MASK.

Definition at line 544 of file deprecated.h.

#define GNC_RND_CEIL   QOF_HOW_RND_CEIL

Deprecated:
use QOF_HOW_RND_CEIL.

Definition at line 727 of file deprecated.h.

#define GNC_RND_FLOOR   QOF_HOW_RND_FLOOR

Deprecated:
use QOF_HOW_RND_FLOOR.

Definition at line 725 of file deprecated.h.

#define GNC_RND_NEVER   QOF_HOW_RND_NEVER

Deprecated:
use QOF_HOW_RND_NEVER.

Definition at line 739 of file deprecated.h.

#define GNC_RND_PROMOTE   QOF_HOW_RND_PROMOTE

Deprecated:
use QOF_HOW_RND_PROMOTE.

Definition at line 731 of file deprecated.h.

#define GNC_RND_ROUND   QOF_HOW_RND_ROUND

Deprecated:
use QOF_HOW_RND_ROUND.

Definition at line 737 of file deprecated.h.

#define GNC_RND_ROUND_HALF_DOWN   QOF_HOW_RND_ROUND_HALF_DOWN

Deprecated:
use QOF_HOW_RND_ROUND_HALF_DOWN.

Definition at line 733 of file deprecated.h.

#define GNC_RND_ROUND_HALF_UP   QOF_HOW_RND_ROUND_HALF_UP

Deprecated:
use QOF_HOW_RND_ROUND_HALF_UP.

Definition at line 735 of file deprecated.h.

#define GNC_RND_TRUNC   QOF_HOW_RND_TRUNC

Deprecated:
use QOF_HOW_RND_TRUNC.

Definition at line 729 of file deprecated.h.

#define GNC_SCANF_LLD   QOF_SCANF_LLD

Deprecated:
use QOF_SCANF_LLD instead.

Definition at line 177 of file deprecated.h.

#define GNCEngineEventType   QofEventId

Deprecated:
use QofEventName instead.

Definition at line 108 of file deprecated.h.

#define gncLogLevel   QofLogLevel

Deprecated:
use QofLogLevel instead

Definition at line 34 of file deprecated.h.

#define GNCNumericErrorCode   QofNumericErrorCode

Deprecated:
use QofNumericErrorCode.

Definition at line 586 of file deprecated.h.

#define QOF_BEGIN_EDIT ( inst   ) 

Value:

if (!(inst)) return;                                              \
                                                                    \
  (inst)->editlevel++;                                              \
  if (1 < (inst)->editlevel) return;                                \
                                                                    \
  if (0 >= (inst)->editlevel)                                       \
  {                                                                 \
    PERR ("unbalanced call - resetting (was %d)", (inst)->editlevel); \
    (inst)->editlevel = 1;                                          \
  }                                                                 \
  ENTER ("(inst=%p)", (inst));                                      \
                                                                    \
  {                                                                 \
    QofBackend * be;                                                \
    be = qof_book_get_backend ((inst)->book);                       \
      if (be && qof_backend_begin_exists(be)) {                     \
         qof_backend_run_begin(be, (inst));                         \
    } else {                                                        \
      (inst)->dirty = TRUE;                                         \
    }                                                               \
  }                                                                 \
  LEAVE (" ");
Deprecated:
use qof_util_param_edit instead to edit at a parameter level, instead of a complete instance.

Definition at line 437 of file deprecated.h.

#define qof_book_get_guid (  )     qof_entity_get_guid (QOF_ENTITY(X))

Deprecated:

Definition at line 353 of file deprecated.h.

#define qof_book_mergeData   QofBookMergeData

Deprecated:
use QofBookMergeData instead.

Definition at line 137 of file deprecated.h.

#define qof_book_mergeResult   QofBookMergeResult

Deprecated:
use QofBookMergeResult instead.

Definition at line 133 of file deprecated.h.

#define qof_book_mergeRule   QofBookMergeRule

Deprecated:
use QofBookMergeRule instead.

Definition at line 135 of file deprecated.h.

#define qof_book_set_guid ( book,
guid   )     qof_entity_set_guid(QOF_ENTITY(book), guid)

Deprecated:
use qof_entity_set_guid instead but only in backends (when reading the GUID from the data source).

Definition at line 333 of file deprecated.h.

#define QOF_COMMIT_EDIT_PART1 ( inst   ) 

Value:

{                            \
  if (!(inst)) return;                                           \
                                                                 \
  (inst)->editlevel--;                                           \
  if (0 < (inst)->editlevel) return;                             \
                                                                 \
  if ((-1 == (inst)->editlevel) && (inst)->dirty)                \
  {                                                              \
    QofBackend * be;                                             \
    be = qof_book_get_backend ((inst)->book);                    \
    if (be && qof_backend_begin_exists(be)) {                    \
      qof_backend_run_begin(be, (inst));                         \
    }                                                            \
    (inst)->editlevel = 0;                                       \
  }                                                              \
  if (0 > (inst)->editlevel)                                     \
  {                                                              \
    PERR ("unbalanced call - resetting (was %d)", (inst)->editlevel); \
    (inst)->editlevel = 0;                                       \
  }                                                              \
  ENTER ("(inst=%p) dirty=%d do-free=%d",                        \
            (inst), (inst)->dirty, (inst)->do_free);             \
}
Deprecated:
no replacement. Delayed updates are not supported.

Definition at line 467 of file deprecated.h.

#define QOF_COMMIT_EDIT_PART2 ( inst,
on_error,
on_done,
on_free   ) 

Deprecated:
Use qof_util_param_commit instead.

Definition at line 495 of file deprecated.h.

#define QOF_TYPE_DATE   "date"

Deprecated:
use QOF_TYPE_TIME instead

Definition at line 336 of file deprecated.h.

#define REPORT_CLOCK ( clockno,
format,
args...   ) 

Value:

do {       \
  if (qof_log_check (log_module, QOF_LOG_INFO))          \
    qof_report_clock (clockno, log_module, QOF_LOG_INFO, \
             __FUNCTION__, format , ## args);               \
} while (0)
Deprecated:
no replacement.

Definition at line 377 of file deprecated.h.

#define REPORT_CLOCK_TOTAL ( clockno,
format,
args...   ) 

Value:

do {       \
  if (qof_log_check (log_module, QOF_LOG_INFO))                \
    qof_report_clock_total (clockno, log_module, QOF_LOG_INFO, \
             __FUNCTION__, format , ## args);               \
} while (0)
Deprecated:
no replacement.

Definition at line 383 of file deprecated.h.

#define SAFE_STRCASECMP ( da,
db   )     SAFE_STRCMP_REAL(strcasecmp,(da),(db))

Deprecated:
use safe_strcasecmp()

Definition at line 173 of file deprecated.h.

#define SAFE_STRCMP ( da,
db   )     SAFE_STRCMP_REAL(strcmp,(da),(db))

Deprecated:
use safe_strcmp()

Definition at line 171 of file deprecated.h.

#define SAFE_STRCMP_REAL ( fcn,
da,
db   ) 

Value:

{    \
  if ((da) && (db)) {                    \
    if ((da) != (db)) {                  \
      gint retval = fcn ((da), (db));    \
      /* if strings differ, return */    \
      if (retval) return retval;         \
    }                                    \
  } else                                 \
  if ((!(da)) && (db)) {                 \
    return -1;                           \
  } else                                 \
  if ((da) && (!(db))) {                 \
    return +1;                           \
  }                                      \
}
Deprecated:
Use the function versions, safe_strcmp() and safe_strcasecmp() instead.

Definition at line 155 of file deprecated.h.

#define START_CLOCK ( clockno,
format,
args...   ) 

Value:

do {        \
  if (qof_log_check (log_module, QOF_LOG_INFO))          \
    qof_start_clock (clockno, log_module, QOF_LOG_INFO,  \
             __FUNCTION__, format , ## args);               \
} while (0)
Deprecated:
no replacement.

Definition at line 371 of file deprecated.h.


Typedef Documentation

typedef struct _QofNumeric gnc_numeric

Deprecated:

Definition at line 538 of file deprecated.h.

typedef void(*) GNCEngineEventHandler(GUID *entity, QofIdType type, QofEventId event_type, gpointer user_data)

Deprecated:
use QofEventHandler instead.

Definition at line 110 of file deprecated.h.

typedef void(*) qof_book_mergeRuleForeachCB(QofBookMergeData *, QofBookMergeRule *, guint)

Deprecated:
use QofBookMergeRuleForeachCB instead.

Definition at line 142 of file deprecated.h.


Enumeration Type Documentation

enum GNCDateMonthFormat

Deprecated:
use QofDateMonthFormat instead.
Enumerator:
GNCDATE_MONTH_NUMBER 
Deprecated:
use QOF_DATE_MONTH_NUMBER.
GNCDATE_MONTH_ABBREV 
Deprecated:
use QOF_DATE_MONTH_ABBREV.
GNCDATE_MONTH_NAME 
Deprecated:
use QOF_DATE_MONTH_NAME.

Definition at line 191 of file deprecated.h.


Function Documentation

void date_add_months ( struct tm *  tm,
gint  months,
gboolean  track_last_day 
)

Deprecated:
use qof_date_time_add_months.

int date_get_last_mday ( struct tm *  tm  ) 

Deprecated:
use g_date_get_days_in_month instead.

Definition at line 631 of file deprecated.c.

00632 {
00633     return g_date_get_days_in_month (tm->tm_mon + 1, tm->tm_year + 1900);
00634 }

gboolean date_is_last_mday ( struct tm *  tm  ) 

Deprecated:
use g_date_get_days_in_month instead.

Definition at line 637 of file deprecated.c.

00638 {
00639     return (tm->tm_mday ==
00640         g_date_get_days_in_month (tm->tm_mon + 1, tm->tm_year + 1900));
00641 }

char dateSeparator ( void   ) 

Deprecated:
use qof_date_format_get_date_separator

Definition at line 1311 of file deprecated.c.

gnc_numeric double_to_gnc_numeric ( double  in,
gint64  denom,
gint  how 
)

Deprecated:
use qof_numeric_from_double

Definition at line 1779 of file deprecated.c.

01780 {
01781     return qof_numeric_from_double (in, denom, how);
01782 }

const gchar* gnc_date_dateformat_to_string ( QofDateFormat  format  ) 

Deprecated:
use qof_date_format_to_name.

Definition at line 1317 of file deprecated.c.

01318 {
01319   switch (format) {
01320   case QOF_DATE_FORMAT_US:
01321     return "us";
01322   case QOF_DATE_FORMAT_UK:
01323     return "uk";
01324   case QOF_DATE_FORMAT_CE:
01325     return "ce";
01326   case QOF_DATE_FORMAT_ISO:
01327     return "iso";
01328   case QOF_DATE_FORMAT_UTC:
01329    return "utc";
01330   case QOF_DATE_FORMAT_LOCALE:
01331     return "locale";
01332   case QOF_DATE_FORMAT_CUSTOM:
01333     return "custom";
01334   default:
01335     return NULL;    
01336   }
01337 }

const gchar* gnc_date_monthformat_to_string ( GNCDateMonthFormat  format  ) 

Deprecated:
no replacement.

Definition at line 1339 of file deprecated.c.

01340 {
01341   switch (format) {
01342   case GNCDATE_MONTH_NUMBER:
01343     return "number";
01344   case GNCDATE_MONTH_ABBREV:
01345     return "abbrev";
01346   case GNCDATE_MONTH_NAME:
01347     return "name";
01348   default:
01349     return NULL;
01350   }
01351 }

int gnc_date_my_last_mday ( int  month,
int  year 
)

Deprecated:
use g_date_get_days_in_month instead.

Definition at line 625 of file deprecated.c.

00626 {
00627     return g_date_get_days_in_month (month, year);
00628 }

gboolean gnc_date_string_to_dateformat ( const gchar *  format_string,
QofDateFormat format 
)

Deprecated:
use qof_date_format_from_name.
QofDateFormat qof_date_format_from_name ( const gchar * name )

Note:
The prototype of qof_date_string_to_format is not the same as gnc_date_string_to_dateformat! The format argument type and the return value have been changed.

Definition at line 211 of file deprecated.c.

00213 {
00214     QofDateFormat df;
00215 
00216     df = qof_date_format_from_name (format_string);
00217     if (df < 0)
00218         return TRUE;
00219     *format = df;
00220     return FALSE;
00221 }

gboolean gnc_date_string_to_monthformat ( const gchar *  format_string,
GNCDateMonthFormat format 
)

Deprecated:
no replacement.

Definition at line 224 of file deprecated.c.

00226 {
00227     if (!format_string)
00228         return TRUE;
00229 
00230     if (!strcmp (format_string, "number"))
00231         *format = GNCDATE_MONTH_NUMBER;
00232     else if (!strcmp (format_string, "abbrev"))
00233         *format = GNCDATE_MONTH_ABBREV;
00234     else if (!strcmp (format_string, "name"))
00235         *format = GNCDATE_MONTH_NAME;
00236     else
00237         return TRUE;
00238 
00239     return FALSE;
00240 }

Timespec gnc_dmy2timespec ( gint  day,
gint  month,
gint  year 
)

Deprecated:
use GDate instead.

Definition at line 987 of file deprecated.c.

00988 {
00989     Timespec ts;
00990     QofTime *qt;
00991     QofDate *qd;
00992 
00993     if (!g_date_valid_dmy (day, month, year))
00994         return null_timespec ();
00995     qd = qof_date_new ();
00996     qd->qd_mday = day;
00997     qd->qd_mon  = month;
00998     qd->qd_year = year;
00999     qof_date_valid (qd);
01000     qt = qof_date_to_qtime (qd);
01001     ts = qof_time_to_Timespec (qt);
01002     qof_time_free (qt);
01003     qof_date_free (qd);
01004     return ts;
01005 }

Timespec gnc_dmy2timespec_end ( gint  day,
gint  month,
gint  year 
)

Deprecated:
use GDate instead.

Definition at line 1008 of file deprecated.c.

01009 {
01010     Timespec ts;
01011     QofTime *qt;
01012     QofDate *qd;
01013 
01014     if (!g_date_valid_dmy (day, month, year))
01015         return null_timespec ();
01016     qd = qof_date_new ();
01017     qd->qd_mday = day;
01018     qd->qd_mon  = month;
01019     qd->qd_year = year;
01020     qof_date_set_day_end (qd);
01021     qt = qof_date_to_qtime (qd);
01022     ts = qof_time_to_Timespec (qt);
01023     qof_time_free (qt);
01024     qof_date_free (qd);
01025     return ts;
01026 }

void gnc_engine_gen_event ( QofEntity entity,
QofEventId  event_type 
)

Deprecated:
use qof_event_gen instead.

Definition at line 149 of file deprecated.c.

00150 {
00151     qof_event_gen (entity, event_type, NULL);
00152 }

void gnc_engine_generate_event ( const GUID guid,
QofIdType  e_type,
QofEventId  event_type 
)

Deprecated:
use qof_event_gen instead.

GCache* gnc_engine_get_string_cache ( void   ) 

Deprecated:
use qof_init instead.

Definition at line 193 of file deprecated.c.

00194 {
00195     return qof_util_get_string_cache ();
00196 }

gint gnc_engine_register_event_handler ( GNCEngineEventHandler  handler,
gpointer  user_data 
)

Deprecated:
use qof_event_register_handler instead.

Definition at line 124 of file deprecated.c.

00126 {
00127     return qof_event_register_old_handler (handler, user_data);
00128 }

void gnc_engine_resume_events ( void   ) 

Deprecated:
use qof_event_resume instead.

Definition at line 143 of file deprecated.c.

00144 {
00145     qof_event_resume ();
00146 }

void gnc_engine_string_cache_destroy ( void   ) 

Deprecated:
use qof_close instead.

Definition at line 199 of file deprecated.c.

00200 {
00201     qof_util_string_cache_destroy ();
00202 }

void gnc_engine_suspend_events ( void   ) 

Deprecated:
use qof_event_suspend instead.

Definition at line 137 of file deprecated.c.

00138 {
00139     qof_event_suspend ();
00140 }

void gnc_engine_unregister_event_handler ( gint  handler_id  ) 

Deprecated:
use qof_event_unregister_handler instead.

Definition at line 131 of file deprecated.c.

00132 {
00133     qof_event_unregister_handler (handler_id);
00134 }

Timespec gnc_iso8601_to_timespec_gmt ( const gchar *   ) 

Deprecated:
set QOF_DATE_FORMAT_ISO8601 and call qof_date_parse

Definition at line 1029 of file deprecated.c.

01030 {
01031     gchar buf[4];
01032     gchar *dupe;
01033     Timespec ts;
01034     struct tm stm;
01035     glong nsec = 0;
01036 
01037     ts.tv_sec = 0;
01038     ts.tv_nsec = 0;
01039     if (!str)
01040         return ts;
01041     dupe = g_strdup (str);
01042     stm.tm_year = atoi (str) - 1900;
01043     str = strchr (str, '-');
01044     if (str)
01045     {
01046         str++;
01047     }
01048     else
01049     {
01050         return ts;
01051     }
01052     stm.tm_mon = atoi (str) - 1;
01053     str = strchr (str, '-');
01054     if (str)
01055     {
01056         str++;
01057     }
01058     else
01059     {
01060         return ts;
01061     }
01062     stm.tm_mday = atoi (str);
01063 
01064     str = strchr (str, ' ');
01065     if (str)
01066     {
01067         str++;
01068     }
01069     else
01070     {
01071         return ts;
01072     }
01073     stm.tm_hour = atoi (str);
01074     str = strchr (str, ':');
01075     if (str)
01076     {
01077         str++;
01078     }
01079     else
01080     {
01081         return ts;
01082     }
01083     stm.tm_min = atoi (str);
01084     str = strchr (str, ':');
01085     if (str)
01086     {
01087         str++;
01088     }
01089     else
01090     {
01091         return ts;
01092     }
01093     stm.tm_sec = atoi (str);
01094 
01095     if (strchr (str, '.'))
01096     {
01097         gint decimals, i, multiplier = 1000000000;
01098         str = strchr (str, '.') + 1;
01099         decimals = strcspn (str, "+- ");
01100         for (i = 0; i < decimals; i++)
01101             multiplier /= 10;
01102         nsec = atoi (str) * multiplier;
01103     }
01104     stm.tm_isdst = -1;
01105 
01106     str += strcspn (str, "+-");
01107     if (str)
01108     {
01109         buf[0] = str[0];
01110         buf[1] = str[1];
01111         buf[2] = str[2];
01112         buf[3] = 0;
01113         stm.tm_hour -= atoi (buf);
01114 
01115         str += 3;
01116         if ('.' == *str)
01117             str++;
01118         if (isdigit ((guchar) * str) && isdigit ((guchar) * (str + 1)))
01119         {
01120             gint cyn;
01121             if ('+' == buf[0])
01122             {
01123                 cyn = -1;
01124             }
01125             else
01126             {
01127                 cyn = +1;
01128             }
01129             buf[0] = str[0];
01130             buf[1] = str[1];
01131             buf[2] = str[2];
01132             buf[3] = 0;
01133             stm.tm_min += cyn * atoi (buf);
01134         }
01135     }
01136 
01137     {
01138         struct tm tmp_tm;
01139         struct tm tm;
01140         glong tz;
01141         gint tz_hour;
01142         time_t secs;
01143 
01144         tmp_tm = stm;
01145         tmp_tm.tm_isdst = -1;
01146 
01147         secs = mktime (&tmp_tm);
01148 
01149         if (secs < 0)
01150         {
01151             PWARN (" mktime failed to handle daylight saving: "
01152                 "tm_hour=%d tm_year=%d tm_min=%d tm_sec=%d tm_isdst=%d for string=%s",
01153                 stm.tm_hour, stm.tm_year, stm.tm_min,
01154                 stm.tm_sec, stm.tm_isdst, dupe);
01155             tmp_tm.tm_hour++;
01156             secs = mktime (&tmp_tm);
01157             if (secs < 0)
01158             {
01159                 tmp_tm.tm_hour -= 2;
01160                 secs = mktime (&tmp_tm);
01161             }
01162             if (secs < 0)
01163             {
01164                 PERR (" unable to recover from buggy mktime ");
01165                 g_free (dupe);
01166                 return ts;
01167             }
01168         }
01169 
01170         tm = *localtime_r (&secs, &tm);
01171 
01172         tz = gnc_timezone (&tmp_tm);
01173 
01174         tz_hour = tz / 3600;
01175         stm.tm_hour -= tz_hour;
01176         stm.tm_min -= (tz % 3600) / 60;
01177         stm.tm_isdst = tmp_tm.tm_isdst;
01178         ts.tv_sec = mktime (&stm);
01179         /* unreachable code */
01180 /*      if (ts.tv_sec < 0)
01181         {
01182             PWARN (" mktime failed to adjust calculated time:"
01183                 " tm_hour=%d tm_year=%d tm_min=%d tm_sec=%d tm_isdst=%d",
01184                 stm.tm_hour, stm.tm_year, stm.tm_min,
01185                 stm.tm_sec, stm.tm_isdst);
01186             ts.tv_sec = secs - tz;
01187         }*/
01188         ts.tv_nsec = nsec;
01189     }
01190     g_free (dupe);
01191     return ts;
01192 }

KvpFrame* gnc_kvp_bag_add ( KvpFrame pwd,
const char *  path,
time_t  secs,
const char *  first_name,
  ... 
)

Deprecated:
use qof_kvp_bag_add instead.

Definition at line 1666 of file deprecated.c.

01668 {
01669     QofTime *qt;
01670     KvpFrame *cwd;
01671     va_list ap;
01672 
01673     qt = qof_time_from_time_t (secs, 0);
01674     va_start (ap, first_name);
01675     cwd = qof_kvp_bag_add(pwd, path, qt, first_name, ap);
01676     va_end (ap);
01677     return cwd;
01678 }

KvpFrame* gnc_kvp_bag_find_by_guid ( KvpFrame root,
const char *  path,
const char *  guid_name,
GUID desired_guid 
)

Deprecated:
use qof_kvp_bag_find_by_guid instead.

void gnc_kvp_bag_merge ( KvpFrame kvp_into,
const char *  intopath,
KvpFrame kvp_from,
const char *  frompath 
)

Deprecated:
use qof_kvp_bag_merge instead.

Definition at line 1696 of file deprecated.c.

01698 {
01699     qof_kvp_bag_merge (kvp_into, intopath, kvp_from, frompath);
01700 }

void gnc_kvp_bag_remove_frame ( KvpFrame root,
const char *  path,
KvpFrame fr 
)

Deprecated:
use qof_kvp_bag_remove_frame instead.

Definition at line 1689 of file deprecated.c.

01691 {
01692     qof_kvp_bag_remove_frame (root, path, fr);
01693 }

void gnc_log_init ( void   ) 

Deprecated:
use qof_log_init_filename instead

const char* gnc_log_prettify ( const char *  name  ) 

Deprecated:
use qof_log_prettify instead.

Definition at line 87 of file deprecated.c.

00088 {
00089     return qof_log_prettify (name);
00090 }

gchar* gnc_num_dbg_to_string ( gnc_numeric  n  ) 

Deprecated:
use qof_numeric_dbg_to_string

Definition at line 1804 of file deprecated.c.

01805 {
01806     return qof_numeric_dbg_to_string (n);
01807 }

gnc_numeric gnc_numeric_abs ( gnc_numeric  a  ) 

Deprecated:
use qof_numeric_abs

Definition at line 1877 of file deprecated.c.

01878 {
01879     return qof_numeric_abs (a);
01880 }

gnc_numeric gnc_numeric_add ( gnc_numeric  a,
gnc_numeric  b,
gint64  denom,
gint  how 
)

Deprecated:
use qof_numeric_add

Definition at line 1850 of file deprecated.c.

01852 {
01853     return qof_numeric_add (a, b, denom, how);
01854 }

gnc_numeric gnc_numeric_add_with_error ( gnc_numeric  a,
gnc_numeric  b,
gint64  denom,
gint  how,
gnc_numeric error 
)

Deprecated:
use qof_numeric_add_with_error

Definition at line 1882 of file deprecated.c.

01885 {
01886     return qof_numeric_add_with_error (a, b, denom, how, error);
01887 }

QofNumericErrorCode gnc_numeric_check ( gnc_numeric  a  ) 

Deprecated:
use qof_numeric_check

Definition at line 1809 of file deprecated.c.

01810 {
01811     return qof_numeric_check (a);
01812 }

gint gnc_numeric_compare ( gnc_numeric  a,
gnc_numeric  b 
)

Deprecated:
use qof_numeric_compare

Definition at line 1814 of file deprecated.c.

01815 {
01816     return qof_numeric_compare (a, b);
01817 }

gnc_numeric gnc_numeric_convert ( gnc_numeric  in,
gint64  denom,
gint  how 
)

Deprecated:
use qof_numeric_convert

Definition at line 1911 of file deprecated.c.

01912 {
01913     return qof_numeric_convert (in, denom, how);
01914 }

gnc_numeric gnc_numeric_convert_with_error ( gnc_numeric  in,
gint64  denom,
gint  how,
gnc_numeric error 
)

Deprecated:
use qof_numeric_convert_with_error

gnc_numeric gnc_numeric_div ( gnc_numeric  x,
gnc_numeric  y,
gint64  denom,
gint  how 
)

Deprecated:
use qof_numeric_div

Definition at line 1868 of file deprecated.c.

01870 {
01871     return qof_numeric_div (x, y, denom, how);
01872 }

gnc_numeric gnc_numeric_div_with_error ( gnc_numeric  a,
gnc_numeric  b,
gint64  denom,
gint  how,
gnc_numeric error 
)

Deprecated:
use qof_numeric_div_with_error

Definition at line 1903 of file deprecated.c.

01906 {
01907     return qof_numeric_div_with_error (a, b, denom, how, error);
01908 }

gboolean gnc_numeric_eq ( gnc_numeric  a,
gnc_numeric  b 
)

Deprecated:
use qof_numeric_eq

Definition at line 1834 of file deprecated.c.

01835 {
01836     return qof_numeric_eq (a, b);
01837 }

gboolean gnc_numeric_equal ( gnc_numeric  a,
gnc_numeric  b 
)

Deprecated:
use qof_numeric_equal

Definition at line 1839 of file deprecated.c.

01840 {
01841     return qof_numeric_equal (a, b);
01842 }

gnc_numeric gnc_numeric_error ( QofNumericErrorCode  error_code  ) 

Deprecated:
use qof_numeric_error

Definition at line 1789 of file deprecated.c.

01790 {
01791     return qof_numeric_error (error_code);
01792 }

gnc_numeric gnc_numeric_mul ( gnc_numeric  a,
gnc_numeric  b,
gint64  denom,
gint  how 
)

Deprecated:
use qof_numeric_mul

Definition at line 1862 of file deprecated.c.

01864 {
01865     return qof_numeric_mul (a, b, denom, how);
01866 }

gnc_numeric gnc_numeric_mul_with_error ( gnc_numeric  a,
gnc_numeric  b,
gint64  denom,
gint  how,
gnc_numeric error 
)

Deprecated:
use qof_numeric_mul_with_error

Definition at line 1896 of file deprecated.c.

01899 {
01900     return qof_numeric_mul_with_error (a, b, denom, how, error);
01901 }

gnc_numeric gnc_numeric_neg ( gnc_numeric  a  ) 

Deprecated:
use qof_numeric_neg

Definition at line 1873 of file deprecated.c.

01874 {
01875     return qof_numeric_neg (a);
01876 }

gboolean gnc_numeric_negative_p ( gnc_numeric  a  ) 

Deprecated:
use qof_numeric_negative_p

Definition at line 1824 of file deprecated.c.

01825 {
01826     return qof_numeric_negative_p (a);
01827 }

gboolean gnc_numeric_positive_p ( gnc_numeric  a  ) 

Deprecated:
use qof_numeric_positive_p

Definition at line 1829 of file deprecated.c.

01830 {
01831     return qof_numeric_positive_p (a);
01832 }

gnc_numeric gnc_numeric_reduce ( gnc_numeric  in  ) 

Deprecated:
use qof_numeric_reduce

Definition at line 1916 of file deprecated.c.

01917 {
01918     return qof_numeric_reduce (in);
01919 }

gint gnc_numeric_same ( gnc_numeric  a,
gnc_numeric  b,
gint64  denom,
gint  how 
)

Deprecated:
use qof_numeric_same

Definition at line 1844 of file deprecated.c.

01846 {
01847     return qof_numeric_same (a, b, denom, how);
01848 }

gnc_numeric gnc_numeric_sub ( gnc_numeric  a,
gnc_numeric  b,
gint64  denom,
gint  how 
)

Deprecated:
use qof_numeric_sub

Definition at line 1856 of file deprecated.c.

01858 {
01859     return qof_numeric_sub (a, b, denom, how);
01860 }

gnc_numeric gnc_numeric_sub_with_error ( gnc_numeric  a,
gnc_numeric  b,
gint64  denom,
gint  how,
gnc_numeric error 
)

Deprecated:
use qof_numeric_sub_with_error

Definition at line 1889 of file deprecated.c.

01892 {
01893     return qof_numeric_sub_with_error (a, b, denom, how, error);
01894 }

gdouble gnc_numeric_to_double ( gnc_numeric  in  ) 

Deprecated:
use qof_numeric_to_double

Definition at line 1794 of file deprecated.c.

01795 {
01796     return qof_numeric_to_double (in);
01797 }

gchar* gnc_numeric_to_string ( gnc_numeric  n  ) 

Deprecated:
use qof_numeric_to_string

Definition at line 1799 of file deprecated.c.

01800 {
01801     return qof_numeric_to_string (n);
01802 }

gboolean gnc_numeric_zero_p ( gnc_numeric  a  ) 

Deprecated:
use qof_numeric_zero_p

Definition at line 1819 of file deprecated.c.

01820 {
01821     return qof_numeric_zero_p (a);
01822 }

const char* gnc_print_date ( Timespec  ts  ) 

Deprecated:
use qof_date_print

Definition at line 778 of file deprecated.c.

00779 {
00780     static gchar buff[MAX_DATE_LENGTH];
00781     QofDateFormat df;
00782     QofTime *time;
00783     gchar *str;
00784 
00785     df = qof_date_format_get_current ();
00786     ENTER (" using date format %d", df);
00787     time = timespecToQofTime (ts);
00788     str = qof_date_print (qof_date_from_qtime (time), df);
00789     qof_time_free (time);
00790     g_stpcpy (buff, str);
00791     g_free (str);
00792     LEAVE (" printing %s", buff);
00793     return buff;
00794 }

void gnc_report_clock ( int  ,
QofLogModule  ,
QofLogLevel  ,
const char *  ,
const char *  ,
  ... 
)

Deprecated:
no replacement

void gnc_report_clock_total ( int  ,
QofLogModule  ,
QofLogLevel  ,
const char *  ,
const char *  ,
  ... 
)

Deprecated:
no replacement

void gnc_set_log_level ( QofLogModule  module,
QofLogLevel  level 
)

Deprecated:
use qof_log_set_level insead.

Definition at line 64 of file deprecated.c.

00065 {
00066     qof_log_set_level (log_module, (QofLogLevel) level);
00067 }

void gnc_set_log_level_global ( QofLogLevel  level  ) 

Deprecated:
use qof_log_set_level_registered instead.

Definition at line 70 of file deprecated.c.

00071 {
00072     qof_log_set_level_registered ((QofLogLevel) level);
00073 }

void gnc_set_logfile ( FILE *  outfile  ) 

Deprecated:
use qof_log_set_file instead.

Definition at line 82 of file deprecated.c.

00083 {
00084     qof_log_set_file (outfile);
00085 }

gboolean gnc_should_log ( QofLogModule  log_module,
QofLogLevel  log_level 
)

Deprecated:
use qof_log_check instead.

Definition at line 118 of file deprecated.c.

00119 {
00120     return qof_log_check (log_module, log_level);
00121 }

void gnc_start_clock ( int  ,
QofLogModule  ,
QofLogLevel  ,
const char *  ,
const char *  ,
  ... 
)

Deprecated:
no replacement

gchar* gnc_stpcpy ( gchar *  dest,
const gchar *  src 
)

Deprecated:
use qof_util_stpcpy instead.

Definition at line 187 of file deprecated.c.

00188 {
00189     return g_stpcpy (dest, src);
00190 }

gpointer gnc_string_cache_insert ( gconstpointer  key  ) 

Deprecated:
use qof_util_string_cache_insert instead.

Definition at line 181 of file deprecated.c.

00182 {
00183     return (gpointer) qof_util_string_cache_insert (key);
00184 }

void gnc_string_cache_remove ( gconstpointer  key  ) 

Deprecated:
use qof_util_string_cache_remove instead.

Definition at line 205 of file deprecated.c.

00206 {
00207     qof_util_string_cache_remove (key);
00208 }

gboolean gnc_strisnum ( const guchar *  s  ) 

Deprecated:
use qof_util_string_isnum

Definition at line 1660 of file deprecated.c.

01661 {
01662     return qof_util_string_isnum (s);
01663 }

void gnc_timespec2dmy ( Timespec  ts,
gint *  day,
gint *  month,
gint *  year 
)

Deprecated:
use QofDate instead.

Definition at line 1230 of file deprecated.c.

01231 {
01232     QofTime *time;
01233     QofDate *qd;
01234 
01235     time = timespecToQofTime (ts);
01236     qd = qof_date_from_qtime (time);
01237     qof_time_free (time);
01238     if (day)
01239         *day = qd->qd_mday;
01240     if (month)
01241         *month = qd->qd_mon;
01242     if ((year) && (qd->qd_year < 0) && (qd->qd_year > G_MAXINT))
01243         *year = (gint)qd->qd_year;
01244 }

int gnc_timespec_last_mday ( Timespec  ts  ) 

Deprecated:
use g_date_get_days_in_month instead.

Definition at line 644 of file deprecated.c.

00645 {
00646     /* Replacement code should not use localtime */
00647     struct tm *result;
00648     time_t t_secs = t.tv_sec + (t.tv_nsec / QOF_NSECS);
00649     result = localtime (&t_secs);
00650     return date_get_last_mday (result);
00651 }

gchar* gnc_timespec_to_iso8601_buff ( Timespec  ts,
gchar *  buff 
)

Deprecated:
set QOF_DATE_FORMAT_ISO8601 and call qof_date_print

Definition at line 1195 of file deprecated.c.

01196 {
01197     gint len, tz_hour, tz_min;
01198     glong secs;
01199     gchar cyn;
01200     time_t tmp;
01201     struct tm parsed;
01202 
01203     tmp = ts.tv_sec;
01204     localtime_r (&tmp, &parsed);
01205 
01206     secs = gnc_timezone (&parsed);
01207     tz_hour = secs / 3600;
01208     tz_min = (secs % 3600) / 60;
01209 
01210     cyn = '-';
01211     if (0 > tz_hour)
01212     {
01213         cyn = '+';
01214         tz_hour = -tz_hour;
01215     }
01216 
01217     len = sprintf (buff, "%4d-%02d-%02d %02d:%02d:%02d.%06ld %c%02d%02d",
01218         parsed.tm_year + 1900,
01219         parsed.tm_mon + 1,
01220         parsed.tm_mday,
01221         parsed.tm_hour,
01222         parsed.tm_min,
01223         parsed.tm_sec, ts.tv_nsec / 1000, cyn, tz_hour, tz_min);
01224 
01225     buff += len;
01226     return buff;
01227 }

time_t gnc_timet_get_day_end ( time_t  time_val  ) 

Deprecated:
no replacement.

Definition at line 587 of file deprecated.c.

00588 {
00589     struct tm tm;
00590 
00591     gnc_tm_get_day_end (&tm, time_val);
00592     return mktime (&tm);
00593 }

time_t gnc_timet_get_day_end_gdate ( GDate *  date  ) 

Deprecated:
no replacement

Definition at line 611 of file deprecated.c.

00612 {
00613     struct tm stm;
00614     time_t secs;
00615 
00616     stm.tm_year = g_date_get_year (date) - 1900;
00617     stm.tm_mon = g_date_get_month (date) - 1;
00618     stm.tm_mday = g_date_get_day (date);
00619     gnc_tm_set_day_end (&stm);
00620     secs = mktime (&stm);
00621     return secs;
00622 }

time_t gnc_timet_get_day_start ( time_t  time_val  ) 

Deprecated:
no replacement.

Definition at line 578 of file deprecated.c.

00579 {
00580     struct tm tm;
00581 
00582     gnc_tm_get_day_start (&tm, time_val);
00583     return mktime (&tm);
00584 }

time_t gnc_timet_get_day_start_gdate ( GDate *  date  ) 

Deprecated:
no replacement

Definition at line 597 of file deprecated.c.

00598 {
00599     struct tm stm;
00600     time_t secs;
00601 
00602     stm.tm_year = g_date_get_year (date) - 1900;
00603     stm.tm_mon = g_date_get_month (date) - 1;
00604     stm.tm_mday = g_date_get_day (date);
00605     gnc_tm_set_day_start (&stm);
00606     secs = mktime (&stm);
00607     return secs;
00608 }

time_t gnc_timet_get_today_end ( void   ) 

Deprecated:
no replacement.

Definition at line 675 of file deprecated.c.

00676 {
00677     struct tm tm;
00678 
00679     gnc_tm_get_day_end (&tm, time (NULL));
00680     return mktime (&tm);
00681 }

time_t gnc_timet_get_today_start ( void   ) 

Deprecated:
no replacement

Definition at line 666 of file deprecated.c.

00667 {
00668     struct tm tm;
00669 
00670     gnc_tm_get_day_start (&tm, time (NULL));
00671     return mktime (&tm);
00672 }

glong gnc_timezone ( struct tm *  tm  ) 

Deprecated:
no replacement

Definition at line 1247 of file deprecated.c.

01248 {
01249     g_return_val_if_fail (tm != NULL, 0);
01250 
01251 #ifdef HAVE_STRUCT_TM_GMTOFF
01252     return -(tm->tm_gmtoff);
01253 #else
01254     return (glong) (timezone - (tm->tm_isdst > 0 ? 3600 : 0));
01255 #endif
01256 }

void gnc_tm_get_day_end ( struct tm *  tm,
time_t  time_val 
)

Deprecated:
no replacement.

Definition at line 571 of file deprecated.c.

00572 {
00573     tm = localtime_r (&time_val, tm);
00574     gnc_tm_set_day_end (tm);
00575 }

void gnc_tm_get_day_start ( struct tm *  tm,
time_t  time_val 
)

Deprecated:
no replacement.

Definition at line 546 of file deprecated.c.

00547 {
00548     tm = localtime_r (&time_val, tm);
00549     gnc_tm_set_day_start (tm);
00550 }

void gnc_tm_get_today_end ( struct tm *  tm  ) 

Deprecated:
no replacement

Definition at line 660 of file deprecated.c.

00661 {
00662     gnc_tm_get_day_end (tm, time (NULL));
00663 }

void gnc_tm_get_today_start ( struct tm *  tm  ) 

Deprecated:
no replacement.

Definition at line 654 of file deprecated.c.

00655 {
00656     gnc_tm_get_day_start (tm, time (NULL));
00657 }

void gnc_tm_set_day_end ( struct tm *  tm  ) 

Deprecated:
use qof_time_set_day_end instead.

Definition at line 562 of file deprecated.c.

00563 {
00564     tm->tm_hour = 23;
00565     tm->tm_min = 59;
00566     tm->tm_sec = 59;
00567     tm->tm_isdst = -1;
00568 }

void gnc_tm_set_day_middle ( struct tm *  tm  ) 

Deprecated:
use qof_time_set_day_middle instead.

Definition at line 553 of file deprecated.c.

00554 {
00555     tm->tm_hour = 12;
00556     tm->tm_min = 0;
00557     tm->tm_sec = 0;
00558     tm->tm_isdst = -1;
00559 }

void gnc_tm_set_day_start ( struct tm *  tm  ) 

Deprecated:
use qof_time_set_day_start instead.

Definition at line 537 of file deprecated.c.

00538 {
00539     tm->tm_hour = 0;
00540     tm->tm_min = 0;
00541     tm->tm_sec = 0;
00542     tm->tm_isdst = -1;
00543 }

QofBackend* gncBackendInit_file ( const char *  book_id,
void *  data 
)

Deprecated:
no replacement.

void kvp_frame_add_timespec ( KvpFrame frame,
const gchar *  path,
Timespec  ts 
)

Deprecated:
use kvp_frame_add_time instead.

Timespec kvp_frame_get_timespec ( const KvpFrame frame,
const gchar *  path 
)

Deprecated:
use kvp_frame_get_time instead.

void kvp_frame_set_timespec ( KvpFrame frame,
const gchar *  path,
Timespec  ts 
)

Deprecated:
use kvp_frame_set_time instead.

Timespec kvp_value_get_timespec ( const KvpValue value  ) 

Deprecated:
use kvp_value_get_time instead.

Definition at line 1495 of file deprecated.c.

01496 {
01497     Timespec ts;
01498     QofTime *qt;
01499     ts.tv_sec = 0;
01500     ts.tv_nsec = 0;
01501     if (!value)
01502         return ts;
01503     qt = kvp_value_get_time (value);
01504     ts = qof_time_to_Timespec (qt);
01505     return ts;
01506 }

KvpValue* kvp_value_new_timespec ( Timespec  timespec  ) 

Deprecated:
use kvp_value_new_time instead.

Definition at line 1484 of file deprecated.c.

01485 {
01486     QofTime *qt;
01487     KvpValue *retval;
01488 
01489     qt = timespecToQofTime (value);
01490     retval = kvp_value_new_time (qt);
01491     return retval;
01492 }

gboolean qof_begin_edit ( QofInstance inst  ) 

Deprecated:
use qof_util_param_edit instead to edit at a parameter level, instead of a complete instance.

Definition at line 1702 of file deprecated.c.

01703 {
01704     return qof_util_param_edit (inst, NULL);
01705 }

gint qof_book_mergeCommit ( QofBookMergeData mergeData  ) 

Deprecated:
use qof_book_merge_commit instead.

Definition at line 168 of file deprecated.c.

00169 {
00170     return qof_book_merge_commit (mergeData);
00171 }

QofBookMergeData* qof_book_mergeInit ( QofBook importBook,
QofBook targetBook 
)

Deprecated:
use qof_book_merge_init instead.

Definition at line 155 of file deprecated.c.

00156 {
00157     return qof_book_merge_init (importBook, targetBook);
00158 }

void qof_book_mergeRuleForeach ( QofBookMergeData mergeData,
QofBookMergeRuleForeachCB  callback,
QofBookMergeResult  mergeResult 
)

Deprecated:
use qof_book_merge_rule_foreach instead.

Definition at line 174 of file deprecated.c.

00176 {
00177     qof_book_merge_rule_foreach (mergeData, cb, mergeResult);
00178 }

QofBookMergeData* qof_book_mergeUpdateResult ( QofBookMergeData mergeData,
QofBookMergeResult  tag 
)

Deprecated:
use qof_book_merge_update_result instead.

Definition at line 161 of file deprecated.c.

00163 {
00164     return qof_book_merge_update_result (mergeData, tag);
00165 }

void qof_book_set_schedxactions ( QofBook book,
GList *  newList 
)

Deprecated:
no replacement.

gboolean qof_commit_edit ( QofInstance inst  ) 

Deprecated:
no replacement.

Definition at line 1708 of file deprecated.c.

01709 {
01710     QofBackend *be;
01711 
01712     if (!inst)
01713         return FALSE;
01714     (inst->editlevel)--;
01715     if (0 < inst->editlevel)
01716         return FALSE;
01717     if ((-1 == inst->editlevel) && inst->dirty)
01718     {
01719         be = qof_book_get_backend ((inst)->book);
01720         if (be && qof_backend_begin_exists (be))
01721             qof_backend_run_begin (be, inst);
01722         inst->editlevel = 0;
01723     }
01724     if (0 > inst->editlevel)
01725         inst->editlevel = 0;
01726     return TRUE;
01727 }

gboolean qof_commit_edit_part2 ( QofInstance inst,
void(*)(QofInstance *, QofBackendError on_error,
void(*)(QofInstance *)  on_done,
void(*)(QofInstance *)  on_free 
)

Deprecated:
use qof_util_param_commit instead.

Definition at line 1731 of file deprecated.c.

01734 {
01735     QofBackend *be;
01736 
01737     /* See if there's a backend.  If there is, invoke it. */
01738     be = qof_book_get_backend (inst->book);
01739     if (be && qof_backend_commit_exists (be))
01740     {
01741         QofBackendError errcode;
01742 
01743         do
01744         {
01745             errcode = qof_backend_get_error (be);
01746         }
01747         while (ERR_BACKEND_NO_ERR != errcode);
01748 
01749         qof_backend_run_commit (be, inst);
01750         errcode = qof_backend_get_error (be);
01751         if (ERR_BACKEND_NO_ERR != errcode)
01752         {
01753             inst->do_free = FALSE;
01754 
01755             qof_backend_set_error (be, errcode);
01756             if (on_error)
01757                 on_error (inst, errcode);
01758             return FALSE;
01759         }
01760         inst->dirty = FALSE;
01761     }
01762     if (inst->do_free)
01763     {
01764         if (on_free)
01765             on_free (inst);
01766         return TRUE;
01767     }
01768     if (on_done)
01769         on_done (inst);
01770     return TRUE;
01771 }

gboolean qof_date_add_days ( Timespec ts,
gint  days 
)

Deprecated:
use qof_date_adddays instead.

Definition at line 1353 of file deprecated.c.

01354 {
01355     struct tm tm;
01356     time_t    tt;
01357 
01358     g_return_val_if_fail(ts, FALSE);
01359     tt = timespecToTime_t(*ts);
01360 #ifdef HAVE_GMTIME_R
01361     tm = *gmtime_r(&tt, &tm);
01362 #else
01363     tm = *gmtime(&tt);
01364 #endif
01365     tm.tm_mday += days;
01366     tt = mktime(&tm);
01367     if(tt < 0) { return FALSE; }
01368     timespecFromTime_t(ts, tt);
01369     return TRUE;
01370 }

gboolean qof_date_add_months ( Timespec ts,
gint  months,
gboolean  track_last_day 
)

Deprecated:
use qof_date_addmonths instead.

Definition at line 1373 of file deprecated.c.

01374 {
01375     struct tm tm;
01376     time_t    tt;
01377     gint new_last_mday;
01378     gboolean was_last_day;
01379 
01380     g_return_val_if_fail(ts, FALSE);
01381     tt = timespecToTime_t(*ts);
01382 #ifdef HAVE_GMTIME_R
01383     tm = *gmtime_r(&tt, &tm);
01384 #else
01385     tm = *gmtime(&tt);
01386 #endif
01387     was_last_day = date_is_last_mday(&tm);
01388     tm.tm_mon += months;
01389     while (tm.tm_mon > 11) {
01390         tm.tm_mon -= 12;
01391         tm.tm_year++;
01392     }
01393     if (track_last_day) {
01394         new_last_mday = date_get_last_mday(&tm);
01395         if (was_last_day || (tm.tm_mday > new_last_mday)) {
01396             tm.tm_mday = new_last_mday;
01397         }
01398     }
01399     tt = mktime(&tm);
01400     if(tt < 0) { return FALSE; }
01401     timespecFromTime_t(ts, tt);
01402     return TRUE;
01403 }

time_t qof_date_dmy_to_sec ( gint  day,
gint  month,
gint  year 
)

Deprecated:
returns incorrect values for dates before 1970. use qof_time_dmy_to_time.

Definition at line 358 of file deprecated.c.

00359 {
00360     QofTime *qt;
00361     QofDate *qd;
00362     time_t retval;
00363 
00364     qd = qof_date_new ();
00365     qd->qd_mday = day;
00366     qd->qd_mon  = month;
00367     qd->qd_year = year;
00368     qt = qof_date_to_qtime (qd);
00369     retval = qof_time_get_secs (qt);
00370     qof_time_free (qt);
00371     qof_date_free (qd);
00372     return retval;
00373 }

QofDateFormat qof_date_format_get ( void   ) 

Deprecated:
use qof_date_format_get_current

Definition at line 1405 of file deprecated.c.

01406 {
01407   return qof_date_format_get_current ();
01408 }

const gchar* qof_date_format_get_string ( QofDateFormat  df  ) 

Deprecated:
no direct replacement.

Definition at line 1410 of file deprecated.c.

01411 {
01412   switch(df) {
01413    case QOF_DATE_FORMAT_US:
01414     return "%m/%d/%y";
01415    case QOF_DATE_FORMAT_UK:
01416     return "%d/%m/%y";
01417    case QOF_DATE_FORMAT_CE:
01418     return "%d.%m.%y";
01419    case QOF_DATE_FORMAT_UTC:
01420     return "%Y-%m-%dT%H:%M:%SZ";
01421    case QOF_DATE_FORMAT_ISO:
01422     return "%y-%m-%d";
01423    case QOF_DATE_FORMAT_LOCALE:
01424    default:
01425     return QOF_D_FMT;
01426   };
01427 }

void qof_date_format_set ( QofDateFormat  df  ) 

Deprecated:
use qof_date_format_set_current.

Definition at line 1429 of file deprecated.c.

01430 {
01431     if(!qof_date_format_set_current (df))
01432         PERR (" unable to set current format, %d", df);
01433 }

const gchar* qof_date_text_format_get_string ( QofDateFormat  df  ) 

Deprecated:
use qof_date_format_get_format

Definition at line 1435 of file deprecated.c.

01436 {
01437     return qof_date_format_get_format (df);
01438 }

gint qof_event_register_old_handler ( GNCEngineEventHandler  old_handler,
gpointer  user_data 
)

Deprecated:
For backwards compatibility - New code must not use this function. The function and the handler prototype will be remove from qofevent.c in libqof2

Definition at line 74 of file qofevent.c.

00076 {
00077     HandlerInfo *hi;
00078     gint handler_id;
00079 
00080     ENTER ("(handler=%p, data=%p)", handler, user_data);
00081 
00082     /* sanity check */
00083     if (!handler)
00084     {
00085         PERR ("no handler specified");
00086         return 0;
00087     }
00088     PINFO (" deprecated handler specified");
00089 
00090     handler_id = find_next_handler_id ();
00091     /* Found one, add the handler */
00092     hi = g_new0 (HandlerInfo, 1);
00093 
00094     hi->old_handler = handler;
00095     hi->user_data = user_data;
00096     hi->handler_id = handler_id;
00097 
00098     handlers = g_list_prepend (handlers, hi);
00099 
00100     LEAVE (" (handler=%p, data=%p) handler_id=%d", handler, user_data,
00101         handler_id);
00102     return handler_id;
00103 
00104 }

Timespec qof_instance_get_last_update ( QofInstance inst  ) 

Deprecated:
use qof_instance_set_update_time instead.

Definition at line 1259 of file deprecated.c.

01260 {
01261     Timespec ts;
01262     ts = inst->last_update;
01263     inst->update_time = timespecToQofTime (ts);
01264     return ts;
01265 }

gboolean qof_is_same_day ( time_t  ,
time_t   
)

Deprecated:
no replacement

Definition at line 521 of file deprecated.c.

00522 {
00523     gboolean retval;
00524     GDate *da, *db;
00525 
00526     da = g_date_new ();
00527     db = g_date_new ();
00528     g_date_set_time_t (da, ta);
00529     g_date_set_time_t (db, tb);
00530     retval = g_date_compare (da, db);
00531     g_date_free (da);
00532     g_date_free (db);
00533     return retval;
00534 }

void qof_log_set_level_global ( QofLogLevel  level  ) 

Deprecated:
use qof_log_set_level_registered instead.
This function has been deprecated because the function name is very misleading. It may, in future, be modified to be truly global (i.e. make changes to log modules where no log_level has been explicitly set) but, despite the name, it only ever modified known (gnucash) modules. Future changes would require that if this function is made truly global it must preserve the effect of qof_log_set_level_registered and the advantages of silent log_modules for those programs that do not use _global. Support could be required for removing log_modules from the hashtable.

Definition at line 76 of file deprecated.c.

00077 {
00078     qof_log_set_level_registered ((QofLogLevel) level);
00079 }

char* qof_print_date ( time_t  secs  ) 

Deprecated:
use qof_date_print

Definition at line 765 of file deprecated.c.

00766 {
00767     QofDateFormat df;
00768     QofTime *time;
00769     gchar *str;
00770 
00771     df = qof_date_format_get_current ();
00772     time = qof_time_from_time_t (t, 0);
00773     str = qof_date_print (qof_date_from_qtime (time), df);
00774     qof_time_free (time);
00775     return str;
00776 }

size_t qof_print_date_buff ( char *  buff,
size_t  buflen,
time_t  secs 
)

Deprecated:
no replacement.

Definition at line 737 of file deprecated.c.

00738 {
00739     struct tm *theTime;
00740     if (!buff)
00741         return 0;
00742     theTime = localtime (&t);
00743     return qof_print_date_dmy_buff (buff, len,
00744         theTime->tm_mday, theTime->tm_mon + 1, theTime->tm_year + 1900);
00745 }

size_t qof_print_date_dmy_buff ( gchar *  buff,
size_t  buflen,
gint  day,
gint  month,
gint  year 
)

Deprecated:
no replacement.

size_t qof_print_date_time_buff ( char *  buff,
size_t  len,
time_t  secs 
)

Deprecated:
no replacement.

Definition at line 446 of file deprecated.c.

00447 {
00448     int flen;
00449     int day, month, year, hour, min, sec;
00450     struct tm ltm, gtm;
00451 
00452     if (!buff)
00453         return 0;
00454     ltm = *localtime (&secs);
00455     day = ltm.tm_mday;
00456     month = ltm.tm_mon + 1;
00457     year = ltm.tm_year + 1900;
00458     hour = ltm.tm_hour;
00459     min = ltm.tm_min;
00460     sec = ltm.tm_sec;
00461     switch (qof_date_format_get_current ())
00462     {
00463     case QOF_DATE_FORMAT_UK:
00464         flen =
00465             g_snprintf (buff, len, "%2d/%2d/%-4d %2d:%02d", day, month,
00466             year, hour, min);
00467         break;
00468     case QOF_DATE_FORMAT_CE:
00469         flen =
00470             g_snprintf (buff, len, "%2d.%2d.%-4d %2d:%02d", day, month,
00471             year, hour, min);
00472         break;
00473     case QOF_DATE_FORMAT_ISO:
00474         flen =
00475             g_snprintf (buff, len, "%04d-%02d-%02d %02d:%02d", year, month,
00476             day, hour, min);
00477         break;
00478     case QOF_DATE_FORMAT_UTC:
00479         {
00480             gtm = *gmtime (&secs);
00481             flen = strftime (buff, len, QOF_UTC_DATE_FORMAT, &gtm);
00482             break;
00483         }
00484     case QOF_DATE_FORMAT_LOCALE:
00485         {
00486             flen = strftime (buff, len, QOF_D_T_FMT, &ltm);
00487         }
00488         break;
00489 
00490     case QOF_DATE_FORMAT_US:
00491     default:
00492         flen =
00493             g_snprintf (buff, len, "%2d/%2d/%-4d %2d:%02d", month, day,
00494             year, hour, min);
00495         break;
00496     }
00497     return flen;
00498 }

size_t qof_print_gdate ( char *  buf,
size_t  bufflen,
GDate *  gd 
)

Deprecated:
no replacement

size_t qof_print_hours_elapsed_buff ( char *  buff,
size_t  len,
int  secs,
gboolean  show_secs 
)

Deprecated:
no replacement.

Definition at line 376 of file deprecated.c.

00378 {
00379     size_t flen;
00380     if (0 <= secs)
00381     {
00382         if (show_secs)
00383         {
00384             flen = g_snprintf (buff, len,
00385                 "%02d:%02d:%02d", (int) (secs / 3600),
00386                 (int) ((secs % 3600) / 60), (int) (secs % 60));
00387         }
00388         else
00389         {
00390             flen = g_snprintf (buff, len,
00391                 "%02d:%02d", (int) (secs / 3600),
00392                 (int) ((secs % 3600) / 60));
00393         }
00394     }
00395     else
00396     {
00397         if (show_secs)
00398         {
00399             flen = g_snprintf (buff, len,
00400                 "-%02d:%02d:%02d", (int) (-secs / 3600),
00401                 (int) ((-secs % 3600) / 60), (int) (-secs % 60));
00402         }
00403         else
00404         {
00405             flen = g_snprintf (buff, len,
00406                 "-%02d:%02d", (int) (-secs / 3600),
00407                 (int) ((-secs % 3600) / 60));
00408         }
00409     }
00410     return flen;
00411 }

size_t qof_print_minutes_elapsed_buff ( char *  buff,
size_t  len,
int  secs,
gboolean  show_secs 
)

Deprecated:
no replacement.

Definition at line 414 of file deprecated.c.

00416 {
00417     size_t flen;
00418     if (0 <= secs)
00419     {
00420         if (show_secs)
00421         {
00422             flen = g_snprintf (buff, len,
00423                 "%02d:%02d", (int) (secs / 60), (int) (secs % 60));
00424         }
00425         else
00426         {
00427             flen = g_snprintf (buff, len, "%02d", (int) (secs / 60));
00428         }
00429     }
00430     else
00431     {
00432         if (show_secs)
00433         {
00434             flen = g_snprintf (buff, len,
00435                 "-%02d:%02d", (int) (-secs / 60), (int) (-secs % 60));
00436         }
00437         else
00438         {
00439             flen = g_snprintf (buff, len, "-%02d", (int) (-secs / 60));
00440         }
00441     }
00442     return flen;
00443 }

size_t qof_print_time_buff ( char *  buff,
size_t  len,
time_t  secs 
)

Deprecated:
no replacement.

QofQueryPredData* qof_query_date_predicate ( QofQueryCompare  how,
QofDateMatch  options,
Timespec  date 
)

Deprecated:
use qof_query_time_predicate instead.

Definition at line 1875 of file qofquerycore.c.

01888 {

gboolean qof_query_date_predicate_get_date ( QofQueryPredData pd,
Timespec date 
)

Deprecated:
use qof_query_time_predicate_get_time instead.

Definition at line 1889 of file qofquerycore.c.

01891     {
01892         QofType name;
01893         QofQueryPredicateFunc pred;
01894         QofCompareFunc comp;
01895         QueryPredicateCopyFunc copy;
01896         QueryPredDataFree pd_free;
01897         QueryToString toString;

void qof_query_print ( QofQuery query  ) 

Deprecated:
this will be private in libqof2.

Definition at line 1576 of file qofquery.c.

01577 {
01578     GList *output;
01579     GString *str;
01580     QofQuerySort *s[3];
01581     gint maxResults = 0, numSorts = 3;
01582 
01583     ENTER (" ");
01584 
01585     if (!query)
01586     {
01587         LEAVE ("query is (null)");
01588         return;
01589     }
01590 
01591     output = NULL;
01592     str = NULL;
01593     maxResults = qof_query_get_max_results (query);
01594 
01595     output = qof_query_printSearchFor (query, output);
01596     output = qof_query_printTerms (query, output);
01597 
01598     qof_query_get_sorts (query, &s[0], &s[1], &s[2]);
01599 
01600     if (s[0])
01601     {
01602         output = qof_query_printSorts (s, numSorts, output);
01603     }
01604 
01605     str = g_string_new (" ");
01606     g_string_printf (str, "Maximum number of results: %d", maxResults);
01607     output = g_list_append (output, str);
01608 
01609     qof_query_printOutput (output);
01610     LEAVE (" ");
01611 }

void qof_report_clock ( gint  clockno,
QofLogModule  log_module,
QofLogLevel  log_level,
const gchar *  function_name,
const gchar *  format,
  ... 
)

Deprecated:
no replacement.

void qof_report_clock_total ( gint  clockno,
QofLogModule  log_module,
QofLogLevel  log_level,
const gchar *  function_name,
const gchar *  format,
  ... 
)

Deprecated:
no replacement.

gboolean qof_scan_date ( const char *  buff,
int *  day,
int *  month,
int *  year 
)

Deprecated:
use qof_date_parse

Definition at line 969 of file deprecated.c.

00970 {
00971   return qof_scan_date_internal(buff, day, month, year, dateFormat);
00972 }

gboolean qof_scan_date_secs ( const char *  buff,
time_t *  secs 
)

Deprecated:
no replacement

void qof_session_clear_current_session ( void   ) 

Deprecated:
Each application should keep their own session context.

Definition at line 1654 of file deprecated.c.

01655 {
01656     current_session = NULL;
01657 }

QofSession* qof_session_get_current_session ( void   ) 

Deprecated:
Each application should keep their own session context.

Definition at line 1635 of file deprecated.c.

01636 {
01637     if (!current_session)
01638     {
01639         qof_event_suspend ();
01640         current_session = qof_session_new ();
01641         qof_event_resume ();
01642     }
01643 
01644     return current_session;
01645 }

void qof_session_set_current_session ( QofSession session  ) 

Deprecated:
Each application should keep their own session context.

Definition at line 1648 of file deprecated.c.

01649 {
01650     current_session = session;
01651 }

void qof_start_clock ( gint  clockno,
QofLogModule  log_module,
QofLogLevel  log_level,
const gchar *  function_name,
const gchar *  format,
  ... 
)

Deprecated:
no replacement.

GCache* qof_util_get_string_cache ( void   ) 

Deprecated:
use qof_init instead.

Definition at line 385 of file qofutil.c.

00387 {
00388     if (!qof_string_cache)
00389     {
00390         qof_string_cache = g_cache_new ((GCacheNewFunc) g_strdup,   /* value_new_func     */
00391             g_free,             /* value_destroy_func */
00392             (GCacheDupFunc) g_strdup,   /* key_dup_func       */
00393             g_free,             /* key_destroy_func   */
00394             g_str_hash,         /* hash_key_func      */
00395             g_str_hash,         /* hash_value_func    */
00396             g_str_equal);       /* key_equal_func     */
00397     }
00398     return qof_string_cache;
00399 }

gchar* qof_util_param_as_string ( QofEntity ent,
QofParam param 
)

Deprecated:
use qof_util_param_to_string instead.

Definition at line 1774 of file deprecated.c.

01775 {
01776     return qof_util_param_to_string (ent, param);
01777 }

gboolean string_to_gnc_numeric ( const gchar *  str,
gnc_numeric n 
)

Deprecated:
use qof_numeric_from_string

Definition at line 1784 of file deprecated.c.

01785 {
01786     return qof_numeric_from_string (str, n);
01787 }

Timespec timespec_abs ( const Timespec t  ) 

Deprecated:
use qof_time_abs.

Definition at line 332 of file deprecated.c.

00333 {
00334     Timespec ts;
00335     QofTime *qt = timespecToQofTime (*t);
00336     qof_time_abs (qt);
00337     ts = qof_time_to_Timespec (qt);
00338     qof_time_free (qt);
00339     return ts;
00340 }

gint timespec_cmp ( const Timespec ta,
const Timespec tb 
)

Deprecated:
use qof_time_cmp.

Definition at line 285 of file deprecated.c.

00286 {
00287     QofTime *qta, *qtb;
00288     gint retval;
00289 
00290     qta = timespecToQofTime (*ta);
00291     qtb = timespecToQofTime (*tb);
00292     retval = qof_time_cmp (qta, qtb);
00293     qof_time_free (qta);
00294     qof_time_free (qtb);
00295     return retval;
00296 }

Timespec timespec_diff ( const Timespec ta,
const Timespec tb 
)

Deprecated:
use qof_time_diff.

Definition at line 316 of file deprecated.c.

00317 {
00318     Timespec ts;
00319     QofTime *qta, *qtb, *qt;
00320 
00321     qta = timespecToQofTime (*ta);
00322     qtb = timespecToQofTime (*tb);
00323     qt = qof_time_diff (qta, qtb);
00324     ts = qof_time_to_Timespec (qt);
00325     qof_time_free (qta);
00326     qof_time_free (qtb);
00327     qof_time_free (qt);
00328     return ts;
00329 }

gboolean timespec_equal ( const Timespec ta,
const Timespec tb 
)

Deprecated:
use qof_time_equal.

Definition at line 271 of file deprecated.c.

00272 {
00273     QofTime *qta, *qtb;
00274     gboolean retval;
00275 
00276     qta = timespecToQofTime (*ta);
00277     qtb = timespecToQofTime (*tb);
00278     retval = qof_time_equal (qta, qtb);
00279     qof_time_free (qta);
00280     qof_time_free (qtb);
00281     return retval;
00282 }

Timespec timespecCanonicalDayTime ( Timespec  t  ) 

Deprecated:
use qof_time_canonical_day_time.

Definition at line 343 of file deprecated.c.

00344 {
00345     struct tm tm, *result;
00346     Timespec retval;
00347 
00348     time_t t_secs = t.tv_sec + (t.tv_nsec / QOF_NSECS);
00349     result = localtime(&t_secs);
00350     tm = *result;
00351     gnc_tm_set_day_middle(&tm);
00352     retval.tv_sec = mktime(&tm);
00353     retval.tv_nsec = 0;
00354     return retval;
00355 }

void timespecFromTime_t ( Timespec ts,
time_t  t 
)

Deprecated:
use qof_time_from_time_t instead

Definition at line 299 of file deprecated.c.

00300 {
00301     QofTime *time;
00302 
00303     time = qof_time_new ();
00304     time = qof_time_from_time_t (t, 0);
00305     *ts = qof_time_to_Timespec (time);
00306     qof_time_free (time);
00307 }

time_t timespecToTime_t ( Timespec  ts  ) 

Deprecated:
use qof_time_to_time_t.

Definition at line 310 of file deprecated.c.

00311 {
00312     return ts.tv_sec;
00313 }

char* xaccDateUtilGetStamp ( time_t  thyme  ) 

Deprecated:
no direct replacement, use a QofDateFormat

Definition at line 684 of file deprecated.c.

00685 {
00686     struct tm *stm;
00687 
00688     stm = localtime (&thyme);
00689     return g_strdup_printf ("%04d%02d%02d%02d%02d%02d",
00690         (stm->tm_year + 1900),
00691         (stm->tm_mon + 1),
00692         stm->tm_mday, stm->tm_hour, stm->tm_min, stm->tm_sec);
00693 }

char* xaccDateUtilGetStampNow ( void   ) 

Deprecated:
use qof_time_stamp_now

Definition at line 1441 of file deprecated.c.

01442 {
01443    return qof_time_stamp_now ();
01444 }

time_t xaccDMYToSec ( gint  day,
gint  month,
gint  year 
)

Deprecated:
use qof_date_dmy_to_sec.


Generated on Fri Sep 15 14:24:57 2006 for QOF by  doxygen 1.4.7