QOF: deprecated.h File Reference

QOF 0.7.5

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

Data Structures | Macros | Typedefs | Enumerations | Functions
deprecated.h File Reference

transitional header from libqof1 to libqof2 More...

`#include "qof.h"`

Go to the source code of this file.

## Data Structures
struct | query_date_def

## Macros
#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) qof_begin_edit (inst)
#define | QOF_COMMIT_EDIT_PART1(inst) qof_commit_edit (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)
#define | ENUM_LIST_DEP(_)
#define | kvp_frame KvpFrame
#define | kvp_value KvpValue
#define | kvp_value_t KvpValueType
#define | kvp_frame_set_gnc_numeric kvp_frame_set_numeric
#define | kvp_frame_set_str kvp_frame_set_string
#define | kvp_frame_add_gnc_numeric kvp_frame_add_numeric
#define | kvp_frame_add_str kvp_frame_add_string
#define | kvp_value_new_gnc_numeric kvp_value_new_numeric

## 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_def * | query_date_t
typedef struct _QofNumeric | gnc_numeric

## Enumerations
enum | GNCDateMonthFormat { GNCDATE_MONTH_NUMBER, GNCDATE_MONTH_ABBREV, GNCDATE_MONTH_NAME }
enum | QofBackendError { ERR_BACKEND_NO_ERR =0, ERR_BACKEND_NO_HANDLER, ERR_BACKEND_NO_BACKEND, ERR_BACKEND_BAD_URL, ERR_BACKEND_NO_SUCH_DB, ERR_BACKEND_CANT_CONNECT, ERR_BACKEND_CONN_LOST, ERR_BACKEND_LOCKED, ERR_BACKEND_READONLY, ERR_BACKEND_TOO_NEW, ERR_BACKEND_DATA_CORRUPT, ERR_BACKEND_SERVER_ERR, ERR_BACKEND_ALLOC, ERR_BACKEND_PERM, ERR_BACKEND_MODIFIED, ERR_BACKEND_MOD_DESTROY, ERR_BACKEND_MISC, ERR_QSF_INVALID_OBJ, ERR_QSF_INVALID_MAP, ERR_QSF_BAD_OBJ_GUID, ERR_QSF_BAD_QOF_VERSION, ERR_QSF_BAD_MAP, ERR_QSF_NO_MAP, ERR_QSF_WRONG_MAP, ERR_QSF_MAP_NOT_OBJ, ERR_QSF_OVERFLOW, ERR_QSF_OPEN_NOT_MERGE, ERR_FILEIO_FILE_BAD_READ =1000, ERR_FILEIO_FILE_EMPTY, ERR_FILEIO_FILE_LOCKERR, ERR_FILEIO_FILE_NOT_FOUND, ERR_FILEIO_FILE_TOO_OLD, ERR_FILEIO_UNKNOWN_FILE_TYPE, ERR_FILEIO_PARSE_ERROR, ERR_FILEIO_BACKUP_ERROR, ERR_FILEIO_WRITE_ERROR, ERR_FILEIO_READ_ERROR, ERR_FILEIO_NO_ENCODING, ERR_NETIO_SHORT_READ =2000, ERR_NETIO_WRONG_CONTENT_TYPE, ERR_NETIO_NOT_GNCXML, ERR_SQL_MISSING_DATA =3000, ERR_SQL_DB_TOO_OLD, ERR_SQL_DB_BUSY, ERR_RPC_HOST_UNK =4000, ERR_RPC_CANT_BIND, ERR_RPC_CANT_ACCEPT, ERR_RPC_NO_CONNECTION, ERR_RPC_BAD_VERSION, ERR_RPC_FAILED, ERR_RPC_NOT_ADDED }

## 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)
QofBookMergeData * | qof_book_mergeInit (QofBook *importBook, QofBook *targetBook)
void | qof_book_mergeRuleForeach (QofBookMergeData *mergeData, QofBookMergeRuleForeachCB callback, QofBookMergeResult mergeResult)
QofBookMergeData * | qof_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)
KvpValue * | kvp_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)
QofQueryPredData * | qof_query_date_predicate (QofQueryCompare how, QofDateMatch options, Timespec date)
gboolean | qof_query_date_predicate_get_date (QofQueryPredData *pd, Timespec *date)
QofSession * | qof_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)
KvpFrame * | gnc_kvp_bag_add (KvpFrame *pwd, const char *path, time_t secs, const char *first_name,...)
KvpFrame * | gnc_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)
gchar * | qof_util_param_as_string (QofEntity *ent, QofParam *param)
static gnc_numeric | gnc_numeric_create (gint64 num, gint64 denom)
static gnc_numeric | gnc_numeric_zero (void)
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)
static gint64 | gnc_numeric_num (gnc_numeric a)
static gint64 | gnc_numeric_denom (gnc_numeric a)
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)
static gnc_numeric | gnc_numeric_add_fixed (gnc_numeric a, gnc_numeric b)
static gnc_numeric | gnc_numeric_sub_fixed (gnc_numeric a, gnc_numeric b)
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)
QofBackend * | gncBackendInit_file (const char *book_id, void *data)
const gchar * | QofBackendErrorasString (QofBackendError n)
gboolean | qof_commit_edit_part2 (QofInstance *inst, void(*on_error)(QofInstance *, QofBackendError), void(*on_done)(QofInstance *), void(*on_free)(QofInstance *))
void | qof_session_push_error (QofSession *session, QofBackendError err, const gchar *message)
const gchar * | qof_session_get_error_message (QofSession *session)
QofErrorId | qof_session_pop_error (QofSession *session)
QofErrorId | qof_session_get_error (QofSession *session)
void | qof_backend_set_error (QofBackend *be, QofErrorId err)
QofErrorId | qof_backend_get_error (QofBackend *be)
void | qof_backend_set_message (QofBackend *be, const gchar *format,...)
gchar * | qof_backend_get_message (QofBackend *be)
gint | double_compare (gdouble d1, gdouble d2)

## Detailed Description

transitional header from libqof1 to libqof2

Definition in file deprecated.h.

## Macro Definition Documentation

#define ENUM_LIST_DEP | ( |  | _ | ) |

Deprecated:
  use QofError instead. backend errors are to be specific to the backend responsible. QofBackend itself registers some errors.

Definition at line 731 of file deprecated.h.

#define GNC_DENOM_AUTO QOF_DENOM_AUTO

Deprecated:
  use QOF_DENOM_AUTO.

Definition at line 558 of file deprecated.h.

#define GNC_DENOM_EXACT QOF_HOW_DENOM_EXACT

Deprecated:
  use QOF_HOW_DENOM_EXACT.

Definition at line 711 of file deprecated.h.

#define GNC_DENOM_FIXED QOF_HOW_DENOM_FIXED

Deprecated:
  use QOF_HOW_DENOM_FIXED.

Definition at line 717 of file deprecated.h.

#define GNC_DENOM_LCD QOF_HOW_DENOM_LCD

Deprecated:
  use QOF_HOW_DENOM_LCD.

Definition at line 715 of file deprecated.h.

#define GNC_DENOM_RECIPROCAL QOF_DENOM_RECIPROCAL

Deprecated:
  use QOF_DENOM_RECIPROCAL.

Definition at line 560 of file deprecated.h.

#define GNC_DENOM_REDUCE QOF_HOW_DENOM_REDUCE

Deprecated:
  use QOF_HOW_DENOM_REDUCE.

Definition at line 713 of file deprecated.h.

#define GNC_DENOM_SIGFIG QOF_HOW_DENOM_SIGFIG

Deprecated:
  use QOF_HOW_DENOM_SIGFIG.

Definition at line 719 of file deprecated.h.

#define GNC_DENOM_SIGFIGS | ( |  | X | ) | QOF_HOW_DENOM_SIGFIGS(X)

Deprecated:
  use QOF_HOW_DENOM_SIGFIGS.

Definition at line 721 of file deprecated.h.

#define GNC_ERROR_ARG QOF_ERROR_ARG

Deprecated:
  use QOF_ERROR_ARG.

Definition at line 548 of file deprecated.h.

#define GNC_ERROR_DENOM_DIFF QOF_ERROR_DENOM_DIFF

Deprecated:
  use QOF_ERROR_DENOM_DIFF.

Definition at line 552 of file deprecated.h.

#define GNC_ERROR_OK QOF_ERROR_OK

Deprecated:
  use QOF_ERROR_OK.

Definition at line 546 of file deprecated.h.

#define GNC_ERROR_OVERFLOW QOF_ERROR_OVERFLOW

Deprecated:
  use QOF_ERROR_OVERFLOW.

Definition at line 550 of file deprecated.h.

#define GNC_ERROR_REMAINDER QOF_ERROR_REMAINDER

Deprecated:
  use QOF_ERROR_REMAINDER.

Definition at line 554 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 532 of file deprecated.h.

#define GNC_HOW_DENOM_FIXED QOF_HOW_DENOM_FIXED

Deprecated:
  use QOF_HOW_DENOM_FIXED.

Definition at line 538 of file deprecated.h.

#define GNC_HOW_DENOM_LCD QOF_HOW_DENOM_LCD

Deprecated:
  use QOF_HOW_DENOM_LCD.

Definition at line 536 of file deprecated.h.

#define GNC_HOW_DENOM_REDUCE QOF_HOW_DENOM_REDUCE

Deprecated:
  use QOF_HOW_DENOM_REDUCE.

Definition at line 534 of file deprecated.h.

#define GNC_HOW_DENOM_SIGFIG QOF_HOW_DENOM_SIGFIG

Deprecated:
  use QOF_HOW_DENOM_SIGFIG.

Definition at line 540 of file deprecated.h.

#define GNC_HOW_DENOM_SIGFIGS QOF_HOW_DENOM_SIGFIGS

Deprecated:
  use QOF_HOW_DENOM_SIGFIGS.

Definition at line 542 of file deprecated.h.

#define GNC_HOW_GET_SIGFIGS QOF_HOW_GET_SIGFIGS

Deprecated:
  use ::QOF_HOW_GET_SIGFIGS.

Definition at line 544 of file deprecated.h.

#define GNC_HOW_RND_CEIL QOF_HOW_RND_CEIL

Deprecated:
  use QOF_HOW_RND_CEIL.

Definition at line 518 of file deprecated.h.

#define GNC_HOW_RND_FLOOR QOF_HOW_RND_FLOOR

Deprecated:
  use QOF_HOW_RND_FLOOR.

Definition at line 516 of file deprecated.h.

#define GNC_HOW_RND_NEVER QOF_HOW_RND_NEVER

Deprecated:
  use QOF_HOW_RND_NEVER.

Definition at line 530 of file deprecated.h.

#define GNC_HOW_RND_PROMOTE QOF_HOW_RND_PROMOTE

Deprecated:
  use QOF_HOW_RND_PROMOTE.

Definition at line 522 of file deprecated.h.

#define GNC_HOW_RND_ROUND QOF_HOW_RND_ROUND

Deprecated:
  use QOF_HOW_RND_ROUND.

Definition at line 528 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 524 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 526 of file deprecated.h.

#define GNC_HOW_RND_TRUNC QOF_HOW_RND_TRUNC

Deprecated:
  use QOF_HOW_RND_TRUNC.

Definition at line 520 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 512 of file deprecated.h.

#define GNC_NUMERIC_GET_SIGFIGS | ( |  | X | ) | QOF_HOW_GET_SIGFIGS(X)

Deprecated:
  use ::QOF_HOW_GET_SIGFIGS.

Definition at line 723 of file deprecated.h.

#define GNC_NUMERIC_RND_MASK QOF_NUMERIC_RND_MASK

Deprecated:
  use QOF_NUMERIC_RND_MASK.

Definition at line 510 of file deprecated.h.

#define GNC_NUMERIC_SIGFIGS_MASK QOF_NUMERIC_SIGFIGS_MASK

Deprecated:
  use ::QOF_NUMERIC_SIGFIGS_MASK.

Definition at line 514 of file deprecated.h.

#define GNC_RND_CEIL QOF_HOW_RND_CEIL

Deprecated:
  use QOF_HOW_RND_CEIL.

Definition at line 697 of file deprecated.h.

#define GNC_RND_FLOOR QOF_HOW_RND_FLOOR

Deprecated:
  use QOF_HOW_RND_FLOOR.

Definition at line 695 of file deprecated.h.

#define GNC_RND_NEVER QOF_HOW_RND_NEVER

Deprecated:
  use QOF_HOW_RND_NEVER.

Definition at line 709 of file deprecated.h.

#define GNC_RND_PROMOTE QOF_HOW_RND_PROMOTE

Deprecated:
  use QOF_HOW_RND_PROMOTE.

Definition at line 701 of file deprecated.h.

#define GNC_RND_ROUND QOF_HOW_RND_ROUND

Deprecated:
  use QOF_HOW_RND_ROUND.

Definition at line 707 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 703 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 705 of file deprecated.h.

#define GNC_RND_TRUNC QOF_HOW_RND_TRUNC

Deprecated:
  use QOF_HOW_RND_TRUNC.

Definition at line 699 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 556 of file deprecated.h.

#define kvp_frame KvpFrame

Deprecated:
  Deprecated backwards compat token

Definition at line 826 of file deprecated.h.

#define kvp_frame_add_gnc_numeric kvp_frame_add_numeric

Deprecated:
  Use kvp_frame_add_numeric instead

Definition at line 836 of file deprecated.h.

#define kvp_frame_add_str kvp_frame_add_string

Deprecated:
  Use kvp_frame_add_string instead

Definition at line 838 of file deprecated.h.

#define kvp_frame_set_gnc_numeric kvp_frame_set_numeric

Deprecated:
  Use kvp_frame_set_numeric instead.

Definition at line 832 of file deprecated.h.

#define kvp_frame_set_str kvp_frame_set_string

Deprecated:
  Use kvp_frame_set_string instead.

Definition at line 834 of file deprecated.h.

#define kvp_value KvpValue

Deprecated:
  Deprecated backwards compat token

Definition at line 828 of file deprecated.h.

#define kvp_value_new_gnc_numeric kvp_value_new_numeric

Deprecated:
  Use kvp_value_new_numeric instead

Definition at line 840 of file deprecated.h.

#define kvp_value_t KvpValueType

Deprecated:
  Deprecated backwards compat token

Definition at line 830 of file deprecated.h.

#define QOF_BEGIN_EDIT | ( |  | inst | ) | qof_begin_edit (inst)

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

Warning
  Important The only workable implementation of this deprecated routine causes a lot of unnecessary work in the backend. All users should refactor their code to check whether the incoming data is different to the existing data and avoid editing that parameter.

Definition at line 445 of file deprecated.h.

#define qof_book_get_guid | ( |  | X | ) | 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 | ) | qof_commit_edit (inst)

Deprecated:
  No replacement. See qof_commit_edit

Definition at line 460 of file deprecated.h.

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

Value:
{ \
QofBackend * be; \
\
be = qof_book_get_backend ((inst)->book); \
if (be) \
{ \
QofBackendError errcode; \
\
errcode = qof_backend_get_error (be); \
if (ERR_BACKEND_NO_ERR != errcode) \
{ \
(inst)->do_free = FALSE; \
qof_backend_set_error (be, errcode); \
(on_error)((inst), errcode); \
} \
(inst)->dirty = FALSE; \
} \
(on_done)(inst); \
\
if ((inst)->do_free) { \
(on_free)(inst); \
return; \
} \
}
qof_backend_get_error
QofErrorId qof_backend_get_error(QofBackend *be)
Definition: deprecated.c:1983
QofBackend
struct QofBackend_s QofBackend
Pseudo-object providing an interface between the framework and a persistant data store (e...
Definition: qofbackend.h:69
qof_backend_set_error
void qof_backend_set_error(QofBackend *be, QofErrorId err)
Definition: deprecated.c:1976
qof_book_get_backend
QofBackend * qof_book_get_backend(QofBook *book)
Retrieve the backend used by this book.
Definition: qofbook.c:154

Deprecated:
  No replacement.

Note
  This macro changes programme flow if the instance is freed.

Definition at line 479 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)
qof_log_check
gboolean qof_log_check(QofLogModule log_module, QofLogLevel log_level)
Definition: qoflog.c:204
qof_report_clock
void qof_report_clock(gint clockno, QofLogModule log_module, QofLogLevel log_level, const gchar *function_name, const gchar *format,...)

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)
qof_log_check
gboolean qof_log_check(QofLogModule log_module, QofLogLevel log_level)
Definition: qoflog.c:204
qof_report_clock_total
void qof_report_clock_total(gint clockno, QofLogModule log_module, QofLogLevel log_level, const gchar *function_name, const gchar *format,...)

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)
qof_log_check
gboolean qof_log_check(QofLogModule log_module, QofLogLevel log_level)
Definition: qoflog.c:204
qof_start_clock
void qof_start_clock(gint clockno, QofLogModule log_module, QofLogLevel log_level, const gchar *function_name, const gchar *format,...)

Deprecated:
  no replacement.

Definition at line 371 of file deprecated.h.

## Typedef Documentation

typedef struct _QofNumeric gnc_numeric

Deprecated:

Definition at line 508 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.

192 {
194 GNCDATE_MONTH_NUMBER,
196 GNCDATE_MONTH_ABBREV,
198 GNCDATE_MONTH_NAME
199 } GNCDateMonthFormat;
GNCDATE_MONTH_NUMBER
Definition: deprecated.h:194
GNCDateMonthFormat
GNCDateMonthFormat
Definition: deprecated.h:191
GNCDATE_MONTH_ABBREV
Definition: deprecated.h:196
GNCDATE_MONTH_NAME
Definition: deprecated.h:198

## 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 633 of file deprecated.c.

634 {
635 return g_date_get_days_in_month (tm->tm_mon + 1, tm->tm_year + 1900);
636 }

gboolean date_is_last_mday | ( | struct tm * | tm | ) |

Deprecated:
  use g_date_get_days_in_month instead.

Definition at line 639 of file deprecated.c.

640 {
641 return (tm->tm_mday ==
642 g_date_get_days_in_month (tm->tm_mon + 1, tm->tm_year + 1900));
643 }

char dateSeparator | ( | void |  | ) |

Deprecated:
  use qof_date_format_get_date_separator

Definition at line 1309 of file deprecated.c.

1310 {
1311 return qof_date_format_get_date_separator (qof_date_format_get_current());
1312 }
qof_date_format_get_current
QofDateFormat qof_date_format_get_current(void)
returns the current date format.
Definition: qofdate.c:288
qof_date_format_get_date_separator
gchar qof_date_format_get_date_separator(QofDateFormat df)
Return the field separator for the current date format.
Definition: qofdate.c:325

gint double_compare | ( | gdouble | d1,
|  | gdouble | d2
| ) |  |

Deprecated:
  use qof_util_double_compare instead.

Definition at line 2089 of file deprecated.c.

2092 {

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

Deprecated:
  use qof_numeric_from_double

Definition at line 1788 of file deprecated.c.

1789 {
1790 return qof_numeric_from_double (in, denom, how);
1791 }
qof_numeric_from_double
QofNumeric qof_numeric_from_double(gdouble in, gint64 denom, gint how)
Definition: qofnumeric.c:919

const gchar* gnc_date_dateformat_to_string | ( | QofDateFormat | format | ) |

Deprecated:
  use qof_date_format_to_name.

Definition at line 1315 of file deprecated.c.

1316 {
1317 switch (format) {
1318 case QOF_DATE_FORMAT_US:
1319 return "us";
1320 case QOF_DATE_FORMAT_UK:
1321 return "uk";
1322 case QOF_DATE_FORMAT_CE:
1323 return "ce";
1324 case QOF_DATE_FORMAT_ISO:
1325 return "iso";
1326 case QOF_DATE_FORMAT_UTC:
1327 return "utc";
1328 case QOF_DATE_FORMAT_LOCALE:
1329 return "locale";
1330 case QOF_DATE_FORMAT_CUSTOM:
1331 return "custom";
1332 default:
1333 return NULL;
1334 }
1335 }
QOF_DATE_FORMAT_UTC
#define QOF_DATE_FORMAT_UTC
QOF UTC format, xsd:date compatible. QOF_UTC_DATE_FORMAT "%Y-%m-%dT%H:%M:%SZ".
Definition: qofdate.h:277
QOF_DATE_FORMAT_ISO
#define QOF_DATE_FORMAT_ISO
Short ISO form. "%F".
Definition: qofdate.h:268
QOF_DATE_FORMAT_CE
#define QOF_DATE_FORMAT_CE
Contintental European default. "%d.%m.%Y".
Definition: qofdate.h:263
QOF_DATE_FORMAT_UK
#define QOF_DATE_FORMAT_UK
United Kingdom default. "%d/%m/%Y".
Definition: qofdate.h:258
QOF_DATE_FORMAT_LOCALE
#define QOF_DATE_FORMAT_LOCALE
GNU locale default. "%x".
Definition: qofdate.h:303
QOF_DATE_FORMAT_CUSTOM
#define QOF_DATE_FORMAT_CUSTOM
Date and time for the current locale "%c".
Definition: qofdate.h:319
QOF_DATE_FORMAT_US
#define QOF_DATE_FORMAT_US
Continental US default. "%m/%d/%Y".
Definition: qofdate.h:253

const gchar* gnc_date_monthformat_to_string | ( | GNCDateMonthFormat | format | ) |

Deprecated:
  no replacement.

Definition at line 1337 of file deprecated.c.

1338 {
1339 switch (format) {
1340 case GNCDATE_MONTH_NUMBER:
1341 return "number";
1342 case GNCDATE_MONTH_ABBREV:
1343 return "abbrev";
1344 case GNCDATE_MONTH_NAME:
1345 return "name";
1346 default:
1347 return NULL;
1348 }
1349 }
GNCDATE_MONTH_NUMBER
Definition: deprecated.h:194
GNCDATE_MONTH_ABBREV
Definition: deprecated.h:196
GNCDATE_MONTH_NAME
Definition: deprecated.h:198

int gnc_date_my_last_mday | ( | int | month,
|  | int | year
| ) |  |

Deprecated:
  use g_date_get_days_in_month instead.

Definition at line 627 of file deprecated.c.

628 {
629 return g_date_get_days_in_month (month, year);
630 }

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 216 of file deprecated.c.

218 {
219 QofDateFormat df;
220
221 df = qof_date_format_from_name (format_string);
222 if (df < 0)
223 return TRUE;
224 *format = df;
225 return FALSE;
226 }
qof_date_format_from_name
QofDateFormat qof_date_format_from_name(const gchar *name)
Returns the default date format for a known shorthand name.
Definition: qofdate.c:385
QofDateFormat
gint QofDateFormat
Definition: qofdate.h:335

gboolean gnc_date_string_to_monthformat | ( | const gchar * | format_string,
|  | GNCDateMonthFormat * | format
| ) |  |

Deprecated:
  no replacement.

Definition at line 229 of file deprecated.c.

231 {
232 if (!format_string)
233 return TRUE;
234
235 if (!strcmp (format_string, "number"))
236 *format = GNCDATE_MONTH_NUMBER;
237 else if (!strcmp (format_string, "abbrev"))
238 *format = GNCDATE_MONTH_ABBREV;
239 else if (!strcmp (format_string, "name"))
240 *format = GNCDATE_MONTH_NAME;
241 else
242 return TRUE;
243
244 return FALSE;
245 }
GNCDATE_MONTH_NUMBER
Definition: deprecated.h:194
GNCDATE_MONTH_ABBREV
Definition: deprecated.h:196
GNCDATE_MONTH_NAME
Definition: deprecated.h:198

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

Deprecated:
  use GDate instead.

Definition at line 989 of file deprecated.c.

990 {
991 Timespec ts;
992 QofTime *qt;
993 QofDate *qd;
994
995 if (!g_date_valid_dmy (day, month, year))
996 return null_timespec ();
997 qd = qof_date_new ();
998 qd->qd_mday = day;
999 qd->qd_mon = month;
1000 qd->qd_year = year;
1001 qof_date_valid (qd);
1002 qt = qof_date_to_qtime (qd);
1003 ts = qof_time_to_Timespec (qt);
1004 qof_time_free (qt);
1005 qof_date_free (qd);
1006 return ts;
1007 }
QofDate_s::qd_year
gint64 qd_year
Extended version to cope with full range of dates.
Definition: qofdate.h:181
qof_date_free
void qof_date_free(QofDate *date)
Definition: qofdate.c:608
timespec64
Definition: qoftime.h:97
qof_date_to_qtime
QofTime * qof_date_to_qtime(const QofDate *qd)
Definition: qofdate.c:892
QofDate_s
Full range replacement for struct tm.
Definition: qofdate.h:138
qof_time_free
void qof_time_free(QofTime *qt)
Free a QofTime when no longer required.
Definition: qoftime.c:56
QofDate_s::qd_mon
glong qd_mon
Signed replacement of struct tm.tm_mon.
Definition: qofdate.h:171
QofTime
struct QofTime64 QofTime
Use a 64-bit signed int QofTime.
Definition: qoftime.h:120
qof_date_new
QofDate * qof_date_new(void)
Definition: qofdate.c:573
QofDate_s::qd_mday
glong qd_mday
Signed replacement of struct tm.tm_mday.
Definition: qofdate.h:164
qof_date_valid
gboolean qof_date_valid(QofDate *date)
Validate a QofDate.
Definition: qofdate.c:616

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

Deprecated:
  use GDate instead.

Definition at line 1010 of file deprecated.c.

1011 {
1012 Timespec ts;
1013 QofTime *qt;
1014 QofDate *qd;
1015
1016 if (!g_date_valid_dmy (day, month, year))
1017 return null_timespec ();
1018 qd = qof_date_new ();
1019 qd->qd_mday = day;
1020 qd->qd_mon = month;
1021 qd->qd_year = year;
1022 qof_date_set_day_end (qd);
1023 qt = qof_date_to_qtime (qd);
1024 ts = qof_time_to_Timespec (qt);
1025 qof_time_free (qt);
1026 qof_date_free (qd);
1027 return ts;
1028 }
QofDate_s::qd_year
gint64 qd_year
Extended version to cope with full range of dates.
Definition: qofdate.h:181
qof_date_free
void qof_date_free(QofDate *date)
Definition: qofdate.c:608
timespec64
Definition: qoftime.h:97
qof_date_to_qtime
QofTime * qof_date_to_qtime(const QofDate *qd)
Definition: qofdate.c:892
QofDate_s
Full range replacement for struct tm.
Definition: qofdate.h:138
qof_time_free
void qof_time_free(QofTime *qt)
Free a QofTime when no longer required.
Definition: qoftime.c:56
QofDate_s::qd_mon
glong qd_mon
Signed replacement of struct tm.tm_mon.
Definition: qofdate.h:171
QofTime
struct QofTime64 QofTime
Use a 64-bit signed int QofTime.
Definition: qoftime.h:120
qof_date_new
QofDate * qof_date_new(void)
Definition: qofdate.c:573
QofDate_s::qd_mday
glong qd_mday
Signed replacement of struct tm.tm_mday.
Definition: qofdate.h:164

void gnc_engine_gen_event | ( | QofEntity * | entity,
|  | QofEventId | event_type
| ) |  |

Deprecated:
  use qof_event_gen instead.

Definition at line 154 of file deprecated.c.

155 {
156 qof_event_gen (entity, event_type, NULL);
157 }
qof_event_gen
void qof_event_gen(QofEntity *entity, QofEventId event_id, gpointer event_data)
Invoke all registered event handlers using the given arguments.
Definition: qofevent.c:292

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 198 of file deprecated.c.

199 {
200 return qof_util_get_string_cache ();
201 }
qof_util_get_string_cache
GCache * qof_util_get_string_cache(void)
Definition: qofutil.c:407

gint gnc_engine_register_event_handler | ( | GNCEngineEventHandler | handler,
|  | gpointer | user_data
| ) |  |

Deprecated:
  use qof_event_register_handler instead.

Definition at line 129 of file deprecated.c.

131 {
132 return qof_event_register_old_handler (handler, user_data);
133 }
qof_event_register_old_handler
gint qof_event_register_old_handler(GNCEngineEventHandler old_handler, gpointer user_data)
Definition: qofevent.c:74

void gnc_engine_resume_events | ( | void |  | ) |

Deprecated:
  use qof_event_resume instead.

Definition at line 148 of file deprecated.c.

149 {
150 qof_event_resume ();
151 }
qof_event_resume
void qof_event_resume(void)
Definition: qofevent.c:200

void gnc_engine_string_cache_destroy | ( | void |  | ) |

Deprecated:
  use qof_close instead.

Definition at line 204 of file deprecated.c.

205 {
206 qof_util_string_cache_destroy ();
207 }
qof_util_string_cache_destroy
void qof_util_string_cache_destroy(void)
Definition: qofutil.c:424

void gnc_engine_suspend_events | ( | void |  | ) |

Deprecated:
  use qof_event_suspend instead.

Definition at line 142 of file deprecated.c.

143 {
144 qof_event_suspend ();
145 }
qof_event_suspend
void qof_event_suspend(void)
Suspend all engine events.
Definition: qofevent.c:189

void gnc_engine_unregister_event_handler | ( | gint | handler_id | ) |

Deprecated:
  use qof_event_unregister_handler instead.

Definition at line 136 of file deprecated.c.

137 {
138 qof_event_unregister_handler (handler_id);
139 }
qof_event_unregister_handler
void qof_event_unregister_handler(gint handler_id)
Unregister an event handler.
Definition: qofevent.c:139

Timespec gnc_iso8601_to_timespec_gmt | ( | const gchar * |  | ) |

Deprecated:
  set QOF_DATE_FORMAT_ISO8601 and call qof_date_parse

Definition at line 1031 of file deprecated.c.

1032 {
1033 gchar buf[4];
1034 gchar *dupe;
1035 Timespec ts;
1036 struct tm stm;
1037 glong nsec = 0;
1038
1039 ts.tv_sec = 0;
1040 ts.tv_nsec = 0;
1041 if (!str)
1042 return ts;
1043 dupe = g_strdup (str);
1044 stm.tm_year = atoi (str) - 1900;
1045 str = strchr (str, '-');
1046 if (str)
1047 {
1048 str++;
1049 }
1050 else
1051 {
1052 return ts;
1053 }
1054 stm.tm_mon = atoi (str) - 1;
1055 str = strchr (str, '-');
1056 if (str)
1057 {
1058 str++;
1059 }
1060 else
1061 {
1062 return ts;
1063 }
1064 stm.tm_mday = atoi (str);
1065
1066 str = strchr (str, ' ');
1067 if (str)
1068 {
1069 str++;
1070 }
1071 else
1072 {
1073 return ts;
1074 }
1075 stm.tm_hour = atoi (str);
1076 str = strchr (str, ':');
1077 if (str)
1078 {
1079 str++;
1080 }
1081 else
1082 {
1083 return ts;
1084 }
1085 stm.tm_min = atoi (str);
1086 str = strchr (str, ':');
1087 if (str)
1088 {
1089 str++;
1090 }
1091 else
1092 {
1093 return ts;
1094 }
1095 stm.tm_sec = atoi (str);
1096
1097 if (strchr (str, '.'))
1098 {
1099 gint decimals, i, multiplier = 1000000000;
1100 str = strchr (str, '.') + 1;
1101 decimals = strcspn (str, "+- ");
1102 for (i = 0; i < decimals; i++)
1103 multiplier /= 10;
1104 nsec = atoi (str) * multiplier;
1105 }
1106 stm.tm_isdst = -1;
1107
1108 str += strcspn (str, "+-");
1109 if (str)
1110 {
1111 buf[0] = str[0];
1112 buf[1] = str[1];
1113 buf[2] = str[2];
1114 buf[3] = 0;
1115 stm.tm_hour -= atoi (buf);
1116
1117 str += 3;
1118 if ('.' == *str)
1119 str++;
1120 if (isdigit ((guchar) * str) && isdigit ((guchar) * (str + 1)))
1121 {
1122 gint cyn;
1123 if ('+' == buf[0])
1124 {
1125 cyn = -1;
1126 }
1127 else
1128 {
1129 cyn = +1;
1130 }
1131 buf[0] = str[0];
1132 buf[1] = str[1];
1133 buf[2] = str[2];
1134 buf[3] = 0;
1135 stm.tm_min += cyn * atoi (buf);
1136 }
1137 }
1138
1139 {
1140 struct tm tmp_tm;
1141 struct tm tm;
1142 glong tz;
1143 gint tz_hour;
1144 time_t secs;
1145
1146 tmp_tm = stm;
1147 tmp_tm.tm_isdst = -1;
1148
1149 secs = mktime (&tmp_tm);
1150
1151 if (secs < 0)
1152 {
1153 PWARN (" mktime failed to handle daylight saving: "
1154 "tm_hour=%d tm_year=%d tm_min=%d tm_sec=%d tm_isdst=%d for string=%s",
1155 stm.tm_hour, stm.tm_year, stm.tm_min,
1156 stm.tm_sec, stm.tm_isdst, dupe);
1157 tmp_tm.tm_hour++;
1158 secs = mktime (&tmp_tm);
1159 if (secs < 0)
1160 {
1161 tmp_tm.tm_hour -= 2;
1162 secs = mktime (&tmp_tm);
1163 }
1164 if (secs < 0)
1165 {
1166 PERR (" unable to recover from buggy mktime ");
1167 g_free (dupe);
1168 return ts;
1169 }
1170 }
1171
1172 tm = *localtime_r (&secs, &tm);
1173
1174 tz = gnc_timezone (&tmp_tm);
1175
1176 tz_hour = tz / 3600;
1177 stm.tm_hour -= tz_hour;
1178 stm.tm_min -= (tz % 3600) / 60;
1179 stm.tm_isdst = tmp_tm.tm_isdst;
1180 ts.tv_sec = mktime (&stm);
1181 /* unreachable code */
1182 /* if (ts.tv_sec < 0)
1183 {
1184 PWARN (" mktime failed to adjust calculated time:"
1185 " tm_hour=%d tm_year=%d tm_min=%d tm_sec=%d tm_isdst=%d",
1186 stm.tm_hour, stm.tm_year, stm.tm_min,
1187 stm.tm_sec, stm.tm_isdst);
1188 ts.tv_sec = secs - tz;
1189 }*/
1190 ts.tv_nsec = nsec;
1191 }
1192 g_free (dupe);
1193 return ts;
1194 }
PERR
#define PERR(format, args...)
Definition: qoflog.h:183
timespec64
Definition: qoftime.h:97
gnc_timezone
glong gnc_timezone(struct tm *tm)
Definition: deprecated.c:1249
PWARN
#define PWARN(format, args...)
Definition: qoflog.h:191

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 1664 of file deprecated.c.

1666 {
1667 QofTime *qt;
1668 KvpFrame *cwd;
1669 va_list ap;
1670
1671 qt = qof_time_from_time_t (secs, 0);
1672 va_start (ap, first_name);
1673 cwd = qof_kvp_bag_add(pwd, path, qt, first_name, ap);
1674 va_end (ap);
1675 return cwd;
1676 }
KvpFrame
struct _KvpFrame KvpFrame
Definition: kvpframe.h:74
qof_time_from_time_t
QofTime * qof_time_from_time_t(time_t t, glong nanosecs)
Definition: qoftime.c:231
qof_kvp_bag_add
KvpFrame * qof_kvp_bag_add(KvpFrame *kvp_root, const gchar *path, QofTime *qt, const gchar *first_name,...)
Definition: kvputil.c:67
QofTime
struct QofTime64 QofTime
Use a 64-bit signed int QofTime.
Definition: qoftime.h:120

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 1694 of file deprecated.c.

1696 {
1697 qof_kvp_bag_merge (kvp_into, intopath, kvp_from, frompath);
1698 }
qof_kvp_bag_merge
void qof_kvp_bag_merge(KvpFrame *kvp_into, const gchar *intopath, KvpFrame *kvp_from, const gchar *frompath)
Definition: kvputil.c:186

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

Deprecated:
  use qof_kvp_bag_remove_frame instead.

Definition at line 1687 of file deprecated.c.

1689 {
1690 qof_kvp_bag_remove_frame (root, path, fr);
1691 }
qof_kvp_bag_remove_frame
void qof_kvp_bag_remove_frame(KvpFrame *root, const gchar *path, KvpFrame *fr)
Definition: kvputil.c:119

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 92 of file deprecated.c.

93 {
94 return qof_log_prettify (name);
95 }
qof_log_prettify
const gchar * qof_log_prettify(const gchar *name)
Definition: qoflog.c:177

gchar* gnc_num_dbg_to_string | ( | gnc_numeric | n | ) |

Deprecated:
  use qof_numeric_dbg_to_string

Definition at line 1813 of file deprecated.c.

1814 {
1815 return qof_numeric_dbg_to_string (n);
1816 }
qof_numeric_dbg_to_string
gchar * qof_numeric_dbg_to_string(QofNumeric n)
Definition: qofnumeric.c:1103

gnc_numeric gnc_numeric_abs | ( | gnc_numeric | a | ) |

Deprecated:
  use qof_numeric_abs

Definition at line 1886 of file deprecated.c.

1887 {
1888 return qof_numeric_abs (a);
1889 }
qof_numeric_abs
QofNumeric qof_numeric_abs(QofNumeric a)
Definition: qofnumeric.c:650

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

Deprecated:
  use qof_numeric_add

Definition at line 1859 of file deprecated.c.

1861 {
1862 return qof_numeric_add (a, b, denom, how);
1863 }
qof_numeric_add
QofNumeric qof_numeric_add(QofNumeric a, QofNumeric b, gint64 denom, gint how)
Definition: qofnumeric.c:300

static gnc_numeric gnc_numeric_add_fixed | ( | gnc_numeric | a,
|  | gnc_numeric | b
| ) |  |
| inlinestatic

Deprecated:
  use qof_numeric_add_fixed

Definition at line 653 of file deprecated.h.

654 {
655 return qof_numeric_add (a, b, QOF_DENOM_AUTO,
656 QOF_HOW_DENOM_FIXED | QOF_HOW_RND_NEVER);
657 }
QOF_HOW_RND_NEVER
Definition: qofnumeric.h:163
qof_numeric_add
QofNumeric qof_numeric_add(QofNumeric a, QofNumeric b, gint64 denom, gint how)
Definition: qofnumeric.c:300
QOF_HOW_DENOM_FIXED
Definition: qofnumeric.h:192
QOF_DENOM_AUTO
#define QOF_DENOM_AUTO
Definition: qofnumeric.h:231

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 1891 of file deprecated.c.

1894 {
1895 return qof_numeric_add_with_error (a, b, denom, how, error);
1896 }
qof_numeric_add_with_error
QofNumeric qof_numeric_add_with_error(QofNumeric a, QofNumeric b, gint64 denom, gint how, QofNumeric *error)
Definition: qofnumeric.c:1014

QofNumericErrorCode gnc_numeric_check | ( | gnc_numeric | a | ) |

Deprecated:
  use qof_numeric_check

Definition at line 1818 of file deprecated.c.

1819 {
1820 return qof_numeric_check (a);
1821 }
qof_numeric_check
QofNumericErrorCode qof_numeric_check(QofNumeric in)
Definition: qofnumeric.c:44

gint gnc_numeric_compare | ( | gnc_numeric | a,
|  | gnc_numeric | b
| ) |  |

Deprecated:
  use qof_numeric_compare

Definition at line 1823 of file deprecated.c.

1824 {
1825 return qof_numeric_compare (a, b);
1826 }
qof_numeric_compare
gint qof_numeric_compare(QofNumeric a, QofNumeric b)
Definition: qofnumeric.c:174

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

Deprecated:
  use qof_numeric_convert

Definition at line 1920 of file deprecated.c.

1921 {
1922 return qof_numeric_convert (in, denom, how);
1923 }
qof_numeric_convert
QofNumeric qof_numeric_convert(QofNumeric in, gint64 denom, gint how)
Definition: qofnumeric.c:662

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

Deprecated:
  use qof_numeric_convert_with_error

static gnc_numeric gnc_numeric_create | ( | gint64 | num,
|  | gint64 | denom
| ) |  |
| inlinestatic

Deprecated:
  use qof_numeric_create

Definition at line 563 of file deprecated.h.

564 {
565 QofNumeric out;
566 out.num = num;
567 out.denom = denom;
568 return out;
569 }
_QofNumeric
Definition: qofnumeric.h:52

static gint64 gnc_numeric_denom | ( | gnc_numeric | a | ) |
| inlinestatic

Deprecated:
  use qof_numeric_denom

Definition at line 593 of file deprecated.h.

594 {
595 return a.denom;
596 }

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

Deprecated:
  use qof_numeric_div

Definition at line 1877 of file deprecated.c.

1879 {
1880 return qof_numeric_div (x, y, denom, how);
1881 }
qof_numeric_div
QofNumeric qof_numeric_div(QofNumeric a, QofNumeric b, gint64 denom, gint how)
Definition: qofnumeric.c:516

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 1912 of file deprecated.c.

1915 {
1916 return qof_numeric_div_with_error (a, b, denom, how, error);
1917 }
qof_numeric_div_with_error
QofNumeric qof_numeric_div_with_error(QofNumeric a, QofNumeric b, gint64 denom, gint how, QofNumeric *error)
Definition: qofnumeric.c:1071

gboolean gnc_numeric_eq | ( | gnc_numeric | a,
|  | gnc_numeric | b
| ) |  |

Deprecated:
  use qof_numeric_eq

Definition at line 1843 of file deprecated.c.

1844 {
1845 return qof_numeric_eq (a, b);
1846 }
qof_numeric_eq
gboolean qof_numeric_eq(QofNumeric a, QofNumeric b)
Definition: qofnumeric.c:223

gboolean gnc_numeric_equal | ( | gnc_numeric | a,
|  | gnc_numeric | b
| ) |  |

Deprecated:
  use qof_numeric_equal

Definition at line 1848 of file deprecated.c.

1849 {
1850 return qof_numeric_equal (a, b);
1851 }
qof_numeric_equal
gboolean qof_numeric_equal(QofNumeric a, QofNumeric b)
Definition: qofnumeric.c:233

gnc_numeric gnc_numeric_error | ( | QofNumericErrorCode | error_code | ) |

Deprecated:
  use qof_numeric_error

Definition at line 1798 of file deprecated.c.

1799 {
1800 return qof_numeric_error (error_code);
1801 }
qof_numeric_error
QofNumeric qof_numeric_error(QofNumericErrorCode error_code)
Definition: qofnumeric.c:1004

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

Deprecated:
  use qof_numeric_mul

Definition at line 1871 of file deprecated.c.

1873 {
1874 return qof_numeric_mul (a, b, denom, how);
1875 }
qof_numeric_mul
QofNumeric qof_numeric_mul(QofNumeric a, QofNumeric b, gint64 denom, gint how)
Definition: qofnumeric.c:405

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 1905 of file deprecated.c.

1908 {
1909 return qof_numeric_mul_with_error (a, b, denom, how, error);
1910 }
qof_numeric_mul_with_error
QofNumeric qof_numeric_mul_with_error(QofNumeric a, QofNumeric b, gint64 denom, gint how, QofNumeric *error)
Definition: qofnumeric.c:1052

gnc_numeric gnc_numeric_neg | ( | gnc_numeric | a | ) |

Deprecated:
  use qof_numeric_neg

Definition at line 1882 of file deprecated.c.

1883 {
1884 return qof_numeric_neg (a);
1885 }
qof_numeric_neg
QofNumeric qof_numeric_neg(QofNumeric a)
Definition: qofnumeric.c:637

gboolean gnc_numeric_negative_p | ( | gnc_numeric | a | ) |

Deprecated:
  use qof_numeric_negative_p

Definition at line 1833 of file deprecated.c.

1834 {
1835 return qof_numeric_negative_p (a);
1836 }
qof_numeric_negative_p
gboolean qof_numeric_negative_p(QofNumeric a)
Definition: qofnumeric.c:137

static gint64 gnc_numeric_num | ( | gnc_numeric | a | ) |
| inlinestatic

Deprecated:
  use qof_numeric_num

Definition at line 587 of file deprecated.h.

588 {
589 return a.num;
590 }

gboolean gnc_numeric_positive_p | ( | gnc_numeric | a | ) |

Deprecated:
  use qof_numeric_positive_p

Definition at line 1838 of file deprecated.c.

1839 {
1840 return qof_numeric_positive_p (a);
1841 }
qof_numeric_positive_p
gboolean qof_numeric_positive_p(QofNumeric a)
Definition: qofnumeric.c:155

gnc_numeric gnc_numeric_reduce | ( | gnc_numeric | in | ) |

Deprecated:
  use qof_numeric_reduce

Definition at line 1925 of file deprecated.c.

1926 {
1927 return qof_numeric_reduce (in);
1928 }
qof_numeric_reduce
QofNumeric qof_numeric_reduce(QofNumeric in)
Definition: qofnumeric.c:888

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

Deprecated:
  use qof_numeric_same

Definition at line 1853 of file deprecated.c.

1855 {
1856 return qof_numeric_same (a, b, denom, how);
1857 }
qof_numeric_same
gint qof_numeric_same(QofNumeric a, QofNumeric b, gint64 denom, gint how)
Definition: qofnumeric.c:285

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

Deprecated:
  use qof_numeric_sub

Definition at line 1865 of file deprecated.c.

1867 {
1868 return qof_numeric_sub (a, b, denom, how);
1869 }
qof_numeric_sub
QofNumeric qof_numeric_sub(QofNumeric a, QofNumeric b, gint64 denom, gint how)
Definition: qofnumeric.c:388

static gnc_numeric gnc_numeric_sub_fixed | ( | gnc_numeric | a,
|  | gnc_numeric | b
| ) |  |
| inlinestatic

Deprecated:
  use qof_numeric_sub_fixed

Definition at line 660 of file deprecated.h.

661 {
662 return gnc_numeric_sub (a, b, QOF_DENOM_AUTO,
663 QOF_HOW_DENOM_FIXED | QOF_HOW_RND_NEVER);
664 }
gnc_numeric_sub
gnc_numeric gnc_numeric_sub(gnc_numeric a, gnc_numeric b, gint64 denom, gint how)
Definition: deprecated.c:1865
QOF_HOW_RND_NEVER
Definition: qofnumeric.h:163
QOF_HOW_DENOM_FIXED
Definition: qofnumeric.h:192
QOF_DENOM_AUTO
#define QOF_DENOM_AUTO
Definition: qofnumeric.h:231

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 1898 of file deprecated.c.

1901 {
1902 return qof_numeric_sub_with_error (a, b, denom, how, error);
1903 }
qof_numeric_sub_with_error
QofNumeric qof_numeric_sub_with_error(QofNumeric a, QofNumeric b, gint64 denom, gint how, QofNumeric *error)
Definition: qofnumeric.c:1034

gdouble gnc_numeric_to_double | ( | gnc_numeric | in | ) |

Deprecated:
  use qof_numeric_to_double

Definition at line 1803 of file deprecated.c.

1804 {
1805 return qof_numeric_to_double (in);
1806 }
qof_numeric_to_double
gdouble qof_numeric_to_double(QofNumeric in)
Definition: qofnumeric.c:991

gchar* gnc_numeric_to_string | ( | gnc_numeric | n | ) |

Deprecated:
  use qof_numeric_to_string

Definition at line 1808 of file deprecated.c.

1809 {
1810 return qof_numeric_to_string (n);
1811 }
qof_numeric_to_string
gchar * qof_numeric_to_string(QofNumeric n)
Definition: qofnumeric.c:1089

static gnc_numeric gnc_numeric_zero | ( | void |  | ) |
| inlinestatic

Deprecated:
  use qof_numeric_zero

Definition at line 572 of file deprecated.h.

573 {
574 return qof_numeric_create (0, 1);
575 }
qof_numeric_create
static QofNumeric qof_numeric_create(gint64 num, gint64 denom)
Definition: qofnumeric.h:243

gboolean gnc_numeric_zero_p | ( | gnc_numeric | a | ) |

Deprecated:
  use qof_numeric_zero_p

Definition at line 1828 of file deprecated.c.

1829 {
1830 return qof_numeric_zero_p (a);
1831 }
qof_numeric_zero_p
gboolean qof_numeric_zero_p(QofNumeric a)
Definition: qofnumeric.c:119

const char* gnc_print_date | ( | Timespec | ts | ) |

Deprecated:
  use qof_date_print

Definition at line 780 of file deprecated.c.

781 {
782 static gchar buff[MAX_DATE_LENGTH];
783 QofDateFormat df;
784 QofTime *time;
785 gchar *str;
786
787 df = qof_date_format_get_current ();
788 ENTER (" using date format %d", df);
789 time = timespecToQofTime (ts);
790 str = qof_date_print (qof_date_from_qtime (time), df);
791 qof_time_free (time);
792 g_stpcpy (buff, str);
793 g_free (str);
794 LEAVE (" printing %s", buff);
795 return buff;
796 }
qof_date_from_qtime
QofDate * qof_date_from_qtime(const QofTime *qt)
Definition: qofdate.c:850
qof_date_print
gchar * qof_date_print(const QofDate *date, QofDateFormat df)
Convert a QofDate to a timestamp according to the specified date format.
Definition: qofdate.c:547
qof_date_format_get_current
QofDateFormat qof_date_format_get_current(void)
returns the current date format.
Definition: qofdate.c:288
LEAVE
#define LEAVE(format, args...)
Definition: qoflog.h:227
qof_time_free
void qof_time_free(QofTime *qt)
Free a QofTime when no longer required.
Definition: qoftime.c:56
MAX_DATE_LENGTH
#define MAX_DATE_LENGTH
The maximum length of a string used for or created by dates.
Definition: qofdate.h:87
QofDateFormat
gint QofDateFormat
Definition: qofdate.h:335
QofTime
struct QofTime64 QofTime
Use a 64-bit signed int QofTime.
Definition: qoftime.h:120
ENTER
#define ENTER(format, args...)
Definition: qoflog.h:217

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 69 of file deprecated.c.

70 {
71 qof_log_set_level (log_module, (QofLogLevel) level);
72 }
QofLogLevel
QofLogLevel
Definition: qoflog.h:58
qof_log_set_level
void qof_log_set_level(QofLogModule log_module, QofLogLevel level)
Definition: qoflog.c:96

void gnc_set_log_level_global | ( | QofLogLevel | level | ) |

Deprecated:
  use qof_log_set_level_registered instead.

Definition at line 75 of file deprecated.c.

76 {
77 qof_log_set_level_registered ((QofLogLevel) level);
78 }
QofLogLevel
QofLogLevel
Definition: qoflog.h:58
qof_log_set_level_registered
void qof_log_set_level_registered(QofLogLevel level)
Definition: qoflog.c:120

void gnc_set_logfile | ( | FILE * | outfile | ) |

Deprecated:
  use qof_log_set_file instead.

Definition at line 87 of file deprecated.c.

88 {
89 qof_log_set_file (outfile);
90 }
qof_log_set_file
void qof_log_set_file(FILE *outfile)
Definition: qoflog.c:133

gboolean gnc_should_log | ( | QofLogModule | log_module,
|  | QofLogLevel | log_level
| ) |  |

Deprecated:
  use qof_log_check instead.

Definition at line 123 of file deprecated.c.

124 {
125 return qof_log_check (log_module, log_level);
126 }
qof_log_check
gboolean qof_log_check(QofLogModule log_module, QofLogLevel log_level)
Definition: qoflog.c:204

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 192 of file deprecated.c.

193 {
194 return g_stpcpy (dest, src);
195 }

gpointer gnc_string_cache_insert | ( | gconstpointer | key | ) |

Deprecated:
  use qof_util_string_cache_insert instead.

Definition at line 186 of file deprecated.c.

187 {
188 return qof_util_string_cache_insert (key);
189 }
qof_util_string_cache_insert
gpointer qof_util_string_cache_insert(gconstpointer key)
Definition: qofutil.c:439

void gnc_string_cache_remove | ( | gconstpointer | key | ) |

Deprecated:
  use qof_util_string_cache_remove instead.

Definition at line 210 of file deprecated.c.

211 {
212 qof_util_string_cache_remove (key);
213 }
qof_util_string_cache_remove
void qof_util_string_cache_remove(gconstpointer key)
Definition: qofutil.c:432

gboolean gnc_strisnum | ( | const guchar * | s | ) |

Deprecated:
  use qof_util_string_isnum

Definition at line 1658 of file deprecated.c.

1659 {
1660 return qof_util_string_isnum (s);
1661 }
qof_util_string_isnum
gboolean qof_util_string_isnum(const guchar *s)
Definition: qofutil.c:195

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

Deprecated:
  use QofDate instead.

Definition at line 1232 of file deprecated.c.

1233 {
1234 QofTime *time;
1235 QofDate *qd;
1236
1237 time = timespecToQofTime (ts);
1238 qd = qof_date_from_qtime (time);
1239 qof_time_free (time);
1240 if (day)
1241 *day = qd->qd_mday;
1242 if (month)
1243 *month = qd->qd_mon;
1244 if ((year) && (qd->qd_year < 0) && (qd->qd_year > G_MAXINT))
1245 *year = (gint)qd->qd_year;
1246 }
QofDate_s::qd_year
gint64 qd_year
Extended version to cope with full range of dates.
Definition: qofdate.h:181
qof_date_from_qtime
QofDate * qof_date_from_qtime(const QofTime *qt)
Definition: qofdate.c:850
QofDate_s
Full range replacement for struct tm.
Definition: qofdate.h:138
qof_time_free
void qof_time_free(QofTime *qt)
Free a QofTime when no longer required.
Definition: qoftime.c:56
QofDate_s::qd_mon
glong qd_mon
Signed replacement of struct tm.tm_mon.
Definition: qofdate.h:171
QofTime
struct QofTime64 QofTime
Use a 64-bit signed int QofTime.
Definition: qoftime.h:120
QofDate_s::qd_mday
glong qd_mday
Signed replacement of struct tm.tm_mday.
Definition: qofdate.h:164

int gnc_timespec_last_mday | ( | Timespec | ts | ) |

Deprecated:
  use g_date_get_days_in_month instead.

Definition at line 646 of file deprecated.c.

647 {
648 /* Replacement code should not use localtime */
649 struct tm *result;
650 time_t t_secs = t.tv_sec + (t.tv_nsec / QOF_NSECS);
651 result = localtime (&t_secs);
652 return date_get_last_mday (result);
653 }
QOF_NSECS
#define QOF_NSECS
Definition: qoftime.h:105
date_get_last_mday
int date_get_last_mday(struct tm *tm)
Definition: deprecated.c:633

gchar* gnc_timespec_to_iso8601_buff | ( | Timespec | ts,
|  | gchar * | buff
| ) |  |

Deprecated:
  set QOF_DATE_FORMAT_ISO8601 and call qof_date_print

Definition at line 1197 of file deprecated.c.

1198 {
1199 gint len, tz_hour, tz_min;
1200 glong secs;
1201 gchar cyn;
1202 time_t tmp;
1203 struct tm parsed;
1204
1205 tmp = ts.tv_sec;
1206 localtime_r (&tmp, &parsed);
1207
1208 secs = gnc_timezone (&parsed);
1209 tz_hour = secs / 3600;
1210 tz_min = (secs % 3600) / 60;
1211
1212 cyn = '-';
1213 if (0 > tz_hour)
1214 {
1215 cyn = '+';
1216 tz_hour = -tz_hour;
1217 }
1218
1219 len = sprintf (buff, "%4d-%02d-%02d %02d:%02d:%02d.%06ld %c%02d%02d",
1220 parsed.tm_year + 1900,
1221 parsed.tm_mon + 1,
1222 parsed.tm_mday,
1223 parsed.tm_hour,
1224 parsed.tm_min,
1225 parsed.tm_sec, ts.tv_nsec / 1000, cyn, tz_hour, tz_min);
1226
1227 buff += len;
1228 return buff;
1229 }
gnc_timezone
glong gnc_timezone(struct tm *tm)
Definition: deprecated.c:1249

time_t gnc_timet_get_day_end | ( | time_t | time_val | ) |

Deprecated:
  no replacement.

Definition at line 589 of file deprecated.c.

590 {
591 struct tm tm;
592
593 gnc_tm_get_day_end (&tm, time_val);
594 return mktime (&tm);
595 }
gnc_tm_get_day_end
void gnc_tm_get_day_end(struct tm *tm, time_t time_val)
Definition: deprecated.c:573

time_t gnc_timet_get_day_end_gdate | ( | GDate * | date | ) |

Deprecated:
  no replacement

Definition at line 613 of file deprecated.c.

614 {
615 struct tm stm;
616 time_t secs;
617
618 stm.tm_year = g_date_get_year (date) - 1900;
619 stm.tm_mon = g_date_get_month (date) - 1;
620 stm.tm_mday = g_date_get_day (date);
621 gnc_tm_set_day_end (&stm);
622 secs = mktime (&stm);
623 return secs;
624 }
gnc_tm_set_day_end
void gnc_tm_set_day_end(struct tm *tm)
Definition: deprecated.c:564

time_t gnc_timet_get_day_start | ( | time_t | time_val | ) |

Deprecated:
  no replacement.

Definition at line 580 of file deprecated.c.

581 {
582 struct tm tm;
583
584 gnc_tm_get_day_start (&tm, time_val);
585 return mktime (&tm);
586 }
gnc_tm_get_day_start
void gnc_tm_get_day_start(struct tm *tm, time_t time_val)
Definition: deprecated.c:548

time_t gnc_timet_get_day_start_gdate | ( | GDate * | date | ) |

Deprecated:
  no replacement

Definition at line 599 of file deprecated.c.

600 {
601 struct tm stm;
602 time_t secs;
603
604 stm.tm_year = g_date_get_year (date) - 1900;
605 stm.tm_mon = g_date_get_month (date) - 1;
606 stm.tm_mday = g_date_get_day (date);
607 gnc_tm_set_day_start (&stm);
608 secs = mktime (&stm);
609 return secs;
610 }
gnc_tm_set_day_start
void gnc_tm_set_day_start(struct tm *tm)
Definition: deprecated.c:539

time_t gnc_timet_get_today_end | ( | void |  | ) |

Deprecated:
  no replacement.

Definition at line 677 of file deprecated.c.

678 {
679 struct tm tm;
680
681 gnc_tm_get_day_end (&tm, time (NULL));
682 return mktime (&tm);
683 }
gnc_tm_get_day_end
void gnc_tm_get_day_end(struct tm *tm, time_t time_val)
Definition: deprecated.c:573

time_t gnc_timet_get_today_start | ( | void |  | ) |

Deprecated:
  no replacement

Definition at line 668 of file deprecated.c.

669 {
670 struct tm tm;
671
672 gnc_tm_get_day_start (&tm, time (NULL));
673 return mktime (&tm);
674 }
gnc_tm_get_day_start
void gnc_tm_get_day_start(struct tm *tm, time_t time_val)
Definition: deprecated.c:548

glong gnc_timezone | ( | struct tm * | tm | ) |

Deprecated:
  no replacement

Definition at line 1249 of file deprecated.c.

1250 {
1251 g_return_val_if_fail (tm != NULL, 0);
1252
1253 return -(tm->tm_gmtoff);
1254 }

void gnc_tm_get_day_end | ( | struct tm * | tm,
|  | time_t | time_val
| ) |  |

Deprecated:
  no replacement.

Definition at line 573 of file deprecated.c.

574 {
575 tm = localtime_r (&time_val, tm);
576 gnc_tm_set_day_end (tm);
577 }
gnc_tm_set_day_end
void gnc_tm_set_day_end(struct tm *tm)
Definition: deprecated.c:564

void gnc_tm_get_day_start | ( | struct tm * | tm,
|  | time_t | time_val
| ) |  |

Deprecated:
  no replacement.

Definition at line 548 of file deprecated.c.

549 {
550 tm = localtime_r (&time_val, tm);
551 gnc_tm_set_day_start (tm);
552 }
gnc_tm_set_day_start
void gnc_tm_set_day_start(struct tm *tm)
Definition: deprecated.c:539

void gnc_tm_get_today_end | ( | struct tm * | tm | ) |

Deprecated:
  no replacement

Definition at line 662 of file deprecated.c.

663 {
664 gnc_tm_get_day_end (tm, time (NULL));
665 }
gnc_tm_get_day_end
void gnc_tm_get_day_end(struct tm *tm, time_t time_val)
Definition: deprecated.c:573

void gnc_tm_get_today_start | ( | struct tm * | tm | ) |

Deprecated:
  no replacement.

Definition at line 656 of file deprecated.c.

657 {
658 gnc_tm_get_day_start (tm, time (NULL));
659 }
gnc_tm_get_day_start
void gnc_tm_get_day_start(struct tm *tm, time_t time_val)
Definition: deprecated.c:548

void gnc_tm_set_day_end | ( | struct tm * | tm | ) |

Deprecated:
  use qof_time_set_day_end instead.

Definition at line 564 of file deprecated.c.

565 {
566 tm->tm_hour = 23;
567 tm->tm_min = 59;
568 tm->tm_sec = 59;
569 tm->tm_isdst = -1;
570 }

void gnc_tm_set_day_middle | ( | struct tm * | tm | ) |

Deprecated:
  use qof_time_set_day_middle instead.

Definition at line 555 of file deprecated.c.

556 {
557 tm->tm_hour = 12;
558 tm->tm_min = 0;
559 tm->tm_sec = 0;
560 tm->tm_isdst = -1;
561 }

void gnc_tm_set_day_start | ( | struct tm * | tm | ) |

Deprecated:
  use qof_time_set_day_start instead.

Definition at line 539 of file deprecated.c.

540 {
541 tm->tm_hour = 0;
542 tm->tm_min = 0;
543 tm->tm_sec = 0;
544 tm->tm_isdst = -1;
545 }

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 1493 of file deprecated.c.

1494 {
1495 Timespec ts;
1496 QofTime *qt;
1497 ts.tv_sec = 0;
1498 ts.tv_nsec = 0;
1499 if (!value)
1500 return ts;
1501 qt = kvp_value_get_time (value);
1502 ts = qof_time_to_Timespec (qt);
1503 return ts;
1504 }
timespec64
Definition: qoftime.h:97
QofTime
struct QofTime64 QofTime
Use a 64-bit signed int QofTime.
Definition: qoftime.h:120

KvpValue* kvp_value_new_timespec | ( | Timespec | timespec | ) |

Deprecated:
  use ::kvp_value_new_time instead.

Definition at line 1482 of file deprecated.c.

1483 {
1484 QofTime *qt;
1485 KvpValue *retval;
1486
1487 qt = timespecToQofTime (value);
1488 retval = kvp_value_new_time (qt);
1489 return retval;
1490 }
KvpValue
struct _KvpValue KvpValue
Definition: kvpframe.h:78
QofTime
struct QofTime64 QofTime
Use a 64-bit signed int QofTime.
Definition: qoftime.h:120

QofErrorId qof_backend_get_error | ( | QofBackend * | be | ) |

Deprecated:
  use qof_error_get_be instead.

Definition at line 1983 of file deprecated.c.

1984 {
1985 QofErrorId err;
1986 if (!be)
1987 return ERR_BACKEND_NO_BACKEND;
1988
1989 /* use 'stack-pop' semantics */
1990 err = be->last_err;
1991 be->last_err = ERR_BACKEND_NO_ERR;
1992 return err;
1993 }
QofErrorId
gint32 QofErrorId
The ID of this error.
Definition: qofbackend.h:54
QofBackend_s::last_err
QofErrorId last_err
Definition: qofbackend-p.h:324

gchar* qof_backend_get_message | ( | QofBackend * | be | ) |

Deprecated:
  use qof_error_get_message instead.

Note
  Unlike the deprecated function, the string returned by qof_error_get_message must NOT be freed by the caller.

Definition at line 2020 of file deprecated.c.

2021 {
2022 if (!be)
2023 return g_strdup ("ERR_BACKEND_NO_BACKEND");
2024 if (!be->error_msg)
2025 return NULL;
2026
2027 return g_strdup(qof_error_get_message_be (be));
2028 }
QofBackend_s::error_msg
gchar * error_msg
Definition: qofbackend-p.h:326
qof_error_get_message_be
const gchar * qof_error_get_message_be(QofBackend *be)
Pop the most recent error and get the message.
Definition: qoferror.c:364

void qof_backend_set_error | ( | QofBackend * | be,
|  | QofErrorId | err
| ) |  |

Deprecated:
  use qof_error_set_be instead.

Definition at line 1976 of file deprecated.c.

1977 {
1978 if (!be)
1979 return;
1980 qof_error_set_be (be, err);
1981 }

void qof_backend_set_message | ( | QofBackend * | be,
|  | const gchar * | format,
|  |  | ...
| ) |  |

Deprecated:
  use qof_error_register instead.

Definition at line 1995 of file deprecated.c.

1996 {
1997 va_list args;
1998 gchar *buffer;
1999
2000 if (!be)
2001 return;
2002
2003 /* If there's already something here, free it */
2004 if (be->error_msg)
2005 g_free (be->error_msg);
2006
2007 if (!format)
2008 {
2009 be->error_msg = NULL;
2010 return;
2011 }
2012
2013 va_start (args, format);
2014 buffer = (gchar *) g_strdup_vprintf (format, args);
2015 va_end (args);
2016
2017 be->error_msg = buffer;
2018 }
QofBackend_s::error_msg
gchar * error_msg
Definition: qofbackend-p.h:326

gboolean qof_begin_edit | ( | QofInstance * | inst | ) |

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

Warning
  Important The only workable implementation of this deprecated routine causes a lot of unnecessary work in the backend. All users should refactor their code to check whether the incoming data is different to the existing data and avoid editing that parameter.

Parameters

  inst | pointer to the instance to prepare to edit.

Definition at line 1718 of file deprecated.c.

1719 {
1720 QofIdTypeConst type;
1721 QofEntity * ent;
1722
1723 param_flag = TRUE;
1724 ent = &inst->entity;
1725 type = ent->e_type;
1726 qof_class_param_foreach (type, param_edit_cb, inst);
1727 return param_flag;
1728 }
qof_class_param_foreach
void qof_class_param_foreach(QofIdTypeConst obj_name, QofParamForeachCB cb, gpointer user_data)
Definition: qofclass.c:267
QofEntity_s
Definition: qofid.h:147
QofInstance_s::entity
QofEntity entity
Definition: qofinstance-p.h:38
QofIdTypeConst
const gchar * QofIdTypeConst
Definition: qofid.h:83

gint qof_book_mergeCommit | ( | QofBookMergeData * | mergeData | ) |

Deprecated:
  use qof_book_merge_commit instead.

Definition at line 173 of file deprecated.c.

174 {
175 return qof_book_merge_commit (mergeData);
176 }
qof_book_merge_commit
gint qof_book_merge_commit(QofBookMergeData *mergeData)
Commits the import data to the target book.
Definition: qofbookmerge.c:1164

QofBookMergeData* qof_book_mergeInit | ( | QofBook * | importBook,
|  | QofBook * | targetBook
| ) |  |

Deprecated:
  use qof_book_merge_init instead.

Definition at line 160 of file deprecated.c.

161 {
162 return qof_book_merge_init (importBook, targetBook);
163 }
qof_book_merge_init
QofBookMergeData * qof_book_merge_init(QofBook *importBook, QofBook *targetBook)
Initialise the QofBookMerge process.
Definition: qofbookmerge.c:933

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

Deprecated:
  use qof_book_merge_rule_foreach instead.

Definition at line 179 of file deprecated.c.

181 {
182 qof_book_merge_rule_foreach (mergeData, cb, mergeResult);
183 }
qof_book_merge_rule_foreach
void qof_book_merge_rule_foreach(QofBookMergeData *mergeData, QofBookMergeRuleForeachCB cb, QofBookMergeResult mergeResult)
Dialogue Control Callback.
Definition: qofbookmerge.c:1216

QofBookMergeData* qof_book_mergeUpdateResult | ( | QofBookMergeData * | mergeData,
|  | QofBookMergeResult | tag
| ) |  |

Deprecated:
  use qof_book_merge_update_result instead.

Definition at line 166 of file deprecated.c.

168 {
169 return qof_book_merge_update_result (mergeData, tag);
170 }
qof_book_merge_update_result
QofBookMergeData * qof_book_merge_update_result(QofBookMergeData *mergeData, QofBookMergeResult tag)
called by dialogue callback to set the result of user intervention
Definition: qofbookmerge.c:1132

void qof_book_set_schedxactions | ( | QofBook * | book,
|  | GList * | newList
| ) |  |

Deprecated:
  no replacement.

gboolean qof_commit_edit | ( | QofInstance * | inst | ) |

Deprecated:
  Use qof_util_param_commit instead.

Warning
  Important The only workable implementation of this deprecated routine causes a lot of unnecessary work in the backend. All users should refactor their code to check whether the incoming data is different to the existing data and avoid editing that parameter.

Parameters

  inst | pointer to the instance to commit.

Definition at line 1730 of file deprecated.c.

1731 {
1732 QofIdTypeConst type;
1733 QofEntity * ent;
1734
1735 param_flag = TRUE;
1736 ent = &inst->entity;
1737 type = ent->e_type;
1738 qof_class_param_foreach (type, param_commit_cb, inst);
1739 return param_flag;
1740 }
qof_class_param_foreach
void qof_class_param_foreach(QofIdTypeConst obj_name, QofParamForeachCB cb, gpointer user_data)
Definition: qofclass.c:267
QofEntity_s
Definition: qofid.h:147
QofInstance_s::entity
QofEntity entity
Definition: qofinstance-p.h:38
QofIdTypeConst
const gchar * QofIdTypeConst
Definition: qofid.h:83

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 1742 of file deprecated.c.

1745 {
1746 QofBackend *be;
1747
1748 ENTER (" ");
1749 /* See if there's a backend. If there is, invoke it. */
1750 be = qof_book_get_backend (inst->book);
1751 if (be && qof_backend_commit_exists(be))
1752 {
1753 QofBackendError errcode;
1754 do {
1755 errcode = qof_backend_get_error (be);
1756 } while (ERR_BACKEND_NO_ERR != errcode);
1757 qof_backend_run_commit(be, inst);
1758 errcode = qof_backend_get_error (be);
1759 if (ERR_BACKEND_NO_ERR != errcode)
1760 {
1761 inst->do_free = FALSE;
1762
1763 qof_backend_set_error (be, errcode);
1764 if (on_error)
1765 on_error (inst, errcode);
1766 LEAVE (" errcode=%d", errcode);
1767 return FALSE;
1768 }
1769 inst->dirty = FALSE;
1770 }
1771 if (inst->do_free) {
1772 LEAVE (" do_free");
1773 if (on_free)
1774 on_free(inst);
1775 return TRUE;
1776 }
1777 if (on_done)
1778 on_done(inst);
1779 LEAVE (" done");
1780 return TRUE;
1781 }
qof_backend_get_error
QofErrorId qof_backend_get_error(QofBackend *be)
Definition: deprecated.c:1983
LEAVE
#define LEAVE(format, args...)
Definition: qoflog.h:227
qof_backend_set_error
void qof_backend_set_error(QofBackend *be, QofErrorId err)
Definition: deprecated.c:1976
qof_book_get_backend
QofBackend * qof_book_get_backend(QofBook *book)
Retrieve the backend used by this book.
Definition: qofbook.c:154
QofInstance_s::book
QofBook * book
Definition: qofinstance-p.h:41
ENTER
#define ENTER(format, args...)
Definition: qoflog.h:217
QofBackend_s
Definition: qofbackend-p.h:283

gboolean qof_date_add_days | ( | Timespec * | ts,
|  | gint | days
| ) |  |

Deprecated:
  use qof_date_adddays instead.

Definition at line 1351 of file deprecated.c.

1352 {
1353 struct tm tm;
1354 time_t tt;
1355
1356 g_return_val_if_fail(ts, FALSE);
1357 tt = timespecToTime_t(*ts);
1358 #ifdef HAVE_GMTIME_R
1359 tm = *gmtime_r(&tt, &tm);
1360 #else
1361 tm = *gmtime(&tt);
1362 #endif
1363 tm.tm_mday += days;
1364 tt = mktime(&tm);
1365 if(tt < 0) { return FALSE; }
1366 timespecFromTime_t(ts, tt);
1367 return TRUE;
1368 }
timespecFromTime_t
void timespecFromTime_t(Timespec *ts, time_t t)
Definition: deprecated.c:304
timespecToTime_t
time_t timespecToTime_t(Timespec ts)
Definition: deprecated.c:315

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

Deprecated:
  use qof_date_addmonths instead.

Definition at line 1371 of file deprecated.c.

1372 {
1373 struct tm tm;
1374 time_t tt;
1375 gint new_last_mday;
1376 gboolean was_last_day;
1377
1378 g_return_val_if_fail(ts, FALSE);
1379 tt = timespecToTime_t(*ts);
1380 #ifdef HAVE_GMTIME_R
1381 tm = *gmtime_r(&tt, &tm);
1382 #else
1383 tm = *gmtime(&tt);
1384 #endif
1385 was_last_day = date_is_last_mday(&tm);
1386 tm.tm_mon += months;
1387 while (tm.tm_mon > 11) {
1388 tm.tm_mon -= 12;
1389 tm.tm_year++;
1390 }
1391 if (track_last_day) {
1392 new_last_mday = date_get_last_mday(&tm);
1393 if (was_last_day || (tm.tm_mday > new_last_mday)) {
1394 tm.tm_mday = new_last_mday;
1395 }
1396 }
1397 tt = mktime(&tm);
1398 if(tt < 0) { return FALSE; }
1399 timespecFromTime_t(ts, tt);
1400 return TRUE;
1401 }
date_is_last_mday
gboolean date_is_last_mday(struct tm *tm)
Definition: deprecated.c:639
timespecFromTime_t
void timespecFromTime_t(Timespec *ts, time_t t)
Definition: deprecated.c:304
timespecToTime_t
time_t timespecToTime_t(Timespec ts)
Definition: deprecated.c:315
date_get_last_mday
int date_get_last_mday(struct tm *tm)
Definition: deprecated.c:633

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 363 of file deprecated.c.

364 {
365 QofTime *qt;
366 QofDate *qd;
367 time_t retval;
368
369 qd = qof_date_new ();
370 qd->qd_mday = day;
371 qd->qd_mon = month;
372 qd->qd_year = year;
373 qt = qof_date_to_qtime (qd);
374 retval = qof_time_get_secs (qt);
375 qof_time_free (qt);
376 qof_date_free (qd);
377 return retval;
378 }
QofDate_s::qd_year
gint64 qd_year
Extended version to cope with full range of dates.
Definition: qofdate.h:181
qof_date_free
void qof_date_free(QofDate *date)
Definition: qofdate.c:608
qof_time_get_secs
QofTimeSecs qof_time_get_secs(const QofTime *qt)
Get the number of seconds.
Definition: qoftime.c:133
qof_date_to_qtime
QofTime * qof_date_to_qtime(const QofDate *qd)
Definition: qofdate.c:892
QofDate_s
Full range replacement for struct tm.
Definition: qofdate.h:138
qof_time_free
void qof_time_free(QofTime *qt)
Free a QofTime when no longer required.
Definition: qoftime.c:56
QofDate_s::qd_mon
glong qd_mon
Signed replacement of struct tm.tm_mon.
Definition: qofdate.h:171
QofTime
struct QofTime64 QofTime
Use a 64-bit signed int QofTime.
Definition: qoftime.h:120
qof_date_new
QofDate * qof_date_new(void)
Definition: qofdate.c:573
QofDate_s::qd_mday
glong qd_mday
Signed replacement of struct tm.tm_mday.
Definition: qofdate.h:164

QofDateFormat qof_date_format_get | ( | void |  | ) |

Deprecated:
  use qof_date_format_get_current

Definition at line 1403 of file deprecated.c.

1404 {
1405 return qof_date_format_get_current ();
1406 }
qof_date_format_get_current
QofDateFormat qof_date_format_get_current(void)
returns the current date format.
Definition: qofdate.c:288

const gchar* qof_date_format_get_string | ( | QofDateFormat | df | ) |

Deprecated:
  no direct replacement.

Definition at line 1408 of file deprecated.c.

1409 {
1410 switch(df) {
1411 case QOF_DATE_FORMAT_US:
1412 return "%m/%d/%y";
1413 case QOF_DATE_FORMAT_UK:
1414 return "%d/%m/%y";
1415 case QOF_DATE_FORMAT_CE:
1416 return "%d.%m.%y";
1417 case QOF_DATE_FORMAT_UTC:
1418 return "%Y-%m-%dT%H:%M:%SZ";
1419 case QOF_DATE_FORMAT_ISO:
1420 return "%y-%m-%d";
1421 case QOF_DATE_FORMAT_LOCALE:
1422 default:
1423 return QOF_D_FMT;
1424 };
1425 }
QOF_DATE_FORMAT_UTC
#define QOF_DATE_FORMAT_UTC
QOF UTC format, xsd:date compatible. QOF_UTC_DATE_FORMAT "%Y-%m-%dT%H:%M:%SZ".
Definition: qofdate.h:277
QOF_DATE_FORMAT_ISO
#define QOF_DATE_FORMAT_ISO
Short ISO form. "%F".
Definition: qofdate.h:268
QOF_DATE_FORMAT_CE
#define QOF_DATE_FORMAT_CE
Contintental European default. "%d.%m.%Y".
Definition: qofdate.h:263
QOF_DATE_FORMAT_UK
#define QOF_DATE_FORMAT_UK
United Kingdom default. "%d/%m/%Y".
Definition: qofdate.h:258
QOF_DATE_FORMAT_LOCALE
#define QOF_DATE_FORMAT_LOCALE
GNU locale default. "%x".
Definition: qofdate.h:303
QOF_DATE_FORMAT_US
#define QOF_DATE_FORMAT_US
Continental US default. "%m/%d/%Y".
Definition: qofdate.h:253

void qof_date_format_set | ( | QofDateFormat | df | ) |

Deprecated:
  use qof_date_format_set_current.

Definition at line 1427 of file deprecated.c.

1428 {
1429 if(!qof_date_format_set_current (df))
1430 PERR (" unable to set current format, %d", df);
1431 }
PERR
#define PERR(format, args...)
Definition: qoflog.h:183
qof_date_format_set_current
gboolean qof_date_format_set_current(QofDateFormat df)
Selects one registered date format as the current default.
Definition: qofdate.c:294

const gchar* qof_date_text_format_get_string | ( | QofDateFormat | df | ) |

Deprecated:
  use qof_date_format_get_format

Definition at line 1433 of file deprecated.c.

1434 {
1435 return qof_date_format_get_format (df);
1436 }
qof_date_format_get_format
const gchar * qof_date_format_get_format(QofDateFormat df)
Retrieve the strftime format string for a registered date format.
Definition: qofdate.c:310

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.

76 {
77 HandlerInfo *hi;
78 gint handler_id;
79
80 ENTER ("(handler=%p, data=%p)", handler, user_data);
81
82 /* sanity check */
83 if (!handler)
84 {
85 PERR ("no handler specified");
86 return 0;
87 }
88 PINFO (" deprecated handler specified");
89
90 handler_id = find_next_handler_id ();
91 /* Found one, add the handler */
92 hi = g_new0 (HandlerInfo, 1);
93
94 hi->old_handler = handler;
95 hi->user_data = user_data;
96 hi->handler_id = handler_id;
97
98 handlers = g_list_prepend (handlers, hi);
99
100 LEAVE (" (handler=%p, data=%p) handler_id=%d", handler, user_data,
101 handler_id);
102 return handler_id;
103
104 }
PERR
#define PERR(format, args...)
Definition: qoflog.h:183
PINFO
#define PINFO(format, args...)
Definition: qoflog.h:199
HandlerInfo
Definition: qofevent-p.h:31
LEAVE
#define LEAVE(format, args...)
Definition: qoflog.h:227
ENTER
#define ENTER(format, args...)
Definition: qoflog.h:217

Timespec qof_instance_get_last_update | ( | QofInstance * | inst | ) |

Deprecated:
  use ::qof_instance_set_update_time instead.

Definition at line 1257 of file deprecated.c.

1258 {
1259 Timespec ts;
1260 ts = inst->last_update;
1261 inst->update_time = timespecToQofTime (ts);
1262 return ts;
1263 }
timespec64
Definition: qoftime.h:97
QofInstance_s::update_time
QofTime * update_time
Definition: qofinstance-p.h:61

gboolean qof_is_same_day | ( | time_t | ,
|  | time_t |
| ) |  |

Deprecated:
  no replacement

Definition at line 526 of file deprecated.c.

527 {
528 struct tm lta, ltb;
529 lta = *localtime (&ta);
530 ltb = *localtime (&tb);
531 if (lta.tm_year == ltb.tm_year)
532 {
533 return (ltb.tm_yday - lta.tm_yday);
534 }
535 return (ltb.tm_year - lta.tm_year)*365; /* very approximate */
536 }

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 81 of file deprecated.c.

82 {
83 qof_log_set_level_registered ((QofLogLevel) level);
84 }
QofLogLevel
QofLogLevel
Definition: qoflog.h:58
qof_log_set_level_registered
void qof_log_set_level_registered(QofLogLevel level)
Definition: qoflog.c:120

char* qof_print_date | ( | time_t | secs | ) |

Deprecated:
  use qof_date_print

Definition at line 767 of file deprecated.c.

768 {
769 QofDateFormat df;
770 QofTime *time;
771 gchar *str;
772
773 df = qof_date_format_get_current ();
774 time = qof_time_from_time_t (t, 0);
775 str = qof_date_print (qof_date_from_qtime (time), df);
776 qof_time_free (time);
777 return str;
778 }
qof_date_from_qtime
QofDate * qof_date_from_qtime(const QofTime *qt)
Definition: qofdate.c:850
qof_date_print
gchar * qof_date_print(const QofDate *date, QofDateFormat df)
Convert a QofDate to a timestamp according to the specified date format.
Definition: qofdate.c:547
qof_time_from_time_t
QofTime * qof_time_from_time_t(time_t t, glong nanosecs)
Definition: qoftime.c:231
qof_date_format_get_current
QofDateFormat qof_date_format_get_current(void)
returns the current date format.
Definition: qofdate.c:288
qof_time_free
void qof_time_free(QofTime *qt)
Free a QofTime when no longer required.
Definition: qoftime.c:56
QofDateFormat
gint QofDateFormat
Definition: qofdate.h:335
QofTime
struct QofTime64 QofTime
Use a 64-bit signed int QofTime.
Definition: qoftime.h:120

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

Deprecated:
  no replacement.

Definition at line 739 of file deprecated.c.

740 {
741 struct tm *theTime;
742 if (!buff)
743 return 0;
744 theTime = localtime (&t);
745 return qof_print_date_dmy_buff (buff, len,
746 theTime->tm_mday, theTime->tm_mon + 1, theTime->tm_year + 1900);
747 }
qof_print_date_dmy_buff
size_t qof_print_date_dmy_buff(gchar *buff, size_t buflen, gint day, gint month, gint year)

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 451 of file deprecated.c.

452 {
453 int flen;
454 int day, month, year, hour, min, sec;
455 struct tm ltm, gtm;
456
457 if (!buff)
458 return 0;
459 ltm = *localtime (&secs);
460 day = ltm.tm_mday;
461 month = ltm.tm_mon + 1;
462 year = ltm.tm_year + 1900;
463 hour = ltm.tm_hour;
464 min = ltm.tm_min;
465 sec = ltm.tm_sec;
466 switch (qof_date_format_get_current ())
467 {
468 case QOF_DATE_FORMAT_UK:
469 flen =
470 g_snprintf (buff, len, "%2d/%2d/%-4d %2d:%02d", day, month,
471 year, hour, min);
472 break;
473 case QOF_DATE_FORMAT_CE:
474 flen =
475 g_snprintf (buff, len, "%2d.%2d.%-4d %2d:%02d", day, month,
476 year, hour, min);
477 break;
478 case QOF_DATE_FORMAT_ISO:
479 flen =
480 g_snprintf (buff, len, "%04d-%02d-%02d %02d:%02d", year, month,
481 day, hour, min);
482 break;
483 case QOF_DATE_FORMAT_UTC:
484 {
485 gtm = *gmtime (&secs);
486 flen = strftime (buff, len, QOF_UTC_DATE_FORMAT, &gtm);
487 break;
488 }
489 case QOF_DATE_FORMAT_LOCALE:
490 {
491 flen = strftime (buff, len, QOF_D_T_FMT, &ltm);
492 }
493 break;
494
495 case QOF_DATE_FORMAT_US:
496 default:
497 flen =
498 g_snprintf (buff, len, "%2d/%2d/%-4d %2d:%02d", month, day,
499 year, hour, min);
500 break;
501 }
502 return flen;
503 }
QOF_DATE_FORMAT_UTC
#define QOF_DATE_FORMAT_UTC
QOF UTC format, xsd:date compatible. QOF_UTC_DATE_FORMAT "%Y-%m-%dT%H:%M:%SZ".
Definition: qofdate.h:277
QOF_DATE_FORMAT_ISO
#define QOF_DATE_FORMAT_ISO
Short ISO form. "%F".
Definition: qofdate.h:268
QOF_UTC_DATE_FORMAT
#define QOF_UTC_DATE_FORMAT
UTC date format string.
Definition: qofdate.h:244
qof_date_format_get_current
QofDateFormat qof_date_format_get_current(void)
returns the current date format.
Definition: qofdate.c:288
QOF_DATE_FORMAT_CE
#define QOF_DATE_FORMAT_CE
Contintental European default. "%d.%m.%Y".
Definition: qofdate.h:263
QOF_DATE_FORMAT_UK
#define QOF_DATE_FORMAT_UK
United Kingdom default. "%d/%m/%Y".
Definition: qofdate.h:258
QOF_DATE_FORMAT_LOCALE
#define QOF_DATE_FORMAT_LOCALE
GNU locale default. "%x".
Definition: qofdate.h:303
QOF_DATE_FORMAT_US
#define QOF_DATE_FORMAT_US
Continental US default. "%m/%d/%Y".
Definition: qofdate.h:253

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 381 of file deprecated.c.

383 {
384 size_t flen;
385 if (0 <= secs)
386 {
387 if (show_secs)
388 {
389 flen = g_snprintf (buff, len,
390 "%02d:%02d:%02d", (int) (secs / 3600),
391 (int) ((secs % 3600) / 60), (int) (secs % 60));
392 }
393 else
394 {
395 flen = g_snprintf (buff, len,
396 "%02d:%02d", (int) (secs / 3600),
397 (int) ((secs % 3600) / 60));
398 }
399 }
400 else
401 {
402 if (show_secs)
403 {
404 flen = g_snprintf (buff, len,
405 "-%02d:%02d:%02d", (int) (-secs / 3600),
406 (int) ((-secs % 3600) / 60), (int) (-secs % 60));
407 }
408 else
409 {
410 flen = g_snprintf (buff, len,
411 "-%02d:%02d", (int) (-secs / 3600),
412 (int) ((-secs % 3600) / 60));
413 }
414 }
415 return flen;
416 }

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

Deprecated:
  no replacement.

Definition at line 419 of file deprecated.c.

421 {
422 size_t flen;
423 if (0 <= secs)
424 {
425 if (show_secs)
426 {
427 flen = g_snprintf (buff, len,
428 "%02d:%02d", (int) (secs / 60), (int) (secs % 60));
429 }
430 else
431 {
432 flen = g_snprintf (buff, len, "%02d", (int) (secs / 60));
433 }
434 }
435 else
436 {
437 if (show_secs)
438 {
439 flen = g_snprintf (buff, len,
440 "-%02d:%02d", (int) (-secs / 60), (int) (-secs % 60));
441 }
442 else
443 {
444 flen = g_snprintf (buff, len, "-%02d", (int) (-secs / 60));
445 }
446 }
447 return flen;
448 }

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 1848 of file qofquerycore.c.

1850 {
1851 query_date_t pdata;
1852
1853 pdata = g_new0 (query_date_def, 1);
1854 pdata->pd.type_name = query_date_type;
1855 pdata->pd.how = how;
1856 pdata->options = options;
1857 pdata->date = date;
1858 return ((QofQueryPredData*)pdata);
1859 }
query_date_def
Definition: deprecated.h:392
_QofQueryPredData
Definition: qofquerycore.h:138

gboolean qof_query_date_predicate_get_date | ( | QofQueryPredData * | pd,
|  | Timespec * | date
| ) |  |

Deprecated:
  use qof_query_time_predicate_get_time instead.

Definition at line 1862 of file qofquerycore.c.

1863 {
1864 query_date_t pdata = (query_date_t)pd;
1865
1866 if (pdata->pd.type_name != query_date_type)
1867 return FALSE;
1868 *date = pdata->date;
1869 return TRUE;
1870 }
query_date_def
Definition: deprecated.h:392

void qof_query_print | ( | QofQuery * | query | ) |

Deprecated:
  Do not call directly, use QofLog.

Deprecated:
  this will be private in libqof2.

Definition at line 1577 of file qofquery.c.

1578 {
1579 GList *output;
1580 GString *str;
1581 QofQuerySort *s[3];
1582 gint maxResults = 0, numSorts = 3;
1583
1584 ENTER (" ");
1585
1586 if (!query)
1587 {
1588 LEAVE ("query is (null)");
1589 return;
1590 }
1591
1592 output = NULL;
1593 str = NULL;
1594 maxResults = qof_query_get_max_results (query);
1595
1596 output = qof_query_printSearchFor (query, output);
1597 output = qof_query_printTerms (query, output);
1598
1599 qof_query_get_sorts (query, &s[0], &s[1], &s[2]);
1600
1601 if (s[0])
1602 {
1603 output = qof_query_printSorts (s, numSorts, output);
1604 }
1605
1606 str = g_string_new (" ");
1607 g_string_printf (str, "Maximum number of results: %d", maxResults);
1608 output = g_list_append (output, str);
1609
1610 qof_query_printOutput (output);
1611 LEAVE (" ");
1612 }
LEAVE
#define LEAVE(format, args...)
Definition: qoflog.h:227
ENTER
#define ENTER(format, args...)
Definition: qoflog.h:217

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 971 of file deprecated.c.

972 {
973 return qof_scan_date_internal(buff, day, month, year, dateFormat);
974 }

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 1652 of file deprecated.c.

1653 {
1654 current_session = NULL;
1655 }

QofSession* qof_session_get_current_session | ( | void |  | ) |

Deprecated:
  Each application should keep their own session context.

Definition at line 1633 of file deprecated.c.

1634 {
1635 if (!current_session)
1636 {
1637 qof_event_suspend ();
1638 current_session = qof_session_new ();
1639 qof_event_resume ();
1640 }
1641
1642 return current_session;
1643 }
qof_event_suspend
void qof_event_suspend(void)
Suspend all engine events.
Definition: qofevent.c:189
qof_event_resume
void qof_event_resume(void)
Definition: qofevent.c:200

const gchar* qof_session_get_error_message | ( | QofSession * | session | ) |

Deprecated:
  use qof_error_get_message instead but note that this clears the error from the session stack.

Definition at line 1938 of file deprecated.c.

1939 {
1940 if (!session)
1941 return "";
1942 if (!session->error_message)
1943 return "";
1944 return session->error_message;
1945 }
_QofSession::error_message
gchar * error_message
Definition: qofsession-p.h:56

QofErrorId qof_session_pop_error | ( | QofSession * | session | ) |

Deprecated:
  use qof_error_get_id or qof_error_check instead.

Definition at line 1947 of file deprecated.c.

1948 {
1949 if (!session)
1950 return QOF_FATAL;
1951 return qof_error_get_id (session);
1952 }
qof_error_get_id
QofErrorId qof_error_get_id(QofSession *session)
Alternative for applications.
Definition: qoferror.c:288
QOF_FATAL
#define QOF_FATAL
general error value
Definition: qoferror.h:131

void qof_session_push_error | ( | QofSession * | session,
|  | QofBackendError | err,
|  | const gchar * | message
| ) |  |

Deprecated:
  use qof_error_set instead.

Definition at line 1930 of file deprecated.c.

1932 {
1933 if (!session)
1934 return;
1935 qof_error_set (session, qof_error_register (message, FALSE));
1936 }
qof_error_register
QofErrorId qof_error_register(const gchar *err_message, gboolean use_file)
Generate and register a new error.
Definition: qoferror.c:91
qof_error_set
void qof_error_set(QofSession *session, QofErrorId error)
Add an error to the stack for this session.
Definition: qoferror.c:133

void qof_session_set_current_session | ( | QofSession * | session | ) |

Deprecated:
  Each application should keep their own session context.

Definition at line 1646 of file deprecated.c.

1647 {
1648 current_session = session;
1649 }

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 407 of file qofutil.c.

409 {
410 if (!qof_string_cache)
411 {
412 qof_string_cache = g_cache_new ((GCacheNewFunc) g_strdup, /* value_new_func */
413 g_free, /* value_destroy_func */
414 (GCacheDupFunc) g_strdup, /* key_dup_func */
415 g_free, /* key_destroy_func */
416 g_str_hash, /* hash_key_func */
417 g_str_hash, /* hash_value_func */
418 g_str_equal); /* key_equal_func */
419 }
420 return qof_string_cache;
421 }

gchar* qof_util_param_as_string | ( | QofEntity * | ent,
|  | QofParam * | param
| ) |  |

Deprecated:
  use qof_util_param_to_string instead.

Definition at line 1783 of file deprecated.c.

1784 {
1785 return qof_util_param_to_string (ent, param);
1786 }
qof_util_param_to_string
gchar * qof_util_param_to_string(QofEntity *ent, const QofParam *param)
Converts a parameter to a string for storage or display.
Definition: qofutil.c:447

gboolean string_to_gnc_numeric | ( | const gchar * | str,
|  | gnc_numeric * | n
| ) |  |

Deprecated:
  use qof_numeric_from_string

Definition at line 1793 of file deprecated.c.

1794 {
1795 return qof_numeric_from_string (str, n);
1796 }
qof_numeric_from_string
gboolean qof_numeric_from_string(const gchar *str, QofNumeric *n)
Definition: qofnumeric.c:1121

Timespec timespec_abs | ( | const Timespec * | t | ) |

Deprecated:
  use qof_time_abs.

Definition at line 337 of file deprecated.c.

338 {
339 Timespec ts;
340 QofTime *qt = timespecToQofTime (*t);
341 qof_time_abs (qt);
342 ts = qof_time_to_Timespec (qt);
343 qof_time_free (qt);
344 return ts;
345 }
qof_time_abs
QofTime * qof_time_abs(QofTime *qt)
Definition: qoftime.c:196
timespec64
Definition: qoftime.h:97
qof_time_free
void qof_time_free(QofTime *qt)
Free a QofTime when no longer required.
Definition: qoftime.c:56
QofTime
struct QofTime64 QofTime
Use a 64-bit signed int QofTime.
Definition: qoftime.h:120

gint timespec_cmp | ( | const Timespec * | ta,
|  | const Timespec * | tb
| ) |  |

Deprecated:
  use qof_time_cmp.

Definition at line 290 of file deprecated.c.

291 {
292 QofTime *qta, *qtb;
293 gint retval;
294
295 qta = timespecToQofTime (*ta);
296 qtb = timespecToQofTime (*tb);
297 retval = qof_time_cmp (qta, qtb);
298 qof_time_free (qta);
299 qof_time_free (qtb);
300 return retval;
301 }
qof_time_free
void qof_time_free(QofTime *qt)
Free a QofTime when no longer required.
Definition: qoftime.c:56
qof_time_cmp
gint qof_time_cmp(const QofTime *ta, const QofTime *tb)
Definition: qoftime.c:165
QofTime
struct QofTime64 QofTime
Use a 64-bit signed int QofTime.
Definition: qoftime.h:120

Timespec timespec_diff | ( | const Timespec * | ta,
|  | const Timespec * | tb
| ) |  |

Deprecated:
  use qof_time_diff.

Definition at line 321 of file deprecated.c.

322 {
323 Timespec ts;
324 QofTime *qta, *qtb, *qt;
325
326 qta = timespecToQofTime (*ta);
327 qtb = timespecToQofTime (*tb);
328 qt = qof_time_diff (qta, qtb);
329 ts = qof_time_to_Timespec (qt);
330 qof_time_free (qta);
331 qof_time_free (qtb);
332 qof_time_free (qt);
333 return ts;
334 }
timespec64
Definition: qoftime.h:97
qof_time_free
void qof_time_free(QofTime *qt)
Free a QofTime when no longer required.
Definition: qoftime.c:56
QofTime
struct QofTime64 QofTime
Use a 64-bit signed int QofTime.
Definition: qoftime.h:120
qof_time_diff
QofTime * qof_time_diff(const QofTime *ta, const QofTime *tb)
difference between two QofTimes.
Definition: qoftime.c:182

gboolean timespec_equal | ( | const Timespec * | ta,
|  | const Timespec * | tb
| ) |  |

Deprecated:
  use qof_time_equal.

Definition at line 276 of file deprecated.c.

277 {
278 QofTime *qta, *qtb;
279 gboolean retval;
280
281 qta = timespecToQofTime (*ta);
282 qtb = timespecToQofTime (*tb);
283 retval = qof_time_equal (qta, qtb);
284 qof_time_free (qta);
285 qof_time_free (qtb);
286 return retval;
287 }
qof_time_free
void qof_time_free(QofTime *qt)
Free a QofTime when no longer required.
Definition: qoftime.c:56
qof_time_equal
gboolean qof_time_equal(const QofTime *ta, const QofTime *tb)
Definition: qoftime.c:148
QofTime
struct QofTime64 QofTime
Use a 64-bit signed int QofTime.
Definition: qoftime.h:120

Timespec timespecCanonicalDayTime | ( | Timespec | t | ) |

Deprecated:
  use ::qof_time_canonical_day_time.

Definition at line 348 of file deprecated.c.

349 {
350 struct tm tm, *result;
351 Timespec retval;
352
353 time_t t_secs = t.tv_sec + (t.tv_nsec / QOF_NSECS);
354 result = localtime(&t_secs);
355 tm = *result;
356 gnc_tm_set_day_middle(&tm);
357 retval.tv_sec = mktime(&tm);
358 retval.tv_nsec = 0;
359 return retval;
360 }
QOF_NSECS
#define QOF_NSECS
Definition: qoftime.h:105
timespec64
Definition: qoftime.h:97
gnc_tm_set_day_middle
void gnc_tm_set_day_middle(struct tm *tm)
Definition: deprecated.c:555

void timespecFromTime_t | ( | Timespec * | ts,
|  | time_t | t
| ) |  |

Deprecated:
  use qof_time_from_time_t instead

Definition at line 304 of file deprecated.c.

305 {
306 QofTime *time;
307
308 time = qof_time_new ();
309 time = qof_time_from_time_t (t, 0);
310 *ts = qof_time_to_Timespec (time);
311 qof_time_free (time);
312 }
qof_time_new
QofTime * qof_time_new(void)
create an empty QofTime
Definition: qoftime.c:46
qof_time_from_time_t
QofTime * qof_time_from_time_t(time_t t, glong nanosecs)
Definition: qoftime.c:231
qof_time_free
void qof_time_free(QofTime *qt)
Free a QofTime when no longer required.
Definition: qoftime.c:56
QofTime
struct QofTime64 QofTime
Use a 64-bit signed int QofTime.
Definition: qoftime.h:120

time_t timespecToTime_t | ( | Timespec | ts | ) |

Deprecated:
  use qof_time_to_time_t.

Definition at line 315 of file deprecated.c.

316 {
317 return ts.tv_sec;
318 }

char* xaccDateUtilGetStamp | ( | time_t | thyme | ) |

Deprecated:
  no direct replacement, use a QofDateFormat

Definition at line 686 of file deprecated.c.

687 {
688 struct tm *stm;
689
690 stm = localtime (&thyme);
691 return g_strdup_printf ("%04d%02d%02d%02d%02d%02d",
692 (stm->tm_year + 1900),
693 (stm->tm_mon + 1),
694 stm->tm_mday, stm->tm_hour, stm->tm_min, stm->tm_sec);
695 }

char* xaccDateUtilGetStampNow | ( | void |  | ) |

Deprecated:
  use qof_time_stamp_now

Definition at line 1439 of file deprecated.c.

1440 {
1441 return qof_time_stamp_now ();
1442 }
qof_time_stamp_now
gchar * qof_time_stamp_now(void)
Definition: qoftime.c:469

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

Deprecated:
  use qof_date_dmy_to_sec.