1 #ifndef USER__H 2 #define USER__H 3 4 #include "status.h" 5 #include "utils.h" 6 7 #define CSV_OUT_FILE_DELIM "," 8 9 typedef unsigned long ulong; 10 11 typedef struct { 12 /* id: user id / c: user credits / d: user debits */ 13 ulong id, c, d; 14 } user_t; 15 16 status_t user_create(user_t **); 17 status_t user_set_data(user_t *, ulong, ulong, ulong); 18 status_t user_destroy(user_t **); 19 20 int user_equals(const void *, const void *); 21 22 status_t user_print_as_csv(const void *, FILE *); 23 status_t user_print_as_xml(const void *, FILE *); 24 25 int user_comparator_credits_minmax(const void *, const void *); 26 int user_comparator_credits_maxmin(const void *, const void *); 27 28 29 #endif