31 #ifndef GNC_EMPLOYEE_H_ 32 #define GNC_EMPLOYEE_H_ 44 #define GNC_ID_EMPLOYEE "gncEmployee" 47 #define GNC_TYPE_EMPLOYEE (gnc_employee_get_type ()) 48 #define GNC_EMPLOYEE(o) \ 49 (G_TYPE_CHECK_INSTANCE_CAST ((o), GNC_TYPE_EMPLOYEE, GncEmployee)) 50 #define GNC_EMPLOYEE_CLASS(k) \ 51 (G_TYPE_CHECK_CLASS_CAST((k), GNC_TYPE_EMPLOYEE, GncEmployeeClass)) 52 #define GNC_IS_EMPLOYEE(o) \ 53 (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNC_TYPE_EMPLOYEE)) 54 #define GNC_IS_EMPLOYEE_CLASS(k) \ 55 (G_TYPE_CHECK_CLASS_TYPE ((k), GNC_TYPE_EMPLOYEE)) 56 #define GNC_EMPLOYEE_GET_CLASS(o) \ 57 (G_TYPE_INSTANCE_GET_CLASS ((o), GNC_TYPE_EMPLOYEE, GncEmployeeClass)) 58 GType gnc_employee_get_type(
void);
62 GncEmployee *gncEmployeeCreate (QofBook *book);
63 void gncEmployeeDestroy (GncEmployee *employee);
64 void gncEmployeeBeginEdit (GncEmployee *employee);
65 void gncEmployeeCommitEdit (GncEmployee *employee);
66 int gncEmployeeCompare (
const GncEmployee *a,
const GncEmployee *b);
71 void gncEmployeeSetID (GncEmployee *employee,
const char *
id);
72 void gncEmployeeSetUsername (GncEmployee *employee,
const char *username);
78 void gncEmployeeSetName (GncEmployee *employee,
const char *name);
79 void gncEmployeeSetLanguage (GncEmployee *employee,
const char *language);
80 void gncEmployeeSetAcl (GncEmployee *employee,
const char *acl);
81 void gncEmployeeSetWorkday (GncEmployee *employee, gnc_numeric workday);
82 void gncEmployeeSetRate (GncEmployee *employee, gnc_numeric rate);
83 void gncEmployeeSetCurrency (GncEmployee *employee, gnc_commodity * currency);
84 void gncEmployeeSetActive (GncEmployee *employee, gboolean active);
85 void gncEmployeeSetCCard (GncEmployee *employee,
Account* ccard_acc);
86 void qofEmployeeSetAddr (GncEmployee *employee,
QofInstance *addr_ent);
92 QofBook * gncEmployeeGetBook (GncEmployee *employee);
93 const char * gncEmployeeGetID (
const GncEmployee *employee);
94 const char * gncEmployeeGetUsername (
const GncEmployee *employee);
100 const char * gncEmployeeGetName (
const GncEmployee *employee);
101 GncAddress * gncEmployeeGetAddr (
const GncEmployee *employee);
102 const char * gncEmployeeGetLanguage (
const GncEmployee *employee);
103 const char * gncEmployeeGetAcl (
const GncEmployee *employee);
104 gnc_numeric gncEmployeeGetWorkday (
const GncEmployee *employee);
105 gnc_numeric gncEmployeeGetRate (
const GncEmployee *employee);
106 gnc_commodity * gncEmployeeGetCurrency (
const GncEmployee *employee);
107 gboolean gncEmployeeGetActive (
const GncEmployee *employee);
108 Account * gncEmployeeGetCCard (
const GncEmployee *employee);
116 static inline GncEmployee * gncEmployeeLookup (
const QofBook *book,
const GncGUID *guid)
122 #define EMPLOYEE_ID "id" 123 #define EMPLOYEE_USERNAME "username" 124 #define EMPLOYEE_NAME "name" 125 #define EMPLOYEE_ADDR "addr" 126 #define EMPLOYEE_LANGUAGE "native language" 127 #define EMPLOYEE_ACL "acl" 128 #define EMPLOYEE_WORKDAY "workday" 129 #define EMPLOYEE_RATE "rate" 130 #define EMPLOYEE_CC "credit_card_account" 133 #define gncEmployeeGetGUID(E) qof_entity_get_guid(QOF_INSTANCE(E)) 134 #define gncEmployeeGetBook(E) qof_instance_get_book(QOF_INSTANCE(E)) 135 #define gncEmployeeRetGUID(E) (E ? *(qof_entity_get_guid(QOF_INSTANCE(E))) : *(guid_null())) 136 #define gncEmployeeLookupDirect(G,B) gncEmployeeLookup((B),&(G)) 140 gboolean gncEmployeeIsDirty (
const GncEmployee *employee);
#define QOF_BOOK_RETURN_ENTITY(book, guid, e_type, c_type)
Encapsulates all the information about a dataset manipulated by QOF.
Account handling public routines.
The type used to store guids in C.
gboolean gncEmployeeEqual(const GncEmployee *e1, const GncEmployee *e2)
Test support function, used by test-dbi-business-stuff.c.