Ejemplo n.º 1
0
        internal void GotVCardResponse(object sender, jabber.protocol.client.IQ response, object data)
        {
            try {
                XmppGlobal.InternalQueryCache.VCard[response.From.Bare] = response;

                jabber.protocol.iq.VCard vcard = (jabber.protocol.iq.VCard)response.Query;

                if (vcard.Photo != null)
                {
                    if (vcard.Photo["BINVAL"] != null)
                    {
                        BaseAvatar = ImageManipulation.Base64ToImage(vcard.Photo["BINVAL"].InnerText);
                    }
                }

                OnVCardReceived(new VCardEventArgs(response));

                CallbackState state = (CallbackState)data;

                if (state.Callback != null)
                {
                    state.Callback.Invoke(sender, response, state.State);
                }
            } catch (Exception ex) {
                Console.WriteLine(ex.ToString());
            }
        }
Ejemplo n.º 2
0
        private void GotQueryResponse(object sender, IQ response, object data)
        {
            CallbackState state = (CallbackState)data;

            if (state.Callback != null)
            {
                state.Callback.Invoke(sender, response, state.State);
            }
        }