1 /***********************************************************************
2 Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12 ***********************************************************************/
13 #ifndef FC__VOTEINFO_H
14 #define FC__VOTEINFO_H
18 #endif /* __cplusplus */
22 enum client_vote_type
{
30 /* Set by the server via packets. */
32 char user
[MAX_LEN_NAME
];
43 /* Set/used by the client. */
44 enum client_vote_type client_vote
;
48 void voteinfo_queue_init(void);
49 void voteinfo_queue_free(void);
50 void voteinfo_queue_remove(int vote_no
);
51 void voteinfo_queue_delayed_remove(int vote_no
);
52 void voteinfo_queue_check_removed(void);
53 void voteinfo_queue_add(int vote_no
, const char *user
, const char *desc
,
54 int percent_required
, int flags
);
55 struct voteinfo
*voteinfo_queue_find(int vote_no
);
56 void voteinfo_do_vote(int vote_no
, enum client_vote_type vote
);
57 struct voteinfo
*voteinfo_queue_get_current(int *pindex
);
58 void voteinfo_queue_next(void);
59 int voteinfo_queue_size(void);
61 bool voteinfo_bar_can_be_shown(void);
65 #endif /* __cplusplus */
67 #endif /* FC__VOTEINFO_H */