This file is indexed.

/usr/include/nepomuk/standardqueries.h is in kdelibs5-dev 4:4.14.2-5+deb8u2.

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
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
/*
   This file is part of the Nepomuk KDE project.
   Copyright (C) 2010 Sebastian Trueg <trueg@kde.org>

   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) version 3, or any
   later version accepted by the membership of KDE e.V. (or its
   successor approved by the membership of KDE e.V.), which shall
   act as a proxy defined in Section 6 of version 3 of the license.

   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, see <http://www.gnu.org/licenses/>.
 */

#ifndef _NEPOMUK_STANDARD_QUERIES_H_
#define _NEPOMUK_STANDARD_QUERIES_H_

#include "nepomukquery_export.h"
#include "term.h"

class QDate;

namespace Nepomuk {
    namespace Query {
        class Query;

        /**
         * A set of predefined queries that can be created via standardQuery().
         *
         * \since 4.6
         */
        enum StandardQuery {
            /**
             * Creates a query that returns all files sorted by descending modification date.
             *
             * The subterm parameter can be used to specify an application restricting the results
             * to files created/opened with that application.
             */
            LastModifiedFilesQuery,

            /**
             * Creates a query that returns all resources sorted by descending score (as calculated
             * by the DataMaintenanceService)
             *
             * The subterm parameter can be used to specify an application restricting the results
             * to files created/opened with that application.
             */
            MostImportantResourcesQuery,

            /**
             * Creates a query that returns all files with a usage count of 0
             * sorted by descending modification date.
             */
            NeverOpenedFilesQuery,

            /**
             * Get the resources related to a specific activity. Use a ResourceTerm referring to
             * the activity as parameter in standardQuery.
             */
            ResourcesForActivityQuery
        };


        /**
         * Modificators to influence the behaviour of dateRangeQuery().
         *
         * \since 4.6
         */
        enum DateRangeFlag {
            /**
             * Query for the modification date (nie:lastModified)
             */
            ModificationDate = 0x1,

            /**
             * Query for the content creation date (nie:contentCreated)
             */
            ContentDate = 0x2,

            /**
             * Query for usage events referring to the resource.
             */
            UsageDate = 0x4,

            /**
             * Query for all possible dates.
             */
            AllDates = ModificationDate|ContentDate|UsageDate
        };
        Q_DECLARE_FLAGS( DateRangeFlags, DateRangeFlag )

        /**
         * Create a standard query as defined by \p query.
         *
         * \param query The query to be generated. See StandardQuery.
         * \param subterm An optional subterm used for specific types of standard queries that need
         * a parameter like ResourcesForActivityQuery.
         *
         * To get a query that only returns files (this is already true for some of the predefined queries)
         * use something like the following:
         *
         * \code
         * Query::FileQuery query = Query::standardQuery( Query::LastModifiedFilesQuery );
         * \endcode
         *
         * Be aware that queries can be combined. One can for example get the most important files related
         * to an activity as follows:
         *
         * \code
         * Query query = Query::standardQuery( Query::ResourcesForActivityQuery, myActivity )
         *     && Query::standardQuery( Query::MostImportantResourcesQuery );
         * \endcode
         *
         * \since 4.6
         */
        NEPOMUKQUERY_EXPORT Query standardQuery( StandardQuery query, const Term& subterm = Term() );

        /**
         * Create a query that returns resources/files that have been modified/accessed in the range
         * from \p start to \p end (including both full days). The flags specified in \p dateFlags can be used to influence the
         * type of dates that are queried.
         *
         * \param start The start date of the range, if invalid no start is used, i.e. everything before \p end matches.
         * \param end The end date of the range, if invalid no end is used, i.e. everything after \p start matches.
         * \param dateFlags Optional flags to influence the final query.
         *
         * \since 4.6
         */
        NEPOMUKQUERY_EXPORT Query dateRangeQuery( const QDate& start, const QDate& end, DateRangeFlags dateFlags = AllDates );
    }
}

Q_DECLARE_OPERATORS_FOR_FLAGS( Nepomuk::Query::DateRangeFlags )

#endif