summaryrefslogtreecommitdiffstats
path: root/kbugbuster/backend/bugjob.h
blob: 981283db3d43595e0bbbb87a4c3eb2ff853c68bc (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
#ifndef KBB_BUGJOB_H
#define KBB_BUGJOB_H

#include <kio/jobclasses.h>

#include "bugserver.h"

class BugJob : public TDEIO::Job
{
    Q_OBJECT
  
  public:
    BugJob( BugServer * );
    virtual ~BugJob();

    BugServer *server() const { return mServer; }

  signals:
    void infoMessage( const TQString &text );
    void infoPercent( unsigned long percent );
    void error( const TQString &text );
    void jobEnded( BugJob * );

  protected:
    void start( const KURL &url /*, const KParts::URLArgs &args = KParts::URLArgs()*/ );

    virtual void process( const TQByteArray &data ) = 0;

  private slots:
    void ioResult( TDEIO::Job *job );

    void ioData( TDEIO::Job *job, const TQByteArray &data );

    void ioInfoMessage( TDEIO::Job *job, const TQString &text );

    void ioInfoPercent( TDEIO::Job *job, unsigned long percent );

  private:
    TQByteArray m_data;
    BugServer *mServer;
};

#endif
/*
 * vim:sw=4:ts=4:et
 */