This file is indexed.

/usr/include/plasma/scripting/runnerscript.h is in kdelibs5-dev 4:4.8.2-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
 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
/*
 *   Copyright 2007 by Aaron Seigo <aseigo@kde.org>
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU Library General Public License as
 *   published by the Free Software Foundation; either version 2, or
 *   (at your option) any later version.
 *
 *   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 Library General Public
 *   License along with this program; if not, write to the
 *   Free Software Foundation, Inc.,
 *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */

#ifndef PLASMA_RUNNERSCRIPT_H
#define PLASMA_RUNNERSCRIPT_H

#include <kgenericfactory.h>
#include <kplugininfo.h>

#include <plasma/plasma_export.h>
#include <plasma/abstractrunner.h>
#include <plasma/scripting/scriptengine.h>

namespace Plasma
{

class RunnerScriptPrivate;

/**
 * @class RunnerScript plasma/scripting/runnerscript.h <Plasma/Scripting/RunnerScript>
 *
 * @short Provides a restricted interface for scripting a runner.
 */
class PLASMA_EXPORT RunnerScript : public ScriptEngine
{
    Q_OBJECT

public:
    /**
     * Default constructor for a RunnerScript.
     * Subclasses should not attempt to access the Plasma::AbstractRunner
     * associated with this RunnerScript in the constructor. All
     * such set up that requires the AbstractRunner itself should be done
     * in the init() method.
     */
    explicit RunnerScript(QObject *parent = 0);
    ~RunnerScript();

    /**
     * Sets the Plasma::AbstractRunner associated with this RunnerScript
     */
    void setRunner(AbstractRunner *runner);

    /**
     * Returns the Plasma::AbstractRunner associated with this script component
     */
    AbstractRunner *runner() const;

    /**
     * Called when the script should create QueryMatch instances through
     * RunnerContext::addInformationalMatch, RunnerContext::addExactMatch, and
     * RunnerContext::addPossibleMatch.
     */
    virtual void match(Plasma::RunnerContext &search);

    /**
     * Called whenever an exact or possible match associated with this
     * runner is triggered.
     */
    virtual void run(const Plasma::RunnerContext &search, const Plasma::QueryMatch &action);


Q_SIGNALS:
    void prepare();
    void teardown();
    void createRunOptions(QWidget *widget);
    void reloadConfiguration();
    void actionsForMatch(const Plasma::QueryMatch &match, QList<QAction*>* actions);

protected:
    /**
     * @return absolute path to the main script file for this plasmoid
     */
    QString mainScript() const;

    /**
     * @return the Package associated with this plasmoid which can
     *         be used to request resources, such as images and
     *         interface files.
     */
    const Package *package() const;

    /**
     * @return the KPluginInfo associated with this plasmoid
     */
    KPluginInfo description() const;

    /**
     * @return a Plasma::DataEngine matchin name
     * @since 4.4
     */
    DataEngine *dataEngine(const QString &name);

    KConfigGroup config() const;
    void setIgnoredTypes(RunnerContext::Types types);
    void setHasRunOptions(bool hasRunOptions);
    void setSpeed(AbstractRunner::Speed newSpeed);
    void setPriority(AbstractRunner::Priority newPriority);
    KService::List serviceQuery(const QString &serviceType,
                                const QString &constraint = QString()) const;
    QAction* addAction(const QString &id, const QIcon &icon, const QString &text);
    void addAction(const QString &id, QAction *action);
    void removeAction(const QString &id);
    QAction* action(const QString &id) const;
    QHash<QString, QAction*> actions() const;
    void clearActions();
    void addSyntax(const RunnerSyntax &syntax);
    void setSyntaxes(const QList<RunnerSyntax> &syns);

private:
    friend class AbstractRunner;

    RunnerScriptPrivate *const d;
};

#define K_EXPORT_PLASMA_RUNNERSCRIPTENGINE(libname, classname) \
K_PLUGIN_FACTORY(factory, registerPlugin<classname>();) \
K_EXPORT_PLUGIN(factory("plasma_runnerscriptengine_" #libname))

} //Plasma namespace

#endif