|
GnuCash 2.4.99
|
00001 /********************************************************************\ 00002 * SX-ttinfo.h -- Template Transaction manipulation functions * 00003 * for scheduled transactions * 00004 * Copyright (C) 2001 Robert Merkel <rgmerk@mira.net> * 00005 * * 00006 * This program is free software; you can redistribute it and/or * 00007 * modify it under the terms of the GNU General Public License as * 00008 * published by the Free Software Foundation; either version 2 of * 00009 * the License, or (at your option) any later version. * 00010 * * 00011 * This program is distributed in the hope that it will be useful, * 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00014 * GNU General Public License for more details. * 00015 * * 00016 * You should have received a copy of the GNU General Public License* 00017 * along with this program; if not, contact: * 00018 * * 00019 * Free Software Foundation Voice: +1-617-542-5942 * 00020 * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 * 00021 * Boston, MA 02110-1301, USA gnu@gnu.org * 00022 * * 00023 \********************************************************************/ 00024 00025 #ifndef GNC_SX_TTINFO_H 00026 #define GNC_SX_TTINFO_H 00027 00028 #include <glib.h> 00029 #include "qof.h" 00030 #include "SchedXaction.h" 00031 #include "Account.h" 00032 #include "gnc-commodity.h" 00033 00034 typedef struct TTInfo_s TTInfo; 00035 typedef struct TTSplitInfo_s TTSplitInfo; 00036 00037 TTInfo *gnc_ttinfo_malloc(void); 00038 00039 void gnc_ttinfo_free(TTInfo *info); 00040 00041 /* these two deep-copy their arguments */ 00042 void gnc_ttinfo_set_description(TTInfo *tti, const char *description); 00043 void gnc_ttinfo_set_num(TTInfo *tti, const char *num); 00044 00045 00046 /* this one points to a persistent pointer so ownership isn't relevant */ 00047 void gnc_ttinfo_set_currency(TTInfo *tti, gnc_commodity *common_currency); 00048 00049 00050 /* no deep copy occurs - if you want a deep copy make one yourself ! */ 00051 void gnc_ttinfo_set_template_splits(TTInfo *tti, GList *splits); 00052 00053 const char * gnc_ttinfo_get_description(TTInfo *tti); 00054 const char * gnc_ttinfo_get_num(TTInfo *tti); 00055 gnc_commodity * gnc_ttinfo_get_currency(TTInfo *tti); 00056 GList * gnc_ttinfo_get_template_splits(TTInfo *tti); 00057 00058 /* split_i IS NOT deep copied and becomes owned by TTI */ 00059 void gnc_ttinfo_append_template_split(TTInfo *tti, TTSplitInfo *split_i); 00060 00061 TTSplitInfo * gnc_ttsplitinfo_malloc(void); 00062 void gnc_ttsplitinfo_free(TTSplitInfo *split_i); 00063 00064 void gnc_ttsplitinfo_set_action(TTSplitInfo *split_i, const char *action); 00065 const char * gnc_ttsplitinfo_get_action(TTSplitInfo *split_i); 00066 00067 void gnc_ttsplitinfo_set_memo(TTSplitInfo *split_i, const char *memo); 00068 const char *gnc_ttsplitinfo_get_memo(TTSplitInfo *split_i); 00069 00070 void gnc_ttsplitinfo_set_credit_formula(TTSplitInfo *split_i, 00071 const char *credit_formula); 00072 00073 void gnc_ttsplitinfo_set_credit_formula_numeric(TTSplitInfo *split_i, 00074 gnc_numeric credit_formula); 00075 00076 const char *gnc_ttsplitinfo_get_credit_formula(TTSplitInfo *split_i); 00077 00078 void gnc_ttsplitinfo_set_debit_formula(TTSplitInfo *split_i, 00079 const char *debit_formula); 00080 00081 void gnc_ttsplitinfo_set_debit_formula_numeric(TTSplitInfo *split_i, 00082 gnc_numeric debit_formula); 00083 00084 const char *gnc_ttsplitinfo_get_debit_formula(TTSplitInfo *split_i); 00085 00086 void gnc_ttsplitinfo_set_account(TTSplitInfo *split_i, Account *acc); 00087 Account *gnc_ttsplitinfo_get_account(TTSplitInfo *split_i); 00088 00089 #endif
1.7.4