From 88274ed5e6d6ffa37683c7e213095d23fd31decd Mon Sep 17 00:00:00 2001 From: joe Date: Mon, 8 Jul 2013 21:15:37 -0400 Subject: Send roster push events to client in case of subscription requests. --- Presence/XMPPTypes.hs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Presence/XMPPTypes.hs') diff --git a/Presence/XMPPTypes.hs b/Presence/XMPPTypes.hs index 301f19fd..2bba8614 100644 --- a/Presence/XMPPTypes.hs +++ b/Presence/XMPPTypes.hs @@ -38,6 +38,7 @@ class JabberClientSession session where getJID :: session -> IO JID closeSession :: session -> IO () subscribe :: session -> Maybe JID -> IO (TChan Presence) + subscribeToRoster :: session -> IO (TChan RosterEvent) forCachedPresence :: session -> (Presence -> IO ()) -> IO () getMyBuddies :: session -> IO [ByteString] getMySubscribers :: session -> IO [ByteString] @@ -72,6 +73,11 @@ data JabberShow = Offline data Presence = Presence JID JabberShow deriving Prelude.Show +data RosterEvent = RequestedSubscription + {- user: -} ByteString + {- contact: -} ByteString + deriving Prelude.Show + data Peer = LocalHost | RemotePeer SockAddr deriving (Eq,Prelude.Show) -- cgit v1.2.3