• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.14.10 API Reference
  • KDE Home
  • Contact Us
 

KMBox Library

  • kmbox
mbox.h
1/*
2 Copyright (c) 2009 Bertjan Broeksema <broeksema@kde.org>
3
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
8
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
18*/
19
20#ifndef KMBOX_MBOX_H
21#define KMBOX_MBOX_H
22
23#include "kmbox_export.h"
24#include "mboxentry.h"
25
26#include <kmime/kmime_message.h>
27
28namespace KMBox {
29
30class MBoxPrivate;
31
38class KMBOX_EXPORT MBox
39{
40 public:
44 enum LockType {
45 ProcmailLockfile,
46 MuttDotlock,
47 MuttDotlockPrivileged,
48 None
49 };
50
54 MBox();
55
61 ~MBox();
62
73 MBoxEntry appendMessage( const KMime::Message::Ptr &message );
74
82 MBoxEntry::List entries( const MBoxEntry::List &deletedEntries = MBoxEntry::List() ) const;
83
87 QString fileName() const;
88
101 bool load( const QString &fileName );
102
115 bool lock();
116
120 bool locked() const;
121
140 bool purge( const MBoxEntry::List &deletedEntries, QList<MBoxEntry::Pair> *movedEntries = 0 );
141
154 KMime::Message *readMessage( const MBoxEntry &entry );
155
167 QByteArray readMessageHeaders( const MBoxEntry &entry );
168
180 QByteArray readRawMessage( const MBoxEntry &entry );
181
193 bool save( const QString &fileName = QString() );
194
204 bool setLockType( LockType ltype );
205
213 void setLockFile( const QString &lockFile );
214
222 void setUnlockTimeout( int msec );
223
231 bool unlock();
232
248 void setReadOnly(bool ro = true);
249
258 bool isReadOnly() const;
259
260 private:
261 //@cond PRIVATE
262 friend class MBoxPrivate;
263 MBoxPrivate * const d;
264 //@endcond
265};
266
267}
268
269#endif // KMBOX_MBOX_H
KMBox::MBoxEntry
A class that encapsulates an entry of a MBox.
Definition: mboxentry.h:39
KMBox::MBoxEntry::List
QList< MBoxEntry > List
Describes a list of mbox entry objects.
Definition: mboxentry.h:44
KMBox::MBox
A class to access mail storages in MBox format.
Definition: mbox.h:39
KMBox::MBox::LockType
LockType
Describes the type of locking that will be used.
Definition: mbox.h:44
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jul 21 2022 00:00:00 by doxygen 1.9.5 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KMBox Library

Skip menu "KMBox Library"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Members
  • File List
  • Related Pages

kdepimlibs-4.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
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