10 #ifndef CRM_COMMON_ELECTION__H    11 #  define CRM_COMMON_ELECTION__H void election_vote(election_t *e)
Start a new election by offering local node's candidacy. 
 
void election_reset(election_t *e)
Stop election timer and disregard all votes. 
 
bool election_check(election_t *e)
Check whether local node has won an election. 
 
void election_timeout_stop(election_t *e)
Stop an election's timer, if running. 
 
struct election_s election_t
 
void election_timeout_set_period(election_t *e, guint period_ms)
Change an election's timeout (restarting timer if running) 
 
void election_remove(election_t *e, const char *uname)
Disregard any previous vote by specified peer. 
 
void election_clear_dampening(election_t *e)
Reset any election dampening currently in effect. 
 
void election_fini(election_t *e)
Free an election object. 
 
election_t * election_init(const char *name, const char *uname, guint period_ms, GSourceFunc cb)
Create a new election object. 
 
enum election_result election_count_vote(election_t *e, xmlNode *vote, bool can_win)
Process an election message (vote or no-vote) from a peer. 
 
enum election_result election_state(election_t *e)
Get current state of an election.