|
| Barracuda.GUI.ServerInterface | | Maintainer | Stephan Friedrichs |
|
|
|
|
|
| Description |
| This module represents the protocol used for communication between the gui
and the server components. It is the only link between the gui and the rest
of the application.
|
|
| Synopsis |
|
|
|
|
| Communication
|
|
| data ControlMessage |
| The messages sent from a graphical user interface to the Barracuda server.
Note that the first message to be sent, is SetUser.
| | Constructors | | SetUser | Sets information about the user using the GUI.
| | suUserID :: UserID | | | suCert :: Certificate | | | suKey :: PrivateKey | |
| | WantJoin | The local user wants to join a channel.
| | | WantLeave | The local user wants to leave a channel.
| | | SendMsg | The local user sent a message to a channel.
| | | CreateChannel | The local user wants to create a new channel.
| | createName :: ChannelName | | | createDescription :: String | | | createInvite :: (Maybe (Set UserID)) | Nothing for a public channel, Just inviations for a private one.
|
| | Authorize | The local user authorized another user to join a private channel.
| | | CMClose | The graphical user interface has been shut down. This message must
be the last thing, a GUI sends, even if it had been closed by
CRClose before.
|
| Instances | |
|
|
| data ControlResponse |
| The messages sent from the Barracuda server to the graphical user interface.
| | Constructors | | AllChans | A complete list of channels and the users inside each of them.
| | | Receive | The given message has been sent to the indicated channel.
| | receiveChannelName :: ChannelName | | | receiveChannelID :: ChannelID | | | receiveSender :: (Maybe UserID) | | | receiveMessage :: String | | | receiveAttachments :: [Attachment] | | | receiveTimestamp :: UTCTime | | | receiveDelayed :: Bool | |
| | WantsAuth | The indicated user requested authorization for the given private channel.
| | | ErrGeneral | An error occured, that has not been further specified.
| | errGenLevel :: MessageType | | | errGenTitle :: String | | | errGenMessage :: String | |
| | ErrNotDelivered | A message could not be delivered to some users.
| | | CRClose | The user interface shall shut down.
|
| Instances | |
|
|
| Interface
|
|
| type GUI |
|
|
| type InfraGUI |
| = (Maybe (Set SockAddr) -> IO ()) | A function the infrastructure GUI can call to
change the infrastructural data.
| | -> Maybe (Set SockAddr) | The initial configuration (Nothing means: inframode
turned off, otherwise only the listed SockAddrs
are processed (see DistributorMsg).
| | -> IO () | | | A function type every infrastructure-mode configuration GUI must provide.
|
|
|
| Produced by Haddock version 0.8 |