This file is indexed.

/usr/include/kdbusservicestarter.h is in kdelibs5-dev 4:4.13.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
91
92
93
94
95
96
97
98
/* This file is part of the KDE libraries
   Copyright (C) 2003 David Faure <faure@kde.org>

   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Library General Public
   License version 2 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
   Library General Public License for more details.

   You should have received a copy of the GNU Library General Public License
   along with this library; see the file COPYING.LIB.  If not, write to
   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
   Boston, MA 02110-1301, USA.
*/

#ifndef KDBUSSERVICESTARTER_H
#define KDBUSSERVICESTARTER_H

#include <kio/kio_export.h>

#include <QtCore/QString>

class KDBusServiceStarterPrivate;

/**
 * A generic DBUS service starter, using KServiceTypeTrader.
 * The default implementation starts new processes, but this interface can
 * also be reimplemented by specific applications to provide dlopened in-process DBus objects.
 * This interface is similar to the startServiceByName() function found in QDBusBusService, but
 * with the added benefit of using KTrader (and, therefore, additional constraints and the
 * ability to search the standard KDE dirs).
 * @author David Faure <faure@kde.org>
 */
class KIO_EXPORT KDBusServiceStarter { //krazy:exclude=dpointer (uses K_GLOBAL_STATIC)
public:

    static KDBusServiceStarter* self();

    /**
     * Check if a given DBus service is available - from the serviceType it's supposed to implement.
     *
     * The trader is queried to find the preferred application for this serviceType,
     * with the constraint that its X-DBus-ServiceName property must be defined.
     * Then the DBus server is checked. If the service is not available,
     * this method will call startServiceFor to start it.
     *
     * @param serviceType the type of service we're looking for
     * @param constraint see KServiceTypeTrader
     * @param error On failure, @p error contains a description of the error
     *         that occurred. If the pointer is 0, the argument will be
     *         ignored
     * @param dbusService On success, @p dbusService contains the DBus service name
     *         under which this service is available. If the pointer is 0 the argument
     *         will be ignored
     * @param flags for future extensions (currently unused)
     *
     * @return an error code indicating success (== 0) or failure (> 0).
     */
    int findServiceFor( const QString& serviceType,
                        const QString& constraint = QString(),
                        QString *error=0, QString* dbusService=0,
                        int flags=0 );

    /**
     * Find an implementation of the given @p serviceType,
     * and start it, to use its DBus interface.
     * The default implementation uses KServiceTypeTrader to find the preferred Application,
     * and then starts it using KToolInvocation::startService...
     *
     * However applications (like kontact) can reimplement this method, to provide
     * an in-process way of loading the implementation for this service type.
     *
     * @param serviceType the type of service we're looking for
     * @param constraint see KServiceTypeTrader
     * @param error On failure, @p error contains a description of the error
     *         that occurred. If the pointer is 0, the argument will be
     *         ignored
     * @param dbusService On success, @p dbusService contains the DBus service name
     *         under which this service is available. If the pointer is 0 the argument
     *         will be ignored
     * @param flags for future extensions (currently unused)
     *
     * @return an error code indicating success (== 0) or failure (> 0).
     */
    virtual int startServiceFor( const QString& serviceType,
                                 const QString& constraint = QString(),
                                 QString *error=0, QString* dbusService=0,
                                 int flags=0 );
protected:
    friend class KDBusServiceStarterPrivate;
    KDBusServiceStarter();
    virtual ~KDBusServiceStarter();
};

#endif