summaryrefslogtreecommitdiffstats
path: root/ksirc/ioDCC.h
blob: f7fb74ef21748bc19f2c861aef0e9576186efe7e (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
66
#ifndef KIODCCC_H
#define KIODCCC_H

#include <tqdict.h>
#include <tqobject.h>
#include <tqguardedptr.h>

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

class KSProgress;

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

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

  virtual void sirc_receive(TQCString, bool broadcast);
  virtual void control_message(int, TQString);
  virtual filterRuleList *defaultRules();

  virtual void showMgr();

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

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

  void dccRenameDone(dccItem *, TQString, TQString);

signals:
  void outputLine(TQCString);

private:
//  TQDict<TQProgressDialog> DlgList;
    //TQDict<KSProgress> DlgList;
    //TQDict<DCCInfo> DCCStatus;
  TQDict<dccItem> DCCGetItems;
  TQDict<dccItem> DCCSendItems;
  TQDict<dccItem> DCCChatItems;

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

  KSircProcess *proc;
};

#endif