Example #1
0
        public void LoadVCard(jabber.JID jid)
        {
            Text          = string.Format("Information for {0}", jid.Bare);
            JidLabel.Text = jid.Bare;

            jabber.protocol.iq.VCardIQ iq = XmppGlobal.Queries.CreateVCardQuery();
            iq.To   = new jabber.JID(jid.Bare);
            iq.Type = jabber.protocol.client.IQType.get;

            XmppGlobal.Queries.SendQuery(iq, new QueryCallback(GotVCard), null);
        }
Example #2
0
        public void RequestVCard(QueryCallback callback, object state, bool forceRefresh)
        {
            jabber.protocol.client.IQ cached = XmppGlobal.InternalQueryCache.VCard[jid];

            if (!forceRefresh && cached != null)
            {
                if (callback != null)
                {
                    callback.Invoke(this, cached, state);
                }
            }
            else
            {
                jabber.protocol.iq.VCardIQ iq = new jabber.protocol.iq.VCardIQ(XmppGlobal.InternalClient.Document);
                iq.To = jid;

                XmppGlobal.InternalTracker.BeginIQ(iq, new jabber.connection.IqCB(GotVCardResponse), new CallbackState(callback, state));
            }
        }
Example #3
0
        public void RequestVCard(QueryCallback callback, object state, bool forceRefresh)
        {
            jabber.protocol.client.IQ cached = XmppGlobal.InternalQueryCache.VCard[jid];

            if (!forceRefresh && cached != null) {
                if (callback != null)
                    callback.Invoke (this, cached, state);
            } else {
                jabber.protocol.iq.VCardIQ iq = new jabber.protocol.iq.VCardIQ (XmppGlobal.InternalClient.Document);
                iq.To = jid;

                XmppGlobal.InternalTracker.BeginIQ (iq, new jabber.connection.IqCB (GotVCardResponse), new CallbackState (callback, state));
            }
        }