This file is indexed.

/usr/include/unity-2d-private/hud.h is in libunity-2d-private-dev 5.10.0-0ubuntu1.

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
/*
 * Copyright (C) 2012 Canonical, Ltd.
 *
 * Authors:
 *  Gerry Boland <gerry.boland@canonical.com>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU 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 General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef HUD_H
#define HUD_H

// Qt
#include <QAbstractListModel>

// libunity-core
#include <UnityCore/Hud.h>

class Hud : public QAbstractListModel
{
    Q_OBJECT

    Q_PROPERTY(QString target READ target NOTIFY targetChanged)
    Q_PROPERTY(bool connected READ connected NOTIFY connectedChanged)
    Q_PROPERTY(QString searchQuery READ searchQuery WRITE setSearchQuery NOTIFY searchQueryChanged)

public:
    explicit Hud(QObject *parent = 0);
    ~Hud();

    enum Roles {
        ResultIdRole = Qt::UserRole+1,
        FormattedTextRole,
        PlainTextRole,
        IconNameRole,
        ItemIconRole,
        CompletionTextRole,
        ShortcutRole
    };

    /* getters */
    QString target() const;
    QString searchQuery() const;
    bool connected() const;

    /* setters */
    void setSearchQuery(const QString&);

    QVariant data(int role) const;
    QHash<int, QByteArray> roleNames() const;

    /* Implementation of virtual methods from QAbstractListModel */
    QVariant data(const QModelIndex& index, int role = Hud::ResultIdRole) const;
    int rowCount(const QModelIndex& parent = QModelIndex()) const;

    Q_INVOKABLE void executeResult(const int) const;
    Q_INVOKABLE void executeResultBySearch(const QString&) const;
    Q_INVOKABLE void endSearch();

Q_SIGNALS:
    void searchQueryChanged();
    void targetChanged();
    void connectedChanged();

private Q_SLOTS:
    void onTargetChanged(const std::string);
    void onConnectedChanged(const bool);
    void onResultsUpdated(const unity::hud::Hud::Queries);

private:
    bool m_connected; //Unity-Core's GlibDbusWrapper is connected to the service and is listening to the service signals
    bool m_hudQueryOpen; //status of the HUD query connection with HUD service
    QString m_searchQuery;
    unity::hud::Hud* m_unityHud;
    unity::hud::Hud::Queries m_unityHudResults; //doubly-ended queue of 'Query's.
};

Q_DECLARE_METATYPE(Hud*)

#endif // HUD_H