diff options
author | Alex <qt-info@nokia.com> | 2009-11-10 15:16:06 +1000 |
---|---|---|
committer | Alex <qt-info@nokia.com> | 2009-11-10 15:16:06 +1000 |
commit | 64cb87a7df1bf0f414da98114231d0481e365e5a (patch) | |
tree | 42ebe44ab66467ed8b4bb7d908df37bd1d7681fe /src/messaging/qmessagestore_maemo.cpp | |
parent | 2bdc619ac29b33c9be82a153fdb929e8e72865cd (diff) |
move all libraries to src/ subdir
Diffstat (limited to 'src/messaging/qmessagestore_maemo.cpp')
-rw-r--r-- | src/messaging/qmessagestore_maemo.cpp | 212 |
1 files changed, 212 insertions, 0 deletions
diff --git a/src/messaging/qmessagestore_maemo.cpp b/src/messaging/qmessagestore_maemo.cpp new file mode 100644 index 0000000000..487b75d5f4 --- /dev/null +++ b/src/messaging/qmessagestore_maemo.cpp @@ -0,0 +1,212 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#include "qmessagestore.h" +#include "qmessagestore_p.h" + +class QMessageStorePrivatePlatform +{ +public: + QMessageStorePrivatePlatform(QMessageStorePrivate *d, QMessageStore *q) + :d_ptr(d), q_ptr(q) {} + QMessageStorePrivate *d_ptr; + QMessageStore *q_ptr; + //... +}; + +QMessageStorePrivate::QMessageStorePrivate() + :q_ptr(0), + p_ptr(0) +{ +} + +void QMessageStorePrivate::initialize(QMessageStore *store) +{ + q_ptr = store; + p_ptr = new QMessageStorePrivatePlatform(this, store); +} + +Q_GLOBAL_STATIC(QMessageStorePrivate,data); + +QMessageStore::QMessageStore(QObject *parent) + : QObject(parent), + d_ptr(data()) +{ + Q_ASSERT(d_ptr != 0); + Q_ASSERT(d_ptr->q_ptr == 0); // QMessageStore should be singleton + d_ptr->initialize(this); +} + +QMessageStore::~QMessageStore() +{ + d_ptr = 0; // should be cleaned up by automatically +} + +QMessageStore* QMessageStore::instance() +{ + QMessageStorePrivate *d = data(); + Q_ASSERT(d != 0); + if (!d->q_ptr) + d->initialize(new QMessageStore()); + return d->q_ptr; +} + +QMessageStore::ErrorCode QMessageStore::lastError() const +{ + return NotYetImplemented; +} + +QMessageIdList QMessageStore::queryMessages(const QMessageFilter &filter, const QMessageOrdering &ordering, uint limit, uint offset) const +{ + Q_UNUSED(filter) + Q_UNUSED(ordering) + Q_UNUSED(limit) + Q_UNUSED(offset) + return QMessageIdList(); // stub +} + +QMessageIdList QMessageStore::queryMessages(const QMessageFilter &filter, const QString &body, QMessageDataComparator::Options options, const QMessageOrdering &ordering, uint limit, uint offset) const +{ + Q_UNUSED(filter) + Q_UNUSED(ordering) + Q_UNUSED(body) + Q_UNUSED(options) + Q_UNUSED(limit) + Q_UNUSED(offset) + return QMessageIdList(); // stub +} + +#ifdef QMESSAGING_OPTIONAL_FOLDER +QMessageFolderIdList QMessageStore::queryFolders(const QMessageFolderFilter &filter, const QMessageFolderOrdering &ordering, uint limit, uint offset) const +{ + Q_UNUSED(filter) + Q_UNUSED(ordering) + Q_UNUSED(limit) + Q_UNUSED(offset) + return QMessageFolderIdList(); // stub +} +#endif + +QMessageAccountIdList QMessageStore::queryAccounts(const QMessageAccountFilter &filter, const QMessageAccountOrdering &ordering, uint limit, uint offset) const +{ + Q_UNUSED(filter) + Q_UNUSED(ordering) + Q_UNUSED(limit) + Q_UNUSED(offset) + return QMessageAccountIdList(); // stub +} + +int QMessageStore::countMessages(const QMessageFilter& filter) const +{ + Q_UNUSED(filter) + return 0; // stub +} + +#ifdef QMESSAGING_OPTIONAL_FOLDER +int QMessageStore::countFolders(const QMessageFolderFilter& filter) const +{ + Q_UNUSED(filter) + return 0; // stub +} +#endif + +int QMessageStore::countAccounts(const QMessageAccountFilter& filter) const +{ + Q_UNUSED(filter) + return 0; // stub +} + +bool QMessageStore::removeMessage(const QMessageId& id, RemovalOption option) +{ + Q_UNUSED(id) + Q_UNUSED(option) + return false; // stub +} + +bool QMessageStore::removeMessages(const QMessageFilter& filter, QMessageStore::RemovalOption option) +{ + Q_UNUSED(filter) + Q_UNUSED(option) + return true; // stub +} + +bool QMessageStore::addMessage(QMessage *m) +{ + Q_UNUSED(m) + return true; // stub +} + +bool QMessageStore::updateMessage(QMessage *m) +{ + Q_UNUSED(m) + return true; // stub +} + +QMessage QMessageStore::message(const QMessageId& id) const +{ + Q_UNUSED(id) + return QMessage(); // stub +} + +#ifdef QMESSAGING_OPTIONAL_FOLDER +QMessageFolder QMessageStore::folder(const QMessageFolderId& id) const +{ + Q_UNUSED(id) + return QMessageFolder(); // stub +} +#endif + +QMessageAccount QMessageStore::account(const QMessageAccountId& id) const +{ + Q_UNUSED(id) + return QMessageAccount(); // stub +} + +QMessageStore::NotificationFilterId QMessageStore::registerNotificationFilter(const QMessageFilter &filter) +{ + Q_UNUSED(filter) + return 0; // stub +} + +void QMessageStore::unregisterNotificationFilter(NotificationFilterId notificationFilterId) +{ + Q_UNUSED(notificationFilterId) +} + |