00001 /********************************************************************************* 00002 ** This file is part of QtContacts tracker storage plugin 00003 ** 00004 ** Copyright (c) 2010-2011 Nokia Corporation and/or its subsidiary(-ies). 00005 ** 00006 ** Contact: Nokia Corporation (info@qt.nokia.com) 00007 ** 00008 ** GNU Lesser General Public License Usage 00009 ** This file may be used under the terms of the GNU Lesser General Public License 00010 ** version 2.1 as published by the Free Software Foundation and appearing in the 00011 ** file LICENSE.LGPL included in the packaging of this file. Please review the 00012 ** following information to ensure the GNU Lesser General Public License version 00013 ** 2.1 requirements will be met: 00014 ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 00015 ** 00016 ** In addition, as a special exception, Nokia gives you certain additional rights. 00017 ** These rights are described in the Nokia Qt LGPL Exception version 1.1, included 00018 ** in the file LGPL_EXCEPTION.txt in this package. 00019 ** 00020 ** Other Usage 00021 ** Alternatively, this file may be used in accordance with the terms and 00022 ** conditions contained in a signed written agreement between you and Nokia. 00023 *********************************************************************************/ 00024 00025 #ifndef QCTREQUESTEXTENSIONS_H 00026 #define QCTREQUESTEXTENSIONS_H 00027 00028 #include <QContactAbstractRequest> 00029 00030 #include "libqtcontacts_extensions_tracker_global.h" 00031 00032 QTM_USE_NAMESPACE 00033 00034 class LIBQTCONTACTS_EXTENSIONS_TRACKER_EXPORT QctRequestExtensions : public QObjectUserData 00035 { 00036 public: 00037 static QctRequestExtensions * get(QContactAbstractRequest *request); 00038 00039 void setNameOrder(const QString &order); 00040 QString nameOrder() const; 00041 00042 private: // fields 00043 QString m_nameOrder; 00044 }; 00045 00047 Q_DECL_DEPRECATED static inline QString 00048 qctRequestGetNameOrder(QContactAbstractRequest *request) 00049 { 00050 return QctRequestExtensions::get(request)->nameOrder(); 00051 } 00052 00054 Q_DECL_DEPRECATED static inline void 00055 qctRequestSetNameOrder(QContactAbstractRequest *request, const QString &order) 00056 { 00057 QctRequestExtensions::get(request)->setNameOrder(order); 00058 } 00059 00060 #endif // QCTREQUESTEXTENSIONS_H