/* office.h
 * Nicholas Ingolia
 * ingolia@mit.edu
 */

#ifndef _office_h
#define _office_h 1

void office_read_head_list(const char *filename);
void office_print_head_list(void);

int office_needs_cleaning(void);
/* effects: Tests whether the time elapsed since the last office cleaning
 *   is long enough to justify another office cleaning.  It returns true
 *   iff the time since the last cleaning is greater than the minimal
 *   inter-cleaning interval.
 */

int office_try_clean_now(void);
/* effects: Tests whether the number of people logged in in the office
 *   is more than the number of required people for an office cleaning,
 *   and whether there is any "compelling reason" why an office cleaning
 *   oughtn't to happen now.  
 *     Currently, the only compelling reason is the meeting blackout, 
 *   M19-21, but future versions may extend this to a configuration option
 *   for cleaning black-outs.
 *     If cleaning is possible, a cleaning is announced and true is returned.
 *   Otherwise, no cleaning is announced and false is returned.
 */

int office_should_clean(void);
/* effects: Randomly decides that the office ought to be cleaned with a 
 *   certain probability, based on the desired average interval between
 *   office cleanings.  It returns true iff the office should be cleaned
 *   in the next hour.
 */

void office_now_cleaned(void);
/* effects: Indicates that the office was just cleaned.
 */

#endif /* defined(_office_h) */
