[telepathy-qt4/master] Removed PendingClientOperation class.

Andre Moreira Magalhaes (andrunko) andre.magalhaes at collabora.co.uk
Thu May 14 13:19:36 PDT 2009


---
 TelepathyQt4/Makefile.am                  |    4 --
 TelepathyQt4/PendingClientOperation       |   13 -----
 TelepathyQt4/pending-client-operation.cpp |   78 -----------------------------
 TelepathyQt4/pending-client-operation.h   |   63 -----------------------
 4 files changed, 0 insertions(+), 158 deletions(-)
 delete mode 100644 TelepathyQt4/PendingClientOperation
 delete mode 100644 TelepathyQt4/pending-client-operation.cpp
 delete mode 100644 TelepathyQt4/pending-client-operation.h

diff --git a/TelepathyQt4/Makefile.am b/TelepathyQt4/Makefile.am
index 0b76a1f..8e76306 100644
--- a/TelepathyQt4/Makefile.am
+++ b/TelepathyQt4/Makefile.am
@@ -74,7 +74,6 @@ libtelepathy_qt4_la_SOURCES = \
     optional-interface-factory.cpp \
     pending-account.cpp \
     pending-channel.cpp \
-    pending-client-operation.cpp \
     pending-connection.cpp \
     pending-contact-attributes.cpp \
     pending-contacts.cpp \
@@ -133,7 +132,6 @@ nodist_libtelepathy_qt4_la_SOURCES = \
     _gen/file-transfer.moc.hpp \
     _gen/pending-account.moc.hpp \
     _gen/pending-channel.moc.hpp \
-    _gen/pending-client-operation.moc.hpp \
     _gen/pending-connection.moc.hpp \
     _gen/pending-contact-attributes.moc.hpp \
     _gen/pending-contacts.moc.hpp \
@@ -176,7 +174,6 @@ tpqt4include_HEADERS = \
     OptionalInterfaceFactory \
     PendingAccount \
     PendingChannel \
-    PendingClientOperation \
     PendingConnection \
     PendingContacts \
     PendingContactAttributes \
@@ -264,7 +261,6 @@ tpqt4include_HEADERS = \
     optional-interface-factory.h \
     pending-account.h \
     pending-channel.h \
-    pending-client-operation.h \
     pending-connection.h \
     pending-contact-attributes.h \
     pending-contacts.h \
diff --git a/TelepathyQt4/PendingClientOperation b/TelepathyQt4/PendingClientOperation
deleted file mode 100644
index 2128ce5..0000000
--- a/TelepathyQt4/PendingClientOperation
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef _TelepathyQt4_Client_PendingClientOperation_HEADER_GUARD_
-#define _TelepathyQt4_Client_PendingClientOperation_HEADER_GUARD_
-
-#ifndef IN_TELEPATHY_QT4_HEADER
-#define IN_TELEPATHY_QT4_HEADER
-#endif
-
-#include <TelepathyQt4/pending-client-operation.h>
-
-#undef IN_TELEPATHY_QT4_HEADER
-
-#endif
-// vim:set ft=cpp:
diff --git a/TelepathyQt4/pending-client-operation.cpp b/TelepathyQt4/pending-client-operation.cpp
deleted file mode 100644
index c060e0f..0000000
--- a/TelepathyQt4/pending-client-operation.cpp
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * This file is part of TelepathyQt4
- *
- * Copyright (C) 2009 Collabora Ltd. <http://www.collabora.co.uk/>
- * Copyright (C) 2009 Nokia Corporation
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#include <TelepathyQt4/PendingClientOperation>
-
-#include "TelepathyQt4/_gen/pending-client-operation.moc.hpp"
-
-namespace Tp
-{
-
-struct PendingClientOperation::Private
-{
-    Private(const QDBusConnection &bus, const QDBusMessage &message)
-        : bus(bus), message(message)
-    {
-    }
-
-    QDBusConnection bus;
-    QDBusMessage message;
-};
-
-PendingClientOperation::PendingClientOperation(const QDBusConnection &bus,
-        const QDBusMessage &message, QObject *parent)
-    : PendingOperation(parent),
-      mPriv(new Private(bus, message))
-{
-    message.setDelayedReply(true);
-}
-
-PendingClientOperation::~PendingClientOperation()
-{
-    delete mPriv;
-}
-
-void PendingClientOperation::setFinished()
-{
-    if (!isFinished()) {
-        mPriv->bus.send(mPriv->message.createReply());
-    }
-    PendingOperation::setFinished();
-}
-
-void PendingClientOperation::setFinishedWithError(const QString &name,
-        const QString &message)
-{
-    if (!isFinished()) {
-        mPriv->bus.send(mPriv->message.createErrorReply(name, message));
-    }
-    PendingOperation::setFinishedWithError(name, message);
-}
-
-void PendingClientOperation::setFinishedWithError(const QDBusError &error)
-{
-    if (!isFinished()) {
-        mPriv->bus.send(mPriv->message.createErrorReply(error));
-    }
-    PendingOperation::setFinishedWithError(error);
-}
-
-} // Tp
diff --git a/TelepathyQt4/pending-client-operation.h b/TelepathyQt4/pending-client-operation.h
deleted file mode 100644
index c1b7282..0000000
--- a/TelepathyQt4/pending-client-operation.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * This file is part of TelepathyQt4
- *
- * Copyright (C) 2009 Collabora Ltd. <http://www.collabora.co.uk/>
- * Copyright (C) 2009 Nokia Corporation
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#ifndef _TelepathyQt4_cli_pending_client_operation_h_HEADER_GUARD_
-#define _TelepathyQt4_cli_pending_client_operation_h_HEADER_GUARD_
-
-#ifndef IN_TELEPATHY_QT4_HEADER
-#error IN_TELEPATHY_QT4_HEADER
-#endif
-
-#include <TelepathyQt4/PendingOperation>
-
-#include <QDBusConnection>
-#include <QDBusMessage>
-
-namespace Tp
-{
-
-class PendingClientOperation : public PendingOperation
-{
-    Q_OBJECT
-    Q_DISABLE_COPY(PendingClientOperation)
-
-public:
-    PendingClientOperation(const QDBusConnection &bus,
-            const QDBusMessage &message,
-            QObject *parent);
-    ~PendingClientOperation();
-
-    // overload as public methods so clients (Handler, Approver, Observer) can
-    // call this method when finished processing a async method to send
-    // a reply.
-    void setFinished();
-    void setFinishedWithError(const QString &name, const QString &message);
-    void setFinishedWithError(const QDBusError &error);
-
-private:
-    struct Private;
-    friend struct Private;
-    Private *mPriv;
-};
-
-} // Tp
-
-#endif
-- 
1.5.6.5




More information about the telepathy-commits mailing list