summaryrefslogtreecommitdiff
path: root/Presence/XMPPTypes.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Presence/XMPPTypes.hs')
-rw-r--r--Presence/XMPPTypes.hs9
1 files changed, 9 insertions, 0 deletions
diff --git a/Presence/XMPPTypes.hs b/Presence/XMPPTypes.hs
index 0e98a77b..4507f5bf 100644
--- a/Presence/XMPPTypes.hs
+++ b/Presence/XMPPTypes.hs
@@ -59,6 +59,7 @@ class JabberClientSession session where
59 isSubscribed :: session -> ByteString -> IO Bool 59 isSubscribed :: session -> ByteString -> IO Bool
60 isBuddy :: session -> ByteString -> IO Bool 60 isBuddy :: session -> ByteString -> IO Bool
61 approveSubscriber :: session -> ByteString -> IO () 61 approveSubscriber :: session -> ByteString -> IO ()
62 rejectSubscriber :: session -> ByteString -> IO ()
62 63
63class JabberPeerSession session where 64class JabberPeerSession session where
64 data XMPPPeerClass session 65 data XMPPPeerClass session
@@ -72,6 +73,7 @@ class JabberPeerSession session where
72 getBuddies :: XMPPPeerClass session -> ByteString -> IO [ByteString] 73 getBuddies :: XMPPPeerClass session -> ByteString -> IO [ByteString]
73 getSubscribers :: XMPPPeerClass session -> ByteString -> IO [ByteString] 74 getSubscribers :: XMPPPeerClass session -> ByteString -> IO [ByteString]
74 processApproval :: session -> ByteString -> JID -> IO () 75 processApproval :: session -> ByteString -> JID -> IO ()
76 processRejection :: session -> ByteString -> JID -> IO ()
75 processRequest :: session -> ByteString -> JID -> IO () 77 processRequest :: session -> ByteString -> JID -> IO ()
76 78
77-- | Jabber ID (JID) datatype 79-- | Jabber ID (JID) datatype
@@ -95,12 +97,18 @@ data RosterEvent = RequestedSubscription
95 | NewBuddy 97 | NewBuddy
96 {- user: -} ByteString 98 {- user: -} ByteString
97 {- contact: -} ByteString 99 {- contact: -} ByteString
100 | RemovedBuddy
101 {- user: -} ByteString
102 {- contact: -} ByteString
98 | PendingSubscriber 103 | PendingSubscriber
99 {- user: -} ByteString 104 {- user: -} ByteString
100 {- contact: -} ByteString 105 {- contact: -} ByteString
101 | NewSubscriber 106 | NewSubscriber
102 {- user: -} ByteString 107 {- user: -} ByteString
103 {- contact: -} ByteString 108 {- contact: -} ByteString
109 | RejectSubscriber
110 {- user: -} ByteString
111 {- contact: -} ByteString
104 deriving Prelude.Show 112 deriving Prelude.Show
105 113
106data Peer = LocalHost | RemotePeer SockAddr 114data Peer = LocalHost | RemotePeer SockAddr
@@ -220,6 +228,7 @@ data OutBoundMessage = OutBoundPresence Presence
220 | PresenceProbe JID JID 228 | PresenceProbe JID JID
221 | Solicitation JID JID 229 | Solicitation JID JID
222 | Approval JID JID 230 | Approval JID JID
231 | Rejection JID JID
223 deriving Prelude.Show 232 deriving Prelude.Show
224 233
225getNamesForPeer :: Peer -> IO [S.ByteString] 234getNamesForPeer :: Peer -> IO [S.ByteString]