summaryrefslogtreecommitdiffstats
path: root/ksirc/ioDCC.h
blob: 76a93941ddff2d02561466ccade7eadaab8fe01b (plain)
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
#ifndef KIODCCC_H
#define KIODCCC_H

#include <qdict.h>
#include <qobject.h>
#include <qguardedptr.h>

#include "dccManager.h"
#include "dccToplevel.h"
#include "messageReceiver.h"

class KSProgress;

struct DCCInfo {
  QString nick;
  QString cancelMessage;
  int LastSize;
  int PercentSize;
  bool inProgress;
};

class KSircIODCC : public QObject,
		   public KSircMessageReceiver
{
  Q_OBJECT
public:
  KSircIODCC(KSircProcess *_proc);
  virtual ~KSircIODCC();

  virtual void sirc_receive(QCString, bool broadcast);
  virtual void control_message(int, QString);
  virtual filterRuleList *defaultRules();

  virtual void showMgr();

protected slots:
  void cancelTransfer(QString);
  void getFile();
  void forgetFile();

  void dccConnectClicked(dccItem *);
  void dccResumeClicked(dccItem *);
  void dccRenameClicked(dccItem *);
  void dccAbortClicked(dccItem *);

  void dccRenameDone(dccItem *, QString, QString);

signals:
  void outputLine(QCString);

private:
//  QDict<QProgressDialog> DlgList;
    //QDict<KSProgress> DlgList;
    //QDict<DCCInfo> DCCStatus;
  QDict<dccItem> DCCGetItems;
  QDict<dccItem> DCCSendItems;
  QDict<dccItem> DCCChatItems;

  //dccDialog *pending;
  QGuardedPtr<dccTopLevel> mgr;

  KSircProcess *proc;
};

#endif