summaryrefslogtreecommitdiff
path: root/Presence/XMPPTypes.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Presence/XMPPTypes.hs')
-rw-r--r--Presence/XMPPTypes.hs10
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
41import SocketLike 41import SocketLike
42import GetHostByAddr 42import GetHostByAddr
43import Data.Maybe (listToMaybe) 43import Data.Maybe (listToMaybe)
44import Data.XML.Types as XML (Event)
45
46data ClientCommands =
47 Send [XML.Event]
48 | BoundToResource
49 | InterestedInRoster
50 | QuitThread
51 deriving Prelude.Show
52
44 53
45class JabberClientSession session where 54class 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]