#ifndef RECORDS_H #define RECORDS_H #include /** * records_table_init - initialize record table data structures */ void records_table_init(); /** * records_table_new - creates a new high scores table * and returns its handle on success or -1 on error */ int records_table_new(int size); /** * records_check_record - checks whether (t, nsets) is a new record */ int records_check_record(int handle, time_t t, int nsets); /** * records_commit_record - checks whether (t, nsets) is a new record * and saves the result in the records table if it is so */ int records_commit_record(int handle, time_t t, int nsets, const gchar *name); /** * records_table_size - returns the number of slots in the records table */ int records_table_size(int handle); /** * records_table_get - gets time, number of sets and player name * from the records table at pos. Note, that the function allocates * memory for player name. It's up to the calling function to free * that memory. * returns 1 on success */ int records_table_get(int handle, int pos, time_t *t, int* nsets, gchar **name); /** * records_table_free - releases memory taken by the records table */ void records_table_free(int handle); #endif