summaryrefslogtreecommitdiff
path: root/libopie/ofileselector/olister.h~
blob: bb6304c0a9e4e995ded1c3252b8bed638d7e34ec (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
#ifndef OPIE_FILE_LISTER_H
#define OPIE_FILE_LISTER_H

#include <qfileinfo.h>
#include <qmap.h>
#include <qstring.h>

class OFileSelector;
/**
 * lister is something like KIO but very
 * very basic and currently only for
 * populating our views.
 * This is a base class which needs to be implemented.
 * @see OLocalLister for a filesystem based implementation
 */
class OLister {
public:
    OLister( OFileSelector* );
    virtual ~OLister();
    virtual void reparse(const QString& path) = 0;

    /**
     * return a list of available mimetypes
     */
    virtual QMap<QString, QString> mimeTypes( const QString& dir ) = 0;

protected:

    void addFile( const QString& mine,
                  QFileInfo*,
                  bool isSymlink = FALSE );
    void addFile( const QString& mine,
                  const QString& path,
                  const QString& file,
                  bool isSymlink = FALSE );
    void addDir( const QString& mine,
                 QFileInfo*,
                 bool isSymlink = FALSE );
    void addDir( const QString& mine,
                 const QString& path,
                 const QString& dir,
                 bool isSymlink = FALSE );
    void addSymlink( const QString& mine,
                     QFileInfo* info,
                     bool isSymlink = FALSE);
    void addSymlink( const QString& mine,
                     const QString& path,
                     const QString& name,
                     bool isSymlink = FALSE );
    OFileSelector* view();
private:
    OFileSelector* m_view;


};

#endif