Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=5ea05d0aec29e9adc5ce93fb80baa1c555877fbb

commit 5ea05d0aec29e9adc5ce93fb80baa1c555877fbb
Author: crazy <[email protected]>
Date:   Sun Oct 18 00:53:46 2015 +0200

tapioca-qt-0.14.1-1-x86_64
* oh wow :P
* kill that

diff --git a/source/lib-extra/tapioca-qt/FrugalBuild 
b/source/lib-extra/tapioca-qt/FrugalBuild
deleted file mode 100644
index e9f455b..0000000
--- a/source/lib-extra/tapioca-qt/FrugalBuild
+++ /dev/null
@@ -1,40 +0,0 @@
-# Compiling Time: 0.30 SBU
-# Maintainer: crazy <[email protected]>
-
-pkgname=tapioca-qt
-pkgver=0.14.1
-pkgrel=1
-pkgdesc="Telepathy Qt4 bindings"
-depends=('qt4-qdbus' 'telepathy-qt')
-makedepends=('cmake')
-groups=('lib-extra')
-archs=('i686' 'x86_64')
-_F_sourceforge_dirname="tapioca-voip"
-Finclude sourceforge
-url="http://tapioca-voip.sourceforge.net/";
-source=($source tapioca-qt-svn.patch)
-sha1sums=('37814550cf8b5071e733378011656ee38cb6211c' \
-          '43abbd88faf3fd676b7da3e0a5c30c191e3bed00')
-
-
-build()
-{
-       Fcd
-       Fpatchall
-       # lol
-       find . -name "*.so*" | xargs rm || Fdie
-       rm -rf tests/test || Fdie
-       mkdir build || Fdie
-       cd build || Fdie
-       cmake .. \
-               -DCMAKE_INSTALL_PREFIX=/usr \
-               -DSYSCONF_INSTALL_DIR=/etc \
-               -DLIB_INSTALL_DIR=/usr/lib \
-               -DCMAKE_VERBOSE_MAKEFILE=TRUE \
-               -DCMAKE_BUILD_TYPE=NONE || Fdie
-       make || Fdie
-       make DESTDIR=$Fdestdir install || Fdie
-}
-
-
-# optimization OK
diff --git a/source/lib-extra/tapioca-qt/tapioca-qt-svn.patch 
b/source/lib-extra/tapioca-qt/tapioca-qt-svn.patch
deleted file mode 100644
index 40f98cd..0000000
--- a/source/lib-extra/tapioca-qt/tapioca-qt-svn.patch
+++ /dev/null
@@ -1,680 +0,0 @@
-diff -Naur tapioca-qt-0.14.1/config.h tapioca-qt/config.h
---- tapioca-qt-0.14.1/config.h 2007-05-23 20:20:42.000000000 +0200
-+++ tapioca-qt/config.h        1970-01-01 01:00:00.000000000 +0100
-@@ -1 +0,0 @@
--#define DATADIR "/usr/local/share"
-diff -Naur tapioca-qt-0.14.1/include/QtTapioca/channel.h 
tapioca-qt/include/QtTapioca/channel.h
---- tapioca-qt-0.14.1/include/QtTapioca/channel.h      2007-05-23 
20:20:42.000000000 +0200
-+++ tapioca-qt/include/QtTapioca/channel.h     2007-11-20 21:25:06.000000000 
+0100
-@@ -57,9 +57,13 @@
-
-     void close();
-     virtual void join();
--    ContactGroup *contactGroup() const;
-+    ContactGroup * contactGroup();
-     bool hasGroupSupport() const;
-
-+    bool hasSupportFor(const QString &) const;
-+
-+    Connection * connection() const;
-+
- Q_SIGNALS:
-     void closed();
-
-diff -Naur tapioca-qt-0.14.1/include/QtTapioca/CMakeLists.txt 
tapioca-qt/include/QtTapioca/CMakeLists.txt
---- tapioca-qt-0.14.1/include/QtTapioca/CMakeLists.txt 2007-05-23 
20:20:42.000000000 +0200
-+++ tapioca-qt/include/QtTapioca/CMakeLists.txt        2007-11-20 
21:25:06.000000000 +0100
-@@ -18,6 +18,8 @@
-     contact.h
-     ContactBase
-     contactbase.h
-+    ContactGroup
-+    contactgroup.h
-     ContactList
-     contactlist.h
-     DBusProxyObject
-@@ -31,7 +33,9 @@
-     TextChannel
-     textchannel.h
-     StreamChannel
-+    streamchannel.h
-     Stream
-+    stream.h
- )
-
- install(FILES ${library_HDRS} DESTINATION include/QtTapioca)
-diff -Naur tapioca-qt-0.14.1/include/QtTapioca/connection.h 
tapioca-qt/include/QtTapioca/connection.h
---- tapioca-qt-0.14.1/include/QtTapioca/connection.h   2007-05-23 
20:20:42.000000000 +0200
-+++ tapioca-qt/include/QtTapioca/connection.h  2007-11-20 21:25:06.000000000 
+0100
-@@ -107,7 +107,7 @@
-      *
-      *  @return User's own contact.
-      */
--    UserContact *userContact() const;
-+    UserContact *userContact();
-
-     /** Check for Avatar interface support.
-      *
-diff -Naur tapioca-qt-0.14.1/include/QtTapioca/contactgroup.h 
tapioca-qt/include/QtTapioca/contactgroup.h
---- tapioca-qt-0.14.1/include/QtTapioca/contactgroup.h 2007-05-23 
20:20:42.000000000 +0200
-+++ tapioca-qt/include/QtTapioca/contactgroup.h        2007-11-20 
21:25:06.000000000 +0100
-@@ -30,6 +30,7 @@
-
- namespace QtTapioca {
-
-+class Channel;
- class Conatct;
- class Connection;
- class ContactGroupPrivate;
-@@ -63,10 +64,12 @@
-     QList<Contact *> contacts() const;
-     QList<Contact *> pendingContacts() const;
-
-+    Channel * channel() const;
-+
- Q_SIGNALS:
--    void contactEntered(Contact *contact);
--    void contactLeft(Contact *contact);
--    void newPendingContact(Contact *contact);
-+    void contactEntered(QtTapioca::Contact *contact);
-+    void contactLeft(QtTapioca::Contact *contact);
-+    void newPendingContact(QtTapioca::Contact *contact);
-
- private Q_SLOTS:
-     void onGroupFlagsChanged(uint added, uint removed);
-@@ -75,10 +78,12 @@
-                           const QList<uint> &remote_pending, uint actor, uint 
reason);
-
- private:
--    ContactGroup(Connection *connection, const QString &serviceName, const 
QString &objPath, QObject *parent = 0);
-+    ContactGroup(Connection *connection, const QString &serviceName, const 
QString &objPath, Channel *channel);
-     QList<Contact *> contactsFromContactList(QList<uint> ids) const;
-
-     ContactGroupPrivate *d;
-+
-+    friend class Channel;
- };
-
- } // namespace
-diff -Naur tapioca-qt-0.14.1/include/QtTapioca/contactlist.h 
tapioca-qt/include/QtTapioca/contactlist.h
---- tapioca-qt-0.14.1/include/QtTapioca/contactlist.h  2007-05-23 
20:20:42.000000000 +0200
-+++ tapioca-qt/include/QtTapioca/contactlist.h 2007-11-20 21:25:06.000000000 
+0100
-@@ -105,6 +105,7 @@
-     Contact *contact(Handle *handle) const;
-     Contact *contact(uint id) const;
-     Contact *addContact(const Handle *handle);
-+    Contact *addContact(const uint id);
-
-     ContactListPrivate *d;
- };
-diff -Naur tapioca-qt-0.14.1/include/QtTapioca/stream.h 
tapioca-qt/include/QtTapioca/stream.h
---- tapioca-qt-0.14.1/include/QtTapioca/stream.h       2007-05-23 
20:20:42.000000000 +0200
-+++ tapioca-qt/include/QtTapioca/stream.h      2007-11-20 21:25:06.000000000 
+0100
-@@ -47,8 +47,8 @@
-     };
-
-     enum StreamState {
--        Connecting = 0,
--        Paused = 1,
-+        Paused = 0,
-+        Connecting = 1,
-         Playing = 2
-     };
-
-@@ -59,8 +59,8 @@
-     StreamState state() const { return m_state; }
-
- Q_SIGNALS:
--    void streamError(Stream *stream, int code, const QString &message);
--    void stateChanged(Stream *stream, Stream::StreamState newState);
-+    void streamError(QtTapioca::Stream *stream, int code, const QString 
&message);
-+    void stateChanged(QtTapioca::Stream *stream, 
QtTapioca::Stream::StreamState newState);
-
- private Q_SLOTS:
-     void onStreamError(uint id, uint error, const QString &msg);
-diff -Naur tapioca-qt-0.14.1/include/QtTapioca/textchannel.h 
tapioca-qt/include/QtTapioca/textchannel.h
---- tapioca-qt-0.14.1/include/QtTapioca/textchannel.h  2007-05-23 
20:20:42.000000000 +0200
-+++ tapioca-qt/include/QtTapioca/textchannel.h 2007-11-20 21:25:06.000000000 
+0100
-@@ -97,7 +97,7 @@
-     TextChannel::ChatState localChatState() const;
-
- Q_SIGNALS:
--    void messageReceived(const QtTapioca::TextChannel::Message &message);
-+    void messageReceived(const QtTapioca::TextChannel *tch, const 
QtTapioca::TextChannel::Message &message);
-     void messageDeliveryError(const QtTapioca::TextChannel::Message &message,
-                               QtTapioca::TextChannel::Message::DeliveryError 
error);
-     void messageSent(const QtTapioca::TextChannel::Message &message);
-diff -Naur tapioca-qt-0.14.1/QtTapioca.pc tapioca-qt/QtTapioca.pc
---- tapioca-qt-0.14.1/QtTapioca.pc     2007-05-23 20:20:42.000000000 +0200
-+++ tapioca-qt/QtTapioca.pc    1970-01-01 01:00:00.000000000 +0100
-@@ -1,11 +0,0 @@
--prefix=/usr/local
--exec_prefix=/usr/local
--libdir=/usr/local/lib
--includedir=/usr/local/include
--
--Name: QtTapioca
--Description: Qt Tapioca binding library
--Version: 0.14.1
--Requires: QtCore QtDBus QtTelepathyClient
--Libs: -L/usr/local/lib -lQtTapioca
--Cflags: -I/usr/local/include/QtTapioca -I/usr/local/include/
-diff -Naur tapioca-qt-0.14.1/RELEASE tapioca-qt/RELEASE
---- tapioca-qt-0.14.1/RELEASE  2007-05-23 20:20:42.000000000 +0200
-+++ tapioca-qt/RELEASE 1970-01-01 01:00:00.000000000 +0100
-@@ -1,2 +0,0 @@
--This api is compliant with version 0.4.4 of Tapioca's spec.
--You can find detailed documentation at: http://tapioca-voip.sf.net
-diff -Naur tapioca-qt-0.14.1/src/channel.cpp tapioca-qt/src/channel.cpp
---- tapioca-qt-0.14.1/src/channel.cpp  2007-05-23 20:20:42.000000000 +0200
-+++ tapioca-qt/src/channel.cpp 2007-11-20 21:25:07.000000000 +0100
-@@ -25,6 +25,7 @@
-
- #include "QtTapioca/Channel"
- #include "QtTapioca/ChannelTarget"
-+#include "QtTapioca/ContactGroup"
-
- #include <QtDBus/QDBusConnection>
- #include <QtDBus/QDBusConnectionInterface>
-@@ -39,7 +40,9 @@
-                    const QString &objPath,
-                    ChannelTarget *channelTarget)
-         : conn(connection),
-+          ch(0),
-           target(channelTarget),
-+          cg(0),
-           join(false)
-     {
-         ch = new org::freedesktop::Telepathy::Channel(serviceName, objPath, 
QDBusConnection::sessionBus());
-@@ -52,7 +55,7 @@
-     Connection *conn;
-     org::freedesktop::Telepathy::Channel *ch;
-     ChannelTarget* target;
--    ContactGroup *cg;
-+    ContactGroup * cg;
-     bool join;
- };
-
-@@ -97,17 +100,35 @@
-     return d->target;
- }
-
--ContactGroup *Channel::contactGroup() const
-+ContactGroup *Channel::contactGroup()
- {
-+    if (!hasGroupSupport()) { return 0; }
-+    if (0 == d->cg)
-+    {
-+        d->cg = new ContactGroup(d->conn, serviceName(), objectPath(), this);
-+        Q_ASSERT(0 != d->cg);
-+    }
-     return d->cg;
- }
-
- bool Channel::hasGroupSupport() const
- {
--    return (d->cg);
-+    return hasSupportFor("org.freedesktop.Telepathy.Channel.Interface.Group");
-+}
-+
-+bool Channel::hasSupportFor(const QString & interface) const
-+{
-+    QStringList interfaces = d->ch->GetInterfaces();
-+    return interfaces.contains(interface);
- }
-
- void Channel::join()
- {
-     d->join = true;
- }
-+
-+Connection * Channel::connection() const
-+{
-+    return d->conn;
-+}
-+
-diff -Naur tapioca-qt-0.14.1/src/connection.cpp tapioca-qt/src/connection.cpp
---- tapioca-qt-0.14.1/src/connection.cpp       2007-05-23 20:20:42.000000000 
+0200
-+++ tapioca-qt/src/connection.cpp      2007-11-20 21:25:07.000000000 +0100
-@@ -139,6 +139,8 @@
-     QObject::connect(d->conn, SIGNAL(StatusChanged(uint,uint)), this, 
SLOT(onStatusChanged(uint,uint)));
-
-     updateOpenChannels();
-+
-+    if (d->status == Connected) { d->loadInterfaces(); }
- }
-
- /*
-@@ -196,16 +198,14 @@
-     Channel *channel = 0;
-     QString objPath;
-
--    d->mutex.lock();
-+    QMutexLocker lock(&(d->mutex));
-     if (type == Channel::Text) {
--        qDebug() << "Creating a text channel.";
-         objPath = 
requestChannel("org.freedesktop.Telepathy.Channel.Type.Text", contact->handle(),
-              suppress_handler);
-         if (!objPath.isEmpty())
-             channel = new TextChannel(this, serviceName(), objPath, contact, 
this);
-     }
-     else if (type == Channel::Stream) {
--        qDebug() << "Creating a stream channel.";
-         objPath = 
requestChannel("org.freedesktop.Telepathy.Channel.Type.StreamedMedia", 
contact->handle(),
-              suppress_handler);
-         if (!objPath.isEmpty())
-@@ -218,8 +218,6 @@
-                          this, SLOT(onChannelDestroyed()));
-     }
-
--    d->mutex.unlock();
--
-     return channel;
- }
-
-@@ -251,7 +249,7 @@
- ContactList *Connection::contactList()
- {
-     if (d->status == Connection::Disconnected)
--        return 0;
-+    { return 0; }
-
-     if (!d->cl) {
-         d->cl = new ContactList(d->conn,
-@@ -273,7 +271,8 @@
-     if (!d->uContact) {
-         if (!d->selfHandle) {
-             /* Updated selfHandle */
--            d->selfHandle = d->handleFactory->createHandle(Handle::Contact, 
d->conn->GetSelfHandle());
-+            uint my_handle = d->conn->GetSelfHandle();
-+            d->selfHandle = d->handleFactory->createHandle(Handle::Contact, 
my_handle);
-             Q_ASSERT (d->selfHandle != 0);
-         }
-
-@@ -286,8 +285,9 @@
- /*
-  * Get User Contact
-  */
--UserContact *Connection::userContact() const
-+UserContact *Connection::userContact()
- {
-+    if (d->uContact == 0 && d->status == Connected) { initUserContact(); }
-     return d->uContact;
- }
-
-@@ -309,19 +309,20 @@
- void Connection::updateOpenChannels()
- {
-     if (d->status != Connection::Connected)
--        return;
-+    { return; }
-
-     org::freedesktop::Telepathy::ChannelInfo channelInfo;
-     org::freedesktop::Telepathy::ChannelInfoList channelInfoList;
-
-     channelInfoList = d->conn->ListChannels();
-
--    foreach (channelInfo, channelInfoList)
-+    foreach (channelInfo, channelInfoList) {
-         incomingChannel(channelInfo.objectPath,
-                         channelInfo.interfaceName,
-                         channelInfo.handleType,
-                         channelInfo.handle,
-                         true);
-+    }
- }
-
- Channel * Connection::incomingChannel(const QDBusObjectPath &objPath,
-@@ -332,14 +333,12 @@
- {
-     Channel *channel = 0;
-
--    d->mutex.lock();
-+    QMutexLocker lock(&(d->mutex));
-
-     if ((d->channels.contains(objPath.path())) ||
-         ((channelType != "org.freedesktop.Telepathy.Channel.Type.Text") &&
--        (channelType != 
"org.freedesktop.Telepathy.Channel.Type.StreamedMedia"))) {
--        d->mutex.unlock();
--        return NULL;
--    }
-+        (channelType != 
"org.freedesktop.Telepathy.Channel.Type.StreamedMedia")))
-+    { return NULL; }
-
-     Contact *contact = contactList()->contact(handleId);
-
-@@ -348,7 +347,6 @@
-         contact = d->cl->addContact(handle);
-         if (!contact) {
-             qDebug() << "error creating a contact.";
--            d->mutex.unlock();
-             return NULL;
-         }
-     }
-@@ -364,8 +362,6 @@
-                          this, SLOT(onChannelDestroyed()));
-     }
-
--    d->mutex.unlock();
--
-     return channel;
- }
-
-@@ -397,7 +393,6 @@
-
-     if (status == Connected) {
-         d->loadInterfaces();
--        initUserContact();
-     }
-
-     emit statusChanged(this,
-diff -Naur tapioca-qt-0.14.1/src/contactbase.cpp tapioca-qt/src/contactbase.cpp
---- tapioca-qt-0.14.1/src/contactbase.cpp      2007-05-23 20:20:42.000000000 
+0200
-+++ tapioca-qt/src/contactbase.cpp     2007-11-20 21:25:07.000000000 +0100
-@@ -308,3 +308,9 @@
-         if (cap.contactHandle == id)
-             updateCapabilities(cap.channelType, cap.newTypeSpecificFlags);
- }
-+
-+bool ContactBase::operator==(const ContactBase &info) const
-+{
-+    return (*(info.handle()) == *handle());
-+}
-+
-diff -Naur tapioca-qt-0.14.1/src/contactgroup.cpp 
tapioca-qt/src/contactgroup.cpp
---- tapioca-qt-0.14.1/src/contactgroup.cpp     2007-05-23 20:20:42.000000000 
+0200
-+++ tapioca-qt/src/contactgroup.cpp    2007-11-20 21:25:07.000000000 +0100
-@@ -35,8 +35,9 @@
- public:
-     ContactGroupPrivate(Connection *connection,
-                         const QString &serviceName,
--                        const QString &objPath)
--        : conn(connection)
-+                        const QString &objPath,
-+                        Channel * chan)
-+        : conn(connection), channel(chan)
-     {
-         telepathyIChannelGroup = new 
org::freedesktop::Telepathy::ChannelGroupInterface(serviceName, objPath, 
QDBusConnection::sessionBus());
-
-@@ -50,6 +51,7 @@
-
-     uint flags;
-     Connection *conn;
-+    Channel * channel;
-     org::freedesktop::Telepathy::ChannelGroupInterface 
*telepathyIChannelGroup;
- };
-
-@@ -57,19 +59,19 @@
-
- using namespace QtTapioca;
-
--ContactGroup::ContactGroup(Connection *connection, const QString 
&serviceName, const QString &objPath, QObject *parent)
--    : d(new ContactGroupPrivate(connection, serviceName, objPath))
-+ContactGroup::ContactGroup(Connection *connection, const QString 
&serviceName, const QString &objPath, Channel *channel)
-+    : d(new ContactGroupPrivate(connection, serviceName, objPath, channel))
- {
-     Q_ASSERT(d);
-
--    QObject::connect(d->telepathyIChannelGroup, SIGNAL(GroupFlagsChanged(uint 
added, uint removed)), this, SLOT(onGroupFlagsChanged(uint added, uint 
removed)));
--    QObject::connect(d->telepathyIChannelGroup, SIGNAL(MembersChanged(const 
QString &message, const QList<uint> &added,
--                                                                      const 
QList<uint> &removed, const QList<uint> &local_pending,
--                                                                      const 
QList<uint> &remote_pending, uint actor, uint reason)),
-+    QObject::connect(d->telepathyIChannelGroup, 
SIGNAL(GroupFlagsChanged(uint, uint)), this, SLOT(onGroupFlagsChanged(uint, 
uint)));
-+    QObject::connect(d->telepathyIChannelGroup, SIGNAL(MembersChanged(const 
QString&, const QList<uint>&,
-+                                                                      const 
QList<uint>&, const QList<uint> &,
-+                                                                      const 
QList<uint>&, uint, uint)),
-                      this,
--                     SLOT(onMembersChanged(const QString &message, const 
QList<uint> &added,
--                                           const QList<uint> &removed, const 
QList<uint> &local_pending,
--                                           const QList<uint> &remote_pending, 
uint actor, uint reason)));
-+                     SLOT(onMembersChanged(const QString&, const QList<uint>&,
-+                                           const QList<uint>&, const 
QList<uint>&,
-+                                           const QList<uint>&, uint, uint)));
- }
-
- ContactGroup::~ContactGroup()
-@@ -154,6 +156,8 @@
-     return lc;
- }
-
-+Channel * ContactGroup::channel() const { return d->channel; }
-+
- QList<Contact *> ContactGroup::contactsFromContactList(QList<uint> ids) const
- {
-     uint i;
-@@ -162,10 +166,18 @@
-
-     foreach (i, ids) {
-         contact = d->conn->contactList()->contact(i);
--        if (contact)
--            lc << contact;
--        else
--            qDebug() << "Contact id:" << i << "not found.";
-+        if (!contact) {
-+            contact = d->conn->contactList()->addContact(i);
-+        }
-+        Q_ASSERT(0 != contact);
-+        lc << contact;
-+        // FIXME: Check if this function should always add a new contact
-+        // in the contactlist when it's not there.
-+        //if (contact)
-+        //    lc << contact;
-+        //else
-+        //    qDebug() << "Contact id:" << i << "not found.";
-+
-     }
-
-     return lc;
-@@ -173,6 +185,7 @@
-
- void ContactGroup::onGroupFlagsChanged(uint added, uint removed)
- {
-+    //TODO
- }
-
- void ContactGroup::onMembersChanged(const QString &message, const QList<uint> 
&added,
-diff -Naur tapioca-qt-0.14.1/src/contactlist.cpp tapioca-qt/src/contactlist.cpp
---- tapioca-qt-0.14.1/src/contactlist.cpp      2007-05-23 20:20:42.000000000 
+0200
-+++ tapioca-qt/src/contactlist.cpp     2007-11-20 21:25:07.000000000 +0100
-@@ -29,6 +29,7 @@
-
- #include <QDebug>
- #include <QtCore/QMutex>
-+#include <QtCore/QMutexLocker>
- #include <QtDBus/QDBusConnection>
- #include <QtDBus/QDBusConnectionInterface>
- #include <QtTelepathy/Client/Channel>
-@@ -250,6 +251,16 @@
-     d->mutex.unlock();
-     return contact;
- }
-+
-+Contact *ContactList::addContact(const uint id)
-+{
-+    Handle * handle(d->handleFactory->createHandle(Handle::Contact, id));
-+
-+    if (handle == 0) { return 0; }
-+
-+    return addContact(handle);
-+}
-+
- /*
-  * Remove Contact
-  */
-@@ -284,6 +295,8 @@
- Contact *ContactList::contact(const QString &uri) const
- {
-     Contact *contact;
-+
-+    QMutexLocker lock(&(d->mutex));
-     foreach (contact, d->contacts) {
-         if (contact->uri() == uri)
-             return contact;
-@@ -294,9 +307,15 @@
- /*
-  * Get Contact from id
-  */
--Contact *ContactList::contact(uint id) const
-+Contact * ContactList::contact(const uint id) const
- {
--    return d->contacts.value(id);
-+    Contact *c = NULL;
-+
-+    QMutexLocker lock(&(d->mutex));
-+    if (d->contacts.contains(id))
-+        c = d->contacts.value(id);
-+
-+    return c;
- }
-
- /*
-diff -Naur tapioca-qt-0.14.1/src/streamchannel.cpp 
tapioca-qt/src/streamchannel.cpp
---- tapioca-qt-0.14.1/src/streamchannel.cpp    2007-05-23 20:20:42.000000000 
+0200
-+++ tapioca-qt/src/streamchannel.cpp   2007-11-20 21:25:07.000000000 +0100
-@@ -45,19 +45,23 @@
- class StreamChannelPrivate {
- public:
-     StreamChannelPrivate(Connection *conn, const QString &serviceName, const 
QString &objPath)
--        : m_conn(conn)
-+        : m_conn(conn),
-+          telepathyChannelHandler(NULL)
-     {
-         telepathyStreamedMedia = new 
org::freedesktop::Telepathy::ChannelStreamedMedia(serviceName, objPath, 
QDBusConnection::sessionBus());
-         telepathyIChannelGroup = new 
org::freedesktop::Telepathy::ChannelGroupInterface(serviceName, objPath, 
QDBusConnection::sessionBus());
--        telepathyChannelHandler = new 
org::freedesktop::Telepathy::ChannelHandler(STREAM_ENGINE_IFACE, 
STREAM_ENGINE_PATH, QDBusConnection::sessionBus());
-         telepathyStreamEngine = new 
org::freedesktop::Telepathy::StreamEngine(STREAM_ENGINE_IFACE, 
STREAM_ENGINE_PATH, QDBusConnection::sessionBus());
-     }
-     ~StreamChannelPrivate()
-     {
-         delete telepathyStreamedMedia;
-         delete telepathyIChannelGroup;
--        delete telepathyStreamEngine;
--        delete telepathyChannelHandler;
-+
-+        if (telepathyStreamEngine)
-+            delete telepathyStreamEngine;
-+
-+        if (telepathyChannelHandler)
-+            delete telepathyChannelHandler;
-     }
-
-     QMutex mutex;
-@@ -84,15 +88,19 @@
-     QObject::connect(d->telepathyStreamedMedia, SIGNAL(StreamRemoved(uint)),
-                      this, SLOT(onStreamRemoved(uint)));
-
-+    if 
(hasSupportFor("org.freedesktop.Telepathy.Channel.Interface.MediaSignalling"))
-+        d->telepathyChannelHandler = new 
org::freedesktop::Telepathy::ChannelHandler(STREAM_ENGINE_IFACE, 
STREAM_ENGINE_PATH, QDBusConnection::sessionBus());
-
--    QDBusReply<void> ret = 
d->telepathyChannelHandler->HandleChannel(d->m_conn->serviceName(),
--                                                                     
QDBusObjectPath(d->m_conn->objectPath()),
--                                                                     
"org.freedesktop.Telepathy.Channel.Type.StreamedMedia",
--                                                                     
QDBusObjectPath(objectPath()),
--                                                                     0,
--                                                                     0);
--    if (!ret.isValid())
--        qDebug() << "error calling HandleChannel:" << ret.error().message();
-+    if (d->telepathyChannelHandler) {
-+        QDBusReply<void> ret = 
d->telepathyChannelHandler->HandleChannel(d->m_conn->serviceName(),
-+                                                                         
QDBusObjectPath(d->m_conn->objectPath()),
-+                                                                         
"org.freedesktop.Telepathy.Channel.Type.StreamedMedia",
-+                                                                         
QDBusObjectPath(objectPath()),
-+                                                                         0,
-+                                                                         0);
-+        if (!ret.isValid())
-+            qDebug() << "error calling HandleChannel:" << 
ret.error().message();
-+    }
-
-     updateStreamList();
-
-diff -Naur tapioca-qt-0.14.1/src/textchannel.cpp tapioca-qt/src/textchannel.cpp
---- tapioca-qt-0.14.1/src/textchannel.cpp      2007-05-23 20:20:42.000000000 
+0200
-+++ tapioca-qt/src/textchannel.cpp     2007-11-20 21:25:07.000000000 +0100
-@@ -39,7 +39,8 @@
- public:
-     TextChannelPrivate(Connection *_conn, const QString &serviceName, const 
QString &objPath)
-         :conn(_conn),
--         currentChatState(TextChannel::Inactive)
-+         currentChatState(TextChannel::Inactive),
-+         iChatState(NULL)
-     {
-         ch = new org::freedesktop::Telepathy::ChannelText(serviceName, 
objPath, QDBusConnection::sessionBus());
-
-@@ -172,7 +173,7 @@
- void TextChannel::onMessageReceived(uint id, uint timestamp, uint sender, 
uint type, uint flags, const QString &text)
- {
-     Message msg(text, timestamp, 
static_cast<TextChannel::Message::Type>(type), id, true);
--    emit messageReceived(msg);
-+    emit messageReceived(this, msg);
- }
-
- void TextChannel::onSendError(uint error, uint timestamp, uint type, const 
QString &text)
-diff -Naur tapioca-qt-0.14.1/tests/test.cpp tapioca-qt/tests/test.cpp
---- tapioca-qt-0.14.1/tests/test.cpp   2007-05-23 20:20:42.000000000 +0200
-+++ tapioca-qt/tests/test.cpp  2007-11-20 21:25:07.000000000 +0100
-@@ -104,8 +104,8 @@
-     MessageFilter messageFilter;
-     QObject::connect(conn, SIGNAL(statusChanged(QtTapioca::Connection *, 
QtTapioca::Connection::Status, QtTapioca::Connection::Reason)),
-                      &messageFilter, 
SLOT(onStatusChanged(QtTapioca::Connection *, QtTapioca::Connection::Status, 
QtTapioca::Connection::Reason)));
--    QObject::connect(conn, SIGNAL(channelCreated(QtTapioca::Connection *, 
QtTapioca::Channel *)),
--                     &messageFilter, 
SLOT(onChannelCreated(QtTapioca::Connection *, QtTapioca::Channel *)));
-+    QObject::connect(conn, SIGNAL(channelCreated(QtTapioca::Connection *, 
QtTapioca::Channel *, bool)),
-+                     &messageFilter, 
SLOT(onChannelCreated(QtTapioca::Connection *, QtTapioca::Channel *, bool)));
-     conn->connect(ContactBase::Available);
-
-     return app.exec();
-@@ -135,9 +135,30 @@
-     }
- }
-
--void MessageFilter::onChannelCreated(Connection *connection, Channel *channel)
-+void MessageFilter::onChannelCreated(Connection *connection, Channel 
*channel, bool suppress)
- {
--    if (channel->type() == Channel::Text)
--        dynamic_cast<TextChannel*>(channel)->sendMessage("reply");
-+    if (channel->type() == Channel::Text) {
-+        TextChannel *tch =  dynamic_cast<TextChannel*>(channel);
-+
-+        QList<TextChannel::Message> msgList = tch->pendingMessages();
-+        foreach (TextChannel::Message m, msgList) {
-+            qDebug() << m.contents();
-+            tch->acknowledge(m);
-+        }
-+
-+        QObject::connect(tch, SIGNAL(messageReceived(const 
QtTapioca::TextChannel *,
-+                                                     const 
QtTapioca::TextChannel::Message &)),
-+                         this,
-+                         SLOT(onMessageReceived(const QtTapioca::TextChannel 
*, const QtTapioca::TextChannel::Message &)));
-+    }
- }
-
-+void MessageFilter::onMessageReceived(const TextChannel *tch, const 
TextChannel::Message &msg)
-+{
-+    TextChannel *t =  const_cast<TextChannel*>(tch);
-+
-+    qDebug() << msg.contents();
-+
-+    t->sendMessage("reply");
-+    t->acknowledge(msg);
-+}
-diff -Naur tapioca-qt-0.14.1/tests/test.h tapioca-qt/tests/test.h
---- tapioca-qt-0.14.1/tests/test.h     2007-05-23 20:20:42.000000000 +0200
-+++ tapioca-qt/tests/test.h    2007-11-20 21:25:07.000000000 +0100
-@@ -23,6 +23,7 @@
-
- #include <QtCore/QObject>
- #include <QtTapioca/Connection>
-+#include <QtTapioca/TextChannel>
-
- using namespace QtTapioca;
-
-@@ -36,7 +37,8 @@
-
- public Q_SLOTS:
-     void onStatusChanged(QtTapioca::Connection *connection, 
QtTapioca::Connection::Status status, QtTapioca::Connection::Reason reason);
--    void onChannelCreated(QtTapioca::Connection *connection, 
QtTapioca::Channel *channel);
-+    void onChannelCreated(QtTapioca::Connection *connection, 
QtTapioca::Channel *channel, bool suppress);
-+    void onMessageReceived(const QtTapioca::TextChannel *tch, const 
QtTapioca::TextChannel::Message &);
- };
-
- #endif
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to