2001-11-16 19:17:06 -06:00
|
|
|
/*
|
|
|
|
* gncJob.h -- the Core Job Interface
|
2002-01-22 09:51:14 -06:00
|
|
|
* Copyright (C) 2001, 2002 Derek Atkins
|
2001-11-16 19:17:06 -06:00
|
|
|
* Author: Derek Atkins <warlord@MIT.EDU>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef GNC_JOB_H_
|
|
|
|
#define GNC_JOB_H_
|
|
|
|
|
|
|
|
typedef struct _gncJob GncJob;
|
|
|
|
|
|
|
|
#include "gncAddress.h"
|
2002-01-22 09:51:14 -06:00
|
|
|
#include "gncOwner.h"
|
2001-11-16 19:17:06 -06:00
|
|
|
|
|
|
|
#define GNC_JOB_MODULE_NAME "gncJob"
|
|
|
|
|
|
|
|
/* Create/Destroy Functions */
|
|
|
|
|
2001-11-24 23:34:34 -06:00
|
|
|
GncJob *gncJobCreate (GNCBook *book);
|
2001-11-16 19:17:06 -06:00
|
|
|
void gncJobDestroy (GncJob *job);
|
|
|
|
|
|
|
|
/* Set Functions */
|
|
|
|
|
|
|
|
void gncJobSetID (GncJob *job, const char *id);
|
2002-01-22 11:16:02 -06:00
|
|
|
void gncJobSetName (GncJob *job, const char *jobname);
|
|
|
|
void gncJobSetReference (GncJob *job, const char *owner_reference);
|
2002-01-22 09:51:14 -06:00
|
|
|
void gncJobSetOwner (GncJob *job, GncOwner *owner);
|
2001-11-16 19:17:06 -06:00
|
|
|
void gncJobSetActive (GncJob *job, gboolean active);
|
|
|
|
|
|
|
|
void gncJobCommitEdit (GncJob *job);
|
|
|
|
|
|
|
|
/* Get Functions */
|
|
|
|
|
2001-11-24 23:34:34 -06:00
|
|
|
GNCBook * gncJobGetBook (GncJob *job);
|
2001-11-16 19:17:06 -06:00
|
|
|
const GUID * gncJobGetGUID (GncJob *job);
|
|
|
|
const char * gncJobGetID (GncJob *job);
|
|
|
|
const char * gncJobGetName (GncJob *job);
|
2002-01-22 11:16:02 -06:00
|
|
|
const char * gncJobGetReference (GncJob *job);
|
2002-01-22 09:51:14 -06:00
|
|
|
GncOwner * gncJobGetOwner (GncJob *job);
|
2001-11-16 19:17:06 -06:00
|
|
|
gboolean gncJobGetActive (GncJob *job);
|
|
|
|
|
2002-06-27 15:03:19 -05:00
|
|
|
GUID gncJobRetGUID (GncJob *job);
|
|
|
|
GncJob *gncJobLookupDirect (GUID guid, GNCBook *book);
|
|
|
|
|
2001-11-24 23:34:34 -06:00
|
|
|
GncJob * gncJobLookup (GNCBook *book, const GUID *guid);
|
2001-11-16 19:17:06 -06:00
|
|
|
gboolean gncJobIsDirty (GncJob *job);
|
|
|
|
|
|
|
|
/* Other functions */
|
|
|
|
|
2002-02-04 12:54:06 -06:00
|
|
|
int gncJobCompare (const GncJob *a, const GncJob *b);
|
|
|
|
|
|
|
|
#define JOB_ID "id"
|
|
|
|
#define JOB_NAME "name"
|
|
|
|
#define JOB_REFERENCE "reference"
|
|
|
|
#define JOB_OWNER "owner"
|
2002-05-09 16:35:24 -05:00
|
|
|
#define JOB_ACTIVE "active"
|
2001-11-16 19:17:06 -06:00
|
|
|
|
|
|
|
#endif /* GNC_JOB_H_ */
|