aboutsummaryrefslogtreecommitdiffstats
path: root/net-im
diff options
context:
space:
mode:
authorarved <arved@FreeBSD.org>2008-02-11 00:46:53 +0800
committerarved <arved@FreeBSD.org>2008-02-11 00:46:53 +0800
commit05313bb68780decd3930023d04d79a31767dc19d (patch)
tree20e9c73e8fe76e2732690dc26e99426743b4f7df /net-im
parent4156fb5d4bd10a021610f2cb25a5d5af96e6154a (diff)
downloadfreebsd-ports-gnome-05313bb68780decd3930023d04d79a31767dc19d.tar.gz
freebsd-ports-gnome-05313bb68780decd3930023d04d79a31767dc19d.tar.zst
freebsd-ports-gnome-05313bb68780decd3930023d04d79a31767dc19d.zip
Add tapioca-qt, telepathy-complaint framework for real-time communication
Diffstat (limited to 'net-im')
-rw-r--r--net-im/Makefile1
-rw-r--r--net-im/tapioca-qt/Makefile41
-rw-r--r--net-im/tapioca-qt/distinfo3
-rw-r--r--net-im/tapioca-qt/files/patch-202014
-rw-r--r--net-im/tapioca-qt/files/patch-2023251
-rw-r--r--net-im/tapioca-qt/files/patch-connection.cpp-202395
-rw-r--r--net-im/tapioca-qt/files/patch-include-QtTapioca-CMakeLists.txt11
-rw-r--r--net-im/tapioca-qt/pkg-descr8
-rw-r--r--net-im/tapioca-qt/pkg-plist38
9 files changed, 462 insertions, 0 deletions
diff --git a/net-im/Makefile b/net-im/Makefile
index e9730ccc00c9..fcf62ed70aed 100644
--- a/net-im/Makefile
+++ b/net-im/Makefile
@@ -120,6 +120,7 @@
SUBDIR += sim-im
SUBDIR += sim-im-devel
SUBDIR += sulci
+ SUBDIR += tapioca-qt
SUBDIR += telepathy-butterfly
SUBDIR += telepathy-gabble
SUBDIR += telepathy-glib
diff --git a/net-im/tapioca-qt/Makefile b/net-im/tapioca-qt/Makefile
new file mode 100644
index 000000000000..448162a30d82
--- /dev/null
+++ b/net-im/tapioca-qt/Makefile
@@ -0,0 +1,41 @@
+# New ports collection Makefile for: tapioca-qt
+# Date created: 2008-02-10
+# Whom: arved
+#
+# $FreeBSD$
+
+PORTNAME= tapioca-qt
+PORTVERSION= 0.14.1
+CATEGORIES= net-im
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
+MASTER_SITE_SUBDIR= tapioca-voip
+
+MAINTAINER= arved@FreeBSD.org
+COMMENT= Framework for VoIP and IP applications
+
+LIB_DEPENDS= QtTelepathyCore.0:${PORTSDIR}/net-im/telepathy-qt
+
+WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}/build
+CMAKE?= ${LOCALBASE}/bin/cmake
+CMAKE_ARGS= -DCMAKE_BUILD_TYPE=DEBUG \
+ -DCMAKE_INSTALL_PREFIX=${PREFIX} \
+ -DCMAKE_C_COMPILER:STRING='${CC}' \
+ -DCMAKE_C_FLAGS:STRING="${CFLAGS}" \
+ -DCMAKE_CXX_COMPILER:STRING=${CXX} \
+ -DCMAKE_CXX_FLAGS:STRING="${CXXFLAGS}"
+USE_QT_VER= 4
+QT_COMPONENTS= corelib qmake uic moc rcc
+USE_LDCONFIG= yes
+
+post-extract:
+ ${MKDIR} ${WRKSRC}
+
+post-patch:
+ ${REINPLACE_CMD} -e \
+ "s,$${LIB_INSTALL_DIR}/pkgconfig,data/pkgconfig,g"\
+ ${WRKSRC}/../CMakeLists.txt
+
+do-configure:
+ cd ${WRKSRC}; ${SETENV} ${CONFIGURE_ENV} ${CMAKE} ${CMAKE_ARGS} ..
+
+.include <bsd.port.mk>
diff --git a/net-im/tapioca-qt/distinfo b/net-im/tapioca-qt/distinfo
new file mode 100644
index 000000000000..5ea3851feb84
--- /dev/null
+++ b/net-im/tapioca-qt/distinfo
@@ -0,0 +1,3 @@
+MD5 (tapioca-qt-0.14.1.tar.gz) = 169318705af6386057b537c5317d520d
+SHA256 (tapioca-qt-0.14.1.tar.gz) = ba25668286eccfa25c5908a639ae761b88271c14a790e82903b2d494e34c90ac
+SIZE (tapioca-qt-0.14.1.tar.gz) = 644166
diff --git a/net-im/tapioca-qt/files/patch-2020 b/net-im/tapioca-qt/files/patch-2020
new file mode 100644
index 000000000000..9be498ce1c8e
--- /dev/null
+++ b/net-im/tapioca-qt/files/patch-2020
@@ -0,0 +1,14 @@
+Index: src/contactbase.cpp
+===================================================================
+--- ../src/contactbase.cpp (revision 2019)
++++ ../src/contactbase.cpp (revision 2020)
+@@ -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 --git a/net-im/tapioca-qt/files/patch-2023 b/net-im/tapioca-qt/files/patch-2023
new file mode 100644
index 000000000000..24d6b011a803
--- /dev/null
+++ b/net-im/tapioca-qt/files/patch-2023
@@ -0,0 +1,251 @@
+Index: include/QtTapioca/contactgroup.h
+===================================================================
+--- ../include/QtTapioca/contactgroup.h (revision 2022)
++++ ../include/QtTapioca/contactgroup.h (revision 2023)
+@@ -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
+Index: include/QtTapioca/channel.h
+===================================================================
+--- ../include/QtTapioca/channel.h (revision 2022)
++++ ../include/QtTapioca/channel.h (revision 2023)
+@@ -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();
+
+Index: include/QtTapioca/contactlist.h
+===================================================================
+--- ../include/QtTapioca/contactlist.h (revision 2022)
++++ ../include/QtTapioca/contactlist.h (revision 2023)
+@@ -102,8 +102,8 @@
+ QObject *parent = 0);
+
+ void loadContacts();
+- Contact *contact(Handle *handle) const;
+- Contact *contact(uint id) const;
++ Contact *contact(Handle *handle);
++ Contact *contact(uint id);
+ Contact *addContact(const Handle *handle);
+
+ ContactListPrivate *d;
+Index: src/contactgroup.cpp
+===================================================================
+--- ../src/contactgroup.cpp (revision 2022)
++++ ../src/contactgroup.cpp (revision 2023)
+@@ -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;
+Index: src/channel.cpp
+===================================================================
+--- ../src/channel.cpp (revision 2022)
++++ ../src/channel.cpp (revision 2023)
+@@ -25,6 +25,7 @@
+
+ #include "QtTapioca/Channel"
+ #include "QtTapioca/ChannelTarget"
++#include "QtTapioca/ContactGroup"
+
+ #include <QtDBus/QDBusConnection>
+ #include <QtDBus/QDBusConnectionInterface>
+@@ -54,7 +55,7 @@
+ Connection *conn;
+ org::freedesktop::Telepathy::Channel *ch;
+ ChannelTarget* target;
+- ContactGroup *cg;
++ ContactGroup * cg;
+ bool join;
+ };
+
+@@ -99,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;
++}
++
+Index: src/contactlist.cpp
+===================================================================
+--- ../src/contactlist.cpp (revision 2022)
++++ ../src/contactlist.cpp (revision 2023)
+@@ -29,6 +29,7 @@
+
+ #include <QDebug>
+ #include <QtCore/QMutex>
++#include <QtCore/QMutexLocker>
+ #include <QtDBus/QDBusConnection>
+ #include <QtDBus/QDBusConnectionInterface>
+ #include <QtTelepathy/Client/Channel>
+@@ -273,7 +274,7 @@
+ /*
+ * Get Contact from Handle
+ */
+-Contact *ContactList::contact(Handle *handle) const
++Contact *ContactList::contact(Handle *handle)
+ {
+ return contact(handle->id());
+ }
+@@ -294,9 +295,30 @@
+ /*
+ * Get Contact from id
+ */
+-Contact *ContactList::contact(uint id) const
++Contact * ContactList::contact(const uint id)
+ {
+- return d->contacts.value(id);
++ QMutexLocker lock(&(d->mutex));
++ if (d->contacts.contains(id))
++ { return d->contacts.value(id); }
++
++ // Handle connections without a contact list:
++ Handle * handle(d->handleFactory->createHandle(Handle::Contact, id));
++
++ if (0 == handle) { return 0; }
++ Contact * c(new Contact(d->telepathyConn,
++ d->telepathyIAvatar,
++ d->telepathyIPresence,
++ d->telepathyIAliasing,
++ d->telepathyICapabilities,
++ d->lists[CONTACT_LIST_TYPE_SUBSCRIBE],
++ d->lists[CONTACT_LIST_TYPE_PUBLISH],
++ d->lists[CONTACT_LIST_TYPE_HIDE],
++ d->lists[CONTACT_LIST_TYPE_ALLOW],
++ d->lists[CONTACT_LIST_TYPE_DENY],
++ handle, this));
++ d->contacts[id] = c;
++
++ return c;
+ }
+
+ /*
diff --git a/net-im/tapioca-qt/files/patch-connection.cpp-2023 b/net-im/tapioca-qt/files/patch-connection.cpp-2023
new file mode 100644
index 000000000000..88f6313057d3
--- /dev/null
+++ b/net-im/tapioca-qt/files/patch-connection.cpp-2023
@@ -0,0 +1,95 @@
+--- ../src/connection.cpp.orig 2007-05-23 20:20:42.000000000 +0200
++++ ../src/connection.cpp 2008-02-10 15:57:31.000000000 +0100
+@@ -139,6 +139,7 @@
+ QObject::connect(d->conn, SIGNAL(StatusChanged(uint,uint)), this, SLOT(onStatusChanged(uint,uint)));
+
+ updateOpenChannels();
++ if (d->status == Connected) { d->loadInterfaces(); }
+ }
+
+ /*
+@@ -196,16 +197,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 +217,6 @@
+ this, SLOT(onChannelDestroyed()));
+ }
+
+- d->mutex.unlock();
+-
+ return channel;
+ }
+
+@@ -251,9 +248,10 @@
+ ContactList *Connection::contactList()
+ {
+ if (d->status == Connection::Disconnected)
+- return 0;
++ { return 0; }
+
+- if (!d->cl) {
++ if (!d->cl)
++ {
+ d->cl = new ContactList(d->conn,
+ d->iAvatar,
+ d->iPresence,
+@@ -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);
+ }
+
+@@ -332,14 +331,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 +345,6 @@
+ contact = d->cl->addContact(handle);
+ if (!contact) {
+ qDebug() << "error creating a contact.";
+- d->mutex.unlock();
+ return NULL;
+ }
+ }
+@@ -364,8 +360,6 @@
+ this, SLOT(onChannelDestroyed()));
+ }
+
+- d->mutex.unlock();
+-
+ return channel;
+ }
+
diff --git a/net-im/tapioca-qt/files/patch-include-QtTapioca-CMakeLists.txt b/net-im/tapioca-qt/files/patch-include-QtTapioca-CMakeLists.txt
new file mode 100644
index 000000000000..2170881b0146
--- /dev/null
+++ b/net-im/tapioca-qt/files/patch-include-QtTapioca-CMakeLists.txt
@@ -0,0 +1,11 @@
+--- ../include/QtTapioca/CMakeLists.txt 2007/06/15 08:40:29 1981
++++ ../include/QtTapioca/CMakeLists.txt 2007/07/20 15:33:04 2019
+@@ -18,6 +18,8 @@
+ contact.h
+ ContactBase
+ contactbase.h
++ ContactGroup
++ contactgroup.h
+ ContactList
+ contactlist.h
+ DBusProxyObject
diff --git a/net-im/tapioca-qt/pkg-descr b/net-im/tapioca-qt/pkg-descr
new file mode 100644
index 000000000000..ef51e60c0766
--- /dev/null
+++ b/net-im/tapioca-qt/pkg-descr
@@ -0,0 +1,8 @@
+The Tapioca project provides a set of convenience libraries to easily
+integrate VoIP and IM in your application, or even write new ones.
+
+Tapioca follows the standard defined by the Telepathy project and therefore,
+operates seamlessly with its connection managers and other software that
+follows it as well.
+
+WWW: http://tapioca-voip.sourceforge.net/
diff --git a/net-im/tapioca-qt/pkg-plist b/net-im/tapioca-qt/pkg-plist
new file mode 100644
index 000000000000..332da308ad70
--- /dev/null
+++ b/net-im/tapioca-qt/pkg-plist
@@ -0,0 +1,38 @@
+libdata/pkgconfig/QtTapioca.pc
+lib/libQtTapioca.so.0.1.0
+lib/libQtTapioca.so.0
+lib/libQtTapioca.so
+include/QtTapioca/Avatar
+include/QtTapioca/avatar.h
+include/QtTapioca/CMakeLists.txt
+include/QtTapioca/Channel
+include/QtTapioca/channel.h
+include/QtTapioca/ChannelTarget
+include/QtTapioca/channeltarget.h
+include/QtTapioca/Connection
+include/QtTapioca/connection.h
+include/QtTapioca/ConnectionManager
+include/QtTapioca/ConnectionManagerFactory
+include/QtTapioca/connectionmanagerfactory.h
+include/QtTapioca/connectionmanager.h
+include/QtTapioca/Contact
+include/QtTapioca/contact.h
+include/QtTapioca/ContactBase
+include/QtTapioca/contactbase.h
+include/QtTapioca/ContactGroup
+include/QtTapioca/contactgroup.h
+include/QtTapioca/ContactList
+include/QtTapioca/contactlist.h
+include/QtTapioca/DBusProxyObject
+include/QtTapioca/dbusproxyobject.h
+include/QtTapioca/Handle
+include/QtTapioca/handle.h
+include/QtTapioca/HandleFactory
+include/QtTapioca/handlefactory.h
+include/QtTapioca/UserContact
+include/QtTapioca/usercontact.h
+include/QtTapioca/TextChannel
+include/QtTapioca/textchannel.h
+include/QtTapioca/StreamChannel
+include/QtTapioca/Stream
+@dirrm include/QtTapioca