add file path retreival

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@1492 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Linas Vepstas 1998-12-28 04:32:33 +00:00
parent 9e1b1f976e
commit f6d08dddf8
2 changed files with 20 additions and 5 deletions

View File

@ -121,6 +121,15 @@ xaccSessionSetGroup (Session *sess, AccountGroup *grp)
/* ============================================================== */
char *
xaccSessionGetFilePath (Session *sess)
{
if (!sess) return NULL;
return (sess->fullpath);
}
/* ============================================================== */
/* hack alert -- we should be yanking this out of
* some config file
*/

View File

@ -71,6 +71,11 @@ void xaccSessionDestroy (Session *);
* routine, except that the argument is a filename (i.e. the five
* letters "file:" should not be prepended).
*
* The xaccSessionGetFilePath() routine returns the fully-qualified file
* path for the session. That is, if a relative or partial filename
* was for the session, then it had to have been fully resolved to
* open the session. This routine returns the result of this resolution.
*
* The xaccSessionGetError() routine can be used to obtain the reason for
* any failure. Standard errno values are used. Calling this routine resets
* the error value. This routine allows an implementation of multiple
@ -135,11 +140,12 @@ void xaccSessionDestroy (Session *);
*
*/
AccountGroup * xaccSessionBegin (Session *, char * sessionid);
AccountGroup * xaccSessionBeginFile (Session *, char * filename);
int xaccSessionGetError (Session *);
AccountGroup * xaccSessionGetGroup (Session *);
void xaccSessionSetGroup (Session *, AccountGroup *topgroup);
AccountGroup * xaccSessionBegin (Session *, char * sessionid);
AccountGroup * xaccSessionBeginFile (Session *, char * filename);
int xaccSessionGetError (Session *);
AccountGroup * xaccSessionGetGroup (Session *);
void xaccSessionSetGroup (Session *, AccountGroup *topgroup);
char * xaccSessionGetFilePath (Session *);
void xaccSessionSave (Session *);
void xaccSessionEnd (Session *);