mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
more data hiding stuff
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@677 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
2afb8e10cf
commit
104624b473
@ -23,6 +23,8 @@
|
||||
* Huntington Beach, CA 92648-4632 *
|
||||
\********************************************************************/
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "Account.h"
|
||||
@ -623,6 +625,40 @@ xaccConsolidateTransactions (Account * acc)
|
||||
/********************************************************************\
|
||||
\********************************************************************/
|
||||
|
||||
void
|
||||
xaccAccountSetType (Account *acc, int tip)
|
||||
{
|
||||
if (!acc) return;
|
||||
acc->type = tip;
|
||||
}
|
||||
|
||||
void
|
||||
xaccAccountSetName (Account *acc, char *str)
|
||||
{
|
||||
if (!acc) return;
|
||||
if (acc->accountName) free (acc->accountName);
|
||||
acc->accountName = strdup (str);
|
||||
}
|
||||
|
||||
void
|
||||
xaccAccountSetDescription (Account *acc, char *str)
|
||||
{
|
||||
if (!acc) return;
|
||||
if (acc->description) free (acc->description);
|
||||
acc->description = strdup (str);
|
||||
}
|
||||
|
||||
void
|
||||
xaccAccountSetNotes (Account *acc, char *str)
|
||||
{
|
||||
if (!acc) return;
|
||||
if (acc->notes) free (acc->notes);
|
||||
acc->notes = strdup (str);
|
||||
}
|
||||
|
||||
/********************************************************************\
|
||||
\********************************************************************/
|
||||
|
||||
AccountGroup *
|
||||
xaccAccountGetChildren (Account *acc)
|
||||
{
|
||||
@ -635,6 +671,11 @@ xaccAccountGetParent (Account *acc)
|
||||
return (acc->parent);
|
||||
}
|
||||
|
||||
int
|
||||
xaccAccountGetType (Account *acc)
|
||||
{
|
||||
return (acc->type);
|
||||
}
|
||||
|
||||
char *
|
||||
xaccAccountGetName (Account *acc)
|
||||
@ -642,4 +683,16 @@ xaccAccountGetName (Account *acc)
|
||||
return (acc->accountName);
|
||||
}
|
||||
|
||||
char *
|
||||
xaccAccountGetDescription (Account *acc)
|
||||
{
|
||||
return (acc->description);
|
||||
}
|
||||
|
||||
char *
|
||||
xaccAccountGetNotes (Account *acc)
|
||||
{
|
||||
return (acc->notes);
|
||||
}
|
||||
|
||||
/*************************** END OF FILE **************************** */
|
||||
|
@ -107,9 +107,17 @@ void xaccConsolidateTransactions (Account *);
|
||||
void xaccMoveFarEnd (Split *, Account *);
|
||||
void xaccMoveFarEndByName (Split *, const char *);
|
||||
|
||||
char * xaccAccountGetName (Account *);
|
||||
AccountGroup *xaccAccountGetChildren (Account *);
|
||||
AccountGroup *xaccAccountGetParent (Account *);
|
||||
void xaccAccountSetType (Account *, int);
|
||||
void xaccAccountSetName (Account *, char *);
|
||||
void xaccAccountSetDescription (Account *, char *);
|
||||
void xaccAccountSetNotes (Account *, char *);
|
||||
|
||||
int xaccAccountGetType (Account *);
|
||||
char * xaccAccountGetName (Account *);
|
||||
char * xaccAccountGetDescription (Account *);
|
||||
char * xaccAccountGetNotes (Account *);
|
||||
AccountGroup * xaccAccountGetChildren (Account *);
|
||||
AccountGroup * xaccAccountGetParent (Account *);
|
||||
|
||||
/** GLOBALS *********************************************************/
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user