[Telepathy-commits] [telepathy-qt4/master] Add stub PendingContacts
Olli Salli
olli.salli at collabora.co.uk
Wed Jan 28 04:57:47 PST 2009
---
TelepathyQt4/Client/PendingContacts | 13 ++++++
TelepathyQt4/Client/pending-contacts.cpp | 61 ++++++++++++++++++++++++++
TelepathyQt4/Client/pending-contacts.h | 69 ++++++++++++++++++++++++++++++
TelepathyQt4/Makefile.am | 5 ++-
4 files changed, 147 insertions(+), 1 deletions(-)
create mode 100644 TelepathyQt4/Client/PendingContacts
create mode 100644 TelepathyQt4/Client/pending-contacts.cpp
create mode 100644 TelepathyQt4/Client/pending-contacts.h
diff --git a/TelepathyQt4/Client/PendingContacts b/TelepathyQt4/Client/PendingContacts
new file mode 100644
index 0000000..4ba8567
--- /dev/null
+++ b/TelepathyQt4/Client/PendingContacts
@@ -0,0 +1,13 @@
+#ifndef _TelepathyQt4_Client_PendingContacts_HEADER_GUARD_
+#define _TelepathyQt4_Client_PendingContacts_HEADER_GUARD_
+
+#ifndef IN_TELEPATHY_QT4_HEADER
+#define IN_TELEPATHY_QT4_HEADER
+#endif
+
+#include <TelepathyQt4/Client/pending-contacts.h>
+
+#undef IN_TELEPATHY_QT4_HEADER
+
+#endif
+// vim:set ft=cpp:
diff --git a/TelepathyQt4/Client/pending-contacts.cpp b/TelepathyQt4/Client/pending-contacts.cpp
new file mode 100644
index 0000000..7fc4f46
--- /dev/null
+++ b/TelepathyQt4/Client/pending-contacts.cpp
@@ -0,0 +1,61 @@
+/*
+ * This file is part of TelepathyQt4
+ *
+ * Copyright (C) 2008 Collabora Ltd. <http://www.collabora.co.uk/>
+ * Copyright (C) 2008 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/Client/PendingContacts>
+#include "TelepathyQt4/Client/_gen/pending-contacts.moc.hpp"
+
+#include <TelepathyQt4/Client/Connection>
+#include "TelepathyQt4/debug-internal.h"
+
+namespace Telepathy
+{
+namespace Client
+{
+
+struct PendingContacts::Private
+{
+ Private(Connection *connection, const UIntList &handles, const QSet<Contact::Feature> &features)
+ : connection(connection), handles(handles), features(features)
+ {
+ }
+
+ Connection *connection;
+ UIntList handles;
+ QSet<Contact::Feature> features;
+};
+
+PendingContacts::PendingContacts(Connection *connection,
+ const UIntList &handles, const QSet<Contact::Feature> &features)
+ : PendingOperation(connection),
+ mPriv(new Private(connection, handles, features))
+{
+}
+
+/**
+ * Class destructor.
+ */
+PendingContacts::~PendingContacts()
+{
+ delete mPriv;
+}
+
+} // Telepathy::Client
+} // Telepathy
diff --git a/TelepathyQt4/Client/pending-contacts.h b/TelepathyQt4/Client/pending-contacts.h
new file mode 100644
index 0000000..92cf412
--- /dev/null
+++ b/TelepathyQt4/Client/pending-contacts.h
@@ -0,0 +1,69 @@
+/*
+ * This file is part of TelepathyQt4
+ *
+ * Copyright (C) 2008 Collabora Ltd. <http://www.collabora.co.uk/>
+ * Copyright (C) 2008 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_contacts_h_HEADER_GUARD_
+#define _TelepathyQt4_cli_pending_contacts_h_HEADER_GUARD_
+
+#ifndef IN_TELEPATHY_QT4_HEADER
+#error IN_TELEPATHY_QT4_HEADER
+#endif
+
+#include <TelepathyQt4/Types>
+#include <TelepathyQt4/Client/Contact>
+#include <TelepathyQt4/Client/PendingOperation>
+
+namespace Telepathy
+{
+namespace Client
+{
+
+class Connection;
+class ContactManager;
+
+class PendingContacts : public PendingOperation
+{
+ Q_OBJECT
+
+public:
+ ~PendingContacts();
+
+ ContactManager *contactManager() const;
+ UIntList handles() const;
+ QSet<Contact::Feature> features() const;
+
+private Q_SLOTS:
+ void onAttributesFinished(PendingOperation *);
+
+private:
+ Q_DISABLE_COPY(PendingContacts);
+ PendingContacts(Connection *connection, const UIntList &handles,
+ const QSet<Contact::Feature> &features);
+
+ struct Private;
+ friend struct Private;
+ friend class ContactManager;
+ Private *mPriv;
+};
+
+} // Telepathy::Client
+} // Telepathy
+
+#endif
diff --git a/TelepathyQt4/Makefile.am b/TelepathyQt4/Makefile.am
index 55d1503..79fc8ca 100644
--- a/TelepathyQt4/Makefile.am
+++ b/TelepathyQt4/Makefile.am
@@ -54,6 +54,7 @@ libtelepathy_qt4_la_SOURCES = \
Client/pending-channel.cpp \
Client/pending-connection.cpp \
Client/pending-contact-attributes.cpp \
+ Client/pending-contacts.cpp \
Client/pending-handles.cpp \
Client/pending-operation.cpp \
Client/pending-string-list.cpp \
@@ -96,9 +97,10 @@ nodist_libtelepathy_qt4_la_SOURCES = \
Client/_gen/connection-manager-internal.moc.hpp \
Client/_gen/dbus-proxy.moc.hpp \
Client/_gen/pending-account.moc.hpp \
- Client/_gen/pending-connection.moc.hpp \
Client/_gen/pending-channel.moc.hpp \
+ Client/_gen/pending-connection.moc.hpp \
Client/_gen/pending-contact-attributes.moc.hpp \
+ Client/_gen/pending-contacts.moc.hpp \
Client/_gen/pending-handles.moc.hpp \
Client/_gen/pending-operation.moc.hpp \
Client/_gen/pending-string-list.moc.hpp \
@@ -192,6 +194,7 @@ tpqt4clientinclude_HEADERS = \
Client/pending-channel.h \
Client/pending-connection.h \
Client/pending-contact-attributes.h \
+ Client/pending-contacts.h \
Client/pending-handles.h \
Client/pending-operation.h \
Client/pending-string-list.h \
--
1.5.6.5
More information about the telepathy-commits
mailing list