This file is indexed.

/usr/include/QtZeitgeist/monitor.h is in libqzeitgeist-dev 0.7.0-1build1.

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
/*
 * This file is part of QtZeitgeist.
 *
 * Copyright (C) 2010 Collabora Ltd. <http://www.collabora.co.uk/>
 *
 * 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) any later version.
 *
 * 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, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */


#ifndef QTZEITGEIST_MONITOR_H_
#define QTZEITGEIST_MONITOR_H_

#include <QObject>

#include "QtZeitgeist/Log"
#include "QtZeitgeist/DataModel/Event"
#include "QtZeitgeist/DataModel/TimeRange"

namespace QtZeitgeist
{

class MonitorPrivate;

/**
 * @class Monitor monitor.h monitor.h
 * @brief Class for monitoring the Zeitgeist log for certain types of events.
 *
 * @Monitor listens for updates to the Zeitgeist event log  matching a given
 * set of templates and with timestamps in some predefined time range.
 *
 * @see Log
 *
 * @author Abner Silva <abner@collabora.co.uk>
 */
class Q_DECL_EXPORT Monitor : public QObject
{
    Q_OBJECT
    Q_DISABLE_COPY(Monitor)
    Q_PROPERTY(quint64 id READ id)
    Q_PROPERTY(QtZeitgeist::DataModel::TimeRange timeRange READ timeRange)
    Q_PROPERTY(QtZeitgeist::DataModel::EventList eventTemplates
            READ eventTemplates)

public:

    /**
     * Return the Monitor ID.
     *
     * Note: The Monitor ID is not related to any data stored or referenced by
     * the Zeitgeist daemon. It's only an unique identification of the monitor
     * instance.
     *
     * @returns An unique ID.
     */
    quint64 id() const;

    /**
     * Return the Monitor Time Range.
     *
     * @returns the time range used to create the monitor.
     */
    QtZeitgeist::DataModel::TimeRange timeRange() const;

    /**
     * Return the Monitor Event Templates.
     *
     * @returns the event templates used to create the monitor.
     */
    QtZeitgeist::DataModel::EventList eventTemplates() const;

protected:

    /**
     * Default constructor.
     */
    explicit Monitor(quint64 id,
            QtZeitgeist::DataModel::TimeRange monitorTimeRange,
            QtZeitgeist::DataModel::EventList monitorTemplates,
            QObject *parent = 0);

    /**
     * Destructor.
     */
    virtual ~Monitor();

Q_SIGNALS:

    /**
     * Signal to notify inserted events.
     *
     * Emitted when events matching the event templates and with timestamps
     * within the time range of the monitor has been inserted into the log.
     *
     * @param timeRange a @TimeRange that specifies the minimum and maximum
     * of the timestamps in @events.
     * @param events a @EventList holding the events that have been inserted
     * into the log.
     */
    void eventsInserted(const QtZeitgeist::DataModel::TimeRange &timeRange,
            const QtZeitgeist::DataModel::EventList &events);

    /**
     * Signal to notify deleted events.
     *
     * Emitted when events with timestamps within the time range of this
     * monitor has been deleted from the log. Note that the deleted events
     * may not match the event templates for the monitor.
     *
     * @param timeRange A @TimeRange that specifies the minimum and maximum
     * timestamps of the deleted events.
     * @param eventIds A @EventIdList holding the ids of the deleted events.
     */
    void eventsDeleted(const QtZeitgeist::DataModel::TimeRange &timeRange,
            const QtZeitgeist::DataModel::EventIdList &eventIds);

private:

    QString objectPath() const;

    friend class Log;
    friend class MonitorPrivate;

    // D Pointer.
    class MonitorPrivate * const d;
};

};

#endif // QTZEITGEIST_MONITOR_H_