diff options
Diffstat (limited to 'Presence/XMPPTypes.hs')
-rw-r--r-- | Presence/XMPPTypes.hs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Presence/XMPPTypes.hs b/Presence/XMPPTypes.hs index a44f7fb1..84da2fed 100644 --- a/Presence/XMPPTypes.hs +++ b/Presence/XMPPTypes.hs | |||
@@ -41,6 +41,15 @@ import ByteStringOperators | |||
41 | import SocketLike | 41 | import SocketLike |
42 | import GetHostByAddr | 42 | import GetHostByAddr |
43 | import Data.Maybe (listToMaybe) | 43 | import Data.Maybe (listToMaybe) |
44 | import Data.XML.Types as XML (Event) | ||
45 | |||
46 | data ClientCommands = | ||
47 | Send [XML.Event] | ||
48 | | BoundToResource | ||
49 | | InterestedInRoster | ||
50 | | QuitThread | ||
51 | deriving Prelude.Show | ||
52 | |||
44 | 53 | ||
45 | class JabberClientSession session where | 54 | class JabberClientSession session where |
46 | data XMPPClass session | 55 | data XMPPClass session |
@@ -50,6 +59,7 @@ class JabberClientSession session where | |||
50 | closeSession :: session -> IO () | 59 | closeSession :: session -> IO () |
51 | subscribe :: session -> Maybe JID -> IO (TChan Presence) | 60 | subscribe :: session -> Maybe JID -> IO (TChan Presence) |
52 | subscribeToRoster :: session -> IO (TChan RosterEvent) | 61 | subscribeToRoster :: session -> IO (TChan RosterEvent) |
62 | clientChannel :: session -> TChan ClientCommands | ||
53 | forCachedPresence :: session -> (Presence -> IO ()) -> IO () | 63 | forCachedPresence :: session -> (Presence -> IO ()) -> IO () |
54 | sendPending :: session -> IO () | 64 | sendPending :: session -> IO () |
55 | getMyBuddies :: session -> IO [ByteString] | 65 | getMyBuddies :: session -> IO [ByteString] |