~ubuntu-branches/ubuntu/karmic/psi/karmic

« back to all changes in this revision

Viewing changes to iris/xmpp-im/xmpp_tasks.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jan Niehusmann
  • Date: 2008-08-28 18:46:52 UTC
  • mfrom: (1.2.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080828184652-iiik12dl91nq7cdi
Tags: 0.12-2
Uploading to unstable (Closes: Bug#494352)

Show diffs side-by-side

added added

removed removed

Lines of Context:
605
605
                        }
606
606
                        tag.appendChild(m);
607
607
                }
 
608
 
 
609
                if(s.hasPhotoHash()) {
 
610
                        QDomElement m = doc()->createElement("x");
 
611
                        m.setAttribute("xmlns", "vcard-temp:x:update");
 
612
                        m.appendChild(textTag(doc(), "photo", s.photoHash()));
 
613
                        tag.appendChild(m);
 
614
                }
608
615
        }
609
616
}
610
617
 
972
979
{
973
980
        type = 0;
974
981
        d->jid = _jid;
975
 
        d->iq = createIQ(doc(), "get", d->jid.full(), id());
 
982
        d->iq = createIQ(doc(), "get", type == 1 ? Jid().full() : d->jid.full(), id());
976
983
        QDomElement v = doc()->createElement("vCard");
977
984
        v.setAttribute("xmlns", "vcard-temp");
978
985
        v.setAttribute("version", "2.0");
990
997
        return d->vcard;
991
998
}
992
999
 
993
 
void JT_VCard::set(const VCard &card)
 
1000
void JT_VCard::set(const Jid &j, const VCard &card)
994
1001
{
995
1002
        type = 1;
996
1003
        d->vcard = card;
997
 
        d->jid = "";
998
 
        d->iq = createIQ(doc(), "set", d->jid.full(), id());
 
1004
        d->jid = j;
 
1005
        d->iq = createIQ(doc(), "set", "", id());
999
1006
        d->iq.appendChild(card.toXml(doc()) );
1000
1007
}
1001
1008