Some miscellaneous updates to main help, for new features and otherwise.
[freeciv.git] / client / voteinfo.h
blob9850bd41596a3a802f9d6496d458ce5141694f1a
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)
6 any later version.
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
16 #ifdef __cplusplus
17 extern "C" {
18 #endif /* __cplusplus */
20 #include "fc_types.h"
22 enum client_vote_type {
23 CVT_NONE = 0,
24 CVT_YES,
25 CVT_NO,
26 CVT_ABSTAIN
29 struct voteinfo {
30 /* Set by the server via packets. */
31 int vote_no;
32 char user[MAX_LEN_NAME];
33 char desc[512];
34 int percent_required;
35 int flags;
36 int yes;
37 int no;
38 int abstain;
39 int num_voters;
40 bool resolved;
41 bool passed;
43 /* Set/used by the client. */
44 enum client_vote_type client_vote;
45 time_t remove_time;
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);
63 #ifdef __cplusplus
65 #endif /* __cplusplus */
67 #endif /* FC__VOTEINFO_H */