summaryrefslogtreecommitdiff
path: root/libopie/ofileselector/olister.h
authorzecke <zecke>2002-09-15 22:19:08 (UTC)
committer zecke <zecke>2002-09-15 22:19:08 (UTC)
commitaabe567e96d040c483b947f5758a1405cc312fdc (patch) (side-by-side diff)
treeceb8ebba2384f1737277c0dfb89256eaa2ac1717 /libopie/ofileselector/olister.h
parent09561ee29b5288e02e513172fc590d27e9e09333 (diff)
downloadopie-aabe567e96d040c483b947f5758a1405cc312fdc.zip
opie-aabe567e96d040c483b947f5758a1405cc312fdc.tar.gz
opie-aabe567e96d040c483b947f5758a1405cc312fdc.tar.bz2
add files
Diffstat (limited to 'libopie/ofileselector/olister.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/ofileselector/olister.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/libopie/ofileselector/olister.h b/libopie/ofileselector/olister.h
new file mode 100644
index 0000000..081b876
--- a/dev/null
+++ b/libopie/ofileselector/olister.h
@@ -0,0 +1,59 @@
+#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, QStringList> mimeTypes( const QString& dir ) = 0;
+
+protected:
+ bool showFiles()const;
+ bool showDirs()const;
+ bool compliesMime( const QString& mime );
+ 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