Commit | Line | Data |
---|---|---|
e68ddb80 AC |
1 | signature POLL = sig |
2 | type poll = {id : int, usr : int, title : string, descr : string, starts : string, ends : string, votes : int} | |
3 | ||
4 | val lookupPoll : int -> poll | |
5 | val listPolls : unit -> poll list | |
56dbfc30 | 6 | val listCurrentPolls : unit -> poll list |
e68ddb80 AC |
7 | val listPollsLimit : int -> poll list |
8 | ||
9 | val addPoll : int * string * string * string * string * int -> int | |
10 | val modPoll : poll -> unit | |
11 | val deletePoll : int -> unit | |
12 | ||
13 | type choice = {id : int, pol : int, seq : real, descr : string} | |
14 | ||
15 | val lookupChoice : int -> choice | |
16 | val addChoice : int * real * string -> int | |
17 | val modChoice : choice -> unit | |
18 | val deleteChoice : int -> unit | |
19 | val listChoices : int -> choice list | |
20 | ||
21 | val vote : int * int * int list -> unit | |
22 | ||
23 | val dateLe : string * string -> bool | |
24 | val dateGeNow : string -> bool | |
56dbfc30 | 25 | val dateLeNow : string -> bool |
e68ddb80 AC |
26 | val dateLtNow : string -> bool |
27 | ||
28 | val canModify : poll -> bool | |
29 | val requireCanModify : poll -> unit | |
30 | ||
31 | val nextSeq : int -> real | |
56dbfc30 AC |
32 | |
33 | val takingVotes : poll -> bool | |
34 | val listChoicesWithVotes : int -> (bool * int * choice) list | |
35 | val listChoicesWithMyVotes : int -> (bool * choice) list | |
36 | ||
37 | val noDupes : ''a list -> bool | |
38 | val listVoters : int -> Init.user list | |
e68ddb80 | 39 | end |