44#define ROOMMAN_MAX_NAME (31U)
47#define ROOMMAN_SUCCESS (0)
49#define ROOMMAN_ERR_INVALID_ROOM (-1)
51#define ROOMMAN_ERR_DUPLICATE_ROOM (-2)
53#define ROOMMAN_ERR_NAMETOOLONG (-3)
55#define ROOMMAN_ERR_EXCEED (-4)
57#define ROOMMAN_ERR_NOUSER (-5)
59#define ROOMMAN_ERR_NOT_EMPTY (-6)
61#define ROOMMAN_ERR_RESERVED (-7)
68#define ROOMMAN_ERR_FATAL (-100)
70#define ROOMMAN_ERR_STORE (-101)
72#define ROOMMAN_ERR_CORRUPT (-102)
224 const char* building,
225 const char* room_name,
257 const char* building,
258 const char* room_name,
roomman_result_t roomman_create_room(char *building_name, char *room_name, uint16_t max_pers, roomman_id_t *rid)
Create a new room.
roomman_result_t roomman_directory(int32_t *fdptr, const char *building, const char *room_name, roomman_id_t *rid)
Get a directory of entries in the database.
roomman_result_t roomman_set_username(char *username)
Set the name of the current user (required for room reservations).
roomman_result_t roomman_update_capacity(roomman_id_t rid, uint16_t new_capacity)
Update the capacity of a room.
roomman_result_t roomman_clear_reservation(roomman_id_t rid)
Reserve a room.
roomman_result_t roomman_remove_persons(roomman_id_t rid, uint16_t persons)
Decrease the number of persons currently using the room.
roomman_result_t roomman_add_persons(roomman_id_t rid, uint16_t persons)
Increase the number of persons currently using the room.
roomman_result_t roomman_lookup(const char *building, const char *room_name, roomman_id_t *rid)
Find room in the database.
roomman_result_t roomman_delete_room(roomman_id_t rid)
Delete a room.
roomman_result_t roomman_readentry(roomman_id_t rid, char *building, char *name, uint16_t *occupied, uint16_t *capacity, char *reserved_by)
Get contents of an entry in the database.
roomman_result_t roomman_reserve_room(roomman_id_t rid)
Reserve a room.