~ubuntu-branches/ubuntu/saucy/kopete/saucy-proposed

« back to all changes in this revision

Viewing changes to protocols/irc/libkirc/plugins/ctcp/kirctransferserver.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2013-06-21 02:22:39 UTC
  • Revision ID: package-import@ubuntu.com-20130621022239-63l3zc8p0nf26pt6
Tags: upstream-4.10.80
ImportĀ upstreamĀ versionĀ 4.10.80

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
    kirctransfer.h - DCC Handler
 
3
 
 
4
    Copyright (c) 2003-2007 by Michel Hermier <michel.hermier@gmail.com>
 
5
 
 
6
    Kopete    (c) 2003-2007 by the Kopete developers <kopete-devel@kde.org>
 
7
 
 
8
    *************************************************************************
 
9
    *                                                                       *
 
10
    * This program is free software; you can redistribute it and/or modify  *
 
11
    * it under the terms of the GNU General Public License as published by  *
 
12
    * the Free Software Foundation; either version 2 of the License, or     *
 
13
    * (at your option) any later version.                                   *
 
14
    *                                                                       *
 
15
    *************************************************************************
 
16
*/
 
17
 
 
18
#ifndef KIRCTRANSFERSERVER_H
 
19
#define KIRCTRANSFERSERVER_H
 
20
 
 
21
#include "kirctransfer.h"
 
22
 
 
23
#include <qobject.h>
 
24
 
 
25
class KExtendedSocket;
 
26
 
 
27
 
 
28
namespace KIrc
 
29
{
 
30
 
 
31
class TransferServer
 
32
        : public QObject
 
33
{
 
34
        Q_OBJECT
 
35
 
 
36
public:
 
37
//      explicit TransferServer(QObject *parent = 0);
 
38
        explicit TransferServer(quint16 port, int backlog = 1, QObject *parent = 0);
 
39
        TransferServer(KIrc::Engine *engine, QString nick,// QString nick_peer_adress,
 
40
                        Transfer::Type type,
 
41
                        QString fileName, quint32 fileSize,
 
42
                        QObject *parent = 0);
 
43
 
 
44
        ~TransferServer();
 
45
 
 
46
        int port()
 
47
        { return m_port; }
 
48
 
 
49
protected:
 
50
        bool initServer();
 
51
        bool initServer( quint16 port, int backlog = 1 );
 
52
 
 
53
signals:
 
54
        void incomingNewTransfer(Transfer *transfer);
 
55
 
 
56
protected slots:
 
57
        void readyAccept();
 
58
        void connectionFailed(int error);
 
59
 
 
60
private:
 
61
        KExtendedSocket *m_socket;
 
62
        quint16 m_port;
 
63
        int m_backlog;
 
64
 
 
65
        // The following will be deprecated ...
 
66
        KIrc::Engine *          m_engine;
 
67
        QString                 m_nick;
 
68
        Transfer::Type  m_type;
 
69
        QString                 m_fileName;
 
70
        quint32         m_fileSize;
 
71
        // by
 
72
        // QPtrList<Transfer> m_pendingTransfers;
 
73
        // QPtrList<Transfer> m_activeTransfers;
 
74
 
 
75
};
 
76
 
 
77
}
 
78
 
 
79
#endif