2 * kopetefileengine.h - Kopete file engine
4 * Copyright (c) 2007 by Guillermo A. Amaral B <me@guillermoamaral.com>
5 * Kopete (c) 2007 by the Kopete developers <kopete-devel@kde.org>
7 * Based on Kopete Mime Source Factory
8 * Copyright (c) 2004 by Richard Smith <kde@metafoo.co.uk>
10 *************************************************************************
12 * This library is free software; you can redistribute it and/or *
13 * modify it under the terms of the GNU Lesser General Public *
14 * License as published by the Free Software Foundation; either *
15 * version 2 of the License, or (at your option) any later version. *
17 *************************************************************************
20 #ifndef KOPETEFILEENGINE_H
21 #define KOPETEFILEENGINE_H
23 #include <qabstractfileengine.h>
27 #include "kopete_export.h"
31 class KOPETE_EXPORT FileEngineHandler
: public QAbstractFileEngineHandler
34 QAbstractFileEngine
*create(const QString
&fileName
) const;
37 class KOPETE_EXPORT FileEngine
: public QAbstractFileEngine
42 explicit FileEngine(const QString
&);
44 bool open(QIODevice::OpenMode openMode
);
49 bool isSequential() const;
51 bool rename(const QString
&newName
);
52 bool mkdir(const QString
&dirName
, bool createParentDirectories
) const;
53 bool rmdir(const QString
&dirName
, bool recurseParentDirectories
) const;
54 bool setSize(qint64 size
);
55 bool caseSensitive() const;
56 bool isRelativePath() const;
57 QStringList
entryList(QDir::Filters filters
, const QStringList
&filterNames
) const;
58 FileFlags
fileFlags(FileFlags type
) const;
59 bool setPermissions(uint perms
);
60 QString
fileName(FileName file
=DefaultName
) const;
61 uint
ownerId(FileOwner
) const;
62 QString
owner(FileOwner
) const;
63 QDateTime
fileTime(FileTime time
) const;
64 void setFileName(const QString
&file
);
67 qint64
read(char *data
, qint64 maxlen
);
68 qint64
readLine(char *data
, qint64 maxlen
);
69 qint64
write(const char *data
, qint64 len
);