Show invite menu in wlm chat window immediately
[kdenetwork.git] / kopete / libkopete / kopetefileengine.h
blob46c829606ab1568a12e9313c9d2f84dd0f624fff
1 /*
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 *************************************************************************
11 * *
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. *
16 * *
17 *************************************************************************
20 #ifndef KOPETEFILEENGINE_H
21 #define KOPETEFILEENGINE_H
23 #include <qabstractfileengine.h>
24 #include <qstring.h>
25 #include <QBuffer>
27 #include "kopete_export.h"
29 namespace Kopete
31 class KOPETE_EXPORT FileEngineHandler : public QAbstractFileEngineHandler
33 public:
34 QAbstractFileEngine *create(const QString &fileName) const;
37 class KOPETE_EXPORT FileEngine : public QAbstractFileEngine
39 public:
40 FileEngine();
41 ~FileEngine();
42 explicit FileEngine(const QString&);
44 bool open(QIODevice::OpenMode openMode);
45 bool close();
46 qint64 size() const;
47 qint64 pos() const;
48 bool seek(qint64);
49 bool isSequential() const;
50 bool remove();
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);
65 bool atEnd() const;
67 qint64 read(char *data, qint64 maxlen);
68 qint64 readLine(char *data, qint64 maxlen);
69 qint64 write(const char *data, qint64 len);
70 private:
71 QString m_fileName;
72 QByteArray m_data;
73 QBuffer m_buffer;
75 } // Kopete
77 #endif