Files | |
file | FreqSpec.h |
Period / Date Frequency Specification. | |
Typedefs | |
typedef enum gncp_FreqType | FreqType |
typedef enum gncp_UIFreqType | UIFreqType |
typedef gncp_freq_spec | FreqSpec |
Enumerations | |
enum | gncp_FreqType { INVALID, ONCE, DAILY, WEEKLY, MONTHLY, MONTH_RELATIVE, COMPOSITE } |
enum | gncp_UIFreqType { UIFREQ_NONE, UIFREQ_ONCE, UIFREQ_DAILY, UIFREQ_DAILY_MF, UIFREQ_WEEKLY, UIFREQ_BI_WEEKLY, UIFREQ_SEMI_MONTHLY, UIFREQ_MONTHLY, UIFREQ_QUARTERLY, UIFREQ_TRI_ANUALLY, UIFREQ_SEMI_YEARLY, UIFREQ_YEARLY, UIFREQ_NUM_UI_FREQSPECS } |
Functions | |
FreqSpec * | xaccFreqSpecMalloc (QofBook *book) |
void | xaccFreqSpecCleanUp (FreqSpec *fs) |
void | xaccFreqSpecFree (FreqSpec *fs) |
FreqType | xaccFreqSpecGetType (FreqSpec *fs) |
void | xaccFreqSpecSetUIType (FreqSpec *fs, UIFreqType newUIFreqType) |
UIFreqType | xaccFreqSpecGetUIType (FreqSpec *fs) |
void | xaccFreqSpecSetNone (FreqSpec *fs) |
void | xaccFreqSpecSetOnceDate (FreqSpec *fs, const GDate *when) |
void | xaccFreqSpecSetDaily (FreqSpec *fs, const GDate *initial_date, guint interval_days) |
void | xaccFreqSpecSetWeekly (FreqSpec *fs, const GDate *inital_date, guint interval_weeks) |
void | xaccFreqSpecSetMonthly (FreqSpec *fs, const GDate *inital_date, guint interval_months) |
void | xaccFreqSpecSetMonthRelative (FreqSpec *fs, const GDate *inital_date, guint interval_months) |
void | xaccFreqSpecSetComposite (FreqSpec *fs) |
void | xaccFreqSpecGetFreqStr (FreqSpec *fs, GString *str) |
int | xaccFreqSpecGetOnce (FreqSpec *fs, GDate *outGD) |
int | xaccFreqSpecGetDaily (FreqSpec *fs, int *outRepeat) |
int | xaccFreqSpecGetWeekly (FreqSpec *fs, int *outRepeat, int *outDayOfWeek) |
int | xaccFreqSpecGetMonthly (FreqSpec *fs, int *outRepeat, int *outDayOfMonth, int *outMonthOffset) |
GList * | xaccFreqSpecCompositeGet (FreqSpec *fs) |
void | xaccFreqSpecCompositeAdd (FreqSpec *fs, FreqSpec *fsToAdd) |
void | xaccFreqSpecGetNextInstance (FreqSpec *fs, const GDate *in_date, GDate *out_date) |
int | gnc_freq_spec_compare (FreqSpec *a, FreqSpec *b) |
|
Frequency specification. |
|
The user's conception of the frequency. It is expected that this list will grow, while the former [FreqType] will not. Ideally this is not here, but what can you do? |
|
Frequency specification. |
|
The user's conception of the frequency. It is expected that this list will grow, while the former [FreqType] will not. Ideally this is not here, but what can you do? |
|
qsort-style comparison of FreqSpecs. More frequently-occuring FreqSpecs are sorted before less-frequent FreqSpecs. FIXME: What to do for composites? |
|
destroys any private data belonging to the FreqSpec. Use this for a stack object. |
|
Adds a FreqSpec to the list in a COMPOSITE FreqSpec; if the FreqSpec is not COMPOSITE, this is an assertion failure. |
|
Returns the list of FreqSpecs in a COMPOSITE FreqSpec. It is an error to use this if the type is not COMPOSITE. The caller should not modify this list; only add/remove composites and use this fn to get the perhaps-changed list head. |
|
Frees a heap allocated FreqSpec. This is the opposite of xaccFreqSpecMalloc(). |
|
DOCUMENT ME! |
|
Returns a human-readable string of the Frequency. This uses UIFreqType to unroll the internal structure. It is an assertion failure if the FreqSpec data doesn't match the UIFreqType. Caller allocates the GString [natch]. |
|
DOCUMENT ME! |
|
Computes the next instance of the FreqSpec after a given input date. The object pointed at by 'out_date' is set to the computed value. The 'in_date' can be any date. It is gaurenteed that the 'out_date' is strictly greater than the 'in_date'. That is, if the 'in_date' happens to be a repeat date (e.g. a previous out_date), then the out_date will be the next repeat date after that. |
|
DOCUMENT ME! |
|
Gets the type of a FreqSpec. |
|
Returns the frequency part of the FreqSpec, specifically, one of the 'user-interface' enumerants. |
|
DOCUMENT ME! |
|
Allocates memory for a FreqSpec and initializes it. |
|
Sets the type to COMPOSITE. Disposes of any previous data. You must Add some repeats to the composite before using it for repeating. |
|
Sets the type to DAILY. Disposes of any previous data. Uses the start date to figure out how many days after epoch (1/1/1900) this repeat would have first occurred on if it had been running back then. This is used later to figure out absolute repeat dates. |
|
Sets the type to MONTHLY. Disposes of any previous data. Uses the inital date to figure out the day of the month to use. |
|
Sets the type to MONTH_RELATIVE. Disposes of any previous data. Uses the inital date to figure out the day of the month to use. |
|
Sets the type to once-off, and initialises the date it occurs on. Disposes of any previous data. |
|
Sets the type of a FreqSpec. Setting the type re-initializes any spec-data; this means destroying any sub-types in the case of COMPOSITE.
|
|
Sets the type to WEEKLY. Disposes of any previous data. Uses the inital date to figure out the day of the week to use. |