4 * This code is published under the terms of the Acess licence.
5 * See the file COPYING for details.
7 * common.h - Core Header
13 #define DEFAULT_CONFIG_FILE "/etc/opendispense/main.cfg"
16 typedef struct sItem tItem;
19 char *Name; //!< Display Name
22 short Type; //!< References an action
23 short ID; //!< Item ID
26 typedef struct sUser tUser;
29 int ID; //!< User ID (LDAP ID)
30 int Balance; //!< Balance in cents
31 int Bytes; //!< Traffic Usage
32 char Name[]; //!< Username
35 typedef struct sHandler tHandler;
39 int (*CanDispense)(int User, int ID);
40 int (*DoDispense)(int User, int ID);
44 extern tItem *gaItems;
45 extern int giNumItems;
46 extern tHandler *gaHandlers;
50 extern void Log_Error(const char *Format, ...);
51 extern void Log_Info(const char *Format, ...);
53 // --- Cokebank Functions ---
54 extern int AlterBalance(int User, int Ammount);
55 extern int GetBalance(int User);
56 extern char *GetUserName(int User);