예제 #1
0
        private void InternalClient_OnPresence(object sender, jabber.protocol.client.Presence pres)
        {
            switch (pres.Type)
            {
            case jabber.protocol.client.PresenceType.available:
            case jabber.protocol.client.PresenceType.unavailable:
                RosterItem ri;

                if (XmppGlobal.Roster.TryGetValue(new jabber.JID(pres.From.Bare), out ri))
                {
                    ri.GotPresenceItem(pres);
                }
                break;

            case jabber.protocol.client.PresenceType.subscribe:
                OnGotSubscriptionRequest(new PresenceItemEventArgs(pres));
                break;
            }

            OnGotPresenceItem(new PresenceItemEventArgs(pres));
        }
예제 #2
0
 void rosterMgr_OnSubscription(RosterManager manager, Item ri, jabber.protocol.client.Presence pres)
 {
     // Not presently used, since we currently use auto-subscription
 }
예제 #3
0
 void rosterMgr_OnUnsubscription(RosterManager manager, jabber.protocol.client.Presence pres, ref bool remove)
 {
     // Not presently used, since we currently use auto-subscription
 }