| 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 |
| 6 | val listCurrentPolls : unit -> poll list |
| 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 |
| 25 | val dateLeNow : string -> bool |
| 26 | val dateLtNow : string -> bool |
| 27 | |
| 28 | val canModify : poll -> bool |
| 29 | val requireCanModify : poll -> unit |
| 30 | |
| 31 | val nextSeq : int -> real |
| 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 |
| 39 | (* This operates on choice IDs. *) |
| 40 | |
| 41 | (* These operate on poll IDs. *) |
| 42 | val countVoters : int -> int |
| 43 | val listPollVoters : int -> Init.user list |
| 44 | end |