diff options
Diffstat (limited to 'Presence/XMPPTypes.hs')
-rw-r--r-- | Presence/XMPPTypes.hs | 16 |
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 | |||
31 | import ByteStringOperators | 31 | import ByteStringOperators |
32 | import SocketLike | 32 | import SocketLike |
33 | 33 | ||
34 | class XMPPSession session where | 34 | class 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 | ||
43 | class XMPPConfig config where | 42 | class 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 |
48 | data JID = JID { name :: Maybe ByteString | 54 | data JID = JID { name :: Maybe ByteString |