summaryrefslogtreecommitdiffstats
path: root/src/part/scan.h
blob: 275ea61e14ca9dd3a1a46f301e96211d695a8ee3 (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
//Author:    Max Howell <[email protected]>, (C) 2003-4
//Copyright: See COPYING file that comes with this distribution

#ifndef SCAN_H
#define SCAN_H

#include <kurl.h>
#include <tqobject.h>

class TQThread;
class Directory;
template<class T> class Chain;

namespace Filelight
{
   class ScanManager : public TQObject
   {
      Q_OBJECT
  TQ_OBJECT

      friend class LocalLister;
      friend class RemoteLister;

   public:
      ScanManager( TQObject *tqparent );
      virtual ~ScanManager();

      bool start( const KURL& );
      bool running() const;

      static uint files() { return s_files; }

   public slots:
      bool abort();
      void emptyCache();

   signals:
      void completed( Directory* );
      void aboutToEmptyCache();

   private:
      static bool s_abort;
      static uint s_files;

      KURL m_url;
      TQThread *m_thread;
      Chain<Directory> *m_cache;

      virtual void customEvent( TQCustomEvent* );
   };
}

#endif