Sophie

Sophie

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

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>acl.cpp Source File</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>KIMAP Library</h2>
<!-- BC -->
<div id="top">
<!-- Generated by Doxygen 1.8.3.1 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_e09087ff1473143b3d9fdc034eb04f95.html">kimap</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">acl.cpp</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment">    Copyright (c) 2009 Andras Mantia &lt;amantia@kde.org&gt;</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"></span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment">    This library is free software; you can redistribute it and/or modify it</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment">    under the terms of the GNU Library General Public License as published by</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment">    the Free Software Foundation; either version 2 of the License, or (at your</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment">    option) any later version.</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"></span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment">    This library is distributed in the hope that it will be useful, but WITHOUT</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment">    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment">    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment">    License for more details.</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"></span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment">    You should have received a copy of the GNU Library General Public License</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment">    along with this library; see the file COPYING.LIB.  If not, write to the</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment">    Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment">    02110-1301, USA.</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment">*/</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;</div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="preprocessor">#include &quot;acl.h&quot;</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;</div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="preprocessor">#include &lt;QtCore/QByteArray&gt;</span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#include &lt;QtCore/QMap&gt;</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#include &lt;KDE/KGlobal&gt;</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="keyword">namespace </span>KIMAP {</div>
<div class="line"><a name="l00027"></a><span class="lineno"><a class="code" href="namespaceKIMAP_1_1Acl.html">   27</a></span>&#160;<span class="keyword">namespace </span>Acl {</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="keyword">class </span>RightsMap</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;{</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;  <span class="keyword">public</span>:</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;    RightsMap() {</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;      map[<span class="charliteral">&#39;l&#39;</span>] = <a class="code" href="namespaceKIMAP_1_1Acl.html#a297cd72adddacd10f027051ff0ca2171a7409566c3f434a26746dd1008a18ea7b" title="Mailbox is visible to LIST/LSUB commands, SUBSCRIBE mailbox.">Lookup</a>;</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;      map[<span class="charliteral">&#39;r&#39;</span>] = <a class="code" href="namespaceKIMAP_1_1Acl.html#a297cd72adddacd10f027051ff0ca2171aba809f2dc705cfff259297ad932ff678" title="SELECT the mailbox, perform STATUS.">Read</a>;</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;      map[<span class="charliteral">&#39;s&#39;</span>] = <a class="code" href="namespaceKIMAP_1_1Acl.html#a297cd72adddacd10f027051ff0ca2171a2bc3ad3fb3c4721fe0903e75c3ca2a71" title="Set or clear the  flag on messages in the mailbox, and keep it across sessions.">KeepSeen</a>;</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;      map[<span class="charliteral">&#39;w&#39;</span>] = <a class="code" href="namespaceKIMAP_1_1Acl.html#a297cd72adddacd10f027051ff0ca2171abc27e47671013cf73f40da00b375ebdf" title="Set or clear flags other than  and  on messages in the mailbox.">Write</a>;</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;      map[<span class="charliteral">&#39;i&#39;</span>] = <a class="code" href="namespaceKIMAP_1_1Acl.html#a297cd72adddacd10f027051ff0ca2171a407f3f769a0084dba3f246f683473403" title="Perform APPEND and COPY with the mailbox as the target.">Insert</a>;</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;      map[<span class="charliteral">&#39;p&#39;</span>] = <a class="code" href="namespaceKIMAP_1_1Acl.html#a297cd72adddacd10f027051ff0ca2171a9182dfdfc7c2574192d21bc19aaa9fe4" title="Send mail to the submission address for the mailbox.">Post</a>;</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;      map[<span class="charliteral">&#39;c&#39;</span>] = <a class="code" href="namespaceKIMAP_1_1Acl.html#a297cd72adddacd10f027051ff0ca2171a3a10aeaa5d39fdfc03fa8730e94d355e" title="Obsolete as of RFC 4314, replaced by CreateMailbox and DeleteMailbox.">Create</a>; <span class="comment">//TODO: obsolete, keep it?</span></div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;      map[<span class="charliteral">&#39;d&#39;</span>] = <a class="code" href="namespaceKIMAP_1_1Acl.html#a297cd72adddacd10f027051ff0ca2171a23842eaf70526aee0664aea2eeedb207" title="Obsolete as of RFC 4314, replaced by DeleteMessage and Expunge.">Delete</a>; <span class="comment">//TODO: obsolete, keep it?</span></div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;      map[<span class="charliteral">&#39;k&#39;</span>] = <a class="code" href="namespaceKIMAP_1_1Acl.html#a297cd72adddacd10f027051ff0ca2171a13c6d4d7e012b21fcd6c265f596d3e69" title="Create new child mailboxes, or move a mailbox with this mailbox as the new parent.">CreateMailbox</a>;</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;      map[<span class="charliteral">&#39;x&#39;</span>] = <a class="code" href="namespaceKIMAP_1_1Acl.html#a297cd72adddacd10f027051ff0ca2171ad801490c2d2b5010af3ed2c144c652ec" title="Delete or move the mailbox.">DeleteMailbox</a>;</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;      map[<span class="charliteral">&#39;t&#39;</span>] = <a class="code" href="namespaceKIMAP_1_1Acl.html#a297cd72adddacd10f027051ff0ca2171a99c1b7a739bb678eaffd9b49c3b6ebef" title="Set or clear the  flag on messages in the mailbox.">DeleteMessage</a>;</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;      map[<span class="charliteral">&#39;e&#39;</span>] = <a class="code" href="namespaceKIMAP_1_1Acl.html#a297cd72adddacd10f027051ff0ca2171a021376460b40653179f3c851a6ade660" title="Expunge the messages in this mailbox.">Expunge</a>;</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;      map[<span class="charliteral">&#39;a&#39;</span>] = <a class="code" href="namespaceKIMAP_1_1Acl.html#a297cd72adddacd10f027051ff0ca2171a345ef9bfcf45bece56eb3b54f59b3022" title="View and modify the access control list for the mailbox.">Admin</a>;</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;      map[<span class="charliteral">&#39;n&#39;</span>] = <a class="code" href="namespaceKIMAP_1_1Acl.html#a297cd72adddacd10f027051ff0ca2171a0cd6b89771085cd4323cb69aa6afaaf0" title="Write shared annotations.">WriteShared</a>;</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;      map[<span class="charliteral">&#39;0&#39;</span>] = <a class="code" href="namespaceKIMAP_1_1Acl.html#a297cd72adddacd10f027051ff0ca2171a54970982f3174b76069c111eb6525c26" title="Server-specific right 0.">Custom0</a>;</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;      map[<span class="charliteral">&#39;1&#39;</span>] = <a class="code" href="namespaceKIMAP_1_1Acl.html#a297cd72adddacd10f027051ff0ca2171a800571e92c86934d903a9849e7171834" title="Server-specific right 1.">Custom1</a>;</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;      map[<span class="charliteral">&#39;2&#39;</span>] = <a class="code" href="namespaceKIMAP_1_1Acl.html#a297cd72adddacd10f027051ff0ca2171a62e19e88d854bcb44e3fa1d5aee43661" title="Server-specific right 2.">Custom2</a>;</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;      map[<span class="charliteral">&#39;3&#39;</span>] = <a class="code" href="namespaceKIMAP_1_1Acl.html#a297cd72adddacd10f027051ff0ca2171a23847c67aea9c54e5fabacb60576a415" title="Server-specific right 3.">Custom3</a>;</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;      map[<span class="charliteral">&#39;4&#39;</span>] = <a class="code" href="namespaceKIMAP_1_1Acl.html#a297cd72adddacd10f027051ff0ca2171a81665ac79d6f55e0aaa4fcddf654bc96" title="Server-specific right 4.">Custom4</a>;</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;      map[<span class="charliteral">&#39;5&#39;</span>] = <a class="code" href="namespaceKIMAP_1_1Acl.html#a297cd72adddacd10f027051ff0ca2171a45aaf972132ec17a663c73e623b71570" title="Server-specific right 5.">Custom5</a>;</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;      map[<span class="charliteral">&#39;6&#39;</span>] = <a class="code" href="namespaceKIMAP_1_1Acl.html#a297cd72adddacd10f027051ff0ca2171ab109aa0981b10897f0633ba2d4295066" title="Server-specific right 6.">Custom6</a>;</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;      map[<span class="charliteral">&#39;7&#39;</span>] = <a class="code" href="namespaceKIMAP_1_1Acl.html#a297cd72adddacd10f027051ff0ca2171a8864e4cda4b5473f6eae4b9d83326ab9" title="Server-specific right 7.">Custom7</a>;</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;      map[<span class="charliteral">&#39;8&#39;</span>] = <a class="code" href="namespaceKIMAP_1_1Acl.html#a297cd72adddacd10f027051ff0ca2171abda3c68e6fb86157cf5bcbc1715f35fb" title="Server-specific right 8.">Custom8</a>;</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;      map[<span class="charliteral">&#39;9&#39;</span>] = <a class="code" href="namespaceKIMAP_1_1Acl.html#a297cd72adddacd10f027051ff0ca2171a3438568b0b78d66fd1df56c280799834" title="Server-specific right 9.">Custom9</a>;</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    }</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;    QMap&lt;char, Right&gt; map;</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;};</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;K_GLOBAL_STATIC( RightsMap, globalRights )</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;}</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;}</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;</div>
<div class="line"><a name="l00067"></a><span class="lineno"><a class="code" href="namespaceKIMAP_1_1Acl.html#a105018980d8a24573f2326cb0c0f929a">   67</a></span>&#160;KIMAP::Acl::Rights <a class="code" href="namespaceKIMAP_1_1Acl.html#a105018980d8a24573f2326cb0c0f929a" title="Convert the text form of a set of rights into a Rights bitflag.">KIMAP::Acl::rightsFromString</a>( <span class="keyword">const</span> QByteArray &amp;<span class="keywordtype">string</span> )</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;{</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;  Rights result;</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;  <span class="keywordflow">if</span> ( <span class="keywordtype">string</span>.isEmpty() ) {</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    <span class="keywordflow">return</span> result;</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;  }</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;  <span class="keywordtype">int</span> pos = 0;</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;  <span class="keywordflow">if</span> ( <span class="keywordtype">string</span>[0] == <span class="charliteral">&#39;+&#39;</span> || <span class="keywordtype">string</span>[0] == <span class="charliteral">&#39;-&#39;</span> ) { <span class="comment">// Skip modifier if any</span></div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;    pos++;</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;  }</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;  <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i = pos; i &lt; <span class="keywordtype">string</span>.size(); i++ ) {</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;    <span class="keywordflow">if</span> ( globalRights-&gt;map.contains( <span class="keywordtype">string</span>[i] ) ) {</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;      result|= globalRights-&gt;map[<span class="keywordtype">string</span>[i]];</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;    }</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;  }</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;  <span class="keywordflow">return</span> result;</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;}</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;</div>
<div class="line"><a name="l00089"></a><span class="lineno"><a class="code" href="namespaceKIMAP_1_1Acl.html#a1e6a3fcecef5c45d86c2155af9de4c82">   89</a></span>&#160;QByteArray <a class="code" href="namespaceKIMAP_1_1Acl.html#a1e6a3fcecef5c45d86c2155af9de4c82" title="Convert a set of rights into text format.">KIMAP::Acl::rightsToString</a>( Rights rights )</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;{</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;  QByteArray result;</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;  <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> right = <a class="code" href="namespaceKIMAP_1_1Acl.html#a297cd72adddacd10f027051ff0ca2171a7409566c3f434a26746dd1008a18ea7b" title="Mailbox is visible to LIST/LSUB commands, SUBSCRIBE mailbox.">Lookup</a>; right &lt;= <a class="code" href="namespaceKIMAP_1_1Acl.html#a297cd72adddacd10f027051ff0ca2171a3438568b0b78d66fd1df56c280799834" title="Server-specific right 9.">Custom9</a>; right &lt;&lt;= 1 ) {</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    <span class="keywordflow">if</span> ( rights &amp; right ) {</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;      result += globalRights-&gt;map.key( (<a class="code" href="namespaceKIMAP_1_1Acl.html#a297cd72adddacd10f027051ff0ca2171" title="Possible rights that can be held on a mailbox.">Right</a>)right );</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    }</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;  }</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;  <span class="keywordflow">return</span> result;</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;}</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;KIMAP::Acl::Rights <a class="code" href="namespaceKIMAP_1_1Acl.html#a7bc7b8dda4708131e18101f5ef1b397b" title="Returns a rights mask that has no obsolete members anymore, i.e.">KIMAP::Acl::normalizedRights</a>( KIMAP::Acl::Rights rights )</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;{</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;  Rights normalized = rights;</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;  <span class="keywordflow">if</span> ( normalized &amp; Create ) {</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;    normalized |= ( CreateMailbox | DeleteMailbox );</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;    normalized &amp;= ~Create;</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;  }</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;  <span class="keywordflow">if</span> ( normalized &amp; Delete ) {</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;    normalized |= ( DeleteMessage | Expunge );</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;    normalized &amp;= ~Delete;</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;  }</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;  <span class="keywordflow">return</span> normalized;</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;}</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;KIMAP::Acl::Rights <a class="code" href="namespaceKIMAP_1_1Acl.html#a76893ef71182828180567851ace4a687" title="Returns a rights mask that contains both obsolete and new flags if one of them is set...">KIMAP::Acl::denormalizedRights</a>( KIMAP::Acl::Rights rights )</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;{</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;  Rights denormalized = <a class="code" href="namespaceKIMAP_1_1Acl.html#a7bc7b8dda4708131e18101f5ef1b397b" title="Returns a rights mask that has no obsolete members anymore, i.e.">normalizedRights</a>( rights );</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;  <span class="keywordflow">if</span> ( denormalized &amp; ( CreateMailbox | DeleteMailbox ) ) {</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;    denormalized |= Create;</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;  }</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;  <span class="keywordflow">if</span> ( denormalized &amp; ( DeleteMessage | Expunge ) ) {</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;    denormalized |= <a class="code" href="namespaceKIMAP_1_1Acl.html#a297cd72adddacd10f027051ff0ca2171a23842eaf70526aee0664aea2eeedb207" title="Obsolete as of RFC 4314, replaced by DeleteMessage and Expunge.">Delete</a>;</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;  }</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;  <span class="keywordflow">return</span> denormalized;</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;}</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;</div>
</div><!-- fragment --></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:09 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">KIMAP Library</h2>
<a href="#cp-skip-project" class="cp-doNotDisplay">Skip menu "KIMAP Library"</a>
</div></div>
<ul><li><a href="index.html">Main Page</a></li><li><a href="namespaces.html">Namespace List</a></li><li><a href="namespacemembers.html">Namespace Members</a></li><li><a href="classes.html">Alphabetical List</a></li><li><a href="annotated.html">Class List</a></li><li><a href="hierarchy.html">Class Hierarchy</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="classKIMAP_1_1AclJobBase.html">kimap::acljobbase</option>,  <option value="classKIMAP_1_1AppendJob.html">kimap::appendjob</option>,  <option value="classKIMAP_1_1CapabilitiesJob.html">kimap::capabilitiesjob</option>,  <option value="classKIMAP_1_1CloseJob.html">kimap::closejob</option>,  <option value="classKIMAP_1_1CopyJob.html">kimap::copyjob</option>,  <option value="classKIMAP_1_1CreateJob.html">kimap::createjob</option>,  <option value="classKIMAP_1_1DeleteAclJob.html">kimap::deleteacljob</option>,  <option value="classKIMAP_1_1DeleteJob.html">kimap::deletejob</option>,  <option value="classKIMAP_1_1ExpungeJob.html">kimap::expungejob</option>,  <option value="classKIMAP_1_1FetchJob.html">kimap::fetchjob</option>,  <option value="classKIMAP_1_1GetAclJob.html">kimap::getacljob</option>,  <option value="classKIMAP_1_1GetMetaDataJob.html">kimap::getmetadatajob</option>,  <option value="classKIMAP_1_1GetQuotaJob.html">kimap::getquotajob</option>,  <option value="classKIMAP_1_1GetQuotaRootJob.html">kimap::getquotarootjob</option>,  <option value="classKIMAP_1_1IdleJob.html">kimap::idlejob</option>,  <option value="classKIMAP_1_1ImapInterval.html">kimap::imapinterval</option>,  <option value="classKIMAP_1_1ImapSet.html">kimap::imapset</option>,  <option value="classKIMAP_1_1ImapStreamParser.html">kimap::imapstreamparser</option>,  <option value="classKIMAP_1_1ListRightsJob.html">kimap::listrightsjob</option>,  <option value="classKIMAP_1_1MetaDataJobBase.html">kimap::metadatajobbase</option>,  <option value="classKIMAP_1_1MyRightsJob.html">kimap::myrightsjob</option>,  <option value="classKIMAP_1_1QuotaJobBase.html">kimap::quotajobbase</option>,  <option value="classKIMAP_1_1SessionUiProxy.html">kimap::sessionuiproxy</option>,  <option value="classKIMAP_1_1SetAclJob.html">kimap::setacljob</option>,  <option value="classKIMAP_1_1SetMetaDataJob.html">kimap::setmetadatajob</option>,  <option value="classKIMAP_1_1SetQuotaJob.html">kimap::setquotajob</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>