This file is indexed.

/usr/include/libusermetrics-1/libusermetricsinput/Metric.h is in libusermetricsinput1-dev 1.1.1+14.04.20140305-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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
/*
 * Copyright (C) 2013 Canonical, Ltd.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of version 3 of the GNU Lesser General Public License as published
 * by the Free Software Foundation.
 *
 * 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 program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * Author: Pete Woods <pete.woods@canonical.com>
 */

#ifndef USERMETRICSINPUT_METRIC_H_
#define USERMETRICSINPUT_METRIC_H_

#include <libusermetricsinput/MetricUpdate.h>
#include <QtCore/QSharedPointer>

/**
 * @{
 */

namespace UserMetricsInput {

class Metric;

/**
 * The instances of Metric are implicitly shared.
 */
typedef QSharedPointer<Metric> MetricPtr;

enum MetricType {
	USER, SYSTEM,
};

/**
 * @brief This class represents a single user metric
 *
 * For example, "number of e-mails today" or "photos taken today".
 *
 * This is a long-lived class that can exist for the whole application
 * lifecycle.
 */
class Q_DECL_EXPORT Metric: public QObject {
public:
	/**
	 * @brief This constructor cannot be used - the class is pure-virtual.
	 */
	explicit Metric(QObject *parent = 0);

	/**
	 * @brief Destructor
	 */
	virtual ~Metric();

	/**
	 * @brief Create an MetricUpdate to a particular Metric
	 *
	 * @param username The user to update the data for. If blank ("")
	 *     or omitted then the current user is used.
	 *
	 * The MetricUpdate object must be deleted - this is when the
	 * actual update will be sent to the storage service.
	 */
	virtual MetricUpdate * update(const QString &username = "") = 0;

	/**
	 * @brief Update the "today" value for a simple user metric
	 *
	 * @param value Today's value
	 * @param username The user to update the data for. If blank ("")
	 *     or omitted then the current user is used.
	 */
	virtual void update(double value, const QString &username = "") = 0;

	/**
	 * @brief Increment the "today" value for a simple user metric
	 *
	 * @param amount How much to increase the metric by - defaults to 1.
	 * @param username The user to update the data for. If blank ("")
	 *     or omitted then the current user is used.
	 */
	virtual void increment(double amount = 1.0f,
			const QString &username = "") = 0;
};

}

/**
 * @}
 **/

#endif // USERMETRICSINPUT_METRIC_H_