/usr/include/libu1db-qt5/index.h is in libu1db-qt5-dev 0.1.5+14.04.20140313-0ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | /*
* Copyright (C) 2013 Canonical, Ltd.
*
* Authors:
* Christian Dywan <christian.dywan@canonical.com>
*
* This program 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; version 3.
*
* This program 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 program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef U1DB_INDEX_H
#define U1DB_INDEX_H
#include <QtCore/QObject>
#include <QSqlDatabase>
#include <QStringList>
#include "database.h"
QT_BEGIN_NAMESPACE_U1DB
class Q_DECL_EXPORT Index : public QObject {
Q_OBJECT
#ifdef Q_QDOC
Q_PROPERTY(Database* database READ getDatabase WRITE setDatabase NOTIFY databaseChanged)
#else
Q_PROPERTY(QT_PREPEND_NAMESPACE_U1DB(Database*) database READ getDatabase WRITE setDatabase NOTIFY databaseChanged)
#endif
Q_PROPERTY(QString name READ getName WRITE setName NOTIFY nameChanged)
Q_PROPERTY(QStringList expression READ getExpression WRITE setExpression NOTIFY expressionChanged)
public:
Index(QObject* parent = 0);
Database* getDatabase();
void setDatabase(Database* database);
QString getName();
void setName(const QString& name);
QStringList getExpression();
void setExpression(QStringList expression);
QList<QVariantMap> getAllResults();
Q_SIGNALS:
void databaseChanged(Database* database);
void nameChanged(const QString& name);
void expressionChanged(QVariant expression);
/*!
The database, an indexed document or the expressions changed.
*/
void dataInvalidated();
private:
Q_DISABLE_COPY(Index)
Database* m_database;
QString m_name;
QStringList m_expression;
QList<QVariantMap> m_results;
void onPathChanged(const QString& path);
void onDocChanged(const QString& docId, QVariant content);
QStringList appendResultsFromMap(QString docId, QStringList fieldsList, QVariantMap current_section, QString current_field);
QStringList getFieldsFromList(QString docId, QStringList fieldsList, QVariantList current_section, QString current_field);
void generateIndexResults();
};
QT_END_NAMESPACE_U1DB
#endif // U1DB_INDEX_H
|