GnuCash
2.6.99
|
Files | |
file | gnc-engine.h |
All type declarations for the whole Gnucash engine. | |
Macros | |
#define | ACCOUNT_MATCH_ALL_TYPE "account-match-all" |
#define | GNC_ID_NONE QOF_ID_NONE |
IDENTIFIERS GncGUID Identifiers can be used to reference Accounts, Transactions, Splits and other objects. These Gnucash types are referred to as Gnucash entities. GncGUID Identifiers are globally-unique and permanent, i.e., once an entity has been assigned an identifier, it retains that same identifier for its lifetime.
| |
#define | GNC_ID_BOOK QOF_ID_BOOK |
#define | GNC_ID_SESSION QOF_ID_SESSION |
#define | GNC_ID_NULL QOF_ID_NULL |
#define | GNC_ID_ACCOUNT "Account" |
#define | GNC_ID_COMMODITY "Commodity" |
#define | GNC_ID_COMMODITY_NAMESPACE "CommodityNamespace" |
#define | GNC_ID_COMMODITY_TABLE "CommodityTable" |
#define | GNC_ID_LOT "Lot" |
#define | GNC_ID_PERIOD "Period" |
#define | GNC_ID_PRICE "Price" |
#define | GNC_ID_PRICEDB "PriceDB" |
#define | GNC_ID_SPLIT "Split" |
#define | GNC_ID_BUDGET "Budget" |
#define | GNC_ID_SCHEDXACTION "SchedXaction" |
#define | GNC_ID_SXES "SchedXactions" |
#define | GNC_ID_SXTG "SXTGroup" |
#define | GNC_ID_SXTT "SXTTrans" |
#define | GNC_ID_TRANS "Trans" |
#define | GNC_INVOICE_ID "gncInvoice" |
#define | GNC_INVOICE_GUID "invoice-guid" |
#define | GNC_OWNER_ID "gncOwner" |
#define | GNC_OWNER_TYPE "owner-type" |
#define | GNC_OWNER_GUID "owner-guid" |
#define | GNC_SX_ID "sched-xaction" |
Typedefs | |
typedef struct account_s | Account |
Account in Gnucash. This is the typename for an account. The actual structure is defined in the private header AccountP.h, but no one outside the engine should include that file. Instead, access that data only through the functions in Account.h . | |
typedef struct split_s | Split |
Split in Gnucash. A "split" is more commonly referred to as a "entry" in a "transaction". Each split belongs to one Account and one Transaction. The split is one out of several parts a Transaction is divided into. More... | |
typedef struct transaction_s | Transaction |
Transaction in Gnucash. A Transaction is a piece of business done; the transfer of money from one account to one or more other accounts. Each Transaction is divided into one or more Splits (usually two). More... | |
typedef struct gnc_commodity_s | gnc_commodity |
An article that is bought and sold. A Commodity is the most general term of what an account keeps track of. Usually this is a monetary currency, but it can also be a stock share or even a precious metal. Every account keeps track of exactly one gnc_commodity. More... | |
typedef struct gnc_commodity_namespace_s | gnc_commodity_namespace |
A gnc_commodity_namespace is an collection of commodities. | |
typedef struct gnc_commodity_table_s | gnc_commodity_table |
A gnc_commodity_table is a database of commodity info. | |
typedef struct gnc_lot_s | GNCLot |
Identifies that something sold at one time was bought at another. A GNCLot provides a way of tracking physical items as they are bought and sold in different transactions. By identifying the individual, underlying physical objects, it provides the needed framework for implementing depreciation, capital gains, inventory control and invoices. More... | |
typedef struct gnc_price_s | GNCPrice |
Price of commodity on a given date. A GNCPrice encapsulates price information: the cost of a commodity expressed as a currency, on a given date. It also holds info about the provenance of the price: where it came from, its general validity. | |
typedef struct gnc_quote_source_s | gnc_quote_source |
typedef GList | AccountList |
typedef GList | LotList |
typedef GList | SplitList |
typedef GList | TransList |
typedef GList | AccountGUIDList |
typedef GList | BookGUIDList |
typedef void(* | EngineCommitErrorCallback )(gpointer data, QofBackendError errcode) |
typedef gint(* | SplitCallback )(Split *s, gpointer data) |
typedef gint(* | TransactionCallback )(Transaction *t, void *data) |
typedef void(* | gnc_engine_init_hook_t )(int, char **) |
Enumerations | |
enum | GNCPlaceholderType { PLACEHOLDER_NONE, PLACEHOLDER_THIS, PLACEHOLDER_CHILD } |
Functions | |
void | gnc_engine_init (int argc, char **argv) |
void | gnc_engine_init_static (int argc, char **argv) |
void | gnc_engine_shutdown (void) |
gboolean | gnc_engine_is_initialized (void) |
void | gnc_log_default (void) |
void | gnc_engine_add_init_hook (gnc_engine_init_hook_t hook) |
void | gnc_engine_add_commit_error_callback (EngineCommitErrorCallback cb, gpointer data) |
void | gnc_engine_signal_commit_error (QofBackendError errcode) |
Lookup Accounts and Subaccounts by name or code | |
Account * | gnc_account_lookup_by_name (const Account *parent, const char *name) |
Account * | gnc_account_lookup_by_full_name (const Account *any_account, const gchar *name) |
Account * | gnc_account_lookup_by_code (const Account *parent, const char *code) |
GNCAccountType conversion/checking | |
const char * | xaccAccountTypeEnumAsString (GNCAccountType type) |
gboolean | xaccAccountStringToType (const char *str, GNCAccountType *type) |
GNCAccountType | xaccAccountStringToEnum (const char *str) |
const char * | xaccAccountGetTypeStr (GNCAccountType type) |
guint32 | xaccParentAccountTypesCompatibleWith (GNCAccountType type) |
gboolean | xaccAccountTypesCompatible (GNCAccountType parent_type, GNCAccountType child_type) |
guint32 | xaccAccountTypesValid (void) |
gboolean | xaccAccountIsAssetLiabType (GNCAccountType t) |
gboolean | xaccAccountIsAPARType (GNCAccountType t) |
gboolean | xaccAccountIsEquityType (GNCAccountType t) |
Account split/transaction list management | |
SplitList * | xaccAccountGetSplitList (const Account *account) |
gint64 | xaccAccountCountSplits (const Account *acc, gboolean include_children) |
void | xaccAccountMoveAllSplits (Account *accfrom, Account *accto) |
gint | xaccAccountForEachTransaction (const Account *account, TransactionCallback proc, void *data) |
Transaction * | xaccAccountFindTransByDesc (const Account *account, const char *description) |
Split * | xaccAccountFindSplitByDesc (const Account *account, const char *description) |
#define | xaccAccountInsertSplit(acc, s) xaccSplitSetAccount((s), (acc)) |
Account lots | |
void | xaccAccountInsertLot (Account *, GNCLot *) |
void | xaccAccountRemoveLot (Account *, GNCLot *) |
LotList * | xaccAccountGetLotList (const Account *account) |
gpointer | xaccAccountForEachLot (const Account *acc, gpointer(*proc)(GNCLot *lot, gpointer user_data), gpointer user_data) |
LotList * | xaccAccountFindOpenLots (const Account *acc, gboolean(*match_func)(GNCLot *lot, gpointer user_data), gpointer user_data, GCompareFunc sort_func) |
Account Reconciliation information getters/setters | |
gboolean | xaccAccountGetReconcileLastDate (const Account *account, time64 *last_date) |
void | xaccAccountSetReconcileLastDate (Account *account, time64 last_date) |
gboolean | xaccAccountGetReconcileLastInterval (const Account *account, int *months, int *days) |
void | xaccAccountSetReconcileLastInterval (Account *account, int months, int days) |
gboolean | xaccAccountGetReconcilePostponeDate (const Account *account, time64 *postpone_date) |
void | xaccAccountSetReconcilePostponeDate (Account *account, time64 postpone_date) |
gboolean | xaccAccountGetReconcilePostponeBalance (const Account *account, gnc_numeric *balance) |
void | xaccAccountSetReconcilePostponeBalance (Account *account, gnc_numeric balance) |
void | xaccAccountClearReconcilePostpone (Account *account) |
Account Placeholder flag | |
gboolean | xaccAccountGetPlaceholder (const Account *account) |
void | xaccAccountSetPlaceholder (Account *account, gboolean val) |
GNCPlaceholderType | xaccAccountGetDescendantPlaceholder (const Account *account) |
Account Hidden flag | |
gboolean | xaccAccountGetHidden (const Account *acc) |
void | xaccAccountSetHidden (Account *acc, gboolean val) |
gboolean | xaccAccountIsHidden (const Account *acc) |
Account Tax related getters/setters | |
gboolean | xaccAccountGetTaxRelated (const Account *account) |
void | xaccAccountSetTaxRelated (Account *account, gboolean tax_related) |
const char * | xaccAccountGetTaxUSCode (const Account *account) |
void | xaccAccountSetTaxUSCode (Account *account, const char *code) |
const char * | xaccAccountGetTaxUSPayerNameSource (const Account *account) |
void | xaccAccountSetTaxUSPayerNameSource (Account *account, const char *source) |
gint64 | xaccAccountGetTaxUSCopyNumber (const Account *account) |
void | xaccAccountSetTaxUSCopyNumber (Account *account, gint64 copy_number) |
Account marking | |
void | xaccAccountSetMark (Account *account, short mark) |
void | xaccClearMark (Account *account, short val) |
void | xaccClearMarkDown (Account *account, short val) |
Staged Traversal | |
The following functions provide support for "staged traversals" over all of the transactions in an account or group. The idea is to be able to perform a sequence of traversals ("stages"), and perform an operation on each transaction exactly once for that stage. Only transactions whose current "stage" is less than the stage of the current traversal will be affected, and they will be "brought up" to the current stage when they are processed. For example, you could perform a stage 1 traversal of all the transactions in an account, and then perform a stage 1 traversal of the transactions in a second account. Presuming the traversal of the first account didn't abort prematurely, any transactions shared by both accounts would be ignored during the traversal of the second account since they had been processed while traversing the first account. However, if you had traversed the second account using a stage of 2, then all the transactions in the second account would have been processed. Traversal can be aborted by having the callback function return a non-zero value. The traversal is aborted immediately, and the non-zero value is returned. Note that an aborted traversal can be restarted; no information is lost due to an abort. The initial impetus for this particular approach came from generalizing a mark/sweep practice that was already being used in FileIO.c. Note that currently, there is a hard limit of 256 stages, which can be changed by enlarging "marker" in the transaction struct. | |
void | gnc_account_tree_begin_staged_transaction_traversals (Account *acc) |
void | xaccSplitsBeginStagedTransactionTraversals (SplitList *splits) |
void | xaccAccountBeginStagedTransactionTraversals (const Account *account) |
gboolean | xaccTransactionTraverse (Transaction *trans, int stage) |
int | xaccAccountStagedTransactionTraversal (const Account *a, unsigned int stage, TransactionCallback thunk, void *data) |
int | gnc_account_tree_staged_transaction_traversal (const Account *account, unsigned int stage, TransactionCallback thunk, void *data) |
int | xaccAccountTreeForEachTransaction (Account *acc, TransactionCallback proc, void *data) |
Deprecated Routines. | |
void | DxaccAccountSetCurrency (Account *account, gnc_commodity *currency) |
gnc_commodity * | DxaccAccountGetCurrency (const Account *account) |
void | dxaccAccountSetQuoteTZ (Account *account, const char *tz) |
const char * | dxaccAccountGetQuoteTZ (const Account *account) |
The GnuCash Engine provides a set of objects and classes that encapsulate typical financial accounting concepts. The GnuCash GUI is expected to manipulate these objects through the provided engine API.
#define ACCOUNT_MATCH_ALL_TYPE "account-match-all" |
#define GNC_INVOICE_ID "gncInvoice" |
STRING CONSTANTS ********************************************** Used to declare constant KVP keys used in more than one class
Definition at line 257 of file gnc-engine.h.
#define xaccAccountInsertSplit | ( | acc, | |
s | |||
) | xaccSplitSetAccount((s), (acc)) |
The xaccAccountInsertSplit() method will insert the indicated split into the indicated account. If the split already belongs to another account, it will be removed from that account first.
typedef GList AccountGUIDList |
GList of GUIDs of a Account
Definition at line 207 of file gnc-engine.h.
typedef GList AccountList |
GList of Account
Definition at line 199 of file gnc-engine.h.
typedef GList BookGUIDList |
GList of GUIDs of a QofBook
Definition at line 209 of file gnc-engine.h.
typedef struct gnc_commodity_s gnc_commodity |
An article that is bought and sold. A Commodity is the most general term of what an account keeps track of. Usually this is a monetary currency, but it can also be a stock share or even a precious metal. Every account keeps track of exactly one gnc_commodity.
(Up to version 1.6.x, we used to have currencies and securities. Now these concepts have been merged into this gnc_commodity. See the comments at xaccAccountSetCommodity() for more about that.)
This is the typename for a gnc_commodity. The actual structure is defined in a private source file. For accessing that data, only use the functions in gnc-commodity.h .
Definition at line 171 of file gnc-engine.h.
typedef void(* gnc_engine_init_hook_t)(int, char **) |
Function type for init hooks in the engine.
Definition at line 217 of file gnc-engine.h.
Identifies that something sold at one time was bought at another. A GNCLot provides a way of tracking physical items as they are bought and sold in different transactions. By identifying the individual, underlying physical objects, it provides the needed framework for implementing depreciation, capital gains, inventory control and invoices.
See the file src/doc/lots.txt for implementation overview.
Definition at line 188 of file gnc-engine.h.
typedef GList LotList |
GList of GNCLots
Definition at line 201 of file gnc-engine.h.
Split in Gnucash. A "split" is more commonly referred to as a "entry" in a "transaction". Each split belongs to one Account and one Transaction. The split is one out of several parts a Transaction is divided into.
This is the typename for a split. The actual structure is defined in the private header TransactionP.h, but no one outside the engine should include that file. Instead, access that data only through the functions in Transaction.h .
Definition at line 144 of file gnc-engine.h.
typedef GList SplitList |
GList of Split
Definition at line 203 of file gnc-engine.h.
typedef struct transaction_s Transaction |
Transaction in Gnucash. A Transaction is a piece of business done; the transfer of money from one account to one or more other accounts. Each Transaction is divided into one or more Splits (usually two).
This is the typename for a transaction. The actual structure is defined in the private header TransactionP.h, but no one outside the engine should include that file. Instead, access that data only through the functions in Transaction.h .
Definition at line 155 of file gnc-engine.h.
typedef GList TransList |
GList of Transaction
Definition at line 205 of file gnc-engine.h.
enum GNCPlaceholderType |
gnc_commodity* DxaccAccountGetCurrency | ( | const Account * | account | ) |
Definition at line 3128 of file Account.c.
const char* dxaccAccountGetQuoteTZ | ( | const Account * | account | ) |
Get the timezone to be used when interpreting the results from a given Finance::Quote backend. Unfortunately, the upstream sources don't label their output, so the user has to specify this bit.
Definition at line 4627 of file Account.c.
void DxaccAccountSetCurrency | ( | Account * | account, |
gnc_commodity * | currency | ||
) |
These two funcs take control of their gnc_commodity args. Don't free
Definition at line 2498 of file Account.c.
void dxaccAccountSetQuoteTZ | ( | Account * | account, |
const char * | tz | ||
) |
Set the timezone to be used when interpreting the results from a given Finance::Quote backend. Unfortunately, the upstream sources don't label their output, so the user has to specify this bit.
Definition at line 4607 of file Account.c.
The gnc_account_lookup_full_name() subroutine works like gnc_account_lookup_by_name, but uses the account code.
Definition at line 2836 of file Account.c.
The gnc_account_lookup_full_name() subroutine works like gnc_account_lookup_by_name, but uses fully-qualified names using the given separator.
Definition at line 2915 of file Account.c.
The gnc_account_lookup_by_name() subroutine fetches the account by name from the descendants of the specified account. The immediate children are searched first. If there is no match,, then a recursive search of all descendants is performed looking for a match.
Definition at line 2803 of file Account.c.
void gnc_account_tree_begin_staged_transaction_traversals | ( | Account * | acc | ) |
gnc_account_tree_begin_staged_transaction_traversals() resets the traversal marker inside every transactions of every account in the account tree originating with the specified node. This is done so that a new sequence of staged traversals can begin.
Definition at line 4889 of file Account.c.
int gnc_account_tree_staged_transaction_traversal | ( | const Account * | account, |
unsigned int | stage, | ||
TransactionCallback | thunk, | ||
void * | data | ||
) |
gnc_account_tree_staged_transaction_traversal() calls thunk on each transaction in the group whose current marker is less than the given stage and updates each transaction's marker to be stage. The traversal will stop if thunk returns a non-zero value. gnc_account_tree_staged_transaction_traversal() function will return zero or the non-zero value returned by thunk. This API does not handle handle recursive traversals.
Definition at line 4939 of file Account.c.
void gnc_engine_add_commit_error_callback | ( | EngineCommitErrorCallback | cb, |
gpointer | data | ||
) |
Set a callback function to be called in case an engine commit fails
Definition at line 197 of file gnc-engine.c.
void gnc_engine_add_init_hook | ( | gnc_engine_init_hook_t | hook | ) |
Pass a function pointer to gnc_engine_add_init_hook and it will be called during the evaluation of gnc_engine_init
Definition at line 173 of file gnc-engine.c.
void gnc_engine_init | ( | int | argc, |
char ** | argv | ||
) |
PROTOTYPES gnc_engine_init should be called before gnc engine functions can be used - see also qof_init for a method that does not require Guile.
Definition at line 139 of file gnc-engine.c.
void gnc_engine_init_static | ( | int | argc, |
char ** | argv | ||
) |
This is the statically linked-in version of gnc_engine_init. It is identically to that function except that it doesn't load the loadable shared module, which means this function will not load the "(gnucash engine)" scheme module.
Definition at line 147 of file gnc-engine.c.
gboolean gnc_engine_is_initialized | ( | void | ) |
check the engine is fully initialized
Definition at line 179 of file gnc-engine.c.
void gnc_engine_shutdown | ( | void | ) |
Called to shutdown the engine, see also qof_close for use without Guile.
Definition at line 160 of file gnc-engine.c.
void gnc_log_default | ( | void | ) |
enable default log modules
Definition at line 189 of file gnc-engine.c.
void xaccAccountBeginStagedTransactionTraversals | ( | const Account * | account | ) |
xaccAccountBeginStagedTransactionTraversals() resets the traversal marker for each transaction which is a parent of one of the splits in the account.
Definition at line 4851 of file Account.c.
void xaccAccountClearReconcilePostpone | ( | Account * | account | ) |
gint64 xaccAccountCountSplits | ( | const Account * | acc, |
gboolean | include_children | ||
) |
The xaccAccountCountSplits() routine returns the number of all the splits in the account.
acc | the account for which to count the splits |
include_children | also count splits in descendants (TRUE) or for this account only (FALSE). |
Definition at line 3725 of file Account.c.
LotList* xaccAccountFindOpenLots | ( | const Account * | acc, |
gboolean(*)(GNCLot *lot, gpointer user_data) | match_func, | ||
gpointer | user_data, | ||
GCompareFunc | sort_func | ||
) |
Find a list of open lots that match the match_func. Sort according to sort_func. If match_func is NULL, then all open lots are returned. If sort_func is NULL, then the returned list has no particular order. The caller must free to returned list.
Definition at line 3751 of file Account.c.
Returns a pointer to the split, not a copy.
Definition at line 4711 of file Account.c.
Transaction* xaccAccountFindTransByDesc | ( | const Account * | account, |
const char * | description | ||
) |
Returns a pointer to the transaction, not a copy.
Definition at line 4726 of file Account.c.
gpointer xaccAccountForEachLot | ( | const Account * | acc, |
gpointer(*)(GNCLot *lot, gpointer user_data) | proc, | ||
gpointer | user_data | ||
) |
The xaccAccountForEachLot() method will apply the function 'proc' to each lot in the account. If 'proc' returns a non-NULL value, further application will be stopped, and the resulting value will be returned. There is no guaranteed order over which the Lots will be traversed.
gint xaccAccountForEachTransaction | ( | const Account * | account, |
TransactionCallback | proc, | ||
void * | data | ||
) |
The xaccAccountForEachTransaction() routine will traverse all of the transactions in account and call the callback function proc on each transaction. Processing will continue if-and-only-if proc returns 0. The user data pointer data will be passed on to the callback function proc.
This function does not descend recursively to traverse transactions in child accounts.
proc will be called exactly once for each transaction that is pointed to by at least one split in the given account.
The result of this function will be 0 if and only if every relevant transaction was traversed exactly once. Else the return value is the last non-zero value returned by proc.
Definition at line 4996 of file Account.c.
GNCPlaceholderType xaccAccountGetDescendantPlaceholder | ( | const Account * | account | ) |
Returns PLACEHOLDER_NONE if account is NULL or neither account nor any descendant of account is a placeholder. If account is a placeholder, returns PLACEHOLDER_THIS. Otherwise, if any descendant of account is a placeholder, return PLACEHOLDER_CHILD.
Definition at line 3935 of file Account.c.
gboolean xaccAccountGetHidden | ( | const Account * | acc | ) |
Get the "hidden" flag for an account. If this flag is set then the account (and any children) will be hidden from the user unless they explicitly ask to see them.
acc | The account whose flag should be retrieved. |
The xaccAccountGetLotList() routine returns a list of all lots in this account.
account | The account whose lots should be returned. |
gboolean xaccAccountGetPlaceholder | ( | const Account * | account | ) |
Get the "placeholder" flag for an account. If this flag is set then the account may not be modified by the user.
account | The account whose flag should be retrieved. |
DOCUMENT ME!
Definition at line 4264 of file Account.c.
gboolean xaccAccountGetReconcileLastInterval | ( | const Account * | account, |
int * | months, | ||
int * | days | ||
) |
DOCUMENT ME!
Definition at line 4300 of file Account.c.
gboolean xaccAccountGetReconcilePostponeBalance | ( | const Account * | account, |
gnc_numeric * | balance | ||
) |
DOCUMENT ME!
Definition at line 4348 of file Account.c.
The xaccAccountGetSplitList() routine returns a pointer to a GList of the splits in the account.
Definition at line 3717 of file Account.c.
gboolean xaccAccountGetTaxRelated | ( | const Account * | account | ) |
const char* xaccAccountGetTaxUSCode | ( | const Account * | account | ) |
gint64 xaccAccountGetTaxUSCopyNumber | ( | const Account * | account | ) |
const char* xaccAccountGetTaxUSPayerNameSource | ( | const Account * | account | ) |
const char* xaccAccountGetTypeStr | ( | GNCAccountType | type | ) |
The xaccAccountGetTypeStr() routine returns a string suitable for use in the GUI/Interface. These strings should be translated to the local language.
Definition at line 4137 of file Account.c.
The xaccAccountInsertLot() method will register the indicated lot with this account. Any splits later inserted into this lot must belong to this account. If the lot is already in another account, the lot, and all of the splits in it, will be moved from that account to this account.
Definition at line 1920 of file Account.c.
gboolean xaccAccountIsAPARType | ( | GNCAccountType | t | ) |
Convenience function to check if the account is a valid business account type (meaning an Accounts Payable/Accounts Receivable).
Definition at line 4225 of file Account.c.
gboolean xaccAccountIsAssetLiabType | ( | GNCAccountType | t | ) |
Convenience function to check if the account is a valid Asset or Liability type, but not a business account type (meaning not an Accounts Payable/Accounts Receivable).
Definition at line 4212 of file Account.c.
gboolean xaccAccountIsEquityType | ( | GNCAccountType | t | ) |
Convenience function to check if the account is a valid Equity type.
Definition at line 4237 of file Account.c.
gboolean xaccAccountIsHidden | ( | const Account * | acc | ) |
Should this account be "hidden". If this flag is set for this account (or any parent account) then the account should be hidden from the user unless they explicitly ask to see it. This function is different from the xaccAccountGetHidden() function because it checks the flag in parent accounts in addition to this account.
acc | The account whose flag should be retrieved. |
Definition at line 3982 of file Account.c.
The xaccAccountMoveAllSplits() routine reassigns each of the splits in accfrom to accto.
Definition at line 1980 of file Account.c.
void xaccAccountSetHidden | ( | Account * | acc, |
gboolean | val | ||
) |
Set the "hidden" flag for an account. If this flag is set then the account (and any children) will be hidden from the user unless they explicitly ask to see them.
acc | The account whose flag should be retrieved. |
val | The new state for the account's "hidden" flag. |
Definition at line 3970 of file Account.c.
void xaccAccountSetMark | ( | Account * | account, |
short | mark | ||
) |
Set a mark on the account. The meaning of this mark is completely undefined. Its presented here as a utility for the programmer, to use as desired. Handy for performing customer traversals over the account tree. The mark is not stored in the database/file format. When accounts are newly created, the mark is set to zero.
Definition at line 1839 of file Account.c.
void xaccAccountSetPlaceholder | ( | Account * | account, |
gboolean | val | ||
) |
Set the "placeholder" flag for an account. If this flag is set then the account may not be modified by the user.
account | The account whose flag should be retrieved. |
val | The new state for the account's "placeholder" flag. |
Definition at line 3923 of file Account.c.
void xaccAccountSetReconcileLastInterval | ( | Account * | account, |
int | months, | ||
int | days | ||
) |
void xaccAccountSetReconcilePostponeBalance | ( | Account * | account, |
gnc_numeric | balance | ||
) |
void xaccAccountSetTaxRelated | ( | Account * | account, |
gboolean | tax_related | ||
) |
void xaccAccountSetTaxUSCode | ( | Account * | account, |
const char * | code | ||
) |
void xaccAccountSetTaxUSCopyNumber | ( | Account * | account, |
gint64 | copy_number | ||
) |
void xaccAccountSetTaxUSPayerNameSource | ( | Account * | account, |
const char * | source | ||
) |
int xaccAccountStagedTransactionTraversal | ( | const Account * | a, |
unsigned int | stage, | ||
TransactionCallback | thunk, | ||
void * | data | ||
) |
xaccAccountStagedTransactionTraversal() calls thunk on each transaction in account a whose current marker is less than the given stage and updates each transaction's marker to be stage. The traversal will stop if thunk returns a non-zero value. xaccAccountStagedTransactionTraversal() function will return zero or the non-zero value returned by thunk. This API does not handle handle recursive traversals.
GNCAccountType xaccAccountStringToEnum | ( | const char * | str | ) |
Conversion routines for the account types to/from strings that are used in persistent storage, communications. These strings should not be translated to the local language. Typical conversion is "INCOME" -> ACCT_TYPE_INCOME.
Definition at line 4098 of file Account.c.
gboolean xaccAccountStringToType | ( | const char * | str, |
GNCAccountType * | type | ||
) |
int xaccAccountTreeForEachTransaction | ( | Account * | acc, |
TransactionCallback | proc, | ||
void * | data | ||
) |
Traverse all of the transactions in the given account group. Continue processing IF proc returns 0. This function will descend recursively to traverse transactions in the children of the accounts in the group.
Proc will be called exactly once for each transaction that is pointed to by at least one split in any account in the hierarchy topped by the root Account acc.
The result of this function will be 0 IF every relevant transaction was traversed exactly once; otherwise, the return value is the last non-zero value returned by the callback.
Note that this routine is just a trivial wrapper for
gnc_account_tree_begin_staged_transaction_traversals(g); gnc_account_tree_staged_transaction_traversal(g, 42, proc, data);
const char* xaccAccountTypeEnumAsString | ( | GNCAccountType | type | ) |
gboolean xaccAccountTypesCompatible | ( | GNCAccountType | parent_type, |
GNCAccountType | child_type | ||
) |
Return TRUE if accounts of type parent_type can have accounts of type child_type as children.
Definition at line 4194 of file Account.c.
guint32 xaccAccountTypesValid | ( | void | ) |
Returns the bitmask of the account type enums that are valid. Deprecated and root account types are stripped.
void xaccClearMark | ( | Account * | account, |
short | val | ||
) |
void xaccClearMarkDown | ( | Account * | account, |
short | val | ||
) |
The xaccClearMarkDown will clear the mark only in this and in sub-accounts.
Definition at line 1861 of file Account.c.
guint32 xaccParentAccountTypesCompatibleWith | ( | GNCAccountType | type | ) |
Return the bitmask of parent account types compatible with a given type.
Definition at line 4147 of file Account.c.
void xaccSplitsBeginStagedTransactionTraversals | ( | SplitList * | splits | ) |
xaccSplitsBeginStagedTransactionTraversals() resets the traversal marker for each transaction which is a parent of one of the splits in the list.
Definition at line 4835 of file Account.c.
gboolean xaccTransactionTraverse | ( | Transaction * | trans, |
int | stage | ||
) |
xaccTransactionTraverse() checks the stage of the given transaction. If the transaction hasn't reached the given stage, the transaction is updated to that stage and the function returns TRUE. Otherwise no change is made and the function returns FALSE.