summaryrefslogtreecommitdiff
path: root/Presence/XMPPTypes.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Presence/XMPPTypes.hs')
-rw-r--r--Presence/XMPPTypes.hs16
1 files changed, 11 insertions, 5 deletions
diff --git a/Presence/XMPPTypes.hs b/Presence/XMPPTypes.hs
index b46b4294..6e054708 100644
--- a/Presence/XMPPTypes.hs
+++ b/Presence/XMPPTypes.hs
@@ -31,18 +31,24 @@ import Control.DeepSeq
31import ByteStringOperators 31import ByteStringOperators
32import SocketLike 32import SocketLike
33 33
34class XMPPSession session where 34class JabberClientSession session where
35 data XMPPClass session 35 data XMPPClass session
36 newSession :: SocketLike sock => XMPPClass session -> sock -> IO session 36 newSession :: SocketLike sock => XMPPClass session -> sock -> IO session
37 setResource :: session -> ByteString -> IO () 37 setResource :: session -> ByteString -> IO ()
38 getJID :: session -> IO JID 38 getJID :: session -> IO JID
39 closeSession :: session -> IO () 39 closeSession :: session -> IO ()
40 subscribe :: session -> Maybe JID -> IO (TChan Presence) 40 subscribe :: session -> Maybe JID -> IO (TChan Presence)
41 announcePresence :: session -> Presence -> IO ()
42 41
43class XMPPConfig config where 42class JabberPeerSession session where
44 getBuddies :: config -> ByteString -> IO [ByteString] 43 data XMPPPeerClass session
45 getSubscribers :: config -> ByteString -> IO [ByteString] 44 newPeerSession :: SocketLike sock => XMPPPeerClass session -> sock -> IO session
45 closePeerSession :: session -> IO ()
46 peerAddress :: session -> Peer
47 userStatus :: session -> ByteString -> IO [Presence]
48 announcePresence :: session -> Presence -> IO ()
49 peerSessionFactory :: session -> XMPPPeerClass session
50 getBuddies :: XMPPPeerClass session -> ByteString -> IO [ByteString]
51 getSubscribers :: XMPPPeerClass session -> ByteString -> IO [ByteString]
46 52
47-- | Jabber ID (JID) datatype 53-- | Jabber ID (JID) datatype
48data JID = JID { name :: Maybe ByteString 54data JID = JID { name :: Maybe ByteString