This file is indexed.

/usr/include/telepathy-qt4/TelepathyQt/_gen/cli-channel-dispatcher.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
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
/*
 * 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 ChannelDispatcherInterface
 * \headerfile TelepathyQt/channel-dispatcher.h <TelepathyQt/ChannelDispatcher>
 * \ingroup clientchanneldispatcher
 *
 * Proxy class providing a 1:1 mapping of the D-Bus interface "org.freedesktop.Telepathy.ChannelDispatcher".
 */
class TP_QT_EXPORT ChannelDispatcherInterface : public Tp::AbstractInterface
{
    Q_OBJECT

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

    /**
     * Creates a ChannelDispatcherInterface 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.
     */
    ChannelDispatcherInterface(
        const QString& busName,
        const QString& objectPath,
        QObject* parent = 0
    );

    /**
     * Creates a ChannelDispatcherInterface 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.
     */
    ChannelDispatcherInterface(
        const QDBusConnection& connection,
        const QString& busName,
        const QString& objectPath,
        QObject* parent = 0
    );

    /**
     * Creates a ChannelDispatcherInterface 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.
     */
    ChannelDispatcherInterface(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 dispatcher.
     *
     * \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 SupportsRequestHints of type \c bool.
     *
     * 
     * If True, the channel dispatcher is new enough to support 
     * CreateChannelWithHints and EnsureChannelWithHints, in addition to the 
     * older CreateChannel and EnsureChannel methods, and also new enough to 
     * emit SucceededWithChannel before the older Succeeded signal. If False 
     * or missing, only the metadata-less variants are supported.
     *
     * \return A pending variant which will emit finished when the property has been
     *          retrieved.
     */
    inline Tp::PendingVariant *requestPropertySupportsRequestHints() const
    {
        return internalRequestProperty(QLatin1String("SupportsRequestHints"));
    }

    /**
     * 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 CreateChannel on the remote object.
     * 
     * \htmlonly
     * <p>Equivalent to calling
     *    \endhtmlonly CreateChannelWithHints() \htmlonly  with an empty
     *   <var>Hints</var> parameter.</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 account
     *     
     *     The Account for which the new channel is to be created.
     *
     * \param requestedProperties
     *     
     *     \htmlonly
     *     <p>A dictionary containing desirable properties.</p>
     *     
     *     <p>This parameter is used in the same way as the corresponding
     *       parameter to
     *        \endhtmlonly CreateChannelWithHints() \htmlonly .</p>
     *     \endhtmlonly
     *
     * \param userActionTime
     *     
     *     \htmlonly
     *     <p>The time at which user action occurred, or 0 if this channel
     *       request is for some reason not involving user action.</p>
     *     
     *     <p>This parameter is used in the same way as the corresponding
     *       parameter to
     *        \endhtmlonly CreateChannelWithHints() \htmlonly .</p>
     *     \endhtmlonly
     *
     * \param preferredHandler
     *     
     *     \htmlonly
     *     <p>Either the well-known bus name (starting with
     *       <code>org.freedesktop.Telepathy.Client.</code>)
     *       of the preferred handler for this
     *       channel, or an empty string to indicate that any handler would be
     *       acceptable.</p>
     *     
     *     <p>This parameter is used in the same way as the corresponding
     *       parameter to
     *        \endhtmlonly CreateChannelWithHints() \htmlonly .</p>
     *     \endhtmlonly
     * \param timeout The timeout in milliseconds.
     *
     * \return
     *     
     *     A ChannelRequest object.
     */
    inline QDBusPendingReply<QDBusObjectPath> CreateChannel(const QDBusObjectPath& account, const QVariantMap& requestedProperties, qlonglong userActionTime, const QString& preferredHandler, int timeout = -1)
    {
        if (!invalidationReason().isEmpty()) {
            return QDBusPendingReply<QDBusObjectPath>(QDBusMessage::createError(
                invalidationReason(),
                invalidationMessage()
            ));
        }

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

    /**
     * Begins a call to the D-Bus method \c EnsureChannel on the remote object.
     * 
     * \htmlonly
     * <p>Equivalent to calling
     *    \endhtmlonly EnsureChannelWithHints() \htmlonly  with an empty
     *   <var>Hints</var> parameter.</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 account
     *     
     *     The Account for which the new channel is to be created.
     *
     * \param requestedProperties
     *     
     *     \htmlonly
     *     <p>A dictionary containing desirable properties.</p>
     *     
     *     <p>This parameter is used in the same way as the corresponding
     *       parameter to
     *        \endhtmlonly CreateChannelWithHints() \htmlonly .</p>
     *     \endhtmlonly
     *
     * \param userActionTime
     *     
     *     \htmlonly
     *     <p>The time at which user action occurred, or 0 if this channel
     *       request is for some reason not involving user action.</p>
     *     
     *     <p>This parameter is used in the same way as the corresponding
     *       parameter to
     *        \endhtmlonly CreateChannelWithHints() \htmlonly .</p>
     *     \endhtmlonly
     *
     * \param preferredHandler
     *     
     *     \htmlonly
     *     <p>Either the well-known bus name (starting with
     *       <code>org.freedesktop.Telepathy.Client.</code>)
     *       of the preferred handler for this
     *       channel, or an empty string to indicate that any handler would be
     *       acceptable. The behaviour and rationale are the same as for the
     *       corresponding parameter to
     *        \endhtmlonly EnsureChannelWithHints() \htmlonly .</p>
     *     \endhtmlonly
     * \param timeout The timeout in milliseconds.
     *
     * \return
     *     
     *     A ChannelRequest object.
     */
    inline QDBusPendingReply<QDBusObjectPath> EnsureChannel(const QDBusObjectPath& account, const QVariantMap& requestedProperties, qlonglong userActionTime, const QString& preferredHandler, int timeout = -1)
    {
        if (!invalidationReason().isEmpty()) {
            return QDBusPendingReply<QDBusObjectPath>(QDBusMessage::createError(
                invalidationReason(),
                invalidationMessage()
            ));
        }

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

    /**
     * Begins a call to the D-Bus method \c CreateChannelWithHints on the remote object.
     * 
     * \htmlonly
     * <p>Start a request to create a channel. This initially just creates a
     *    \endhtmlonly ChannelRequestInterface \htmlonly 
     *   object, which can be used to continue the request and track its
     *   success or failure.</p>
     * 
     * <div class="rationale">
     *   <p>The request can take a long time - in the worst case, the
     *     channel dispatcher has to ask the account manager to put the
     *     account online, the account manager has to ask the operating
     *     system to obtain an Internet connection, and the operating
     *     system has to ask the user whether to activate an Internet
     *     connection using an on-demand mechanism like dialup.</p>
     * 
     *   <p>This means that using a single D-Bus method call and response
     *     to represent the whole request will tend to lead to that call
     *     timing out, which is not the behaviour we want.</p>
     * </div>
     * 
     * <p>If this method is called for an Account that is disabled, invalid
     *   or otherwise unusable, no error is signalled until
     *    \endhtmlonly ChannelRequestInterface::Proceed() \htmlonly 
     *   is called, at which point
     *    \endhtmlonly ChannelRequestInterface::Failed() \htmlonly 
     *   is emitted with an appropriate error.</p>
     * 
     * <div class="rationale">
     *   <p>This means there's only one code path for errors, apart from
     *     InvalidArgument for &quot;that request makes no sense&quot;.</p>
     * 
     *   <p>It also means that the request will proceed if the account is
     *     enabled after calling CreateChannel, but before calling
     *     Proceed.</p>
     * </div>
     * \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 account
     *     
     *     The Account for which the new channel is to be created.
     *
     * \param requestedProperties
     *     
     *     \htmlonly
     *     <p>A dictionary containing desirable properties. This has the same
     *       semantics as the corresponding parameter to
     *        \endhtmlonly ConnectionInterfaceRequestsInterface::CreateChannel() \htmlonly .
     *     </p>
     *     
     *     <p>Certain properties will not necessarily make sense in this
     *       dictionary: for instance,
     *        \endhtmlonly \link ChannelInterface::requestPropertyTargetHandle() ChannelInterface::TargetHandle \endlink \htmlonly 
     *       can only be given if the requester is able to interact with a
     *        \endhtmlonly ConnectionInterface \htmlonly 
     *       to the desired account.</p>
     *     \endhtmlonly
     *
     * \param userActionTime
     *     
     *     \htmlonly
     *     <p>The time at which user action occurred, or 0 if this channel
     *       request is for some reason not involving user action.
     *       The  \endhtmlonly \link ChannelRequestInterface::requestPropertyUserActionTime() ChannelRequestInterface::UserActionTime \endlink \htmlonly 
     *       property will be set to this value, and it will eventually be
     *       passed as the <code>User_Action_Time</code> parameter of  \endhtmlonly ClientHandlerInterface::HandleChannels() \htmlonly .</p>
     *     \endhtmlonly
     *
     * \param preferredHandler
     *     
     *     \htmlonly
     *     <p>Either the well-known bus name (starting with
     *       <code>org.freedesktop.Telepathy.Client.</code>)
     *       of the preferred handler for this
     *       channel, or an empty string to indicate that any handler would be
     *       acceptable. The channel dispatcher SHOULD dispatch as many as
     *       possible of the resulting channels (ideally, all of them)
     *       to that handler—irrespective of whether that handler's  \endhtmlonly \link ClientHandlerInterface::requestPropertyHandlerChannelFilter() ClientHandlerInterface::HandlerChannelFilter \endlink \htmlonly 
     *       matches the channel—and SHOULD remember the preferred handler
     *       so it can try to dispatch subsequent channels in the same bundle
     *       to the same handler.</p>
     *     
     *     <div class="rationale">
     *       <p>This must be the well-known bus name, not the unique name,
     *         to ensure that all handlers do indeed have the Client API,
     *         and the Client object on the handler can be located easily.</p>
     *     
     *       <p>This is partly so the channel dispatcher can call
     *          \endhtmlonly ClientHandlerInterface::HandleChannels() \htmlonly 
     *         on it, and partly so the channel dispatcher
     *         can recover state if it crashes and is restarted.</p>
     *     
     *       <p>The filter should be disregarded for ease of use of this
     *         interface: clients will usually use this argument to request
     *         channels be sent to themself, and this should trump the filter
     *         not matching. This also allows a client to become the handler
     *         for a channel produced by one of its own requests, while not
     *         being a candidate to handle other channels of that type.</p>
     *     </div>
     *     
     *     <p>If this is a well-known bus name and the handler has the
     *       Requests interface, the channel dispatcher SHOULD
     *       call  \endhtmlonly ClientInterfaceRequestsInterface::AddRequest() \htmlonly 
     *       on that Handler after this method has returned.</p>
     *     
     *     <div class="rationale">
     *       <p>This ordering allows a Handler which calls CreateChannel with
     *         itself as the preferred handler to associate the call to
     *         AddRequest with that call.</p>
     *     </div>
     *     
     *     <p>This is copied to the ChannelRequest that is returned,
     *       as the  \endhtmlonly \link ChannelRequestInterface::requestPropertyPreferredHandler() ChannelRequestInterface::PreferredHandler \endlink \htmlonly 
     *       property.</p>
     *     \endhtmlonly
     *
     * \param hints
     *     
     *     Additional information about the channel request, which will be 
     *     used as the value for the resulting request&apos;s Hints property. 
     *     See the Hints property&apos;s documentation for rationale.
     * \param timeout The timeout in milliseconds.
     *
     * \return
     *     
     *     A ChannelRequest object.
     */
    inline QDBusPendingReply<QDBusObjectPath> CreateChannelWithHints(const QDBusObjectPath& account, const QVariantMap& requestedProperties, qlonglong userActionTime, const QString& preferredHandler, const QVariantMap& hints, int timeout = -1)
    {
        if (!invalidationReason().isEmpty()) {
            return QDBusPendingReply<QDBusObjectPath>(QDBusMessage::createError(
                invalidationReason(),
                invalidationMessage()
            ));
        }

        QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
                this->staticInterfaceName(), QLatin1String("CreateChannelWithHints"));
        callMessage << QVariant::fromValue(account) << QVariant::fromValue(requestedProperties) << QVariant::fromValue(userActionTime) << QVariant::fromValue(preferredHandler) << QVariant::fromValue(hints);
        return this->connection().asyncCall(callMessage, timeout);
    }

    /**
     * Begins a call to the D-Bus method \c EnsureChannelWithHints on the remote object.
     * 
     * \htmlonly
     * <p>Start a request to ensure that a channel exists, creating it if
     *   necessary.  This initially just creates a  \endhtmlonly ChannelRequestInterface \htmlonly 
     *   object, which can be used to continue the request and track its
     *   success or failure.</p>
     * 
     * <p>If this method is called for an Account that is disabled, invalid
     *   or otherwise unusable, no error is signalled until
     *    \endhtmlonly ChannelRequestInterface::Proceed() \htmlonly 
     *   is called, at which point
     *    \endhtmlonly ChannelRequestInterface::Failed() \htmlonly 
     *   is emitted with an appropriate error.</p>
     * 
     * <div class="rationale">
     *   <p>The rationale is as for  \endhtmlonly ChannelDispatcherInterface::CreateChannelWithHints() \htmlonly .</p>
     * </div>
     * \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 account
     *     
     *     The Account for which the new channel is to be created.
     *
     * \param requestedProperties
     *     
     *     \htmlonly
     *     <p>A dictionary containing desirable properties. This has the same
     *       semantics as the corresponding parameter to
     *        \endhtmlonly ConnectionInterfaceRequestsInterface::EnsureChannel() \htmlonly .
     *     </p>
     *     
     *     <p>Certain properties will not necessarily make sense in this
     *       dictionary: for instance,
     *        \endhtmlonly \link ChannelInterface::requestPropertyTargetHandle() ChannelInterface::TargetHandle \endlink \htmlonly 
     *       can only be given if the requester is able to interact with a
     *        \endhtmlonly ConnectionInterface \htmlonly 
     *       to the desired account.</p>
     *     \endhtmlonly
     *
     * \param userActionTime
     *     
     *     \htmlonly
     *     <p>The time at which user action occurred, or 0 if this channel
     *       request is for some reason not involving user action.</p>
     *     
     *     <p>This parameter is used in the same way as the corresponding
     *       parameter to
     *        \endhtmlonly CreateChannelWithHints() \htmlonly .</p>
     *     \endhtmlonly
     *
     * \param preferredHandler
     *     
     *     \htmlonly
     *     <p>Either the well-known bus name (starting with
     *       <code>org.freedesktop.Telepathy.Client.</code>)
     *       of the preferred handler for this
     *       channel, or an empty string to indicate that any handler would be
     *       acceptable. The behaviour and rationale are the same as for the
     *       corresponding parameter to
     *        \endhtmlonly CreateChannelWithHints() \htmlonly , except
     *       as noted here.</p>
     *     
     *     <p>If any new channels are created in response to this
     *       request, the channel dispatcher SHOULD dispatch as many as
     *       possible of the resulting channels (ideally, all of them)
     *       to that handler, and SHOULD remember the preferred handler
     *       so it can try to dispatch subsequent channels in the same bundle
     *       to the same handler. If the requested channel already exists (that
     *       is,  \endhtmlonly ConnectionInterfaceRequestsInterface::EnsureChannel() \htmlonly 
     *       returns <code>Yours=False</code>) then the channel dispatcher
     *       SHOULD re-dispatch the channel to its existing handler, and MUST
     *       NOT dispatch it to this client (unless it is the existing handler);
     *       the request is still deemed to have succeeded in this case.</p>
     *     
     *     <div class="rationale">
     *       <p>An address book application, for example, might call  \endhtmlonly ChannelDispatcherInterface::EnsureChannel() \htmlonly 
     *         to ensure that a text channel with a particular contact is
     *         displayed to the user; it does not care whether a new channel was
     *         made. An IM client might call  \endhtmlonly ChannelDispatcherInterface::EnsureChannel() \htmlonly 
     *         in response to the user double-clicking an entry in the contact
     *         list, with itself as the <code>Preferred_Handler</code>; if the
     *         user already has a conversation with that contact in another
     *         application, they would expect the existing window to be
     *         presented, rather than their double-click leading to an error
     *         message.  So the request should succeed, even if its
     *         <code>Preferred_Handler</code> is not used.</p>
     *     </div>
     *     \endhtmlonly
     *
     * \param hints
     *     
     *     Additional information about the channel request, which will be 
     *     used as the value for the resulting request&apos;s Hints property.
     * \param timeout The timeout in milliseconds.
     *
     * \return
     *     
     *     A ChannelRequest object.
     */
    inline QDBusPendingReply<QDBusObjectPath> EnsureChannelWithHints(const QDBusObjectPath& account, const QVariantMap& requestedProperties, qlonglong userActionTime, const QString& preferredHandler, const QVariantMap& hints, int timeout = -1)
    {
        if (!invalidationReason().isEmpty()) {
            return QDBusPendingReply<QDBusObjectPath>(QDBusMessage::createError(
                invalidationReason(),
                invalidationMessage()
            ));
        }

        QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
                this->staticInterfaceName(), QLatin1String("EnsureChannelWithHints"));
        callMessage << QVariant::fromValue(account) << QVariant::fromValue(requestedProperties) << QVariant::fromValue(userActionTime) << QVariant::fromValue(preferredHandler) << QVariant::fromValue(hints);
        return this->connection().asyncCall(callMessage, timeout);
    }

    /**
     * Begins a call to the D-Bus method \c DelegateChannels on the remote object.
     * 
     * \htmlonly
     * <p>Called by a
     *  \endhtmlonly ClientHandlerInterface \htmlonly 
     *   to redispatch a bunch of channels it is currently handling.</p>
     * 
     * <p>For each <var>Channel</var> in <var>Channels</var>, if another
     *    \endhtmlonly ClientHandlerInterface \htmlonly 
     *   can be found,
     *    \endhtmlonly ClientHandlerInterface::HandleChannels() \htmlonly 
     *   will be called on it until a
     *    \endhtmlonly ClientHandlerInterface \htmlonly 
     *   accepts it.</p>
     * 
     * <p>This method returns once all the <var>Channels</var> have either
     *   been accepted or rejected by Handlers.</p>
     * 
     * <p>If this method fails, the original
     *    \endhtmlonly ClientHandlerInterface \htmlonly 
     *   is still handling the channels.</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 channels
     *     
     *     \htmlonly
     *     <p>The list of channels to redispatch. The caller has to be the current
     *        \endhtmlonly ClientHandlerInterface \htmlonly 
     *       of all of these channels
     *     </p>
     *     \endhtmlonly
     *
     * \param userActionTime
     *     
     *     \htmlonly
     *     <p>The time at which user action occurred, or 0 if this channels
     *       delegation is for some reason not involving user action.</p>
     *     
     *     <p>This parameter is used in the same way as the corresponding
     *       parameter to
     *        \endhtmlonly CreateChannelWithHints() \htmlonly .</p>
     *     \endhtmlonly
     *
     * \param preferredHandler
     *     
     *     \htmlonly
     *     <p>Either the well-known bus name (starting with
     *       <code>org.freedesktop.Telepathy.Client.</code>)
     *       of the preferred new handler for these
     *       channels, or an empty string to indicate that any handler would be
     *       acceptable. The behaviour and rationale are the same as for the
     *       corresponding parameter to
     *        \endhtmlonly CreateChannelWithHints() \htmlonly .</p>
     *     \endhtmlonly
     * \param timeout The timeout in milliseconds.
     *
     * \return
     *     
     *     \htmlonly
     *     <p>The list of channels which have been delegated; the caller is no
     *     longer handling these channels.</p>
     *     
     *     <p>The client should remove these channels from its
     *      \endhtmlonly \link ClientHandlerInterface::requestPropertyHandledChannels() ClientHandlerInterface::HandledChannels \endlink \htmlonly 
     *     property.</p>
     *     \endhtmlonly
     *
     * \return
     *     
     *     \htmlonly
     *     <p>The list of channels which have NOT been delegated; the caller is still
     *     handling these channels.</p>
     *     \endhtmlonly
     */
    inline QDBusPendingReply<Tp::ObjectPathList, Tp::NotDelegatedMap> DelegateChannels(const Tp::ObjectPathList& channels, qlonglong userActionTime, const QString& preferredHandler, int timeout = -1)
    {
        if (!invalidationReason().isEmpty()) {
            return QDBusPendingReply<Tp::ObjectPathList, Tp::NotDelegatedMap>(QDBusMessage::createError(
                invalidationReason(),
                invalidationMessage()
            ));
        }

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

    /**
     * Begins a call to the D-Bus method \c PresentChannel on the remote object.
     * 
     * \htmlonly
     * <p>Equivalent of calling
     *  \endhtmlonly ChannelDispatcherInterface::EnsureChannel() \htmlonly 
     * with a <var>Requested_Properties</var> which would result in ensuring
     * <var>Channel</var>.</p>
     * 
     *  <p>If <var>Channel</var> is handled, its handler will be asked to present it the user
     *  (e.g. bring it into the foreground).</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 channel
     *     
     *     \htmlonly
     *     <p>The channel to present.</p>
     *     \endhtmlonly
     *
     * \param userActionTime
     *     
     *     \htmlonly
     *     <p>The time at which user action occurred, or 0 if this channel
     *       request is for some reason not involving user action.</p>
     *     
     *     <p>This parameter is used in the same way as the corresponding
     *       parameter to
     *        \endhtmlonly EnsureChannelWithHints() \htmlonly .</p>
     *     \endhtmlonly
     * \param timeout The timeout in milliseconds.
     */
    inline QDBusPendingReply<> PresentChannel(const QDBusObjectPath& channel, 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("PresentChannel"));
        callMessage << QVariant::fromValue(channel) << QVariant::fromValue(userActionTime);
        return this->connection().asyncCall(callMessage, timeout);
    }

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