Basic infrastructure for file transfers
authorManuel Nickschas <sputnick@quassel-irc.org>
Thu, 26 Dec 2013 19:57:34 +0000 (20:57 +0100)
committerManuel Nickschas <sputnick@quassel-irc.org>
Thu, 26 Dec 2013 20:02:59 +0000 (21:02 +0100)
This introduces the Transfer class as well as TransferManager and the
specialized versions for client and core. It also adds the needed accessors
in Client and CoreSession as well as the SyncableObject stuff to make it all
work together.

To make something happen, a Transfer needs to be created on the core side with
the appropriate attributes; it needs then to be synchronized and handed over
to CoreTransferManager::addTransfer(). This will trigger the creation of the
appropriate Transfer object on the client side, adding this to the
ClientTransferManager as soon as synchronization is complete (meaning, the
transferAdded() signal will be fired with a fully synchronized Transfer object).

Note that the list of transfers is not synchronized (yet?), so there won't be a
transfer history on re-sync.

16 files changed:
src/client/CMakeLists.txt
src/client/client.cpp
src/client/client.h
src/client/clienttransfermanager.cpp [new file with mode: 0644]
src/client/clienttransfermanager.h [new file with mode: 0644]
src/common/CMakeLists.txt
src/common/quassel.cpp
src/common/transfer.cpp [new file with mode: 0644]
src/common/transfer.h [new file with mode: 0644]
src/common/transfermanager.cpp [new file with mode: 0644]
src/common/transfermanager.h [new file with mode: 0644]
src/core/CMakeLists.txt
src/core/coresession.cpp
src/core/coresession.h
src/core/coretransfermanager.cpp [new file with mode: 0644]
src/core/coretransfermanager.h [new file with mode: 0644]

index 3377771..b5fef02 100644 (file)
@@ -33,6 +33,7 @@ set(SOURCES
     clientignorelistmanager.cpp
     clientirclisthelper.cpp
     clientsettings.cpp
+    clienttransfermanager.cpp
     clientuserinputhandler.cpp
     coreaccount.cpp
     coreaccountmodel.cpp
@@ -60,6 +61,7 @@ set(MOC_HDRS
     clientidentity.h
     clientignorelistmanager.h
     clientirclisthelper.h
+    clienttransfermanager.h
     clientuserinputhandler.h
     coreaccountmodel.h
     coreconnection.h
index 238e001..7ab4e27 100644 (file)
@@ -34,6 +34,7 @@
 #include "clientirclisthelper.h"
 #include "clientidentity.h"
 #include "clientignorelistmanager.h"
+#include "clienttransfermanager.h"
 #include "clientuserinputhandler.h"
 #include "coreaccountmodel.h"
 #include "coreconnection.h"
@@ -102,6 +103,7 @@ Client::Client(QObject *parent)
     _inputHandler(0),
     _networkConfig(0),
     _ignoreListManager(0),
+    _transferManager(0),
     _messageModel(0),
     _messageProcessor(0),
     _coreAccountModel(new CoreAccountModel(this)),
@@ -404,6 +406,10 @@ void Client::setSyncedToCore()
     _ignoreListManager = new ClientIgnoreListManager(this);
     signalProxy()->synchronize(ignoreListManager());
 
+    Q_ASSERT(!_transferManager);
+    _transferManager = new ClientTransferManager(this);
+    signalProxy()->synchronize(transferManager());
+
     // trigger backlog request once all active bufferviews are initialized
     connect(bufferViewOverlay(), SIGNAL(initDone()), this, SLOT(requestInitialBacklog()));
 
index 74ad868..f56e62d 100644 (file)
@@ -49,6 +49,7 @@ class ClientBacklogManager;
 class ClientBufferViewManager;
 class ClientIgnoreListManager;
 class ClientIrcListHelper;
+class ClientTransferManager;
 class ClientUserInputHandler;
 class CoreAccountModel;
 class CoreConnection;
@@ -56,6 +57,7 @@ class IrcUser;
 class IrcChannel;
 class NetworkConfig;
 class SignalProxy;
+
 struct NetworkInfo;
 
 class Client : public QObject
@@ -117,6 +119,7 @@ public:
     static inline ClientUserInputHandler *inputHandler() { return instance()->_inputHandler; }
     static inline NetworkConfig *networkConfig() { return instance()->_networkConfig; }
     static inline ClientIgnoreListManager *ignoreListManager() { return instance()->_ignoreListManager; }
+    static inline ClientTransferManager *transferManager() { return instance()->_transferManager; }
 
     static inline CoreAccountModel *coreAccountModel() { return instance()->_coreAccountModel; }
     static inline CoreConnection *coreConnection() { return instance()->_coreConnection; }
@@ -234,6 +237,7 @@ private:
     ClientUserInputHandler *_inputHandler;
     NetworkConfig *_networkConfig;
     ClientIgnoreListManager *_ignoreListManager;
+    ClientTransferManager *_transferManager;
 
     MessageModel *_messageModel;
     AbstractMessageProcessor *_messageProcessor;
diff --git a/src/client/clienttransfermanager.cpp b/src/client/clienttransfermanager.cpp
new file mode 100644 (file)
index 0000000..b67c690
--- /dev/null
@@ -0,0 +1,53 @@
+/***************************************************************************
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
+ *   devel@quassel-irc.org                                                 *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU General Public License as published by  *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) version 3.                                           *
+ *                                                                         *
+ *   This program is distributed in the hope that it will be useful,       *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
+ *   GNU General Public License for more details.                          *
+ *                                                                         *
+ *   You should have received a copy of the GNU General Public License     *
+ *   along with this program; if not, write to the                         *
+ *   Free Software Foundation, Inc.,                                       *
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
+ ***************************************************************************/
+
+#include "clienttransfermanager.h"
+
+#include "client.h"
+#include "transfer.h"
+
+
+INIT_SYNCABLE_OBJECT(ClientTransferManager)
+ClientTransferManager::ClientTransferManager(QObject *parent)
+    : TransferManager(parent)
+{
+
+}
+
+
+void ClientTransferManager::onCoreTransferAdded(const QUuid &uuid)
+{
+    if (uuid.isNull()) {
+        qWarning() << Q_FUNC_INFO << "Invalid transfer uuid" << uuid.toString();
+        return;
+    }
+
+    Transfer *transfer = new Transfer(uuid, this);
+    connect(transfer, SIGNAL(initDone()), SLOT(onTransferInitDone())); // we only want to add initialized transfers
+    Client::signalProxy()->synchronize(transfer);
+}
+
+
+void ClientTransferManager::onTransferInitDone()
+{
+    Transfer *transfer = qobject_cast<Transfer *>(sender());
+    Q_ASSERT(transfer);
+    addTransfer(transfer);
+}
diff --git a/src/client/clienttransfermanager.h b/src/client/clienttransfermanager.h
new file mode 100644 (file)
index 0000000..6f60f72
--- /dev/null
@@ -0,0 +1,44 @@
+/***************************************************************************
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
+ *   devel@quassel-irc.org                                                 *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU General Public License as published by  *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) version 3.                                           *
+ *                                                                         *
+ *   This program is distributed in the hope that it will be useful,       *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
+ *   GNU General Public License for more details.                          *
+ *                                                                         *
+ *   You should have received a copy of the GNU General Public License     *
+ *   along with this program; if not, write to the                         *
+ *   Free Software Foundation, Inc.,                                       *
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
+ ***************************************************************************/
+
+#ifndef CLIENTTRANSFERMANAGER_H
+#define CLIENTTRANSFERMANAGER_H
+
+#include "transfermanager.h"
+
+#include <QUuid>
+
+class Transfer;
+
+class ClientTransferManager : public TransferManager
+{
+    Q_OBJECT
+    SYNCABLE_OBJECT
+
+public:
+    ClientTransferManager(QObject *parent = 0);
+
+public slots:
+    void onCoreTransferAdded(const QUuid &uuid);
+    void onTransferInitDone();
+
+};
+
+#endif
index 04fbe3b..ae7bfbe 100644 (file)
@@ -35,6 +35,8 @@ set(SOURCES
     settings.cpp
     signalproxy.cpp
     syncableobject.cpp
+    transfer.cpp
+    transfermanager.cpp
     util.cpp
 
     protocols/legacy/legacypeer.cpp
@@ -63,6 +65,8 @@ set(MOC_HDRS
     settings.h
     signalproxy.h
     syncableobject.h
+    transfer.h
+    transfermanager.h
 
     protocols/legacy/legacypeer.h
 )
index cd38fd2..0af9a4a 100644 (file)
@@ -35,6 +35,7 @@
 #include <QLibraryInfo>
 #include <QSettings>
 #include <QTranslator>
+#include <QUuid>
 
 #include "bufferinfo.h"
 #include "identity.h"
@@ -189,6 +190,7 @@ void Quassel::registerMetaTypes()
     qRegisterMetaType<MsgId>("MsgId");
 
     qRegisterMetaType<QHostAddress>("QHostAddress");
+    qRegisterMetaType<QUuid>("QUuid");
 
     qRegisterMetaTypeStreamOperators<IdentityId>("IdentityId");
     qRegisterMetaTypeStreamOperators<BufferId>("BufferId");
diff --git a/src/common/transfer.cpp b/src/common/transfer.cpp
new file mode 100644 (file)
index 0000000..523d9e3
--- /dev/null
@@ -0,0 +1,149 @@
+/***************************************************************************
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
+ *   devel@quassel-irc.org                                                 *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU General Public License as published by  *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) version 3.                                           *
+ *                                                                         *
+ *   This program is distributed in the hope that it will be useful,       *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
+ *   GNU General Public License for more details.                          *
+ *                                                                         *
+ *   You should have received a copy of the GNU General Public License     *
+ *   along with this program; if not, write to the                         *
+ *   Free Software Foundation, Inc.,                                       *
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
+ ***************************************************************************/
+
+#include "transfer.h"
+
+INIT_SYNCABLE_OBJECT(Transfer)
+Transfer::Transfer(const QUuid &uuid, QObject *parent)
+    : SyncableObject(parent),
+    _state(New),
+    _direction(Receive),
+    _port(0),
+    _fileSize(0),
+    _uuid(uuid)
+{
+    renameObject(QString("Transfer/%1").arg(_uuid.toString()));
+}
+
+Transfer::Transfer(Direction direction, const QString &fileName, const QHostAddress &address, quint16 port, quint64 fileSize, QObject *parent)
+    : SyncableObject(parent),
+    _state(New),
+    _direction(direction),
+    _fileName(fileName),
+    _address(address),
+    _port(port),
+    _fileSize(fileSize),
+    _uuid(QUuid::createUuid())
+{
+    renameObject(QString("Transfer/%1").arg(_uuid.toString()));
+}
+
+
+QUuid Transfer::uuid() const
+{
+    return _uuid;
+}
+
+
+Transfer::State Transfer::state() const
+{
+    return _state;
+}
+
+
+void Transfer::setState(Transfer::State state)
+{
+    if (_state != state) {
+        _state = state;
+        SYNC(ARG(state));
+        emit stateChanged(state);
+    }
+}
+
+
+
+Transfer::Direction Transfer::direction() const
+{
+    return _direction;
+}
+
+
+void Transfer::setDirection(Transfer::Direction direction)
+{
+    if (_direction != direction) {
+        _direction = direction;
+        SYNC(ARG(direction));
+        emit directionChanged(direction);
+    }
+}
+
+
+QHostAddress Transfer::address() const
+{
+    return _address;
+}
+
+
+void Transfer::setAddress(const QHostAddress &address)
+{
+    if (_address != address) {
+        _address = address;
+        SYNC(ARG(address));
+        emit addressChanged(address);
+    }
+}
+
+
+quint16 Transfer::port() const
+{
+    return _port;
+}
+
+
+void Transfer::setPort(quint16 port)
+{
+    if (_port != port) {
+        _port = port;
+        SYNC(ARG(port));
+        emit portChanged(port);
+    }
+}
+
+
+QString Transfer::fileName() const
+{
+    return _fileName;
+}
+
+
+void Transfer::setFileName(const QString &fileName)
+{
+    if (_fileName != fileName) {
+        _fileName = fileName;
+        SYNC(ARG(fileName));
+        emit fileNameChanged(fileName);
+    }
+}
+
+
+quint64 Transfer::fileSize() const
+{
+    return _fileSize;
+}
+
+
+void Transfer::setFileSize(quint64 fileSize)
+{
+    if (_fileSize != fileSize) {
+        _fileSize = fileSize;
+        SYNC(ARG(fileSize));
+        emit fileSizeChanged(fileSize);
+    }
+}
diff --git a/src/common/transfer.h b/src/common/transfer.h
new file mode 100644 (file)
index 0000000..88cf6f1
--- /dev/null
@@ -0,0 +1,99 @@
+/***************************************************************************
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
+ *   devel@quassel-irc.org                                                 *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU General Public License as published by  *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) version 3.                                           *
+ *                                                                         *
+ *   This program is distributed in the hope that it will be useful,       *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
+ *   GNU General Public License for more details.                          *
+ *                                                                         *
+ *   You should have received a copy of the GNU General Public License     *
+ *   along with this program; if not, write to the                         *
+ *   Free Software Foundation, Inc.,                                       *
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
+ ***************************************************************************/
+
+#ifndef TRANSFER_H
+#define TRANSFER_H
+
+#include <QHostAddress>
+#include <QUuid>
+
+#include "syncableobject.h"
+
+class Transfer : public SyncableObject
+{
+    Q_OBJECT
+    SYNCABLE_OBJECT
+
+    Q_PROPERTY(QUuid uuid READ uuid);
+    Q_PROPERTY(State state READ state WRITE setState NOTIFY stateChanged);
+    Q_PROPERTY(Direction direction READ direction WRITE setDirection NOTIFY directionChanged);
+    Q_PROPERTY(QHostAddress address READ address WRITE setAddress NOTIFY addressChanged);
+    Q_PROPERTY(quint16 port READ port WRITE setPort NOTIFY portChanged);
+    Q_PROPERTY(QString fileName READ fileName WRITE setFileName NOTIFY fileNameChanged);
+    Q_PROPERTY(quint64 fileSize READ fileSize WRITE setFileSize NOTIFY fileSizeChanged);
+
+public:
+    enum State {
+        New,
+        Pending,
+        Transferring,
+        Paused,
+        Completed,
+        Failed,
+        Rejected
+    };
+    Q_ENUMS(State)
+
+    enum Direction {
+        Send,
+        Receive
+    };
+    Q_ENUMS(Direction)
+
+    Transfer(const QUuid &uuid, QObject *parent = 0); // for creating a syncable object client-side
+    Transfer(Direction direction, const QString &fileName, const QHostAddress &address, quint16 port, quint64 size = 0, QObject *parent = 0);
+
+    QUuid uuid() const;
+    State state() const;
+    Direction direction() const;
+    QString fileName() const;
+    QHostAddress address() const;
+    quint16 port() const;
+    quint64 fileSize() const;
+
+signals:
+    void stateChanged(State state);
+    void directionChanged(Direction direction);
+    void addressChanged(const QHostAddress &address);
+    void portChanged(quint16 port);
+    void fileNameChanged(const QString &fileName);
+    void fileSizeChanged(quint64 fileSize);
+
+protected:
+    void setState(State state);
+
+private:
+    void setDirection(Direction direction);
+    void setAddress(const QHostAddress &address);
+    void setPort(quint16 port);
+    void setFileName(const QString &fileName);
+    void setFileSize(quint64 fileSize);
+
+
+    State _state;
+    Direction _direction;
+    QString _fileName;
+    QHostAddress _address;
+    quint16 _port;
+    quint64 _fileSize;
+    QUuid _uuid;
+};
+
+#endif
diff --git a/src/common/transfermanager.cpp b/src/common/transfermanager.cpp
new file mode 100644 (file)
index 0000000..f83635b
--- /dev/null
@@ -0,0 +1,47 @@
+/***************************************************************************
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
+ *   devel@quassel-irc.org                                                 *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU General Public License as published by  *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) version 3.                                           *
+ *                                                                         *
+ *   This program is distributed in the hope that it will be useful,       *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
+ *   GNU General Public License for more details.                          *
+ *                                                                         *
+ *   You should have received a copy of the GNU General Public License     *
+ *   along with this program; if not, write to the                         *
+ *   Free Software Foundation, Inc.,                                       *
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
+ ***************************************************************************/
+
+#include "transfermanager.h"
+
+#include "transfer.h"
+
+
+INIT_SYNCABLE_OBJECT(TransferManager)
+TransferManager::TransferManager(QObject *parent)
+    : SyncableObject(parent)
+{
+
+}
+
+
+void TransferManager::addTransfer(Transfer *transfer)
+{
+    QUuid uuid = transfer->uuid();
+    if (_transfers.contains(uuid)) {
+        qWarning() << "Cannot add the same file transfer twice!";
+        transfer->deleteLater();
+        return;
+    }
+    transfer->setParent(this);
+    _transfers[uuid] = transfer;
+
+    SYNC_OTHER(onCoreTransferAdded, ARG(uuid));
+    emit transferAdded(transfer);
+}
diff --git a/src/common/transfermanager.h b/src/common/transfermanager.h
new file mode 100644 (file)
index 0000000..e1f211a
--- /dev/null
@@ -0,0 +1,55 @@
+/***************************************************************************
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
+ *   devel@quassel-irc.org                                                 *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU General Public License as published by  *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) version 3.                                           *
+ *                                                                         *
+ *   This program is distributed in the hope that it will be useful,       *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
+ *   GNU General Public License for more details.                          *
+ *                                                                         *
+ *   You should have received a copy of the GNU General Public License     *
+ *   along with this program; if not, write to the                         *
+ *   Free Software Foundation, Inc.,                                       *
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
+ ***************************************************************************/
+
+#ifndef TRANSFERMANAGER_H
+#define TRANSFERMANAGER_H
+
+#include "syncableobject.h"
+
+#include <QUuid>
+
+class Transfer;
+
+class TransferManager : public SyncableObject
+{
+    Q_OBJECT
+    SYNCABLE_OBJECT
+
+public:
+    TransferManager(QObject *parent = 0);
+    inline virtual const QMetaObject *syncMetaObject() const { return &staticMetaObject; }
+
+    const Transfer *transfer(const QUuid &uuid) const;
+
+public slots:
+    void addTransfer(Transfer *transfer);
+
+signals:
+    void transferAdded(Transfer *transfer);
+
+protected slots:
+    virtual void onCoreTransferAdded(const QUuid &uuid) { Q_UNUSED(uuid) };
+
+private:
+    QHash<QUuid, Transfer *> _transfers;
+
+};
+
+#endif
index 42dac8f..265ac0d 100644 (file)
@@ -24,6 +24,7 @@ set(SOURCES
     coresession.cpp
     coresessioneventprocessor.cpp
     coresettings.cpp
+    coretransfermanager.cpp
     coreuserinputhandler.cpp
     coreusersettings.cpp
     ctcpparser.cpp
@@ -58,6 +59,7 @@ set(MOC_HDRS
     corenetworkconfig.h
     coresession.h
     coresessioneventprocessor.h
+    coretransfermanager.h
     coreuserinputhandler.h
     ctcpparser.h
     eventstringifier.h
index ce5026a..7fb524a 100644 (file)
@@ -34,6 +34,7 @@
 #include "corenetwork.h"
 #include "corenetworkconfig.h"
 #include "coresessioneventprocessor.h"
+#include "coretransfermanager.h"
 #include "coreusersettings.h"
 #include "ctcpparser.h"
 #include "eventstringifier.h"
@@ -66,6 +67,7 @@ CoreSession::CoreSession(UserId uid, bool restoreState, QObject *parent)
     _ircListHelper(new CoreIrcListHelper(this)),
     _networkConfig(new CoreNetworkConfig("GlobalNetworkConfig", this)),
     _coreInfo(this),
+    _transferManager(new CoreTransferManager(this)),
     _eventManager(new CoreEventManager(this)),
     _eventStringifier(new EventStringifier(this)),
     _sessionEventProcessor(new CoreSessionEventProcessor(this)),
@@ -120,6 +122,7 @@ CoreSession::CoreSession(UserId uid, bool restoreState, QObject *parent)
     p->synchronize(networkConfig());
     p->synchronize(&_coreInfo);
     p->synchronize(&_ignoreListManager);
+    p->synchronize(transferManager());
     // Restore session state
     if (restoreState)
         restoreSessionState();
index 59d6d51..510f9c8 100644 (file)
@@ -39,6 +39,7 @@ class CoreIrcListHelper;
 class CoreNetwork;
 class CoreNetworkConfig;
 class CoreSessionEventProcessor;
+class CoreTransferManager;
 class CtcpParser;
 class EventManager;
 class EventStringifier;
@@ -85,6 +86,8 @@ public:
     inline CoreIrcListHelper *ircListHelper() const { return _ircListHelper; }
 
     inline CoreIgnoreListManager *ignoreListManager() { return &_ignoreListManager; }
+    inline CoreTransferManager *transferManager() const { return _transferManager; }
+
 //   void attachNetworkConnection(NetworkConnection *conn);
 
     //! Return necessary data for restoring the session after restarting the core
@@ -199,6 +202,7 @@ private:
     CoreIrcListHelper *_ircListHelper;
     CoreNetworkConfig *_networkConfig;
     CoreCoreInfo _coreInfo;
+    CoreTransferManager *_transferManager;
 
     EventManager *_eventManager;
     EventStringifier *_eventStringifier; // should eventually move into client
diff --git a/src/core/coretransfermanager.cpp b/src/core/coretransfermanager.cpp
new file mode 100644 (file)
index 0000000..981ac28
--- /dev/null
@@ -0,0 +1,31 @@
+/***************************************************************************
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
+ *   devel@quassel-irc.org                                                 *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU General Public License as published by  *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) version 3.                                           *
+ *                                                                         *
+ *   This program is distributed in the hope that it will be useful,       *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
+ *   GNU General Public License for more details.                          *
+ *                                                                         *
+ *   You should have received a copy of the GNU General Public License     *
+ *   along with this program; if not, write to the                         *
+ *   Free Software Foundation, Inc.,                                       *
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
+ ***************************************************************************/
+
+#include "coretransfermanager.h"
+
+#include "transfer.h"
+
+
+INIT_SYNCABLE_OBJECT(CoreTransferManager)
+CoreTransferManager::CoreTransferManager(QObject *parent)
+    : TransferManager(parent)
+{
+
+}
diff --git a/src/core/coretransfermanager.h b/src/core/coretransfermanager.h
new file mode 100644 (file)
index 0000000..ea5777b
--- /dev/null
@@ -0,0 +1,36 @@
+/***************************************************************************
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
+ *   devel@quassel-irc.org                                                 *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU General Public License as published by  *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) version 3.                                           *
+ *                                                                         *
+ *   This program is distributed in the hope that it will be useful,       *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
+ *   GNU General Public License for more details.                          *
+ *                                                                         *
+ *   You should have received a copy of the GNU General Public License     *
+ *   along with this program; if not, write to the                         *
+ *   Free Software Foundation, Inc.,                                       *
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
+ ***************************************************************************/
+
+#ifndef CORETRANSFERMANAGER_H
+#define CORETRANSFERMANAGER_H
+
+#include "transfermanager.h"
+
+class CoreTransferManager : public TransferManager
+{
+    Q_OBJECT
+    SYNCABLE_OBJECT
+
+public:
+    CoreTransferManager(QObject *parent = 0);
+
+};
+
+#endif