This file is indexed.

/usr/include/telepathy-qt4/TelepathyQt/_gen/cli-channel-dispatch-operation.h is in libtelepathy-qt4-dev 0.9.3-3ubuntu1.

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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
/*
 * This file contains D-Bus client proxy classes generated by qt-client-gen.py.
 *
 * This file can be distributed under the same terms as the specification from
 * which it was generated.
 */

#ifndef IN_TP_QT_HEADER
#error IN_TP_QT_HEADER
#endif

#include <TelepathyQt/Types>

#include <QtGlobal>

#include <QString>
#include <QObject>
#include <QVariant>

#include <QDBusPendingReply>

#include <TelepathyQt/AbstractInterface>
#include <TelepathyQt/DBusProxy>
#include <TelepathyQt/Global>

namespace Tp
{
class PendingVariant;
class PendingOperation;
}

namespace Tp
{
namespace Client
{

/**
 * \class ChannelDispatchOperationInterface
 * \headerfile TelepathyQt/channel-dispatch-operation.h <TelepathyQt/ChannelDispatchOperation>
 * \ingroup clientchanneldispatchoperation
 *
 * Proxy class providing a 1:1 mapping of the D-Bus interface "org.freedesktop.Telepathy.ChannelDispatchOperation".
 */
class TP_QT_EXPORT ChannelDispatchOperationInterface : public Tp::AbstractInterface
{
    Q_OBJECT

public:
    /**
     * Returns the name of the interface "org.freedesktop.Telepathy.ChannelDispatchOperation", which this class
     * represents.
     *
     * \return The D-Bus interface name.
     */
    static inline QLatin1String staticInterfaceName()
    {
        return QLatin1String("org.freedesktop.Telepathy.ChannelDispatchOperation");
    }

    /**
     * Creates a ChannelDispatchOperationInterface associated with the given object on the session bus.
     *
     * \param busName Name of the service the object is on.
     * \param objectPath Path to the object on the service.
     * \param parent Passed to the parent class constructor.
     */
    ChannelDispatchOperationInterface(
        const QString& busName,
        const QString& objectPath,
        QObject* parent = 0
    );

    /**
     * Creates a ChannelDispatchOperationInterface associated with the given object on the given bus.
     *
     * \param connection The bus via which the object can be reached.
     * \param busName Name of the service the object is on.
     * \param objectPath Path to the object on the service.
     * \param parent Passed to the parent class constructor.
     */
    ChannelDispatchOperationInterface(
        const QDBusConnection& connection,
        const QString& busName,
        const QString& objectPath,
        QObject* parent = 0
    );

    /**
     * Creates a ChannelDispatchOperationInterface associated with the same object as the given proxy.
     *
     * \param proxy The proxy to use. It will also be the QObject::parent()
     *               for this object.
     */
    ChannelDispatchOperationInterface(Tp::DBusProxy *proxy);

    /**
     * Asynchronous getter for the remote object property \c Interfaces of type \c QStringList.
     *
     * 
     * A list of the extra interfaces provided by this channel dispatch 
     * operation. This property cannot change.
     *
     * \return A pending variant which will emit finished when the property has been
     *          retrieved.
     */
    inline Tp::PendingVariant *requestPropertyInterfaces() const
    {
        return internalRequestProperty(QLatin1String("Interfaces"));
    }

    /**
     * Asynchronous getter for the remote object property \c Connection of type \c QDBusObjectPath.
     *
     * 
     * The Connection with which the Channels are associated. The well-known 
     * bus name to use can be derived from this object path by removing the 
     * leading &apos;/&apos; and replacing all subsequent &apos;/&apos; by 
     * &apos;.&apos;. This property cannot change.
     *
     * \return A pending variant which will emit finished when the property has been
     *          retrieved.
     */
    inline Tp::PendingVariant *requestPropertyConnection() const
    {
        return internalRequestProperty(QLatin1String("Connection"));
    }

    /**
     * Asynchronous getter for the remote object property \c Account of type \c QDBusObjectPath.
     *
     * 
     * The Account with which the Connection and Channels are associated. This 
     * property cannot change.
     *
     * \return A pending variant which will emit finished when the property has been
     *          retrieved.
     */
    inline Tp::PendingVariant *requestPropertyAccount() const
    {
        return internalRequestProperty(QLatin1String("Account"));
    }

    /**
     * Asynchronous getter for the remote object property \c Channels of type \c Tp::ChannelDetailsList.
     *
     * 
     * The Channels to be dispatched, and their properties. Change 
     * notification is via the ChannelLost signal (channels cannot be added to 
     * this property, only removed).
     *
     * \return A pending variant which will emit finished when the property has been
     *          retrieved.
     */
    inline Tp::PendingVariant *requestPropertyChannels() const
    {
        return internalRequestProperty(QLatin1String("Channels"));
    }

    /**
     * Asynchronous getter for the remote object property \c PossibleHandlers of type \c QStringList.
     *
     * 
     * The well known bus names (starting with 
     * org.freedesktop.Telepathy.Client.) of the possible Handlers for these 
     * channels. The channel dispatcher MUST place the most preferred handlers 
     * first, according to some reasonable heuristic. As a result, approvers 
     * SHOULD use the first handler by default. The heuristic used to 
     * prioritize handlers SHOULD give a higher priority to handlers that are 
     * already running. If, for instance, Empathy and Kopete have similar 
     * functionality, and Empathy is running, we should prefer to send 
     * channels to it rather than launching Kopete via service activation.
     *
     * \return A pending variant which will emit finished when the property has been
     *          retrieved.
     */
    inline Tp::PendingVariant *requestPropertyPossibleHandlers() const
    {
        return internalRequestProperty(QLatin1String("PossibleHandlers"));
    }

    /**
     * Request all of the DBus properties on the interface.
     *
     * \return A pending variant map which will emit finished when the properties have
     *          been retrieved.
     */
    Tp::PendingVariantMap *requestAllProperties() const
    {
        return internalRequestAllProperties();
    }

public Q_SLOTS:
    /**
     * Begins a call to the D-Bus method \c HandleWith on the remote object.
     * 
     * \htmlonly
     * <p>Called by an approver to accept a channel bundle and request that
     *   the given handler be used to handle it.</p>
     * 
     * <p>If successful, this method will cause the ChannelDispatchOperation
     *   object to disappear, emitting
     *    \endhtmlonly Finished() \htmlonly .</p>
     * 
     * <p>However, this method may fail because the dispatch has already been
     *   completed and the object has already gone. If this occurs, it
     *   indicates that another approver has asked for the bundle to be
     *   handled by a particular handler. The approver MUST NOT attempt
     *   to interact with the channels further in this case, unless it is
     *   separately invoked as the handler.</p>
     * 
     * <p>Approvers which are also channel handlers SHOULD use
     *    \endhtmlonly Claim() \htmlonly  instead
     *   of HandleWith to request that they can handle a channel bundle
     *   themselves.</p>
     * 
     * <p>(FIXME: list some possible errors)</p>
     * 
     * <p>If the channel handler raises an error from  \endhtmlonly ClientHandlerInterface::HandleChannels() \htmlonly ,
     *   this method
     *   MAY respond by raising that same error, even if it is not
     *   specifically documented here.</p>
     * \endhtmlonly
     *
     * Note that \a timeout is ignored as of now. It will be used once
     * http://bugreports.qt.nokia.com/browse/QTBUG-11775 is fixed.
     *
     *
     * \param handler
     *     
     *     \htmlonly
     *     <p>The well-known bus name (starting with
     *       <code>org.freedesktop.Telepathy.Client.</code>) of the channel
     *       handler that should handle the channel, or the empty string
     *       if the client has no preferred channel handler.</p>
     *     \endhtmlonly
     * \param timeout The timeout in milliseconds.
     */
    inline QDBusPendingReply<> HandleWith(const QString& handler, int timeout = -1)
    {
        if (!invalidationReason().isEmpty()) {
            return QDBusPendingReply<>(QDBusMessage::createError(
                invalidationReason(),
                invalidationMessage()
            ));
        }

        QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
                this->staticInterfaceName(), QLatin1String("HandleWith"));
        callMessage << QVariant::fromValue(handler);
        return this->connection().asyncCall(callMessage, timeout);
    }

    /**
     * Begins a call to the D-Bus method \c Claim on the remote object.
     * 
     * \htmlonly
     * <p>Called by an approver to claim channels for handling
     *   internally. If this method is called successfully, the process
     *   calling this method becomes the handler for the channel, but
     *   <em>does not</em> have the  \endhtmlonly ClientHandlerInterface::HandleChannels() \htmlonly 
     *   method called on it.</p>
     * 
     * <p>Clients that call Claim on channels but do not immediately
     *   close them SHOULD implement the Handler interface and its
     *    \endhtmlonly \link ClientHandlerInterface::requestPropertyHandledChannels() ClientHandlerInterface::HandledChannels \endlink \htmlonly 
     *   property.</p>
     * 
     * <p>Approvers wishing to reject channels MUST call this method to
     *   claim ownership of them, and MUST NOT call
     *    \endhtmlonly ChannelInterface::Close() \htmlonly 
     *   on the channels unless/until this method returns successfully.</p>
     * 
     * <div class="rationale">
     *   <p>The channel dispatcher can't know how best to close arbitrary
     *     channel types, so it leaves it up to the approver to do so.
     *     For instance, for Text channels it is necessary
     *     to acknowledge any messages that have already been displayed to
     *     the user first - ideally, the approver would display and then
     *     acknowledge the messages - or to call  \endhtmlonly ChannelInterfaceDestroyableInterface::Destroy() \htmlonly 
     *     if the destructive behaviour of that method is desired.</p>
     * 
     *   <p>Similarly, an Approver for StreamedMedia channels can close the
     *     channel with a reason (e.g. &quot;busy&quot;) if desired. The channel
     *     dispatcher, which is designed to have no specific knowledge
     *     of particular channel types, can't do that.</p>
     * </div>
     * 
     * <p>If successful, this method will cause the ChannelDispatchOperation
     *   object to disappear, emitting
     *    \endhtmlonly Finished() \htmlonly , in the same way as for
     *    \endhtmlonly HandleWith() \htmlonly .</p>
     * 
     * <p>This method may fail because the dispatch operation has already
     *   been completed. Again, see HandleWith for more details. The approver
     *   MUST NOT attempt to interact with the channels further in this
     *   case.</p>
     * 
     * <p>(FIXME: list some other possible errors)</p>
     * \endhtmlonly
     *
     * Note that \a timeout is ignored as of now. It will be used once
     * http://bugreports.qt.nokia.com/browse/QTBUG-11775 is fixed.
     *
     * \param timeout The timeout in milliseconds.
     */
    inline QDBusPendingReply<> Claim(int timeout = -1)
    {
        if (!invalidationReason().isEmpty()) {
            return QDBusPendingReply<>(QDBusMessage::createError(
                invalidationReason(),
                invalidationMessage()
            ));
        }

        QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
                this->staticInterfaceName(), QLatin1String("Claim"));
        return this->connection().asyncCall(callMessage, timeout);
    }

    /**
     * Begins a call to the D-Bus method \c HandleWithTime on the remote object.
     * 
     * \htmlonly
     * <p>A variant of  \endhtmlonly HandleWith() \htmlonly  allowing the
     *   approver to pass an user action time. This timestamp will be passed
     *   to the Handler when  \endhtmlonly ClientHandlerInterface::HandleChannels() \htmlonly 
     *   is called.</p>
     * \endhtmlonly
     *
     * Note that \a timeout is ignored as of now. It will be used once
     * http://bugreports.qt.nokia.com/browse/QTBUG-11775 is fixed.
     *
     *
     * \param handler
     *     
     *     \htmlonly
     *     <p>The well-known bus name (starting with
     *       <code>org.freedesktop.Telepathy.Client.</code>) of the channel
     *       handler that should handle the channel, or the empty string
     *       if the client has no preferred channel handler.</p>
     *     \endhtmlonly
     *
     * \param userActionTime
     *     
     *     \htmlonly
     *     <p>The time at which user action occurred.</p>
     *     \endhtmlonly
     * \param timeout The timeout in milliseconds.
     */
    inline QDBusPendingReply<> HandleWithTime(const QString& handler, qlonglong userActionTime, int timeout = -1)
    {
        if (!invalidationReason().isEmpty()) {
            return QDBusPendingReply<>(QDBusMessage::createError(
                invalidationReason(),
                invalidationMessage()
            ));
        }

        QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
                this->staticInterfaceName(), QLatin1String("HandleWithTime"));
        callMessage << QVariant::fromValue(handler) << QVariant::fromValue(userActionTime);
        return this->connection().asyncCall(callMessage, timeout);
    }

Q_SIGNALS:
    /**
     * Represents the signal \c ChannelLost on the remote object.
     * 
     * \htmlonly
     * <p>A channel has closed before it could be claimed or handled. If
     *   this is emitted for the last remaining channel in a channel
     *   dispatch operation, it MUST immediately be followed by
     *    \endhtmlonly Finished() \htmlonly .</p>
     * 
     * <p>This signal MUST NOT be emitted until all Approvers that were
     *   invoked have returned (successfully or with an error) from
     *   their  \endhtmlonly ClientApproverInterface::AddDispatchOperation() \htmlonly 
     *   method.</p>
     * 
     * <div class="rationale">
     *   <p>This means that Approvers can connect to the ChannelLost signal
     *     in a race-free way. Non-approver processes that discover
     *     a channel dispatch operation in some way (such as observers)
     *     will have to follow the usual &quot;connect to signals then recover
     *     state&quot; model - first connect to ChannelLost and
     *      \endhtmlonly Finished() \htmlonly ,
     *     then download  \endhtmlonly \link requestPropertyChannels() Channels \endlink \htmlonly  (and
     *     on error, perhaps assume that the operation has already
     *     Finished).</p>
     * </div>
     * \endhtmlonly
     *
     * \param channel
     *     
     *     The Channel that closed.
     *
     * \param error
     *     
     *     \htmlonly
     *     <p>The name of a D-Bus error indicating why the channel closed. If
     *       no better reason can be found,
     *       <code>org.freedesktop.Telepathy.Error.NotAvailable</code> MAY
     *       be used as a fallback; this means that this error SHOULD NOT be
     *       given any more specific meaning.</p>
     *     \endhtmlonly
     *
     * \param message
     *     
     *     A string associated with the D-Bus error.
     */
    void ChannelLost(const QDBusObjectPath& channel, const QString& error, const QString& message);

    /**
     * Represents the signal \c Finished on the remote object.
     * 
     * \htmlonly
     * <p>Emitted when this dispatch operation finishes. The dispatch
     *   operation is no longer present and further methods must not be
     *   called on it.</p>
     * 
     * <p>Approvers that have a user interface SHOULD stop notifying the user
     *   about the channels in response to this signal; they MAY assume that
     *   on errors, they would have received
     *    \endhtmlonly ChannelLost() \htmlonly  first.</p>
     * 
     * <p>Its object path SHOULD NOT be reused for a subsequent dispatch
     *   operation; the ChannelDispatcher MUST choose object paths
     *   in a way that avoids immediate re-use.</p>
     * 
     * <div class="rationale">
     *   <p>Otherwise, clients might accidentally call
     *      \endhtmlonly HandleWith() \htmlonly  or
     *      \endhtmlonly Claim() \htmlonly  on a new dispatch operation
     *     instead of the one they intended to handle.</p>
     * </div>
     * 
     * <p>This signal MUST NOT be emitted until all Approvers that were
     *   invoked have returned (successfully or with an error) from
     *   their  \endhtmlonly ClientApproverInterface::AddDispatchOperation() \htmlonly 
     *   method.</p>
     * 
     * <div class="rationale">
     *   <p>This means that Approvers can connect to the ChannelLost signal
     *     in a race-free way. Non-approver processes that discover
     *     a channel dispatch operation in some way (such as observers)
     *     will have to follow the usual &quot;connect to signals then recover
     *     state&quot; model - first connect to
     *      \endhtmlonly ChannelLost() \htmlonly  and
     *     Finished, then download  \endhtmlonly \link requestPropertyChannels() Channels \endlink \htmlonly 
     *     (and on error, perhaps assume that the operation has already
     *     Finished).</p>
     * </div>
     * \endhtmlonly
     */
    void Finished();

protected:
    virtual void invalidate(Tp::DBusProxy *, const QString &, const QString &);
};
}
}
Q_DECLARE_METATYPE(Tp::Client::ChannelDispatchOperationInterface*)