• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdenetwork API Reference
  • KDE Home
  • Contact Us
 

kopete/libkopete

  • sources
  • kde-4.14
  • kdenetwork
  • kopete
  • libkopete
kopetefileengine.h
Go to the documentation of this file.
1 /*
2 * kopetefileengine.h - Kopete file engine
3 *
4 * Copyright (c) 2007 by Guillermo A. Amaral B <me@guillermoamaral.com>
5 * Kopete (c) 2007 by the Kopete developers <kopete-devel@kde.org>
6 *
7 * Based on Kopete Mime Source Factory
8 * Copyright (c) 2004 by Richard Smith <kde@metafoo.co.uk>
9 *
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 *************************************************************************
18 */
19 
20 #ifndef KOPETEFILEENGINE_H
21 #define KOPETEFILEENGINE_H
22 
23 #include <qabstractfileengine.h>
24 #include <qstring.h>
25 #include <QBuffer>
26 
27 #include "kopete_export.h"
28 
29 namespace Kopete
30 {
31  class KOPETE_EXPORT FileEngineHandler : public QAbstractFileEngineHandler
32  {
33  public:
34  QAbstractFileEngine *create(const QString &fileName) const;
35  };
36 
37  class KOPETE_EXPORT FileEngine : public QAbstractFileEngine
38  {
39  public:
40  FileEngine();
41  ~FileEngine();
42  explicit FileEngine(const QString&);
43 
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;
66 
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;
74  };
75 } // Kopete
76 
77 #endif
QIODevice::OpenMode
typedef OpenMode
KOPETE_EXPORT
#define KOPETE_EXPORT
Definition: kopete_export.h:27
Kopete::FileEngine
Definition: kopetefileengine.h:37
QByteArray
QBuffer
QDir::Filters
typedef Filters
kopete_export.h
Kopete::FileEngineHandler
Definition: kopetefileengine.h:31
QString
QStringList
QAbstractFileEngineHandler
QAbstractFileEngine
QDateTime
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:29:19 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kopete/libkopete

Skip menu "kopete/libkopete"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdenetwork API Reference

Skip menu "kdenetwork API Reference"
  • kget
  • kopete
  •   kopete
  •   libkopete
  • krdc
  • krfb

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal