00001 /**************************************************************************** 00002 ** 00003 ** Copyright (C) 2010-2011 Nokia Corporation and/or its subsidiary(-ies). 00004 ** All rights reserved. 00005 ** Contact: Nokia Corporation (ivan.frade@nokia.com) 00006 ** 00007 ** This file is part of the QtSparql module (not yet part of the Qt Toolkit). 00008 ** 00009 ** $QT_BEGIN_LICENSE:LGPL$ 00010 ** GNU Lesser General Public License Usage 00011 ** This file may be used under the terms of the GNU Lesser General Public 00012 ** License version 2.1 as published by the Free Software Foundation and 00013 ** appearing in the file LICENSE.LGPL included in the packaging of this 00014 ** file. Please review the following information to ensure the GNU Lesser 00015 ** General Public License version 2.1 requirements will be met: 00016 ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 00017 ** 00018 ** In addition, as a special exception, Nokia gives you certain additional 00019 ** rights. These rights are described in the Nokia Qt LGPL Exception 00020 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 00021 ** 00022 ** GNU General Public License Usage 00023 ** Alternatively, this file may be used under the terms of the GNU General 00024 ** Public License version 3.0 as published by the Free Software Foundation 00025 ** and appearing in the file LICENSE.GPL included in the packaging of this 00026 ** file. Please review the following information to ensure the GNU General 00027 ** Public License version 3.0 requirements will be met: 00028 ** http://www.gnu.org/copyleft/gpl.html. 00029 ** 00030 ** Other Usage 00031 ** Alternatively, this file may be used in accordance with the terms and 00032 ** conditions contained in a signed written agreement between you and Nokia. 00033 ** 00034 ** If you have questions regarding the use of this file, please contact 00035 ** Nokia at ivan.frade@nokia.com. 00036 ** $QT_END_LICENSE$ 00037 ** 00038 ****************************************************************************/ 00039 00040 #ifndef QSPARQL_TRACKER_DIRECT_SYNC_RESULT_P_H 00041 #define QSPARQL_TRACKER_DIRECT_SYNC_RESULT_P_H 00042 00043 #include <QtSparql/qsparqlresult.h> 00044 00045 #ifdef QT_PLUGIN 00046 #define Q_EXPORT_SPARQLDRIVER_TRACKER_DIRECT 00047 #else 00048 #define Q_EXPORT_SPARQLDRIVER_TRACKER_DIRECT Q_SPARQL_EXPORT 00049 #endif 00050 00051 QT_BEGIN_HEADER 00052 00053 QT_BEGIN_NAMESPACE 00054 00055 class QTrackerDirectDriverPrivate; 00056 class QTrackerDirectSyncResultPrivate; 00057 class QSparqlQueryOptions; 00058 00059 // A sync and forward-only Result class. The instance of this class is retreved 00060 // with QTrackerDirectDriver::syncExec(). 00061 class Q_EXPORT_SPARQLDRIVER_TRACKER_DIRECT QTrackerDirectSyncResult : public QSparqlResult 00062 { 00063 Q_OBJECT 00064 public: 00065 explicit QTrackerDirectSyncResult(QTrackerDirectDriverPrivate* p, 00066 const QString& query, 00067 QSparqlQuery::StatementType type, 00068 const QSparqlQueryOptions& options); 00069 ~QTrackerDirectSyncResult(); 00070 00071 // Implementation of the QSparqlResult interface 00072 virtual bool next(); 00073 00074 virtual QSparqlResultRow current() const; 00075 virtual QSparqlBinding binding(int i) const; 00076 virtual QVariant value(int i) const; 00077 virtual QString stringValue(int i) const; 00078 00079 virtual bool isFinished() const; 00080 00081 virtual bool hasFeature(QSparqlResult::Feature feature) const; 00082 00083 public Q_SLOTS: 00084 void exec(); 00085 void update(); 00086 00087 private Q_SLOTS: 00088 void driverClosing(); 00089 00090 private: 00091 QTrackerDirectSyncResultPrivate* d; 00092 }; 00093 00094 QT_END_NAMESPACE 00095 00096 QT_END_HEADER 00097 00098 #endif // QSPARQL_TRACKER_DIRECT_SYNC_RESULT_P_H