~ubuntu-branches/ubuntu/quantal/psi/quantal

« 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-04-14 18:57:30 UTC
  • mfrom: (2.1.9 hardy)
  • Revision ID: james.westby@ubuntu.com-20080414185730-528re3zp0m2hdlhi
Tags: 0.11-8
* added CONFIG -= link_prl to .pro files and removed dependencies
  which are made unnecessary by this change
* Fix segfault when closing last chat tab with qt4.4
  (This is from upstream svn, rev. 1101) (Closes: Bug#476122)

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 *
19
19
 */
20
20
 
21
 
#include"xmpp_tasks.h"
22
 
 
23
 
#include"base64.h"
24
 
//#include"sha1.h"
25
 
#include"xmpp_xmlcommon.h"
26
 
//#include"xmpp_stream.h"
27
 
//#include"xmpp_types.h"
28
 
#include"xmpp_vcard.h"
29
 
 
30
 
#include<qregexp.h>
31
 
#include<qvaluelist.h>
 
21
#include "xmpp_tasks.h"
 
22
 
 
23
//#include <QtCrypto>
 
24
//#include "sha1.h"
 
25
#include "xmpp_xmlcommon.h"
 
26
//#include "xmpp_stream.h"
 
27
//#include "xmpp_types.h"
 
28
#include "xmpp_vcard.h"
 
29
 
 
30
#include <qregexp.h>
 
31
#include <QList>
32
32
 
33
33
using namespace XMPP;
34
34
 
45
45
{
46
46
        QString ret;
47
47
 
48
 
        for(unsigned int n = 0; n < str.length(); ++n) {
 
48
        for(int n = 0; n < str.length(); ++n) {
49
49
                if(str.at(n) == '\\') {
50
50
                        ++n;
51
51
                        if(n >= str.length())
89
89
        return r;
90
90
}
91
91
 
 
92
//----------------------------------------------------------------------------
 
93
// JT_Session
 
94
//----------------------------------------------------------------------------
 
95
//
 
96
#include "protocol.h"
 
97
 
 
98
JT_Session::JT_Session(Task *parent) : Task(parent)
 
99
{
 
100
}
 
101
 
 
102
void JT_Session::onGo() 
 
103
{
 
104
        QDomElement iq = createIQ(doc(), "set", "", id());
 
105
        QDomElement session = doc()->createElement("session");
 
106
        session.setAttribute("xmlns",NS_SESSION);
 
107
        iq.appendChild(session);
 
108
        send(iq);
 
109
}
 
110
 
 
111
bool JT_Session::take(const QDomElement& x) 
 
112
{
 
113
        if(!iqVerify(x, "", id()))
 
114
                return false;
 
115
 
 
116
        if(x.attribute("type") == "result") {
 
117
                setSuccess();
 
118
        }
 
119
        else {
 
120
                setError(x);
 
121
        }
 
122
        return true;
 
123
}
92
124
 
93
125
//----------------------------------------------------------------------------
94
126
// JT_Register
99
131
        Private() {}
100
132
 
101
133
        Form form;
 
134
        XData xdata;
 
135
        bool hasXData;
102
136
        Jid jid;
103
137
        int type;
104
138
};
108
142
{
109
143
        d = new Private;
110
144
        d->type = -1;
 
145
        d->hasXData = false;
111
146
}
112
147
 
113
148
JT_Register::~JT_Register()
185
220
        }
186
221
}
187
222
 
 
223
void JT_Register::setForm(const Jid& to, const XData& xdata)
 
224
{
 
225
        d->type = 4;
 
226
        iq = createIQ(doc(), "set", to.full(), id());
 
227
        QDomElement query = doc()->createElement("query");
 
228
        query.setAttribute("xmlns", "jabber:iq:register");
 
229
        iq.appendChild(query);
 
230
        query.appendChild(xdata.toXml(doc(), true));
 
231
}
 
232
 
188
233
const Form & JT_Register::form() const
189
234
{
190
235
        return d->form;
191
236
}
192
237
 
 
238
bool JT_Register::hasXData() const
 
239
{
 
240
        return d->hasXData;
 
241
}
 
242
 
 
243
const XData& JT_Register::xdata() const
 
244
{
 
245
        return d->xdata;
 
246
}
 
247
 
193
248
void JT_Register::onGo()
194
249
{
195
250
        send(iq);
216
271
                                        d->form.setInstructions(tagContent(i));
217
272
                                else if(i.tagName() == "key")
218
273
                                        d->form.setKey(tagContent(i));
 
274
                                else if(i.tagName() == "x" && i.attribute("xmlns") == "jabber:x:data") {
 
275
                                        d->xdata.fromXml(i);
 
276
                                        d->hasXData = true;
 
277
                                }
219
278
                                else {
220
279
                                        FormField f;
221
280
                                        if(f.setType(i.tagName())) {
303
362
        Private() {}
304
363
 
305
364
        Roster roster;
306
 
        QValueList<QDomElement> itemList;
 
365
        QList<QDomElement> itemList;
307
366
};
308
367
 
309
368
JT_Roster::JT_Roster(Task *parent)
361
420
                QDomElement query = doc()->createElement("query");
362
421
                query.setAttribute("xmlns", "jabber:iq:roster");
363
422
                iq.appendChild(query);
364
 
                for(QValueList<QDomElement>::ConstIterator it = d->itemList.begin(); it != d->itemList.end(); ++it)
 
423
                for(QList<QDomElement>::ConstIterator it = d->itemList.begin(); it != d->itemList.end(); ++it)
365
424
                        query.appendChild(*it);
366
425
                send(iq);
367
426
        }
379
438
 
380
439
        QDomElement i = doc()->createElement("request");
381
440
        i.setAttribute("type", "JT_Roster");
382
 
        for(QValueList<QDomElement>::ConstIterator it = d->itemList.begin(); it != d->itemList.end(); ++it)
 
441
        for(QList<QDomElement>::ConstIterator it = d->itemList.begin(); it != d->itemList.end(); ++it)
383
442
                i.appendChild(*it);
384
443
        return lineEncode(Stream::xmlToString(i));
385
444
        return "";
467
526
                return false;
468
527
 
469
528
        roster(xmlReadRoster(queryTag(e), true));
 
529
        send(createIQ(doc(), "result", e.attribute("from"), e.attribute("id")));
470
530
 
471
531
        return true;
472
532
}
516
576
                        x.setAttribute("xmlns", "jabber:x:signed");
517
577
                        tag.appendChild(x);
518
578
                }
 
579
 
 
580
                if(!s.capsNode().isEmpty() && !s.capsVersion().isEmpty()) {
 
581
                        QDomElement c = doc()->createElement("c");
 
582
                        c.setAttribute("xmlns","http://jabber.org/protocol/caps");
 
583
                        c.setAttribute("node",s.capsNode());
 
584
                        c.setAttribute("ver",s.capsVersion());
 
585
                        if (!s.capsExt().isEmpty()) 
 
586
                                c.setAttribute("ext",s.capsExt());
 
587
                        tag.appendChild(c);
 
588
                }
 
589
 
 
590
                if(s.isMUC()) {
 
591
                        QDomElement m = doc()->createElement("x");
 
592
                        m.setAttribute("xmlns","http://jabber.org/protocol/muc");
 
593
                        if (!s.mucPassword().isEmpty()) {
 
594
                                m.appendChild(textTag(doc(),"password",s.mucPassword()));
 
595
                        }
 
596
                        if (s.hasMUCHistory()) {
 
597
                                QDomElement h = doc()->createElement("history");
 
598
                                if (s.mucHistoryMaxChars() >= 0)
 
599
                                        h.setAttribute("maxchars",s.mucHistoryMaxChars());
 
600
                                if (s.mucHistoryMaxStanzas() >= 0)
 
601
                                        h.setAttribute("maxstanzas",s.mucHistoryMaxStanzas());
 
602
                                if (s.mucHistorySeconds() >= 0)
 
603
                                        h.setAttribute("seconds",s.mucHistorySeconds());
 
604
                                m.appendChild(h);
 
605
                        }
 
606
                        tag.appendChild(m);
 
607
                }
519
608
        }
520
609
}
521
610
 
525
614
        tag.setAttribute("to", to.full());
526
615
}
527
616
 
528
 
void JT_Presence::sub(const Jid &to, const QString &subType)
 
617
void JT_Presence::sub(const Jid &to, const QString &subType, const QString& nick)
529
618
{
530
619
        type = 1;
531
620
 
532
621
        tag = doc()->createElement("presence");
533
622
        tag.setAttribute("to", to.full());
534
623
        tag.setAttribute("type", subType);
 
624
        if (!nick.isEmpty()) {
 
625
                QDomElement nick_tag = textTag(doc(),"nick",nick);
 
626
                nick_tag.setAttribute("xmlns","http://jabber.org/protocol/nick");
 
627
                tag.appendChild(nick_tag);
 
628
        }
535
629
}
536
630
 
537
631
void JT_Presence::onGo()
569
663
                else if(type == "error") {
570
664
                        QString str = "";
571
665
                        int code = 0;
572
 
                        getErrorFromElement(e, &code, &str);
 
666
                        getErrorFromElement(e, client()->stream().baseNS(), &code, &str);
573
667
                        p.setError(code, str);
574
668
                }
575
 
                else {
576
 
                        subscription(j, type);
 
669
                else if(type == "subscribe" || type == "subscribed" || type == "unsubscribe" || type == "unsubscribed") {
 
670
                        QString nick;
 
671
                        bool found;
 
672
                        QDomElement tag = findSubTag(e, "nick", &found);
 
673
                        if (found && tag.attribute("xmlns") == "http://jabber.org/protocol/nick") {
 
674
                                nick = tagContent(tag);
 
675
                        }
 
676
                        subscription(j, type, nick);
577
677
                        return true;
578
678
                }
579
679
        }
625
725
                else if(i.tagName() == "x" && i.attribute("xmlns") == "http://jabber.org/protocol/e2e") {
626
726
                        p.setKeyID(tagContent(i));
627
727
                }
 
728
                else if(i.tagName() == "c" && i.attribute("xmlns") == "http://jabber.org/protocol/caps") {
 
729
                        p.setCapsNode(i.attribute("node"));
 
730
                        p.setCapsVersion(i.attribute("ver"));
 
731
                        p.setCapsExt(i.attribute("ext"));
 
732
                }
 
733
                else if(i.tagName() == "x" && i.attribute("xmlns") == "vcard-temp:x:update") {
 
734
                        QDomElement t;
 
735
                        bool found;
 
736
                        t = findSubTag(i, "photo", &found);
 
737
                        if (found)
 
738
                                p.setPhotoHash(tagContent(t));
 
739
                        else
 
740
                                p.setPhotoHash("");
 
741
                }
 
742
                else if(i.tagName() == "x" && i.attribute("xmlns") == "http://jabber.org/protocol/muc#user") {
 
743
                        for(QDomNode muc_n = i.firstChild(); !muc_n.isNull(); muc_n = muc_n.nextSibling()) {
 
744
                                QDomElement muc_e = muc_n.toElement();
 
745
                                if(muc_e.isNull())
 
746
                                        continue;
 
747
 
 
748
                                if (muc_e.tagName() == "item") 
 
749
                                        p.setMUCItem(MUCItem(muc_e));
 
750
                                else if (muc_e.tagName() == "status") 
 
751
                                        p.setMUCStatus(muc_e.attribute("code").toInt());
 
752
                                else if (muc_e.tagName() == "destroy")
 
753
                                        p.setMUCDestroy(MUCDestroy(muc_e));
 
754
                        }
 
755
                }
628
756
        }
629
757
 
630
758
        presence(j, p);
647
775
                noShowNS = true;
648
776
 
649
777
        QDomElement i;
650
 
        uint x;
 
778
        int x;
651
779
        //if(noShowNS)
652
780
                i = e.ownerDocument().createElement(e.tagName());
653
781
        //else
677
805
:Task(parent)
678
806
{
679
807
        m = msg;
680
 
        m.setId(id());
 
808
        if (m.id().isEmpty())
 
809
                m.setId(id());
681
810
}
682
811
 
683
812
JT_Message::~JT_Message()
696
825
//----------------------------------------------------------------------------
697
826
// JT_PushMessage
698
827
//----------------------------------------------------------------------------
699
 
static QDomElement addCorrectNS(const QDomElement &e)
700
 
{
701
 
        uint x;
702
 
 
703
 
        // grab child nodes
704
 
        /*QDomDocumentFragment frag = e.ownerDocument().createDocumentFragment();
705
 
        QDomNodeList nl = e.childNodes();
706
 
        for(x = 0; x < nl.count(); ++x)
707
 
                frag.appendChild(nl.item(x).cloneNode());*/
708
 
 
709
 
        // find closest xmlns
710
 
        QDomNode n = e;
711
 
        while(!n.isNull() && !n.toElement().hasAttribute("xmlns"))
712
 
                n = n.parentNode();
713
 
        QString ns;
714
 
        if(n.isNull() || !n.toElement().hasAttribute("xmlns"))
715
 
                ns = "jabber:client";
716
 
        else
717
 
                ns = n.toElement().attribute("xmlns");
718
 
 
719
 
        // make a new node
720
 
        QDomElement i = e.ownerDocument().createElementNS(ns, e.tagName());
721
 
 
722
 
        // copy attributes
723
 
        QDomNamedNodeMap al = e.attributes();
724
 
        for(x = 0; x < al.count(); ++x) {
725
 
                QDomAttr a = al.item(x).toAttr();
726
 
                if(a.name() != "xmlns")
727
 
                        i.setAttributeNodeNS(al.item(x).cloneNode().toAttr());
728
 
        }
729
 
 
730
 
        // copy children
731
 
        QDomNodeList nl = e.childNodes();
732
 
        for(x = 0; x < nl.count(); ++x) {
733
 
                QDomNode n = nl.item(x);
734
 
                if(n.isElement())
735
 
                        i.appendChild(addCorrectNS(n.toElement()));
736
 
                else
737
 
                        i.appendChild(n.cloneNode());
738
 
        }
739
 
 
740
 
        //i.appendChild(frag);
741
 
        return i;
742
 
}
743
 
 
744
828
JT_PushMessage::JT_PushMessage(Task *parent)
745
829
:Task(parent)
746
830
{
969
1053
 
970
1054
        Jid jid;
971
1055
        Form form;
972
 
        QValueList<SearchResult> resultList;
 
1056
        QList<SearchResult> resultList;
973
1057
};
974
1058
 
975
1059
JT_Search::JT_Search(Task *parent)
1019
1103
        return d->form;
1020
1104
}
1021
1105
 
1022
 
const QValueList<SearchResult> & JT_Search::results() const
 
1106
const QList<SearchResult> & JT_Search::results() const
1023
1107
{
1024
1108
        return d->resultList;
1025
1109
}
1265
1349
        //      return TRUE;
1266
1350
        //}
1267
1351
        else if(ns == "http://jabber.org/protocol/disco#info") {
 
1352
                // Find out the node
 
1353
                bool invalid_node = false;
 
1354
                QString node;
 
1355
                bool found;
 
1356
                QDomElement q = findSubTag(e, "query", &found);
 
1357
                if(found) // NOTE: Should always be true, since a NS was found above
 
1358
                        node = q.attribute("node");
 
1359
                
1268
1360
                QDomElement iq = createIQ(doc(), "result", e.attribute("from"), e.attribute("id"));
1269
1361
                QDomElement query = doc()->createElement("query");
1270
1362
                query.setAttribute("xmlns", "http://jabber.org/protocol/disco#info");
 
1363
                if (!node.isEmpty())
 
1364
                        query.setAttribute("node", node);
1271
1365
                iq.appendChild(query);
 
1366
 
 
1367
                // Identity
 
1368
                DiscoItem::Identity identity = client()->identity();
 
1369
                QDomElement id = doc()->createElement("identity");
 
1370
                if (!identity.category.isEmpty() && !identity.type.isEmpty()) {
 
1371
                        id.setAttribute("category",identity.category);
 
1372
                        id.setAttribute("type",identity.type);
 
1373
                        if (!identity.name.isEmpty()) {
 
1374
                                id.setAttribute("name",identity.name);
 
1375
                        }
 
1376
                }
 
1377
                else {
 
1378
                        // Default values
 
1379
                        id.setAttribute("category","client");
 
1380
                        id.setAttribute("type","pc");
 
1381
                }
 
1382
                query.appendChild(id);
 
1383
 
1272
1384
                QDomElement feature;
1273
 
 
1274
 
                feature = doc()->createElement("feature");
1275
 
                feature.setAttribute("var", "http://jabber.org/protocol/bytestreams");
1276
 
                query.appendChild(feature);
1277
 
 
1278
 
                feature = doc()->createElement("feature");
1279
 
                feature.setAttribute("var", "http://jabber.org/protocol/si");
1280
 
                query.appendChild(feature);
1281
 
 
1282
 
                feature = doc()->createElement("feature");
1283
 
                feature.setAttribute("var", "http://jabber.org/protocol/si/profile/file-transfer");
1284
 
                query.appendChild(feature);
1285
 
 
1286
 
                send(iq);
 
1385
                if (node.isEmpty() || node == client()->capsNode() + "#" + client()->capsVersion()) {
 
1386
                        // Standard features
 
1387
                        feature = doc()->createElement("feature");
 
1388
                        feature.setAttribute("var", "http://jabber.org/protocol/bytestreams");
 
1389
                        query.appendChild(feature);
 
1390
 
 
1391
                        feature = doc()->createElement("feature");
 
1392
                        feature.setAttribute("var", "http://jabber.org/protocol/si");
 
1393
                        query.appendChild(feature);
 
1394
 
 
1395
                        feature = doc()->createElement("feature");
 
1396
                        feature.setAttribute("var", "http://jabber.org/protocol/si/profile/file-transfer");
 
1397
                        query.appendChild(feature);
 
1398
                        
 
1399
                        feature = doc()->createElement("feature");
 
1400
                        feature.setAttribute("var", "http://jabber.org/protocol/disco#info");
 
1401
                        query.appendChild(feature);
 
1402
 
 
1403
                        // Client-specific features
 
1404
                        QStringList clientFeatures = client()->features().list();
 
1405
                        for (QStringList::ConstIterator i = clientFeatures.begin(); i != clientFeatures.end(); ++i) {
 
1406
                                feature = doc()->createElement("feature");
 
1407
                                feature.setAttribute("var", *i);
 
1408
                                query.appendChild(feature);
 
1409
                        }
 
1410
 
 
1411
                        if (node.isEmpty()) {
 
1412
                                // Extended features
 
1413
                                QStringList exts = client()->extensions();
 
1414
                                for (QStringList::ConstIterator i = exts.begin(); i != exts.end(); ++i) {
 
1415
                                        const QStringList& l = client()->extension(*i).list();
 
1416
                                        for ( QStringList::ConstIterator j = l.begin(); j != l.end(); ++j ) {
 
1417
                                                feature = doc()->createElement("feature");
 
1418
                                                feature.setAttribute("var", *j);
 
1419
                                                query.appendChild(feature);
 
1420
                                        }
 
1421
                                }
 
1422
                        }
 
1423
                }
 
1424
                else if (node.startsWith(client()->capsNode() + "#")) {
 
1425
                        QString ext = node.right(node.length()-client()->capsNode().length()-1);
 
1426
                        if (client()->extensions().contains(ext)) {
 
1427
                                const QStringList& l = client()->extension(ext).list();
 
1428
                                for ( QStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) {
 
1429
                                        feature = doc()->createElement("feature");
 
1430
                                        feature.setAttribute("var", *it);
 
1431
                                        query.appendChild(feature);
 
1432
                                }
 
1433
                        }
 
1434
                        else {
 
1435
                                invalid_node = true;
 
1436
                        }
 
1437
                }
 
1438
                else {
 
1439
                        invalid_node = true;
 
1440
                }
 
1441
                
 
1442
                if (!invalid_node) {
 
1443
                        send(iq);
 
1444
                }
 
1445
                else {
 
1446
                        // Create error reply
 
1447
                        QDomElement error_reply = createIQ(doc(), "result", e.attribute("from"), e.attribute("id"));
 
1448
                        
 
1449
                        // Copy children
 
1450
                        for (QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
 
1451
                                error_reply.appendChild(n.cloneNode());
 
1452
                        }
 
1453
                        
 
1454
                        // Add error
 
1455
                        QDomElement error = doc()->createElement("error");
 
1456
                        error.setAttribute("type","cancel");
 
1457
                        error_reply.appendChild(error);
 
1458
                        QDomElement error_type = doc()->createElement("item-not-found");
 
1459
                        error_type.setAttribute("xmlns","urn:ietf:params:xml:ns:xmpp-stanzas");
 
1460
                        error.appendChild(error_type);
 
1461
                        send(error_reply);
 
1462
                }
1287
1463
                return true;
1288
1464
        }
1289
1465
 
1590
1766
}
1591
1767
 
1592
1768
//----------------------------------------------------------------------------
1593
 
// JT_DiscoInfo
1594
 
//----------------------------------------------------------------------------
1595
 
class JT_DiscoInfo::Private
1596
 
{
1597
 
public:
1598
 
        Private() { }
1599
 
 
1600
 
        QDomElement iq;
1601
 
        Jid jid;
1602
 
        DiscoItem item;
1603
 
};
1604
 
 
1605
 
JT_DiscoInfo::JT_DiscoInfo(Task *parent)
1606
 
: Task(parent)
1607
 
{
1608
 
        d = new Private;
1609
 
}
1610
 
 
1611
 
JT_DiscoInfo::~JT_DiscoInfo()
1612
 
{
1613
 
        delete d;
1614
 
}
1615
 
 
1616
 
void JT_DiscoInfo::get(const DiscoItem &item)
1617
 
{
1618
 
        DiscoItem::Identity id;
1619
 
        if ( item.identities().count() == 1 )
1620
 
                id = item.identities().first();
1621
 
        get(item.jid(), item.node(), id);
1622
 
}
1623
 
 
1624
 
void JT_DiscoInfo::get (const Jid &j, const QString &node, DiscoItem::Identity ident)
1625
 
{
1626
 
        d->item = DiscoItem(); // clear item
1627
 
 
1628
 
        d->jid = j;
1629
 
        d->iq = createIQ(doc(), "get", d->jid.full(), id());
1630
 
        QDomElement query = doc()->createElement("query");
1631
 
        query.setAttribute("xmlns", "http://jabber.org/protocol/disco#info");
1632
 
 
1633
 
        if ( !node.isEmpty() )
1634
 
                query.setAttribute("node", node);
1635
 
 
1636
 
        if ( !ident.category.isEmpty() && !ident.type.isEmpty() ) {
1637
 
                QDomElement i = doc()->createElement("item");
1638
 
 
1639
 
                i.setAttribute("category", ident.category);
1640
 
                i.setAttribute("type", ident.type);
1641
 
                if ( !ident.name.isEmpty() )
1642
 
                        i.setAttribute("name", ident.name);
1643
 
 
1644
 
                query.appendChild( i );
1645
 
 
1646
 
        }
1647
 
 
1648
 
        d->iq.appendChild(query);
1649
 
}
1650
 
 
1651
 
const DiscoItem &JT_DiscoInfo::item() const
1652
 
{
1653
 
        return d->item;
1654
 
}
1655
 
 
1656
 
void JT_DiscoInfo::onGo ()
1657
 
{
1658
 
        send(d->iq);
1659
 
}
1660
 
 
1661
 
bool JT_DiscoInfo::take(const QDomElement &x)
1662
 
{
1663
 
        if(!iqVerify(x, d->jid, id()))
1664
 
                return false;
1665
 
 
1666
 
        if(x.attribute("type") == "result") {
1667
 
                QDomElement q = queryTag(x);
1668
 
 
1669
 
                DiscoItem item;
1670
 
 
1671
 
                item.setJid( d->jid );
1672
 
                item.setNode( q.attribute("node") );
1673
 
 
1674
 
                QStringList features;
1675
 
                DiscoItem::Identities identities;
1676
 
 
1677
 
                for(QDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
1678
 
                        QDomElement e = n.toElement();
1679
 
                        if( e.isNull() )
1680
 
                                continue;
1681
 
 
1682
 
                        if ( e.tagName() == "feature" ) {
1683
 
                                features << e.attribute("var");
1684
 
                        }
1685
 
                        else if ( e.tagName() == "identity" ) {
1686
 
                                DiscoItem::Identity id;
1687
 
 
1688
 
                                id.category = e.attribute("category");
1689
 
                                id.name     = e.attribute("name");
1690
 
                                id.type     = e.attribute("type");
1691
 
 
1692
 
                                identities.append( id );
1693
 
                        }
1694
 
                }
1695
 
 
1696
 
                item.setFeatures( features );
1697
 
                item.setIdentities( identities );
1698
 
 
1699
 
                d->item = item;
1700
 
 
1701
 
                setSuccess(true);
1702
 
        }
1703
 
        else {
1704
 
                setError(x);
1705
 
        }
1706
 
 
1707
 
        return true;
1708
 
}
1709
 
 
1710
 
//----------------------------------------------------------------------------
1711
1769
// JT_DiscoPublish
1712
1770
//----------------------------------------------------------------------------
1713
1771
class JT_DiscoPublish::Private