Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > 110492f5122731329f0db69a1df590c3 > files > 4221

kdepimlibs-apidocs-4.10.5-1.fc18.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
  <title>KMBox::MBox Class Reference</title>
<style type="text/css">
  .cp-doNotDisplay { display: none; }
  @media aural, braille, handheld, tty { .cp-doNotDisplay { display: inline; speak: normal; }}
  .cp-edit { text-align: right; }
  @media print, embossed { .cp-edit { display: none; }}
</style>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="Content-Style-Type" content="text/css" />
  <link rel="meta" href="http://www.kde.org/labels.rdf" type="application/rdf+xml" title="ICRA labels" />
  <meta name="trademark" content="KDE e.V." />
  <meta name="description" content="K Desktop Environment Homepage, KDE.org" />
  <meta name="MSSmartTagsPreventParsing" content="true" />
  <meta name="robots" content="all" />
  <meta name="no-email-collection" content="http://www.unspam.com/noemailcollection" />
  <script type="text/javascript" src="jquery.js"></script>
  <script type="text/javascript" src="dynsections.js"></script>
  <link rel="shortcut icon" href="../../favicon.ico" /><link rel="icon" href="../../favicon.ico" />
  <link rel="stylesheet" media="screen" type="text/css" title="KDE Colors" href="../../kde.css" />
  <link rel="stylesheet" media="print, embossed" type="text/css" href="../../print.css" />
  <link rel="stylesheet" media="screen, aural, handheld, tty, braille" type="text/css" title="Flat" href="../../flat.css" />
  <link rel="stylesheet" type="text/css" href="../../doxygen.css" />
  <link rel="stylesheet" type="text/css" href="../../tabs.css" />
</head>
<body>
<ul class="cp-doNotDisplay">
  <li><a href="#cp-content" accesskey="2">Skip to content</a></li>
  <li><a href="#cp-menu" accesskey="5">Skip to link menu</a></li>
</ul>
<div id="container">
<div id="header">
  <div id="header_top"><div><div>
    <img alt ="" src="../../top-kde.jpg"/>
    </div></div></div>
  <div id="header_bottom">
    <div id="location">
      <ul>
        <li><a href="http://api.kde.org">KDE API Reference</a></li>
        <li><a href="../../index.html">kdepimlibs-4.10.5 API Reference</a></li>
      </ul>
    </div>
    <div id="menu">
<ul>
<li><a href="http://www.kde.org/">KDE Home</a></li>
<li><a href="http://kde.org/contact/">Contact Us</a></li>
</ul>
</div>
</div>
</div>
<!-- End page header -->
    <div id="body_wrapper">
      <div id="body">
        <!-- begin main content -->
        <div id="right">
          <div class="content">
          <div id="main">
            <div class="clearer">&nbsp;</div>
<h2><a name="content"></a>KMBox Library</h2>
<!-- BC -->
<div id="top">
<!-- Generated by Doxygen 1.8.3.1 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>KMBox</b></li><li class="navelem"><a class="el" href="classKMBox_1_1MBox.html">MBox</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classKMBox_1_1MBox-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">KMBox::MBox Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="mbox_8h_source.html">mbox.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:ad104aaa0fb21e6c9baf6964a7760908d"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKMBox_1_1MBox.html#ad104aaa0fb21e6c9baf6964a7760908d">LockType</a> { <b>ProcmailLockfile</b>, 
<b>MuttDotlock</b>, 
<b>MuttDotlockPrivileged</b>, 
<b>None</b>
 }</td></tr>
<tr class="separator:ad104aaa0fb21e6c9baf6964a7760908d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a52d40121e3eebf8c70d25524ada04fef"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKMBox_1_1MBox.html#a52d40121e3eebf8c70d25524ada04fef">MBox</a> ()</td></tr>
<tr class="separator:a52d40121e3eebf8c70d25524ada04fef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a40ad5b59a247773f4e929e8e5dc1f425"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKMBox_1_1MBox.html#a40ad5b59a247773f4e929e8e5dc1f425">~MBox</a> ()</td></tr>
<tr class="separator:a40ad5b59a247773f4e929e8e5dc1f425"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5fedba73cee0630b3f944bcc24ecdcb2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classKMBox_1_1MBoxEntry.html">MBoxEntry</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKMBox_1_1MBox.html#a5fedba73cee0630b3f944bcc24ecdcb2">appendMessage</a> (const KMime::Message::Ptr &amp;message)</td></tr>
<tr class="separator:a5fedba73cee0630b3f944bcc24ecdcb2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a01bc2608f9610dff071974ae1caf3e9b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classKMBox_1_1MBoxEntry.html#ab3a90184128dfefd8a8b4974661420e4">MBoxEntry::List</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKMBox_1_1MBox.html#a01bc2608f9610dff071974ae1caf3e9b">entries</a> (const <a class="el" href="classKMBox_1_1MBoxEntry.html#ab3a90184128dfefd8a8b4974661420e4">MBoxEntry::List</a> &amp;deletedEntries=<a class="el" href="classKMBox_1_1MBoxEntry.html#ab3a90184128dfefd8a8b4974661420e4">MBoxEntry::List</a>()) const </td></tr>
<tr class="separator:a01bc2608f9610dff071974ae1caf3e9b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af42bc6d99a504611ffd6dce33aaf2772"><td class="memItemLeft" align="right" valign="top">QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKMBox_1_1MBox.html#af42bc6d99a504611ffd6dce33aaf2772">fileName</a> () const </td></tr>
<tr class="separator:af42bc6d99a504611ffd6dce33aaf2772"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a394cca3b3e6532d91485beee22658084"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKMBox_1_1MBox.html#a394cca3b3e6532d91485beee22658084">load</a> (const QString &amp;<a class="el" href="classKMBox_1_1MBox.html#af42bc6d99a504611ffd6dce33aaf2772">fileName</a>)</td></tr>
<tr class="separator:a394cca3b3e6532d91485beee22658084"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3439681d9523517b7f3ea06ee7f2de50"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKMBox_1_1MBox.html#a3439681d9523517b7f3ea06ee7f2de50">lock</a> ()</td></tr>
<tr class="separator:a3439681d9523517b7f3ea06ee7f2de50"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acd5477ff53ce642f752ab21f71e26520"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKMBox_1_1MBox.html#acd5477ff53ce642f752ab21f71e26520">locked</a> () const </td></tr>
<tr class="separator:acd5477ff53ce642f752ab21f71e26520"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaf719819a35a0056182f21753b830bb1"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKMBox_1_1MBox.html#aaf719819a35a0056182f21753b830bb1">purge</a> (const <a class="el" href="classKMBox_1_1MBoxEntry.html#ab3a90184128dfefd8a8b4974661420e4">MBoxEntry::List</a> &amp;deletedEntries, QList&lt; <a class="el" href="classKMBox_1_1MBoxEntry.html#a76a32c2718bfc2a425910a313e97c306">MBoxEntry::Pair</a> &gt; *movedEntries=0)</td></tr>
<tr class="separator:aaf719819a35a0056182f21753b830bb1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae8c9bddf55d35c545538ea5d0959f955"><td class="memItemLeft" align="right" valign="top">KMime::Message *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKMBox_1_1MBox.html#ae8c9bddf55d35c545538ea5d0959f955">readMessage</a> (const <a class="el" href="classKMBox_1_1MBoxEntry.html">MBoxEntry</a> &amp;entry)</td></tr>
<tr class="separator:ae8c9bddf55d35c545538ea5d0959f955"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae6da75689e2c1d1443285cf550d86449"><td class="memItemLeft" align="right" valign="top">QByteArray&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKMBox_1_1MBox.html#ae6da75689e2c1d1443285cf550d86449">readMessageHeaders</a> (const <a class="el" href="classKMBox_1_1MBoxEntry.html">MBoxEntry</a> &amp;entry)</td></tr>
<tr class="separator:ae6da75689e2c1d1443285cf550d86449"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a02e66b4306aad72eecf9b3cbf3693b03"><td class="memItemLeft" align="right" valign="top">QByteArray&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKMBox_1_1MBox.html#a02e66b4306aad72eecf9b3cbf3693b03">readRawMessage</a> (const <a class="el" href="classKMBox_1_1MBoxEntry.html">MBoxEntry</a> &amp;entry)</td></tr>
<tr class="separator:a02e66b4306aad72eecf9b3cbf3693b03"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a756d08cc1954a1b9aa710f4c09f09647"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKMBox_1_1MBox.html#a756d08cc1954a1b9aa710f4c09f09647">save</a> (const QString &amp;<a class="el" href="classKMBox_1_1MBox.html#af42bc6d99a504611ffd6dce33aaf2772">fileName</a>=QString())</td></tr>
<tr class="separator:a756d08cc1954a1b9aa710f4c09f09647"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3bc68f23e9b068a6ffe47abf6ac21ea7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKMBox_1_1MBox.html#a3bc68f23e9b068a6ffe47abf6ac21ea7">setLockFile</a> (const QString &amp;lockFile)</td></tr>
<tr class="separator:a3bc68f23e9b068a6ffe47abf6ac21ea7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5ff45c5bb927e086c0bb98a3927fa542"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKMBox_1_1MBox.html#a5ff45c5bb927e086c0bb98a3927fa542">setLockType</a> (<a class="el" href="classKMBox_1_1MBox.html#ad104aaa0fb21e6c9baf6964a7760908d">LockType</a> ltype)</td></tr>
<tr class="separator:a5ff45c5bb927e086c0bb98a3927fa542"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a900f67b6bd9a73172febd63e7d71f164"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKMBox_1_1MBox.html#a900f67b6bd9a73172febd63e7d71f164">setUnlockTimeout</a> (int msec)</td></tr>
<tr class="separator:a900f67b6bd9a73172febd63e7d71f164"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abf0ef7017bcb330733247abd8b4a81f5"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKMBox_1_1MBox.html#abf0ef7017bcb330733247abd8b4a81f5">unlock</a> ()</td></tr>
<tr class="separator:abf0ef7017bcb330733247abd8b4a81f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A class to access mail storages in <a class="el" href="classKMBox_1_1MBox.html" title="A class to access mail storages in MBox format.">MBox</a> format. </p>
<dl class="section author"><dt>Author</dt><dd>Bertjan Broeksema <a href="#" onclick="location.href='mai'+'lto:'+'bro'+'ek'+'sem'+'a@'+'kde'+'.o'+'rg'; return false;">broek<span style="display: none;">.nosp@m.</span>sema<span style="display: none;">.nosp@m.</span>@kde.<span style="display: none;">.nosp@m.</span>org</a> </dd></dl>
<dl class="section since"><dt>Since</dt><dd>4.6 </dd></dl>

<p>Definition at line <a class="el" href="mbox_8h_source.html#l00038">38</a> of file <a class="el" href="mbox_8h_source.html">mbox.h</a>.</p>
</div><h2 class="groupheader">Member Enumeration Documentation</h2>
<a class="anchor" id="ad104aaa0fb21e6c9baf6964a7760908d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classKMBox_1_1MBox.html#ad104aaa0fb21e6c9baf6964a7760908d">KMBox::MBox::LockType</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Describes the type of locking that will be used. </p>

<p>Definition at line <a class="el" href="mbox_8h_source.html#l00044">44</a> of file <a class="el" href="mbox_8h_source.html">mbox.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a52d40121e3eebf8c70d25524ada04fef"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">MBox::MBox </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates a new mbox object. </p>
<p>public methods. </p>

<p>Definition at line <a class="el" href="mbox_8cpp_source.html#l00041">41</a> of file <a class="el" href="mbox_8cpp_source.html">mbox.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a40ad5b59a247773f4e929e8e5dc1f425"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">MBox::~MBox </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Destroys the mbox object. </p>
<p>The file will be unlocked if it is still open. </p>

<p>Definition at line <a class="el" href="mbox_8cpp_source.html#l00052">52</a> of file <a class="el" href="mbox_8cpp_source.html">mbox.cpp</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a5fedba73cee0630b3f944bcc24ecdcb2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classKMBox_1_1MBoxEntry.html">MBoxEntry</a> MBox::appendMessage </td>
          <td>(</td>
          <td class="paramtype">const KMime::Message::Ptr &amp;&#160;</td>
          <td class="paramname"><em>message</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Appends <code>message</code> to the <a class="el" href="classKMBox_1_1MBox.html" title="A class to access mail storages in MBox format.">MBox</a> and returns the corresponding mbox entry for it. </p>
<p>You must load a mbox file by making a call to <a class="el" href="classKMBox_1_1MBox.html#a394cca3b3e6532d91485beee22658084" title="Loads the raw mbox data from disk into the current MBox object.">load( const QString&amp; )</a> before appending entries. The returned mbox entry is <em>only</em> valid for that particular file.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">message</td><td>The message to append to the mbox. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the corresponding mbox entry for the message in the file or an invalid mbox entry if the message was not added. </dd></dl>

<p>Definition at line <a class="el" href="mbox_8cpp_source.html#l00067">67</a> of file <a class="el" href="mbox_8cpp_source.html">mbox.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a01bc2608f9610dff071974ae1caf3e9b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classKMBox_1_1MBoxEntry.html#ab3a90184128dfefd8a8b4974661420e4">MBoxEntry::List</a> MBox::entries </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classKMBox_1_1MBoxEntry.html#ab3a90184128dfefd8a8b4974661420e4">MBoxEntry::List</a> &amp;&#160;</td>
          <td class="paramname"><em>deletedEntries</em> = <code><a class="el" href="classKMBox_1_1MBoxEntry.html#ab3a90184128dfefd8a8b4974661420e4">MBoxEntry::List</a>()</code></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Retrieve the mbox entry objects for all emails from the file except the <code>deleteEntries</code>. </p>
<p>The <code>deletedEntries</code> should be a list of mbox entries with offsets of deleted messages.</p>
<p>Note: One <em>must</em> call <a class="el" href="classKMBox_1_1MBox.html#a394cca3b3e6532d91485beee22658084" title="Loads the raw mbox data from disk into the current MBox object.">load()</a> before calling this method. </p>

<p>Definition at line <a class="el" href="mbox_8cpp_source.html#l00123">123</a> of file <a class="el" href="mbox_8cpp_source.html">mbox.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="af42bc6d99a504611ffd6dce33aaf2772"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QString MBox::fileName </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the file name that was passed to the last call to <a class="el" href="classKMBox_1_1MBox.html#a394cca3b3e6532d91485beee22658084" title="Loads the raw mbox data from disk into the current MBox object.">load()</a>. </p>

<p>Definition at line <a class="el" href="mbox_8cpp_source.html#l00141">141</a> of file <a class="el" href="mbox_8cpp_source.html">mbox.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a394cca3b3e6532d91485beee22658084"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool MBox::load </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>fileName</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Loads the raw mbox data from disk into the current <a class="el" href="classKMBox_1_1MBox.html" title="A class to access mail storages in MBox format.">MBox</a> object. </p>
<p>Messages already present are <em>not</em> preserved. This method does not load the full messages into memory but only the offsets of the messages and their sizes. If the file currently is locked this method will do nothing and return false. Appended messages that are not written yet will get lost.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">fileName</td><td>the name of the mbox on disk. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true, if successful, false on error.</dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classKMBox_1_1MBox.html#a756d08cc1954a1b9aa710f4c09f09647" title="Writes the mbox to disk.">save( const QString &amp; )</a> </dd></dl>

<p>Definition at line <a class="el" href="mbox_8cpp_source.html#l00146">146</a> of file <a class="el" href="mbox_8cpp_source.html">mbox.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a3439681d9523517b7f3ea06ee7f2de50"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool MBox::lock </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Locks the mbox file using the configured lock method. </p>
<p>This can be used for consecutive calls to readMessage and readMessageHeaders. Calling <a class="el" href="classKMBox_1_1MBox.html#a3439681d9523517b7f3ea06ee7f2de50" title="Locks the mbox file using the configured lock method.">lock()</a> before these calls prevents the mbox file being locked for every call.</p>
<p>NOTE: Even when the lock method is None the mbox is internally marked as locked. This means that it must be unlocked before calling <a class="el" href="classKMBox_1_1MBox.html#a394cca3b3e6532d91485beee22658084" title="Loads the raw mbox data from disk into the current MBox object.">load()</a>.</p>
<dl class="section return"><dt>Returns</dt><dd>true if locked successful, false on error.</dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classKMBox_1_1MBox.html#a5ff45c5bb927e086c0bb98a3927fa542" title="Sets the locktype that should be used for locking the mbox file.">setLockType( LockType )</a>, <a class="el" href="classKMBox_1_1MBox.html#abf0ef7017bcb330733247abd8b4a81f5" title="Unlock the mbox file.">unlock()</a> </dd></dl>

<p>Definition at line <a class="el" href="mbox_8cpp_source.html#l00208">208</a> of file <a class="el" href="mbox_8cpp_source.html">mbox.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="acd5477ff53ce642f752ab21f71e26520"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool MBox::locked </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns whether or not the mbox currently is locked. </p>

<p>Definition at line <a class="el" href="mbox_8cpp_source.html#l00302">302</a> of file <a class="el" href="mbox_8cpp_source.html">mbox.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="aaf719819a35a0056182f21753b830bb1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool MBox::purge </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classKMBox_1_1MBoxEntry.html#ab3a90184128dfefd8a8b4974661420e4">MBoxEntry::List</a> &amp;&#160;</td>
          <td class="paramname"><em>deletedEntries</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QList&lt; <a class="el" href="classKMBox_1_1MBoxEntry.html#a76a32c2718bfc2a425910a313e97c306">MBoxEntry::Pair</a> &gt; *&#160;</td>
          <td class="paramname"><em>movedEntries</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Removes all messages for the given mbox entries from the current reference file (i.e. </p>
<p>the file that is loaded with <a class="el" href="classKMBox_1_1MBox.html#a394cca3b3e6532d91485beee22658084" title="Loads the raw mbox data from disk into the current MBox object.">load( const QString &amp; )</a> or the file from the last <a class="el" href="classKMBox_1_1MBox.html#a756d08cc1954a1b9aa710f4c09f09647" title="Writes the mbox to disk.">save( const QString &amp; )</a> call if that was not the same file). This method will first check if all lines at the offsets are actually separator lines if this is not then no message will be deleted to prevent corruption.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">deletedEntries</td><td>The mbox entries of the messages that should be removed from the file. </td></tr>
    <tr><td class="paramname">movedEntries</td><td>Optional list for storing pairs of mbox entries that got moved within the file due to the deletions. The <code>first</code> member of the pair is the entry with the original offsets the <code>second</code> member is the entry with the new (current) offset</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if all offsets refer to a mbox separator line and a file was loaded, false otherewhise. In the latter the physical file has not changed. </dd></dl>

<p>Definition at line <a class="el" href="mbox_8cpp_source.html#l00312">312</a> of file <a class="el" href="mbox_8cpp_source.html">mbox.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="ae8c9bddf55d35c545538ea5d0959f955"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">KMime::Message * MBox::readMessage </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classKMBox_1_1MBoxEntry.html">MBoxEntry</a> &amp;&#160;</td>
          <td class="paramname"><em>entry</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reads the entire message from the file for the given mbox <code>entry</code>. </p>
<p>If the mbox file is not locked this method will lock the file before reading and unlock it after reading. If the file already is locked, it will not unlock the file after reading the entry.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">entry</td><td>The entry in the mbox file. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Message for the given entry or 0 if the the file could not be locked or the entry offset &gt; fileSize.</dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classKMBox_1_1MBox.html#a3439681d9523517b7f3ea06ee7f2de50" title="Locks the mbox file using the configured lock method.">lock()</a>, <a class="el" href="classKMBox_1_1MBox.html#abf0ef7017bcb330733247abd8b4a81f5" title="Unlock the mbox file.">unlock()</a> </dd></dl>

<p>Definition at line <a class="el" href="mbox_8cpp_source.html#l00507">507</a> of file <a class="el" href="mbox_8cpp_source.html">mbox.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="ae6da75689e2c1d1443285cf550d86449"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QByteArray MBox::readMessageHeaders </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classKMBox_1_1MBoxEntry.html">MBoxEntry</a> &amp;&#160;</td>
          <td class="paramname"><em>entry</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reads the headers of the message for the given mbox <code>entry</code>. </p>
<p>If the mbox file is not locked this method will lock the file before reading and unlock it after reading. If the file already is locked, it will not unlock the file after reading the entry.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">entry</td><td>The entry in the mbox file. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>QByteArray containing the raw message header data.</dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classKMBox_1_1MBox.html#a3439681d9523517b7f3ea06ee7f2de50" title="Locks the mbox file using the configured lock method.">lock()</a>, <a class="el" href="classKMBox_1_1MBox.html#abf0ef7017bcb330733247abd8b4a81f5" title="Unlock the mbox file.">unlock()</a> </dd></dl>

<p>Definition at line <a class="el" href="mbox_8cpp_source.html#l00521">521</a> of file <a class="el" href="mbox_8cpp_source.html">mbox.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a02e66b4306aad72eecf9b3cbf3693b03"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QByteArray MBox::readRawMessage </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classKMBox_1_1MBoxEntry.html">MBoxEntry</a> &amp;&#160;</td>
          <td class="paramname"><em>entry</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reads the entire message from the file for the given mbox <code>entry</code>. </p>
<p>If the mbox file is not locked this method will lock the file before reading and unlock it after reading. If the file already is locked, it will not unlock the file after reading the entry.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">entry</td><td>The entry in the mbox file. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>QByteArray containing the raw message data.</dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classKMBox_1_1MBox.html#a3439681d9523517b7f3ea06ee7f2de50" title="Locks the mbox file using the configured lock method.">lock()</a>, <a class="el" href="classKMBox_1_1MBox.html#abf0ef7017bcb330733247abd8b4a81f5" title="Unlock the mbox file.">unlock()</a> </dd></dl>

<p>Definition at line <a class="el" href="mbox_8cpp_source.html#l00419">419</a> of file <a class="el" href="mbox_8cpp_source.html">mbox.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a756d08cc1954a1b9aa710f4c09f09647"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool MBox::save </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>fileName</em> = <code>QString()</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Writes the mbox to disk. </p>
<p>If the fileName is empty only appended messages will be written to the file that was passed to <a class="el" href="classKMBox_1_1MBox.html#a394cca3b3e6532d91485beee22658084" title="Loads the raw mbox data from disk into the current MBox object.">load( const QString &amp; )</a>. Otherwise the contents of the file that was loaded with load is copied to <code>fileName</code> first.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">fileName</td><td>the name of the file </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the save was successful; false otherwise.</dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classKMBox_1_1MBox.html#a394cca3b3e6532d91485beee22658084" title="Loads the raw mbox data from disk into the current MBox object.">load( const QString &amp; )</a> </dd></dl>

<p>Definition at line <a class="el" href="mbox_8cpp_source.html#l00562">562</a> of file <a class="el" href="mbox_8cpp_source.html">mbox.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a3bc68f23e9b068a6ffe47abf6ac21ea7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void MBox::setLockFile </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>lockFile</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the lockfile that should be used by the procmail or the KDE lock file method. </p>
<p>If this method is not called and one of the before mentioned lock methods is used the name of the lock file will be equal to MBOXFILENAME.lock. </p>

<p>Definition at line <a class="el" href="mbox_8cpp_source.html#l00634">634</a> of file <a class="el" href="mbox_8cpp_source.html">mbox.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a5ff45c5bb927e086c0bb98a3927fa542"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool MBox::setLockType </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classKMBox_1_1MBox.html#ad104aaa0fb21e6c9baf6964a7760908d">LockType</a>&#160;</td>
          <td class="paramname"><em>ltype</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the locktype that should be used for locking the mbox file. </p>
<p>If the new LockType cannot be used (e.g. the lockfile executable could not be found) the LockType will not be changed.</p>
<p>This method will not do anything if the mbox obeject is currently locked to make sure that it doesn't leave a locked file for one of the lockfile / mutt_dotlock methods. </p>

<p>Definition at line <a class="el" href="mbox_8cpp_source.html#l00605">605</a> of file <a class="el" href="mbox_8cpp_source.html">mbox.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a900f67b6bd9a73172febd63e7d71f164"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void MBox::setUnlockTimeout </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>msec</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>By default the unlock method will directly unlock the file. </p>
<p>However this is expensive in case of many consecutive calls to readEntry. Setting the time out to a non zero value will keep the lock open until the timeout has passed. On each read the timer will be reset. </p>

<p>Definition at line <a class="el" href="mbox_8cpp_source.html#l00639">639</a> of file <a class="el" href="mbox_8cpp_source.html">mbox.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="abf0ef7017bcb330733247abd8b4a81f5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool MBox::unlock </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Unlock the mbox file. </p>
<dl class="section return"><dt>Returns</dt><dd>true if the unlock was successful, false otherwise.</dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classKMBox_1_1MBox.html#a3439681d9523517b7f3ea06ee7f2de50" title="Locks the mbox file using the configured lock method.">lock()</a> </dd></dl>

<p>Definition at line <a class="el" href="mbox_8cpp_source.html#l00644">644</a> of file <a class="el" href="mbox_8cpp_source.html">mbox.cpp</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="mbox_8h_source.html">mbox.h</a></li>
<li><a class="el" href="mbox_8cpp_source.html">mbox.cpp</a></li>
</ul>
</div><!-- contents -->
<div class="copyrights">
This file is part of the KDE documentation.<br/>
Documentation copyright &copy; 1996-2013 The KDE developers.<br/>
Generated on Fri Jul 12 2013 16:48:17 by
<a href="http://www.doxygen.org/index.html">doxygen</a> 1.8.3.1 written
by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>, &copy;&nbsp;1997-2006
<p>
KDE's <a href="http://techbase.kde.org/Policies/Library_Documentation_Policy">Doxygen guidelines</a> are available online.
</p>
</div>
            </div>
          </div>
        </div>
        <div id="left">
          <div class="menu_box">
<a name="cp-menu" /><div class="menutitle"><div>
<h2 id="cp-menu-project">KMBox Library</h2>
<a href="#cp-skip-project" class="cp-doNotDisplay">Skip menu "KMBox Library"</a>
</div></div>
<ul><li><a href="index.html">Main Page</a></li><li><a href="classes.html">Alphabetical List</a></li><li><a href="annotated.html">Class List</a></li><li><a href="functions.html">Class Members</a></li><li><a href="files.html">File List</a></li><li><a href="pages.html">Related Pages</a></li></ul>
<!--
<h2>Class Picker</h2>
<div style="text-align: center;">
<form name="guideform">
<select name="guidelinks" style="width:100%;" onChange="window.location=document.guideform.guidelinks.options[document.guideform.guidelinks.selectedIndex].value">
<option value="annotated.html">-- Choose --</option>
  <option value="classKMBox_1_1MBox.html">kmbox::mbox</option>,  <option value="classKMBox_1_1MBoxEntry.html">kmbox::mboxentry</option>,
</select>
</form>
</div>
-->
<div class="menu_box">
<a name="cp-menu" /><div class="menutitle"><div>
<h2 id="cp-menu-project">kdepimlibs-4.10.5 API Reference</h2>
<a href="#cp-skip-project" class="cp-doNotDisplay">Skip menu "kdepimlibs-4.10.5 API Reference"</a>
</div></div>
<div class="nav_list">
<ul>
<li><a href="../../akonadi/html/index.html">akonadi</a></li><li>&nbsp;&nbsp;<a href="../../akonadi/contact/html/index.html">contact</a></li><li>&nbsp;&nbsp;<a href="../../akonadi/kmime/html/index.html">kmime</a></li><li>&nbsp;&nbsp;<a href="../../akonadi/socialutils/html/index.html">socialutils</a></li><li><a href="../../kabc/html/index.html">kabc</a></li><li><a href="../../kalarmcal/html/index.html">kalarmcal</a></li><li><a href="../../kblog/html/index.html">kblog</a></li><li><a href="../../kcal/html/index.html">kcal</a></li><li><a href="../../kcalcore/html/index.html">kcalcore</a></li><li><a href="../../kcalutils/html/index.html">kcalutils</a></li><li><a href="../../kholidays/html/index.html">kholidays</a></li><li><a href="../../kimap/html/index.html">kimap</a></li><li><a href="../../kioslave/html/index.html">kioslave</a></li><li>&nbsp;&nbsp;<a href="../../kioslave/imap4/html/index.html">imap4</a></li><li>&nbsp;&nbsp;<a href="../../kioslave/mbox/html/index.html">mbox</a></li><li>&nbsp;&nbsp;<a href="../../kioslave/nntp/html/index.html">nntp</a></li><li><a href="../../kldap/html/index.html">kldap</a></li><li><a href="../../kmbox/html/index.html">kmbox</a></li><li><a href="../../kmime/html/index.html">kmime</a></li><li><a href="../../kontactinterface/html/index.html">kontactinterface</a></li><li><a href="../../kpimidentities/html/index.html">kpimidentities</a></li><li><a href="../../kpimtextedit/html/index.html">kpimtextedit</a></li><li><a href="../../kpimutils/html/index.html">kpimutils</a></li><li><a href="../../kresources/html/index.html">kresources</a></li><li><a href="../../ktnef/html/index.html">ktnef</a></li><li><a href="../../kxmlrpcclient/html/index.html">kxmlrpcclient</a></li><li><a href="../../mailtransport/html/index.html">mailtransport</a></li><li><a href="../../microblog/html/index.html">microblog</a></li><li><a href="../../qgpgme/html/index.html">qgpgme</a></li><li><a href="../../syndication/html/index.html">syndication</a></li><li>&nbsp;&nbsp;<a href="../../syndication/atom/html/index.html">atom</a></li><li>&nbsp;&nbsp;<a href="../../syndication/rdf/html/index.html">rdf</a></li><li>&nbsp;&nbsp;<a href="../../syndication/rss2/html/index.html">rss2</a></li>
</ul></div></div>
<!-- api_searchbox -->
          </div>
        </div>
        <div class="clearer"></div>
      </div>
      <div class="clearer"></div>
    </div>
    <div id="end_body"></div>
    <div id="footer"><div id="footer_text">
    Report problems with this website to <a href="https://bugs.kde.org/enter_sysadmin_request.cgi?component=api.kde.org">our bug tracking system</a>.<br>
    Contact the specific authors with questions and comments about the page contents.<p>
    KDE<sup>&#174;</sup> and <a href="/media/images/kde_gear_black.png">the K Desktop Environment<sup>&#174;</sup> logo</a> are registered trademarks of <a href="http://ev.kde.org/" title="Homepage of the KDE non-profit Organization">KDE e.V.</a> |
        <a href="http://www.kde.org/contact/impressum.php">Legal</a></p>
    </div></div>
  </div>
<!--
WARNING: DO NOT SEND MAIL TO THE FOLLOWING EMAIL ADDRESS! YOU WILL
BE BLOCKED INSTANTLY AND PERMANENTLY!
<a href="mailto:aaaatrap-45abe0e0c3bebc77@kde.org">Block me</a>
WARNING END
-->
</body>
</html>