~ubuntu-branches/ubuntu/trusty/ktp-approver/trusty-proposed

« back to all changes in this revision

Viewing changes to src/dispatchoperation.h

  • Committer: Package Import Robot
  • Author(s): Rohan Garg
  • Date: 2012-02-03 19:28:04 UTC
  • Revision ID: package-import@ubuntu.com-20120203192804-0l0dkcacog047fwb
Tags: upstream-0.3.0
ImportĀ upstreamĀ versionĀ 0.3.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
    Copyright (C) 2010 Collabora Ltd. <info@collabora.co.uk>
 
3
      @author George Kiagiadakis <george.kiagiadakis@collabora.co.uk>
 
4
 
 
5
    This library is free software; you can redistribute it and/or modify
 
6
    it under the terms of the GNU Lesser General Public License as published
 
7
    by the Free Software Foundation; either version 2.1 of the License, or
 
8
    (at your option) any later version.
 
9
 
 
10
    This program is distributed in the hope that it will be useful,
 
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
    GNU General Public License for more details.
 
14
 
 
15
    You should have received a copy of the GNU Lesser General Public License
 
16
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
17
*/
 
18
#ifndef DISPATCHOPERATION_H
 
19
#define DISPATCHOPERATION_H
 
20
 
 
21
#include <QtCore/QObject>
 
22
#include <TelepathyQt/ChannelDispatchOperation>
 
23
 
 
24
class ChannelApprover;
 
25
 
 
26
class DispatchOperation : public QObject
 
27
{
 
28
    Q_OBJECT
 
29
public:
 
30
    DispatchOperation(const Tp::ChannelDispatchOperationPtr & dispatchOperation, QObject *parent);
 
31
    virtual ~DispatchOperation();
 
32
 
 
33
 
 
34
private Q_SLOTS:
 
35
    void onChannelLost(const Tp::ChannelPtr & channel,
 
36
                       const QString & errorName,
 
37
                       const QString & errorMessage);
 
38
    void onDispatchOperationInvalidated(Tp::DBusProxy *proxy,
 
39
                                        const QString & errorName,
 
40
                                        const QString & errorMessage);
 
41
    void onChannelAccepted();
 
42
    void onChannelRejected();
 
43
    void onClaimFinished(Tp::PendingOperation *operation);
 
44
 
 
45
private:
 
46
    Tp::ChannelDispatchOperationPtr m_dispatchOperation;
 
47
    QHash<Tp::ChannelPtr, ChannelApprover*> m_channelApprovers;
 
48
};
 
49
 
 
50
#endif // DISPATCHOPERATION_H