~ubuntu-branches/ubuntu/vivid/ktp-filetransfer-handler/vivid

« back to all changes in this revision

Viewing changes to src/filetransfer-handler.h

  • Committer: Package Import Robot
  • Author(s): Rohan Garg
  • Date: 2012-02-08 15:49:24 UTC
  • Revision ID: package-import@ubuntu.com-20120208154924-9m2mcgarcut2pde1
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, 2011 Daniele E. Domenichelli <daniele.domenichelli@gmail.com>
 
3
 *
 
4
 * This program is free software: you can redistribute it and/or modify
 
5
 * it under the terms of the GNU General Public License as published by
 
6
 * the Free Software Foundation, either version 2 of the License, or
 
7
 * (at your option) any later version.
 
8
 *
 
9
 * This program is distributed in the hope that it will be useful,
 
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
 * GNU General Public License for more details.
 
13
 *
 
14
 * You should have received a copy of the GNU General Public License
 
15
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
16
 */
 
17
 
 
18
#ifndef TELEPATHY_KDE_FILETRANSFER_HANDLER_H
 
19
#define TELEPATHY_KDE_FILETRANSFER_HANDLER_H
 
20
 
 
21
#include <TelepathyQt/AbstractClientHandler>
 
22
#include <TelepathyQt/Types>
 
23
 
 
24
class KJob;
 
25
namespace Tp
 
26
{
 
27
    class PendingOperation;
 
28
}
 
29
 
 
30
class FileTransferHandler : public QObject, public Tp::AbstractClientHandler
 
31
{
 
32
    Q_OBJECT
 
33
    Q_DISABLE_COPY(FileTransferHandler);
 
34
 
 
35
public:
 
36
    explicit FileTransferHandler(QObject* parent = 0);
 
37
    virtual ~FileTransferHandler();
 
38
 
 
39
    virtual bool bypassApproval() const;
 
40
    void handleChannels(const Tp::MethodInvocationContextPtr<> &context,
 
41
                        const Tp::AccountPtr &account,
 
42
                        const Tp::ConnectionPtr &connection,
 
43
                        const QList<Tp::ChannelPtr> &channels,
 
44
                        const QList<Tp::ChannelRequestPtr> &requestsSatisfied,
 
45
                        const QDateTime &userActionTime,
 
46
                        const Tp::AbstractClientHandler::HandlerInfo &handlerInfo);
 
47
 
 
48
private Q_SLOTS:
 
49
    void onInfoMessage(KJob* job, const QString &plain, const QString &rich);
 
50
    void handleResult(KJob* job);
 
51
};
 
52
 
 
53
#endif // TELEPATHY_KDE_FILETRANSFER_HANDLER_H