Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > by-pkgid > 98d6b53e11e983e268c3e19f14e091a0 > files > 4769

kdepim-devel-doc-3.5.9-9mdv2008.1.x86_64.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_US" xml:lang="en_US">

<head>
  <title>libkpgp: kpgpkey.h Source File (libkpgp)</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

  <meta http-equiv="Content-Style-Type" content="text/css" />

  <meta http-equiv="pics-label" content='(pics-1.1 "http://www.icra.org/ratingsv02.html" comment "ICRAonline DE v2.0" l gen true for "http://www.kde.org"  r (nz 1 vz 1 lz 1 oz 1 cb 1) "http://www.rsac.org/ratingsv01.html" l gen true for "http://www.kde.org"  r (n 0 s 0 v 0 l 0))' />

  <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" />

  <link rel="shortcut icon" href="../../favicon.ico" />

<link rel="stylesheet" media="screen" type="text/css" title="APIDOX" href="doxygen.css" />



<style type="text/css">
<!--
hr { display: none; }
#content h2 { margin-left: 0px; }
table.mdTable { background-color: #f8f8f8; border: .2em solid #d7d7d7; }
td.mdRow { padding: 8px 20px; }
td.md { font-weight: bold; }
td.mdname1 { font-weight: bold; color: #602020; }
td.mdname { font-weight: bold; color: #602020;  }

-->
</style>

</head>

<body>

<div id="nav_header_top" align="right">
  <a href="#content" class="doNotDisplay" accesskey="2">Skip to main content ::</a>

  <a href="../.."><img id="nav_header_logo" alt="Home" align="left" src="../../kde_gear_64.png" border="0" /></a>
  <span class="doNotDisplay">::</span>
  <img id="nav_header_logo_right" alt="" align="right" src="../../pimlogo.png" border="0" />

  <div id="nav_header_title" align="left">KDE PIM API Reference</div>


</div>

<div id="nav_header_bottom" align="right">
  <span class="doNotDisplay">:: <a href="#navigation" accesskey="5">Skip to Link Menu</a><br/></span>
  <div id="nav_header_bottom_left" style="text-align: left;">
/ <a href="../../">API Reference</a>
 / <a href=".">libkpgp</a>
  </div>
</div>


<table id="main" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
      <td valign="top" class="menuheader" height="0"></td>

  <td id="contentcolumn" valign="top" rowspan="2" >
    <div id="content" style="padding-top: 0px;"><div style="width:100%; margin: 0px; padding: 0px;">
    <h2><a name="content"></a>libkpgp</h2>


<!-- Generated by Doxygen 1.5.5 -->
<h1>kpgpkey.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment">    kpgpkey.h</span>
<a name="l00003"></a>00003 <span class="comment"></span>
<a name="l00004"></a>00004 <span class="comment">    Copyright (C) 2001,2002 the KPGP authors</span>
<a name="l00005"></a>00005 <span class="comment">    See file AUTHORS.kpgp for details</span>
<a name="l00006"></a>00006 <span class="comment"></span>
<a name="l00007"></a>00007 <span class="comment">    This file is part of KPGP, the KDE PGP/GnuPG support library.</span>
<a name="l00008"></a>00008 <span class="comment"></span>
<a name="l00009"></a>00009 <span class="comment">    KPGP is free software; you can redistribute it and/or modify</span>
<a name="l00010"></a>00010 <span class="comment">    it under the terms of the GNU General Public License as published by</span>
<a name="l00011"></a>00011 <span class="comment">    the Free Software Foundation; either version 2 of the License, or</span>
<a name="l00012"></a>00012 <span class="comment">    (at your option) any later version.</span>
<a name="l00013"></a>00013 <span class="comment"></span>
<a name="l00014"></a>00014 <span class="comment">    You should have received a copy of the GNU General Public License</span>
<a name="l00015"></a>00015 <span class="comment">    along with this program; if not, write to the Free Software Foundation,</span>
<a name="l00016"></a>00016 <span class="comment">    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA</span>
<a name="l00017"></a>00017 <span class="comment"> */</span>
<a name="l00018"></a>00018 
<a name="l00019"></a>00019 <span class="preprocessor">#ifndef KPGPKEY_H</span>
<a name="l00020"></a>00020 <span class="preprocessor"></span><span class="preprocessor">#define KPGPKEY_H</span>
<a name="l00021"></a>00021 <span class="preprocessor"></span>
<a name="l00022"></a>00022 <span class="preprocessor">#include &lt;time.h&gt;</span>
<a name="l00023"></a>00023 
<a name="l00024"></a>00024 <span class="preprocessor">#include &lt;qcstring.h&gt;</span>
<a name="l00025"></a>00025 <span class="preprocessor">#include &lt;qstring.h&gt;</span>
<a name="l00026"></a>00026 <span class="preprocessor">#include &lt;qstringlist.h&gt;</span>
<a name="l00027"></a>00027 <span class="preprocessor">#include &lt;qvaluelist.h&gt;</span>
<a name="l00028"></a>00028 
<a name="l00029"></a>00029 <span class="keyword">namespace </span>Kpgp {
<a name="l00030"></a>00030 
<a name="l00034"></a>00034 <span class="keyword">typedef</span> <span class="keyword">enum</span>
<a name="l00035"></a>00035 { <span class="comment">// this is copied from gpgme.h which is a part of GPGME</span>
<a name="l00036"></a>00036   KPGP_VALIDITY_UNKNOWN = 0,   <span class="comment">// the trust hasn't been determined</span>
<a name="l00037"></a>00037   KPGP_VALIDITY_UNDEFINED = 1, <span class="comment">// trust is undefined</span>
<a name="l00038"></a>00038   KPGP_VALIDITY_NEVER = 2,
<a name="l00039"></a>00039   KPGP_VALIDITY_MARGINAL = 3,
<a name="l00040"></a>00040   KPGP_VALIDITY_FULL = 4,
<a name="l00041"></a>00041   KPGP_VALIDITY_ULTIMATE = 5
<a name="l00042"></a>00042 } Validity;
<a name="l00043"></a>00043 
<a name="l00046"></a>00046 <span class="keyword">typedef</span> <span class="keyword">enum</span>
<a name="l00047"></a>00047 {
<a name="l00048"></a>00048   NeverEncrypt = -1,
<a name="l00049"></a>00049   UnknownEncryptPref = 0,
<a name="l00050"></a>00050   AlwaysEncrypt = 1,
<a name="l00051"></a>00051   AlwaysEncryptIfPossible = 2,
<a name="l00052"></a>00052   AlwaysAskForEncryption = 3,
<a name="l00053"></a>00053   AskWheneverPossible = 4
<a name="l00054"></a>00054 } EncryptPref;
<a name="l00055"></a>00055 
<a name="l00056"></a>00056 
<a name="l00057"></a>00057 <span class="keyword">typedef</span> QCString KeyID;
<a name="l00058"></a>00058 
<a name="l00059"></a>00059 <span class="keyword">class </span>KeyIDList : <span class="keyword">public</span> QValueList&lt;KeyID&gt;
<a name="l00060"></a>00060 {
<a name="l00061"></a>00061  <span class="keyword">public</span>:
<a name="l00062"></a>00062   KeyIDList() { }
<a name="l00063"></a>00063   KeyIDList( <span class="keyword">const</span> KeyIDList&amp; l ) : QValueList&lt;KeyID&gt;(l) { }
<a name="l00064"></a>00064   KeyIDList( <span class="keyword">const</span> QValueList&lt;KeyID&gt;&amp; l ) : QValueList&lt;KeyID&gt;(l) { }
<a name="l00065"></a>00065   KeyIDList( <span class="keyword">const</span> KeyID&amp; i ) { append(i); }
<a name="l00066"></a>00066 
<a name="l00067"></a>00067   QStringList toStringList() <span class="keyword">const</span>;
<a name="l00068"></a>00068 
<a name="l00069"></a>00069   <span class="keyword">static</span> KeyIDList fromStringList( <span class="keyword">const</span> QStringList&amp; );
<a name="l00070"></a>00070 };
<a name="l00071"></a>00071 
<a name="l00074"></a><a class="code" href="classKpgp_1_1UserID.html">00074</a> <span class="keyword">class </span><a class="code" href="classKpgp_1_1UserID.html" title="This class is used to store information about a user id of a PGP key.">UserID</a>
<a name="l00075"></a>00075 {
<a name="l00076"></a>00076  <span class="keyword">public</span>:
<a name="l00078"></a>00078   <a class="code" href="classKpgp_1_1UserID.html#4b0bf748a1b1268ccb378ba0c561dcad" title="Constructs a new user id with the given values.">UserID</a>(<span class="keyword">const</span> QString&amp; str,
<a name="l00079"></a>00079              <span class="keyword">const</span> Validity <a class="code" href="classKpgp_1_1UserID.html#b1f6eb9a6c8a5f6dc6d96f5336d2d5ab" title="Returns the validity of resp.">validity</a> = KPGP_VALIDITY_UNKNOWN,
<a name="l00080"></a>00080              <span class="keyword">const</span> <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1UserID.html#7bd011db26b751dbcb73a48e5faabe1c" title="Returns true if the user id has been revoked.">revoked</a> = <span class="keyword">false</span>,
<a name="l00081"></a>00081              <span class="keyword">const</span> <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1UserID.html#87dbe981bb92d6cfdbc08ba66ced42b3" title="Returns true if the user id is invalid.">invalid</a> = <span class="keyword">false</span>);
<a name="l00082"></a>00082   ~<a class="code" href="classKpgp_1_1UserID.html" title="This class is used to store information about a user id of a PGP key.">UserID</a>() {};
<a name="l00083"></a>00083   
<a name="l00085"></a>00085   QString <a class="code" href="classKpgp_1_1UserID.html#ec3a9b703b25943be5b8518acc7f69b2" title="Returns the text of the user id.">text</a>() <span class="keyword">const</span>;
<a name="l00086"></a>00086 
<a name="l00088"></a>00088   <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1UserID.html#7bd011db26b751dbcb73a48e5faabe1c" title="Returns true if the user id has been revoked.">revoked</a>() <span class="keyword">const</span>;
<a name="l00089"></a>00089 
<a name="l00091"></a>00091   <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1UserID.html#87dbe981bb92d6cfdbc08ba66ced42b3" title="Returns true if the user id is invalid.">invalid</a>() <span class="keyword">const</span>;
<a name="l00092"></a>00092 
<a name="l00094"></a>00094   Validity <a class="code" href="classKpgp_1_1UserID.html#b1f6eb9a6c8a5f6dc6d96f5336d2d5ab" title="Returns the validity of resp.">validity</a>() <span class="keyword">const</span>;
<a name="l00095"></a>00095 
<a name="l00097"></a>00097   <span class="keywordtype">void</span> <a class="code" href="classKpgp_1_1UserID.html#a0133f362c130e12445b715bfb4dc5f5" title="Sets the text of the user id to str.">setText</a>(<span class="keyword">const</span> QString&amp; str);
<a name="l00098"></a>00098 
<a name="l00100"></a>00100   <span class="keywordtype">void</span> <a class="code" href="classKpgp_1_1UserID.html#953ba47b0d3b851ed74ee213073f2676" title="Sets the flag if the user id has been revoked to revoked.">setRevoked</a>(<span class="keyword">const</span> <span class="keywordtype">bool</span> revoked);
<a name="l00101"></a>00101 
<a name="l00103"></a>00103   <span class="keywordtype">void</span> <a class="code" href="classKpgp_1_1UserID.html#776a01517cd7460018341834fe17b8ca" title="Sets the flag if the user id is invalid to invalid.">setInvalid</a>(<span class="keyword">const</span> <span class="keywordtype">bool</span> invalid);
<a name="l00104"></a>00104 
<a name="l00107"></a>00107   <span class="keywordtype">void</span> <a class="code" href="classKpgp_1_1UserID.html#267fe61162401407c9af317589d9327e" title="Sets the validity of resp.">setValidity</a>(<span class="keyword">const</span> Validity validity);
<a name="l00108"></a>00108 
<a name="l00109"></a>00109  <span class="keyword">protected</span>:
<a name="l00110"></a>00110   <span class="keywordtype">bool</span> mRevoked : 1;
<a name="l00111"></a>00111   <span class="keywordtype">bool</span> mInvalid : 1;
<a name="l00112"></a>00112   Validity mValidity;
<a name="l00113"></a>00113   QString mText;
<a name="l00114"></a>00114 };
<a name="l00115"></a>00115 
<a name="l00116"></a>00116 <span class="keyword">typedef</span> QPtrList&lt;UserID&gt; UserIDList;
<a name="l00117"></a>00117 <span class="keyword">typedef</span> QPtrListIterator&lt;UserID&gt; UserIDListIterator;
<a name="l00118"></a>00118 
<a name="l00119"></a><a class="code" href="classKpgp_1_1UserID.html#ec3a9b703b25943be5b8518acc7f69b2">00119</a> <span class="keyword">inline</span> QString <a class="code" href="classKpgp_1_1UserID.html#ec3a9b703b25943be5b8518acc7f69b2" title="Returns the text of the user id.">UserID::text</a>()<span class="keyword"> const</span>
<a name="l00120"></a>00120 <span class="keyword"></span>{
<a name="l00121"></a>00121   <span class="keywordflow">return</span> mText;
<a name="l00122"></a>00122 }
<a name="l00123"></a>00123 
<a name="l00124"></a><a class="code" href="classKpgp_1_1UserID.html#7bd011db26b751dbcb73a48e5faabe1c">00124</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> UserID::revoked()<span class="keyword"> const</span>
<a name="l00125"></a>00125 <span class="keyword"></span>{
<a name="l00126"></a>00126   <span class="keywordflow">return</span> mRevoked;
<a name="l00127"></a>00127 }
<a name="l00128"></a>00128 
<a name="l00129"></a><a class="code" href="classKpgp_1_1UserID.html#87dbe981bb92d6cfdbc08ba66ced42b3">00129</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1UserID.html#87dbe981bb92d6cfdbc08ba66ced42b3" title="Returns true if the user id is invalid.">UserID::invalid</a>()<span class="keyword"> const</span>
<a name="l00130"></a>00130 <span class="keyword"></span>{
<a name="l00131"></a>00131   <span class="keywordflow">return</span> mInvalid;
<a name="l00132"></a>00132 }
<a name="l00133"></a>00133 
<a name="l00134"></a><a class="code" href="classKpgp_1_1UserID.html#b1f6eb9a6c8a5f6dc6d96f5336d2d5ab">00134</a> <span class="keyword">inline</span> Validity <a class="code" href="classKpgp_1_1UserID.html#b1f6eb9a6c8a5f6dc6d96f5336d2d5ab" title="Returns the validity of resp.">UserID::validity</a>()<span class="keyword"> const</span>
<a name="l00135"></a>00135 <span class="keyword"></span>{
<a name="l00136"></a>00136   <span class="keywordflow">return</span> mValidity;
<a name="l00137"></a>00137 }
<a name="l00138"></a>00138 
<a name="l00139"></a><a class="code" href="classKpgp_1_1UserID.html#a0133f362c130e12445b715bfb4dc5f5">00139</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classKpgp_1_1UserID.html#a0133f362c130e12445b715bfb4dc5f5" title="Sets the text of the user id to str.">UserID::setText</a>(<span class="keyword">const</span> QString&amp; str)
<a name="l00140"></a>00140 {
<a name="l00141"></a>00141   mText = str;
<a name="l00142"></a>00142 }
<a name="l00143"></a>00143 
<a name="l00144"></a><a class="code" href="classKpgp_1_1UserID.html#953ba47b0d3b851ed74ee213073f2676">00144</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classKpgp_1_1UserID.html#953ba47b0d3b851ed74ee213073f2676" title="Sets the flag if the user id has been revoked to revoked.">UserID::setRevoked</a>(<span class="keyword">const</span> <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1UserID.html#7bd011db26b751dbcb73a48e5faabe1c" title="Returns true if the user id has been revoked.">revoked</a>)
<a name="l00145"></a>00145 {
<a name="l00146"></a>00146   mRevoked = revoked;
<a name="l00147"></a>00147 }
<a name="l00148"></a>00148 
<a name="l00149"></a><a class="code" href="classKpgp_1_1UserID.html#776a01517cd7460018341834fe17b8ca">00149</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classKpgp_1_1UserID.html#776a01517cd7460018341834fe17b8ca" title="Sets the flag if the user id is invalid to invalid.">UserID::setInvalid</a>(<span class="keyword">const</span> <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1UserID.html#87dbe981bb92d6cfdbc08ba66ced42b3" title="Returns true if the user id is invalid.">invalid</a>)
<a name="l00150"></a>00150 {
<a name="l00151"></a>00151   mInvalid = invalid;
<a name="l00152"></a>00152 }
<a name="l00153"></a>00153 
<a name="l00154"></a><a class="code" href="classKpgp_1_1UserID.html#267fe61162401407c9af317589d9327e">00154</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classKpgp_1_1UserID.html#267fe61162401407c9af317589d9327e" title="Sets the validity of resp.">UserID::setValidity</a>(<span class="keyword">const</span> Validity <a class="code" href="classKpgp_1_1UserID.html#b1f6eb9a6c8a5f6dc6d96f5336d2d5ab" title="Returns the validity of resp.">validity</a>)
<a name="l00155"></a>00155 {
<a name="l00156"></a>00156   mValidity = validity;
<a name="l00157"></a>00157 }
<a name="l00158"></a>00158 
<a name="l00159"></a>00159 
<a name="l00162"></a><a class="code" href="classKpgp_1_1Subkey.html">00162</a> <span class="keyword">class </span><a class="code" href="classKpgp_1_1Subkey.html" title="This class is used to store information about a subkey of a PGP key.">Subkey</a>
<a name="l00163"></a>00163 {
<a name="l00164"></a>00164  <span class="keyword">public</span>:
<a name="l00166"></a>00166   <a class="code" href="classKpgp_1_1Subkey.html" title="This class is used to store information about a subkey of a PGP key.">Subkey</a>(<span class="keyword">const</span> KeyID&amp; keyID, <span class="keyword">const</span> <span class="keywordtype">bool</span> secret = <span class="keyword">false</span>);
<a name="l00167"></a>00167   ~<a class="code" href="classKpgp_1_1Subkey.html" title="This class is used to store information about a subkey of a PGP key.">Subkey</a>() {};
<a name="l00168"></a>00168 
<a name="l00170"></a>00170   <span class="keywordtype">bool</span> secret() <span class="keyword">const</span>;
<a name="l00171"></a>00171 
<a name="l00173"></a>00173   <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1UserID.html#7bd011db26b751dbcb73a48e5faabe1c" title="Returns true if the user id has been revoked.">revoked</a>() <span class="keyword">const</span>;
<a name="l00174"></a>00174 
<a name="l00176"></a>00176   <span class="keywordtype">bool</span> expired() <span class="keyword">const</span>;
<a name="l00177"></a>00177 
<a name="l00179"></a>00179   <span class="keywordtype">bool</span> disabled() <span class="keyword">const</span>;
<a name="l00180"></a>00180 
<a name="l00182"></a>00182   <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1UserID.html#87dbe981bb92d6cfdbc08ba66ced42b3" title="Returns true if the user id is invalid.">invalid</a>() <span class="keyword">const</span>;
<a name="l00183"></a>00183 
<a name="l00185"></a>00185   <span class="keywordtype">bool</span> canEncrypt() <span class="keyword">const</span>;
<a name="l00186"></a>00186 
<a name="l00188"></a>00188   <span class="keywordtype">bool</span> canSign() <span class="keyword">const</span>;
<a name="l00189"></a>00189 
<a name="l00191"></a>00191   <span class="keywordtype">bool</span> canCertify() <span class="keyword">const</span>;
<a name="l00192"></a>00192 
<a name="l00194"></a>00194   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> keyAlgorithm() <span class="keyword">const</span>;
<a name="l00195"></a>00195 
<a name="l00197"></a>00197   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> keyLength() <span class="keyword">const</span>;
<a name="l00198"></a>00198 
<a name="l00201"></a>00201   KeyID longKeyID() <span class="keyword">const</span>;
<a name="l00202"></a>00202 
<a name="l00204"></a>00204   KeyID keyID() <span class="keyword">const</span>;
<a name="l00205"></a>00205   
<a name="l00207"></a>00207   QCString fingerprint() <span class="keyword">const</span>;
<a name="l00208"></a>00208 
<a name="l00210"></a>00210   time_t creationDate() <span class="keyword">const</span>;
<a name="l00211"></a>00211 
<a name="l00213"></a>00213   time_t expirationDate() <span class="keyword">const</span>;
<a name="l00214"></a>00214 
<a name="l00216"></a>00216   <span class="keywordtype">void</span> setSecret(<span class="keyword">const</span> <span class="keywordtype">bool</span> secret);
<a name="l00217"></a>00217 
<a name="l00219"></a>00219   <span class="keywordtype">void</span> <a class="code" href="classKpgp_1_1UserID.html#953ba47b0d3b851ed74ee213073f2676" title="Sets the flag if the user id has been revoked to revoked.">setRevoked</a>(<span class="keyword">const</span> <span class="keywordtype">bool</span> revoked);
<a name="l00220"></a>00220 
<a name="l00222"></a>00222   <span class="keywordtype">void</span> setExpired(<span class="keyword">const</span> <span class="keywordtype">bool</span> expired);
<a name="l00223"></a>00223 
<a name="l00225"></a>00225   <span class="keywordtype">void</span> setDisabled(<span class="keyword">const</span> <span class="keywordtype">bool</span> disabled);
<a name="l00226"></a>00226 
<a name="l00228"></a>00228   <span class="keywordtype">void</span> <a class="code" href="classKpgp_1_1UserID.html#776a01517cd7460018341834fe17b8ca" title="Sets the flag if the user id is invalid to invalid.">setInvalid</a>(<span class="keyword">const</span> <span class="keywordtype">bool</span> invalid);
<a name="l00229"></a>00229 
<a name="l00232"></a>00232   <span class="keywordtype">void</span> setCanEncrypt(<span class="keyword">const</span> <span class="keywordtype">bool</span> canEncrypt);
<a name="l00233"></a>00233 
<a name="l00236"></a>00236   <span class="keywordtype">void</span> setCanSign(<span class="keyword">const</span> <span class="keywordtype">bool</span> canSign);
<a name="l00237"></a>00237 
<a name="l00240"></a>00240   <span class="keywordtype">void</span> setCanCertify(<span class="keyword">const</span> <span class="keywordtype">bool</span> canCertify);
<a name="l00241"></a>00241 
<a name="l00243"></a>00243   <span class="keywordtype">void</span> setKeyAlgorithm(<span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> keyAlgo);
<a name="l00244"></a>00244 
<a name="l00246"></a>00246   <span class="keywordtype">void</span> setKeyLength(<span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> keyLen);
<a name="l00247"></a>00247 
<a name="l00249"></a>00249   <span class="keywordtype">void</span> setKeyID(<span class="keyword">const</span> KeyID&amp; keyID);
<a name="l00250"></a>00250 
<a name="l00252"></a>00252   <span class="keywordtype">void</span> setFingerprint(<span class="keyword">const</span> QCString&amp; fingerprint);
<a name="l00253"></a>00253 
<a name="l00256"></a>00256   <span class="keywordtype">void</span> setCreationDate(<span class="keyword">const</span> time_t creationDate);
<a name="l00257"></a>00257 
<a name="l00260"></a>00260   <span class="keywordtype">void</span> setExpirationDate(<span class="keyword">const</span> time_t expirationDate);
<a name="l00261"></a>00261 
<a name="l00262"></a>00262  <span class="keyword">protected</span>:
<a name="l00263"></a>00263   <span class="keywordtype">bool</span> mSecret : 1;
<a name="l00264"></a>00264   <span class="comment">/* various flags */</span>
<a name="l00265"></a>00265   <span class="keywordtype">bool</span> mRevoked : 1;
<a name="l00266"></a>00266   <span class="keywordtype">bool</span> mExpired : 1;
<a name="l00267"></a>00267   <span class="keywordtype">bool</span> mDisabled : 1;
<a name="l00268"></a>00268   <span class="keywordtype">bool</span> mInvalid : 1;
<a name="l00269"></a>00269   <span class="keywordtype">bool</span> mCanEncrypt : 1;
<a name="l00270"></a>00270   <span class="keywordtype">bool</span> mCanSign : 1;
<a name="l00271"></a>00271   <span class="keywordtype">bool</span> mCanCertify : 1;
<a name="l00272"></a>00272 
<a name="l00273"></a>00273   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> mKeyAlgo;
<a name="l00274"></a>00274   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> mKeyLen;
<a name="l00275"></a>00275   KeyID mKeyID;
<a name="l00276"></a>00276   QCString mFingerprint;
<a name="l00277"></a>00277   time_t mTimestamp; <span class="comment">/* -1 for invalid, 0 for not available */</span>
<a name="l00278"></a>00278   time_t mExpiration; <span class="comment">/* -1 for never, 0 for not available */</span>
<a name="l00279"></a>00279 };
<a name="l00280"></a>00280 
<a name="l00281"></a><a class="code" href="classKpgp_1_1Subkey.html#173c2a81219cfd907e5e4c329b06fd00">00281</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1Subkey.html#173c2a81219cfd907e5e4c329b06fd00" title="Returns true if the subkey is a secret subkey.">Subkey::secret</a>()<span class="keyword"> const</span>
<a name="l00282"></a>00282 <span class="keyword"></span>{
<a name="l00283"></a>00283   <span class="keywordflow">return</span> mSecret;
<a name="l00284"></a>00284 }
<a name="l00285"></a>00285 
<a name="l00286"></a><a class="code" href="classKpgp_1_1Subkey.html#135c33ffd241091c9c265acb85a876a6">00286</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1Subkey.html#135c33ffd241091c9c265acb85a876a6" title="Returns true if the subkey has been revoked.">Subkey::revoked</a>()<span class="keyword"> const</span>
<a name="l00287"></a>00287 <span class="keyword"></span>{
<a name="l00288"></a>00288   <span class="keywordflow">return</span> mRevoked;
<a name="l00289"></a>00289 }
<a name="l00290"></a>00290 
<a name="l00291"></a><a class="code" href="classKpgp_1_1Subkey.html#9a36cc4daf08866fe9c1f18bd4a61c5c">00291</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1Subkey.html#9a36cc4daf08866fe9c1f18bd4a61c5c" title="Returns true if the subkey has expired.">Subkey::expired</a>()<span class="keyword"> const</span>
<a name="l00292"></a>00292 <span class="keyword"></span>{
<a name="l00293"></a>00293   <span class="keywordflow">return</span> mExpired;
<a name="l00294"></a>00294 }
<a name="l00295"></a>00295 
<a name="l00296"></a><a class="code" href="classKpgp_1_1Subkey.html#20df202f6ec8d6687b39c3f7b35d18dc">00296</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1Subkey.html#20df202f6ec8d6687b39c3f7b35d18dc" title="Returns true if the subkey has been disabled.">Subkey::disabled</a>()<span class="keyword"> const</span>
<a name="l00297"></a>00297 <span class="keyword"></span>{
<a name="l00298"></a>00298   <span class="keywordflow">return</span> mDisabled;
<a name="l00299"></a>00299 }
<a name="l00300"></a>00300 
<a name="l00301"></a><a class="code" href="classKpgp_1_1Subkey.html#37be8de2afc857b08c927205c8a22f3a">00301</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1Subkey.html#37be8de2afc857b08c927205c8a22f3a" title="Returns true if the subkey is invalid.">Subkey::invalid</a>()<span class="keyword"> const</span>
<a name="l00302"></a>00302 <span class="keyword"></span>{
<a name="l00303"></a>00303   <span class="keywordflow">return</span> mInvalid;
<a name="l00304"></a>00304 }
<a name="l00305"></a>00305 
<a name="l00306"></a><a class="code" href="classKpgp_1_1Subkey.html#1ad6cc448ab49a8e6d24b0e03ca0d936">00306</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1Subkey.html#1ad6cc448ab49a8e6d24b0e03ca0d936" title="Returns true if the subkey can be used to encrypt data.">Subkey::canEncrypt</a>()<span class="keyword"> const</span>
<a name="l00307"></a>00307 <span class="keyword"></span>{
<a name="l00308"></a>00308   <span class="keywordflow">return</span> mCanEncrypt;
<a name="l00309"></a>00309 }
<a name="l00310"></a>00310 
<a name="l00311"></a><a class="code" href="classKpgp_1_1Subkey.html#6b494954574a741c5a14a99458d69ec6">00311</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1Subkey.html#6b494954574a741c5a14a99458d69ec6" title="Returns true if the subkey can be used to sign data.">Subkey::canSign</a>()<span class="keyword"> const</span>
<a name="l00312"></a>00312 <span class="keyword"></span>{
<a name="l00313"></a>00313   <span class="keywordflow">return</span> mCanSign;
<a name="l00314"></a>00314 }
<a name="l00315"></a>00315 
<a name="l00316"></a><a class="code" href="classKpgp_1_1Subkey.html#af6e0760f9e29a59dd84e97a0dfa9e1a">00316</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1Subkey.html#af6e0760f9e29a59dd84e97a0dfa9e1a" title="Returns true if the subkey can be used to certify keys.">Subkey::canCertify</a>()<span class="keyword"> const</span>
<a name="l00317"></a>00317 <span class="keyword"></span>{
<a name="l00318"></a>00318   <span class="keywordflow">return</span> mCanCertify;
<a name="l00319"></a>00319 }
<a name="l00320"></a>00320 
<a name="l00321"></a><a class="code" href="classKpgp_1_1Subkey.html#febb37594e91f8c71484953e3aa4abe2">00321</a> <span class="keyword">inline</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classKpgp_1_1Subkey.html#febb37594e91f8c71484953e3aa4abe2" title="Returns the key algorithm of the subkey.">Subkey::keyAlgorithm</a>()<span class="keyword"> const</span>
<a name="l00322"></a>00322 <span class="keyword"></span>{
<a name="l00323"></a>00323   <span class="keywordflow">return</span> mKeyAlgo;
<a name="l00324"></a>00324 }
<a name="l00325"></a>00325 
<a name="l00326"></a><a class="code" href="classKpgp_1_1Subkey.html#ee1a72cfae784ec9c1ec1ececc0ffd2a">00326</a> <span class="keyword">inline</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classKpgp_1_1Subkey.html#ee1a72cfae784ec9c1ec1ececc0ffd2a" title="Returns the length of the subkey in bits.">Subkey::keyLength</a>()<span class="keyword"> const</span>
<a name="l00327"></a>00327 <span class="keyword"></span>{
<a name="l00328"></a>00328   <span class="keywordflow">return</span> mKeyLen;
<a name="l00329"></a>00329 }
<a name="l00330"></a>00330 
<a name="l00331"></a><a class="code" href="classKpgp_1_1Subkey.html#70f48020f98be2903e41475732b2f77c">00331</a> <span class="keyword">inline</span> KeyID <a class="code" href="classKpgp_1_1Subkey.html#70f48020f98be2903e41475732b2f77c" title="Returns the long 64 bit key ID of the subkey if it&amp;#39;s available.">Subkey::longKeyID</a>()<span class="keyword"> const</span>
<a name="l00332"></a>00332 <span class="keyword"></span>{
<a name="l00333"></a>00333   <span class="keywordflow">return</span> mKeyID;
<a name="l00334"></a>00334 }
<a name="l00335"></a>00335 
<a name="l00336"></a><a class="code" href="classKpgp_1_1Subkey.html#4169ebfa68e549e577b99005acf518e1">00336</a> <span class="keyword">inline</span> KeyID <a class="code" href="classKpgp_1_1Subkey.html#4169ebfa68e549e577b99005acf518e1" title="Returns the (short) 32 bit key ID of the subkey.">Subkey::keyID</a>()<span class="keyword"> const</span>
<a name="l00337"></a>00337 <span class="keyword"></span>{
<a name="l00338"></a>00338   <span class="keywordflow">return</span> mKeyID.right(8);
<a name="l00339"></a>00339 }
<a name="l00340"></a>00340 
<a name="l00341"></a><a class="code" href="classKpgp_1_1Subkey.html#83d437d6f99943d67053bfaa7cbe860a">00341</a> <span class="keyword">inline</span> QCString <a class="code" href="classKpgp_1_1Subkey.html#83d437d6f99943d67053bfaa7cbe860a" title="Returns the fingerprint of the subkey.">Subkey::fingerprint</a>()<span class="keyword"> const</span>
<a name="l00342"></a>00342 <span class="keyword"></span>{
<a name="l00343"></a>00343   <span class="keywordflow">return</span> mFingerprint;
<a name="l00344"></a>00344 }
<a name="l00345"></a>00345 
<a name="l00346"></a><a class="code" href="classKpgp_1_1Subkey.html#868b8ddfa828686541489519194c75fb">00346</a> <span class="keyword">inline</span> time_t <a class="code" href="classKpgp_1_1Subkey.html#868b8ddfa828686541489519194c75fb" title="Returns the creation date of the subkey.">Subkey::creationDate</a>()<span class="keyword"> const</span>
<a name="l00347"></a>00347 <span class="keyword"></span>{
<a name="l00348"></a>00348   <span class="keywordflow">return</span> mTimestamp;
<a name="l00349"></a>00349 }
<a name="l00350"></a>00350 
<a name="l00351"></a><a class="code" href="classKpgp_1_1Subkey.html#9f2af8fee29b3053fde2219440d15104">00351</a> <span class="keyword">inline</span> time_t <a class="code" href="classKpgp_1_1Subkey.html#9f2af8fee29b3053fde2219440d15104" title="Returns the expiration date of the subkey.">Subkey::expirationDate</a>()<span class="keyword"> const</span>
<a name="l00352"></a>00352 <span class="keyword"></span>{
<a name="l00353"></a>00353   <span class="keywordflow">return</span> mExpiration;
<a name="l00354"></a>00354 }
<a name="l00355"></a>00355 
<a name="l00356"></a><a class="code" href="classKpgp_1_1Subkey.html#0d2ae833901945891e10c5157e2b81a2">00356</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classKpgp_1_1Subkey.html#0d2ae833901945891e10c5157e2b81a2" title="Sets the flag if the subkey is a secret subkey to secret.">Subkey::setSecret</a>(<span class="keyword">const</span> <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1Subkey.html#173c2a81219cfd907e5e4c329b06fd00" title="Returns true if the subkey is a secret subkey.">secret</a>)
<a name="l00357"></a>00357 {
<a name="l00358"></a>00358   mSecret = secret;
<a name="l00359"></a>00359 }
<a name="l00360"></a>00360 
<a name="l00361"></a><a class="code" href="classKpgp_1_1Subkey.html#2f8b4ed30f3d9c32fbd9da3531f2a5b8">00361</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classKpgp_1_1Subkey.html#2f8b4ed30f3d9c32fbd9da3531f2a5b8" title="Sets the flag if the subkey has been revoked to revoked.">Subkey::setRevoked</a>(<span class="keyword">const</span> <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1Subkey.html#135c33ffd241091c9c265acb85a876a6" title="Returns true if the subkey has been revoked.">revoked</a>)
<a name="l00362"></a>00362 {
<a name="l00363"></a>00363   mRevoked = revoked;
<a name="l00364"></a>00364 }
<a name="l00365"></a>00365 
<a name="l00366"></a><a class="code" href="classKpgp_1_1Subkey.html#794b6394295da947e3a57d4804b34c28">00366</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classKpgp_1_1Subkey.html#794b6394295da947e3a57d4804b34c28" title="Sets the flag if the subkey has expired to expired.">Subkey::setExpired</a>(<span class="keyword">const</span> <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1Subkey.html#9a36cc4daf08866fe9c1f18bd4a61c5c" title="Returns true if the subkey has expired.">expired</a>)
<a name="l00367"></a>00367 {
<a name="l00368"></a>00368   mExpired = expired;
<a name="l00369"></a>00369 }
<a name="l00370"></a>00370 
<a name="l00371"></a><a class="code" href="classKpgp_1_1Subkey.html#2a6a430f8b0971b610d2f637a061f910">00371</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classKpgp_1_1Subkey.html#2a6a430f8b0971b610d2f637a061f910" title="Sets the flag if the subkey has been disabled to disabled.">Subkey::setDisabled</a>(<span class="keyword">const</span> <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1Subkey.html#20df202f6ec8d6687b39c3f7b35d18dc" title="Returns true if the subkey has been disabled.">disabled</a>)
<a name="l00372"></a>00372 {
<a name="l00373"></a>00373   mDisabled = disabled;
<a name="l00374"></a>00374 }
<a name="l00375"></a>00375 
<a name="l00376"></a><a class="code" href="classKpgp_1_1Subkey.html#bd3dc8d2fa22b7ab41004202c075f83d">00376</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classKpgp_1_1Subkey.html#bd3dc8d2fa22b7ab41004202c075f83d" title="Sets the flag if the subkey is invalid to invalid.">Subkey::setInvalid</a>(<span class="keyword">const</span> <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1Subkey.html#37be8de2afc857b08c927205c8a22f3a" title="Returns true if the subkey is invalid.">invalid</a>)
<a name="l00377"></a>00377 {
<a name="l00378"></a>00378   mInvalid = invalid;
<a name="l00379"></a>00379 }
<a name="l00380"></a>00380 
<a name="l00381"></a><a class="code" href="classKpgp_1_1Subkey.html#5411d5086048cbe865b159c5aa6c905a">00381</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classKpgp_1_1Subkey.html#5411d5086048cbe865b159c5aa6c905a" title="Sets the flag if the subkey can be used to encrypt data to canEncrypt.">Subkey::setCanEncrypt</a>(<span class="keyword">const</span> <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1Subkey.html#1ad6cc448ab49a8e6d24b0e03ca0d936" title="Returns true if the subkey can be used to encrypt data.">canEncrypt</a>)
<a name="l00382"></a>00382 {
<a name="l00383"></a>00383   mCanEncrypt = canEncrypt;
<a name="l00384"></a>00384 }
<a name="l00385"></a>00385 
<a name="l00386"></a><a class="code" href="classKpgp_1_1Subkey.html#656d74041c13b493300b57b29d1fa691">00386</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classKpgp_1_1Subkey.html#656d74041c13b493300b57b29d1fa691" title="Sets the flag if the subkey can be used to sign data to canSign.">Subkey::setCanSign</a>(<span class="keyword">const</span> <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1Subkey.html#6b494954574a741c5a14a99458d69ec6" title="Returns true if the subkey can be used to sign data.">canSign</a>)
<a name="l00387"></a>00387 {
<a name="l00388"></a>00388   mCanSign = canSign;
<a name="l00389"></a>00389 }
<a name="l00390"></a>00390 
<a name="l00391"></a><a class="code" href="classKpgp_1_1Subkey.html#33a4f9f3c43a1526363c96539bd16d12">00391</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classKpgp_1_1Subkey.html#33a4f9f3c43a1526363c96539bd16d12" title="Sets the flag if the subkey can be used to certify keys to canCertify.">Subkey::setCanCertify</a>(<span class="keyword">const</span> <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1Subkey.html#af6e0760f9e29a59dd84e97a0dfa9e1a" title="Returns true if the subkey can be used to certify keys.">canCertify</a>)
<a name="l00392"></a>00392 {
<a name="l00393"></a>00393   mCanCertify = canCertify;
<a name="l00394"></a>00394 }
<a name="l00395"></a>00395 
<a name="l00396"></a><a class="code" href="classKpgp_1_1Subkey.html#43405028147065497aed93250b6f90a9">00396</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classKpgp_1_1Subkey.html#43405028147065497aed93250b6f90a9" title="Sets the key algorithm of the subkey to keyAlgo.">Subkey::setKeyAlgorithm</a>(<span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> keyAlgo)
<a name="l00397"></a>00397 {
<a name="l00398"></a>00398   mKeyAlgo = keyAlgo;
<a name="l00399"></a>00399 }
<a name="l00400"></a>00400 
<a name="l00401"></a><a class="code" href="classKpgp_1_1Subkey.html#4f704202538efa058355734054b5994b">00401</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classKpgp_1_1Subkey.html#4f704202538efa058355734054b5994b" title="Sets the key length of the subkey to keyLen bits.">Subkey::setKeyLength</a>(<span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> keyLen)
<a name="l00402"></a>00402 {
<a name="l00403"></a>00403   mKeyLen = keyLen;
<a name="l00404"></a>00404 }
<a name="l00405"></a>00405 
<a name="l00406"></a><a class="code" href="classKpgp_1_1Subkey.html#cf8065480a2f4dcb1b2b868617723897">00406</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classKpgp_1_1Subkey.html#cf8065480a2f4dcb1b2b868617723897" title="Sets the key ID of the subkey to keyID.">Subkey::setKeyID</a>(<span class="keyword">const</span> KeyID&amp; <a class="code" href="classKpgp_1_1Subkey.html#4169ebfa68e549e577b99005acf518e1" title="Returns the (short) 32 bit key ID of the subkey.">keyID</a>)
<a name="l00407"></a>00407 {
<a name="l00408"></a>00408   mKeyID = keyID;
<a name="l00409"></a>00409 }
<a name="l00410"></a>00410 
<a name="l00411"></a><a class="code" href="classKpgp_1_1Subkey.html#8ef232a60046405cef6f0ee771156250">00411</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classKpgp_1_1Subkey.html#8ef232a60046405cef6f0ee771156250" title="Sets the fingerprint of the subkey to fingerprint.">Subkey::setFingerprint</a>(<span class="keyword">const</span> QCString&amp; <a class="code" href="classKpgp_1_1Subkey.html#83d437d6f99943d67053bfaa7cbe860a" title="Returns the fingerprint of the subkey.">fingerprint</a>)
<a name="l00412"></a>00412 {
<a name="l00413"></a>00413   mFingerprint = fingerprint;
<a name="l00414"></a>00414 }
<a name="l00415"></a>00415 
<a name="l00416"></a><a class="code" href="classKpgp_1_1Subkey.html#d40a4cd6fc05a0e8767fbe7d49dddd51">00416</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classKpgp_1_1Subkey.html#d40a4cd6fc05a0e8767fbe7d49dddd51" title="Sets the creation date of the subkey to creationDate seconds since Epoch.">Subkey::setCreationDate</a>(<span class="keyword">const</span> time_t <a class="code" href="classKpgp_1_1Subkey.html#868b8ddfa828686541489519194c75fb" title="Returns the creation date of the subkey.">creationDate</a>)
<a name="l00417"></a>00417 {
<a name="l00418"></a>00418   mTimestamp = creationDate;
<a name="l00419"></a>00419 }
<a name="l00420"></a>00420 
<a name="l00421"></a><a class="code" href="classKpgp_1_1Subkey.html#eca531b253fa20e9a638283369f0d430">00421</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classKpgp_1_1Subkey.html#eca531b253fa20e9a638283369f0d430" title="Sets the expiration date of the subkey to expirationDate seconds since Epoch.">Subkey::setExpirationDate</a>(<span class="keyword">const</span> time_t <a class="code" href="classKpgp_1_1Subkey.html#9f2af8fee29b3053fde2219440d15104" title="Returns the expiration date of the subkey.">expirationDate</a>)
<a name="l00422"></a>00422 {
<a name="l00423"></a>00423   mExpiration = expirationDate;
<a name="l00424"></a>00424 }
<a name="l00425"></a>00425 
<a name="l00426"></a>00426 <span class="keyword">typedef</span> QPtrList&lt;Subkey&gt; SubkeyList;
<a name="l00427"></a>00427 <span class="keyword">typedef</span> QPtrListIterator&lt;Subkey&gt; SubkeyListIterator;
<a name="l00428"></a>00428 
<a name="l00429"></a>00429 
<a name="l00432"></a><a class="code" href="classKpgp_1_1Key.html">00432</a> <span class="keyword">class </span><a class="code" href="classKpgp_1_1Key.html" title="This class is used to store information about a PGP key.">Key</a>
<a name="l00433"></a>00433 {
<a name="l00434"></a>00434  <span class="keyword">public</span>:
<a name="l00437"></a>00437   <a class="code" href="classKpgp_1_1Key.html" title="This class is used to store information about a PGP key.">Key</a>( <span class="keyword">const</span> KeyID&amp; keyid = KeyID(),
<a name="l00438"></a>00438        <span class="keyword">const</span> QString&amp; uid = QString::null,
<a name="l00439"></a>00439        <span class="keyword">const</span> <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1Subkey.html#173c2a81219cfd907e5e4c329b06fd00" title="Returns true if the subkey is a secret subkey.">secret</a> = <span class="keyword">false</span>);
<a name="l00440"></a>00440   ~<a class="code" href="classKpgp_1_1Key.html" title="This class is used to store information about a PGP key.">Key</a>();
<a name="l00441"></a>00441 
<a name="l00443"></a>00443   <span class="keywordtype">void</span> clear();
<a name="l00444"></a>00444 
<a name="l00446"></a>00446   <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1Subkey.html#173c2a81219cfd907e5e4c329b06fd00" title="Returns true if the subkey is a secret subkey.">secret</a>() <span class="keyword">const</span>;
<a name="l00447"></a>00447 
<a name="l00449"></a>00449   <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1Subkey.html#135c33ffd241091c9c265acb85a876a6" title="Returns true if the subkey has been revoked.">revoked</a>() <span class="keyword">const</span>;
<a name="l00450"></a>00450 
<a name="l00452"></a>00452   <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1Subkey.html#9a36cc4daf08866fe9c1f18bd4a61c5c" title="Returns true if the subkey has expired.">expired</a>() <span class="keyword">const</span>;
<a name="l00453"></a>00453 
<a name="l00455"></a>00455   <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1Subkey.html#20df202f6ec8d6687b39c3f7b35d18dc" title="Returns true if the subkey has been disabled.">disabled</a>() <span class="keyword">const</span>;
<a name="l00456"></a>00456 
<a name="l00458"></a>00458   <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1Subkey.html#37be8de2afc857b08c927205c8a22f3a" title="Returns true if the subkey is invalid.">invalid</a>() <span class="keyword">const</span>;
<a name="l00459"></a>00459 
<a name="l00461"></a>00461   <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1Subkey.html#1ad6cc448ab49a8e6d24b0e03ca0d936" title="Returns true if the subkey can be used to encrypt data.">canEncrypt</a>() <span class="keyword">const</span>;
<a name="l00462"></a>00462 
<a name="l00464"></a>00464   <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1Subkey.html#6b494954574a741c5a14a99458d69ec6" title="Returns true if the subkey can be used to sign data.">canSign</a>() <span class="keyword">const</span>;
<a name="l00465"></a>00465 
<a name="l00467"></a>00467   <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1Subkey.html#af6e0760f9e29a59dd84e97a0dfa9e1a" title="Returns true if the subkey can be used to certify keys.">canCertify</a>() <span class="keyword">const</span>;
<a name="l00468"></a>00468 
<a name="l00470"></a>00470   <span class="keywordtype">void</span> <a class="code" href="classKpgp_1_1Subkey.html#0d2ae833901945891e10c5157e2b81a2" title="Sets the flag if the subkey is a secret subkey to secret.">setSecret</a>(<span class="keyword">const</span> <span class="keywordtype">bool</span> secret);
<a name="l00471"></a>00471 
<a name="l00473"></a>00473   <span class="keywordtype">void</span> <a class="code" href="classKpgp_1_1Subkey.html#2f8b4ed30f3d9c32fbd9da3531f2a5b8" title="Sets the flag if the subkey has been revoked to revoked.">setRevoked</a>(<span class="keyword">const</span> <span class="keywordtype">bool</span> revoked);
<a name="l00474"></a>00474 
<a name="l00476"></a>00476   <span class="keywordtype">void</span> <a class="code" href="classKpgp_1_1Subkey.html#794b6394295da947e3a57d4804b34c28" title="Sets the flag if the subkey has expired to expired.">setExpired</a>(<span class="keyword">const</span> <span class="keywordtype">bool</span> expired);
<a name="l00477"></a>00477 
<a name="l00479"></a>00479   <span class="keywordtype">void</span> <a class="code" href="classKpgp_1_1Subkey.html#2a6a430f8b0971b610d2f637a061f910" title="Sets the flag if the subkey has been disabled to disabled.">setDisabled</a>(<span class="keyword">const</span> <span class="keywordtype">bool</span> disabled);
<a name="l00480"></a>00480 
<a name="l00482"></a>00482   <span class="keywordtype">void</span> <a class="code" href="classKpgp_1_1Subkey.html#bd3dc8d2fa22b7ab41004202c075f83d" title="Sets the flag if the subkey is invalid to invalid.">setInvalid</a>(<span class="keyword">const</span> <span class="keywordtype">bool</span> invalid);
<a name="l00483"></a>00483 
<a name="l00486"></a>00486   <span class="keywordtype">void</span> <a class="code" href="classKpgp_1_1Subkey.html#5411d5086048cbe865b159c5aa6c905a" title="Sets the flag if the subkey can be used to encrypt data to canEncrypt.">setCanEncrypt</a>(<span class="keyword">const</span> <span class="keywordtype">bool</span> canEncrypt);
<a name="l00487"></a>00487 
<a name="l00490"></a>00490   <span class="keywordtype">void</span> <a class="code" href="classKpgp_1_1Subkey.html#656d74041c13b493300b57b29d1fa691" title="Sets the flag if the subkey can be used to sign data to canSign.">setCanSign</a>(<span class="keyword">const</span> <span class="keywordtype">bool</span> canSign);
<a name="l00491"></a>00491 
<a name="l00494"></a>00494   <span class="keywordtype">void</span> <a class="code" href="classKpgp_1_1Subkey.html#33a4f9f3c43a1526363c96539bd16d12" title="Sets the flag if the subkey can be used to certify keys to canCertify.">setCanCertify</a>(<span class="keyword">const</span> <span class="keywordtype">bool</span> canCertify);
<a name="l00495"></a>00495 
<a name="l00496"></a>00496 
<a name="l00498"></a>00498   EncryptPref encryptionPreference();
<a name="l00499"></a>00499 
<a name="l00501"></a>00501   <span class="keywordtype">void</span> setEncryptionPreference( <span class="keyword">const</span> EncryptPref encrPref );
<a name="l00502"></a>00502 
<a name="l00503"></a>00503 
<a name="l00506"></a>00506   QString primaryUserID() <span class="keyword">const</span>;
<a name="l00507"></a>00507 
<a name="l00510"></a>00510   KeyID primaryKeyID() <span class="keyword">const</span>;
<a name="l00511"></a>00511 
<a name="l00514"></a>00514   QCString primaryFingerprint() <span class="keyword">const</span>;
<a name="l00515"></a>00515 
<a name="l00517"></a>00517   <span class="keywordtype">bool</span> isNull() <span class="keyword">const</span>;
<a name="l00518"></a>00518 
<a name="l00521"></a>00521   time_t <a class="code" href="classKpgp_1_1Subkey.html#868b8ddfa828686541489519194c75fb" title="Returns the creation date of the subkey.">creationDate</a>() <span class="keyword">const</span>;
<a name="l00522"></a>00522 
<a name="l00526"></a>00526   Validity keyTrust() <span class="keyword">const</span>;
<a name="l00527"></a>00527 
<a name="l00530"></a>00530   Validity keyTrust( <span class="keyword">const</span> QString&amp; uid ) <span class="keyword">const</span>;
<a name="l00531"></a>00531 
<a name="l00536"></a>00536   <span class="keywordtype">void</span> cloneKeyTrust( <span class="keyword">const</span> <a class="code" href="classKpgp_1_1Key.html" title="This class is used to store information about a PGP key.">Key</a>* key );
<a name="l00537"></a>00537 
<a name="l00541"></a>00541   <span class="keywordtype">bool</span> isValid() <span class="keyword">const</span>;
<a name="l00542"></a>00542 
<a name="l00546"></a>00546   <span class="keywordtype">bool</span> isValidEncryptionKey() <span class="keyword">const</span>;
<a name="l00547"></a>00547 
<a name="l00550"></a>00550   <span class="keywordtype">bool</span> isValidSigningKey() <span class="keyword">const</span>;
<a name="l00551"></a>00551 
<a name="l00553"></a>00553   <span class="keyword">const</span> UserIDList userIDs() <span class="keyword">const</span>;
<a name="l00554"></a>00554 
<a name="l00556"></a>00556   <span class="keyword">const</span> SubkeyList subkeys() <span class="keyword">const</span>;
<a name="l00557"></a>00557 
<a name="l00560"></a>00560   <span class="keywordtype">void</span> addUserID(<span class="keyword">const</span> QString&amp; uid,
<a name="l00561"></a>00561                  <span class="keyword">const</span> Validity validity = KPGP_VALIDITY_UNKNOWN,
<a name="l00562"></a>00562                  <span class="keyword">const</span> <span class="keywordtype">bool</span> revoked = <span class="keyword">false</span>,
<a name="l00563"></a>00563                  <span class="keyword">const</span> <span class="keywordtype">bool</span> invalid = <span class="keyword">false</span>);
<a name="l00564"></a>00564 
<a name="l00566"></a>00566   <span class="keywordtype">void</span> addUserID(<span class="keyword">const</span> <a class="code" href="classKpgp_1_1UserID.html" title="This class is used to store information about a user id of a PGP key.">UserID</a> *userID);
<a name="l00567"></a>00567 
<a name="l00571"></a>00571   <span class="keywordtype">bool</span> matchesUserID(<span class="keyword">const</span> QString&amp; str, <span class="keywordtype">bool</span> cs = <span class="keyword">true</span>);
<a name="l00572"></a>00572 
<a name="l00575"></a>00575   <span class="keywordtype">void</span> addSubkey(<span class="keyword">const</span> KeyID&amp; <a class="code" href="classKpgp_1_1Subkey.html#4169ebfa68e549e577b99005acf518e1" title="Returns the (short) 32 bit key ID of the subkey.">keyID</a>, <span class="keyword">const</span> <span class="keywordtype">bool</span> secret = <span class="keyword">false</span>);
<a name="l00576"></a>00576 
<a name="l00578"></a>00578   <span class="keywordtype">void</span> addSubkey(<span class="keyword">const</span> <a class="code" href="classKpgp_1_1Subkey.html" title="This class is used to store information about a subkey of a PGP key.">Subkey</a> *subkey);
<a name="l00579"></a>00579 
<a name="l00581"></a>00581   <a class="code" href="classKpgp_1_1Subkey.html" title="This class is used to store information about a subkey of a PGP key.">Subkey</a> *getSubkey(<span class="keyword">const</span> KeyID&amp; keyID);
<a name="l00582"></a>00582 
<a name="l00584"></a>00584   <span class="keywordtype">void</span> <a class="code" href="classKpgp_1_1Subkey.html#8ef232a60046405cef6f0ee771156250" title="Sets the fingerprint of the subkey to fingerprint.">setFingerprint</a>(<span class="keyword">const</span> KeyID&amp; keyID, <span class="keyword">const</span> QCString&amp; fpr);
<a name="l00585"></a>00585 
<a name="l00586"></a>00586  <span class="keyword">protected</span>:
<a name="l00587"></a>00587   <span class="keywordtype">bool</span> mSecret : 1;
<a name="l00588"></a>00588   <span class="comment">/* global flags */</span>
<a name="l00589"></a>00589   <span class="keywordtype">bool</span> mRevoked : 1;
<a name="l00590"></a>00590   <span class="keywordtype">bool</span> mExpired : 1;
<a name="l00591"></a>00591   <span class="keywordtype">bool</span> mDisabled : 1;
<a name="l00592"></a>00592   <span class="keywordtype">bool</span> mInvalid : 1;
<a name="l00593"></a>00593   <span class="keywordtype">bool</span> mCanEncrypt : 1;
<a name="l00594"></a>00594   <span class="keywordtype">bool</span> mCanSign : 1;
<a name="l00595"></a>00595   <span class="keywordtype">bool</span> mCanCertify : 1;
<a name="l00596"></a>00596   
<a name="l00597"></a>00597   EncryptPref mEncryptPref;
<a name="l00598"></a>00598 
<a name="l00599"></a>00599   SubkeyList mSubkeys;
<a name="l00600"></a>00600   UserIDList mUserIDs;
<a name="l00601"></a>00601 };
<a name="l00602"></a>00602 
<a name="l00603"></a><a class="code" href="classKpgp_1_1Key.html#47550c1377abed91de9167dedc3767e6">00603</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1Key.html#47550c1377abed91de9167dedc3767e6" title="Returns true if the key is a secret key.">Key::secret</a>()<span class="keyword"> const</span>
<a name="l00604"></a>00604 <span class="keyword"></span>{
<a name="l00605"></a>00605   <span class="keywordflow">return</span> mSecret;
<a name="l00606"></a>00606 }
<a name="l00607"></a>00607 
<a name="l00608"></a><a class="code" href="classKpgp_1_1Key.html#ee5a21c196f0a18cfb5662d6a7eb6a09">00608</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1Key.html#ee5a21c196f0a18cfb5662d6a7eb6a09" title="Returns true if the key has been revoked.">Key::revoked</a>()<span class="keyword"> const</span>
<a name="l00609"></a>00609 <span class="keyword"></span>{
<a name="l00610"></a>00610   <span class="keywordflow">return</span> mRevoked;
<a name="l00611"></a>00611 }
<a name="l00612"></a>00612 
<a name="l00613"></a><a class="code" href="classKpgp_1_1Key.html#dc043ac9bf4c143cb0cf4656fe7df711">00613</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1Key.html#dc043ac9bf4c143cb0cf4656fe7df711" title="Returns true if the key has expired.">Key::expired</a>()<span class="keyword"> const</span>
<a name="l00614"></a>00614 <span class="keyword"></span>{
<a name="l00615"></a>00615   <span class="keywordflow">return</span> mExpired;
<a name="l00616"></a>00616 }
<a name="l00617"></a>00617 
<a name="l00618"></a><a class="code" href="classKpgp_1_1Key.html#9b49b60bc0168b82f94a3e706c9e199a">00618</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1Key.html#9b49b60bc0168b82f94a3e706c9e199a" title="Returns true if the key has been disabled.">Key::disabled</a>()<span class="keyword"> const</span>
<a name="l00619"></a>00619 <span class="keyword"></span>{
<a name="l00620"></a>00620   <span class="keywordflow">return</span> mDisabled;
<a name="l00621"></a>00621 }
<a name="l00622"></a>00622 
<a name="l00623"></a><a class="code" href="classKpgp_1_1Key.html#d8d4b79a778a89a6047b14297bbc5b96">00623</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1Key.html#d8d4b79a778a89a6047b14297bbc5b96" title="Returns true if the key is invalid.">Key::invalid</a>()<span class="keyword"> const</span>
<a name="l00624"></a>00624 <span class="keyword"></span>{
<a name="l00625"></a>00625   <span class="keywordflow">return</span> mInvalid;
<a name="l00626"></a>00626 }
<a name="l00627"></a>00627 
<a name="l00628"></a><a class="code" href="classKpgp_1_1Key.html#653d29690790120b90d06c8da06b2aeb">00628</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1Key.html#653d29690790120b90d06c8da06b2aeb" title="Returns true if the key can be used to encrypt data.">Key::canEncrypt</a>()<span class="keyword"> const</span>
<a name="l00629"></a>00629 <span class="keyword"></span>{
<a name="l00630"></a>00630   <span class="keywordflow">return</span> mCanEncrypt;
<a name="l00631"></a>00631 }
<a name="l00632"></a>00632 
<a name="l00633"></a><a class="code" href="classKpgp_1_1Key.html#b4b140e5e5fa717be882eeeea8ae8b59">00633</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1Key.html#b4b140e5e5fa717be882eeeea8ae8b59" title="Returns true if the key can be used to sign data.">Key::canSign</a>()<span class="keyword"> const</span>
<a name="l00634"></a>00634 <span class="keyword"></span>{
<a name="l00635"></a>00635   <span class="keywordflow">return</span> mCanSign;
<a name="l00636"></a>00636 }
<a name="l00637"></a>00637 
<a name="l00638"></a><a class="code" href="classKpgp_1_1Key.html#81c9b1ea81753b2fc114aa3119c234cc">00638</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1Key.html#81c9b1ea81753b2fc114aa3119c234cc" title="Returns true if the key can be used to certify keys.">Key::canCertify</a>()<span class="keyword"> const</span>
<a name="l00639"></a>00639 <span class="keyword"></span>{
<a name="l00640"></a>00640   <span class="keywordflow">return</span> mCanCertify;
<a name="l00641"></a>00641 }
<a name="l00642"></a>00642 
<a name="l00643"></a><a class="code" href="classKpgp_1_1Key.html#3cd64c4a8ae324a8382050df77bf4869">00643</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classKpgp_1_1Key.html#3cd64c4a8ae324a8382050df77bf4869" title="Sets the flag if the key is a secret key to secret.">Key::setSecret</a>(<span class="keyword">const</span> <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1Key.html#47550c1377abed91de9167dedc3767e6" title="Returns true if the key is a secret key.">secret</a>)
<a name="l00644"></a>00644 {
<a name="l00645"></a>00645   mSecret = secret;
<a name="l00646"></a>00646 }
<a name="l00647"></a>00647 
<a name="l00648"></a><a class="code" href="classKpgp_1_1Key.html#e734177a6d5a8f65a32668e0a988b579">00648</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classKpgp_1_1Key.html#e734177a6d5a8f65a32668e0a988b579" title="Sets the flag if the key has been revoked to revoked.">Key::setRevoked</a>(<span class="keyword">const</span> <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1Key.html#ee5a21c196f0a18cfb5662d6a7eb6a09" title="Returns true if the key has been revoked.">revoked</a>)
<a name="l00649"></a>00649 {
<a name="l00650"></a>00650   mRevoked = revoked;
<a name="l00651"></a>00651 }
<a name="l00652"></a>00652 
<a name="l00653"></a><a class="code" href="classKpgp_1_1Key.html#e9fb78dcb3d5f7a1b17b984e00e57fe3">00653</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classKpgp_1_1Key.html#e9fb78dcb3d5f7a1b17b984e00e57fe3" title="Sets the flag if the key has expired to expired.">Key::setExpired</a>(<span class="keyword">const</span> <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1Key.html#dc043ac9bf4c143cb0cf4656fe7df711" title="Returns true if the key has expired.">expired</a>)
<a name="l00654"></a>00654 {
<a name="l00655"></a>00655   mExpired = expired;
<a name="l00656"></a>00656 }
<a name="l00657"></a>00657 
<a name="l00658"></a><a class="code" href="classKpgp_1_1Key.html#ed47de6b2013c6024174885c4c9f7187">00658</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classKpgp_1_1Key.html#ed47de6b2013c6024174885c4c9f7187" title="Sets the flag if the key has been disabled to disabled.">Key::setDisabled</a>(<span class="keyword">const</span> <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1Key.html#9b49b60bc0168b82f94a3e706c9e199a" title="Returns true if the key has been disabled.">disabled</a>)
<a name="l00659"></a>00659 {
<a name="l00660"></a>00660   mDisabled = disabled;
<a name="l00661"></a>00661 }
<a name="l00662"></a>00662 
<a name="l00663"></a><a class="code" href="classKpgp_1_1Key.html#5050e9804070f5f6a6346e590e39b31e">00663</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classKpgp_1_1Key.html#5050e9804070f5f6a6346e590e39b31e" title="Sets the flag if the key is invalid to invalid.">Key::setInvalid</a>(<span class="keyword">const</span> <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1Key.html#d8d4b79a778a89a6047b14297bbc5b96" title="Returns true if the key is invalid.">invalid</a>)
<a name="l00664"></a>00664 {
<a name="l00665"></a>00665   mInvalid = invalid;
<a name="l00666"></a>00666 }
<a name="l00667"></a>00667 
<a name="l00668"></a><a class="code" href="classKpgp_1_1Key.html#7c1e0187a0853efca290700046e218bc">00668</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classKpgp_1_1Key.html#7c1e0187a0853efca290700046e218bc" title="Sets the flag if the key can be used to encrypt data to canEncrypt.">Key::setCanEncrypt</a>(<span class="keyword">const</span> <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1Key.html#653d29690790120b90d06c8da06b2aeb" title="Returns true if the key can be used to encrypt data.">canEncrypt</a>)
<a name="l00669"></a>00669 {
<a name="l00670"></a>00670   mCanEncrypt = canEncrypt;
<a name="l00671"></a>00671 }
<a name="l00672"></a>00672 
<a name="l00673"></a><a class="code" href="classKpgp_1_1Key.html#adf81966c3a7cf5bc243041ca136801e">00673</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classKpgp_1_1Key.html#adf81966c3a7cf5bc243041ca136801e" title="Sets the flag if the key can be used to sign data to canSign.">Key::setCanSign</a>(<span class="keyword">const</span> <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1Key.html#b4b140e5e5fa717be882eeeea8ae8b59" title="Returns true if the key can be used to sign data.">canSign</a>)
<a name="l00674"></a>00674 {
<a name="l00675"></a>00675   mCanSign = canSign;
<a name="l00676"></a>00676 }
<a name="l00677"></a>00677 
<a name="l00678"></a><a class="code" href="classKpgp_1_1Key.html#ce206302a33956db69c2bcc55b8bcf8c">00678</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classKpgp_1_1Key.html#ce206302a33956db69c2bcc55b8bcf8c" title="Sets the flag if the key can be used to certify keys to canCertify.">Key::setCanCertify</a>(<span class="keyword">const</span> <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1Key.html#81c9b1ea81753b2fc114aa3119c234cc" title="Returns true if the key can be used to certify keys.">canCertify</a>)
<a name="l00679"></a>00679 {
<a name="l00680"></a>00680   mCanCertify = canCertify;
<a name="l00681"></a>00681 }
<a name="l00682"></a>00682 
<a name="l00683"></a><a class="code" href="classKpgp_1_1Key.html#ce3391e101c90b66f16eafa4a4c3638a">00683</a> <span class="keyword">inline</span> EncryptPref <a class="code" href="classKpgp_1_1Key.html#ce3391e101c90b66f16eafa4a4c3638a" title="Returns the encryption preference for this key.">Key::encryptionPreference</a>()
<a name="l00684"></a>00684 {
<a name="l00685"></a>00685   <span class="keywordflow">return</span> mEncryptPref;
<a name="l00686"></a>00686 }
<a name="l00687"></a>00687 
<a name="l00688"></a><a class="code" href="classKpgp_1_1Key.html#aa1986387d3466f1c359451b94a69f33">00688</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classKpgp_1_1Key.html#aa1986387d3466f1c359451b94a69f33" title="Sets the encryption preference for this key to encrPref.">Key::setEncryptionPreference</a>( <span class="keyword">const</span> EncryptPref encrPref )
<a name="l00689"></a>00689 {
<a name="l00690"></a>00690   mEncryptPref = encrPref;
<a name="l00691"></a>00691 }
<a name="l00692"></a>00692 
<a name="l00693"></a><a class="code" href="classKpgp_1_1Key.html#56da6b26551845ece29869a968e58cf9">00693</a> <span class="keyword">inline</span> QString <a class="code" href="classKpgp_1_1Key.html#56da6b26551845ece29869a968e58cf9" title="Returns the primary user ID or a null string if there are no user IDs.">Key::primaryUserID</a>()<span class="keyword"> const</span>
<a name="l00694"></a>00694 <span class="keyword"></span>{
<a name="l00695"></a>00695   <a class="code" href="classKpgp_1_1UserID.html" title="This class is used to store information about a user id of a PGP key.">UserID</a> *uid = mUserIDs.getFirst();
<a name="l00696"></a>00696 
<a name="l00697"></a>00697   <span class="keywordflow">if</span> (uid)
<a name="l00698"></a>00698     <span class="keywordflow">return</span> uid-&gt;<a class="code" href="classKpgp_1_1UserID.html#ec3a9b703b25943be5b8518acc7f69b2" title="Returns the text of the user id.">text</a>();
<a name="l00699"></a>00699   <span class="keywordflow">else</span>
<a name="l00700"></a>00700     <span class="keywordflow">return</span> QString::null;
<a name="l00701"></a>00701 }
<a name="l00702"></a>00702 
<a name="l00703"></a><a class="code" href="classKpgp_1_1Key.html#eb04790ca5a95622884c30f430c6b828">00703</a> <span class="keyword">inline</span> KeyID <a class="code" href="classKpgp_1_1Key.html#eb04790ca5a95622884c30f430c6b828" title="Returns the key ID of the primary key or a null string if there are no subkeys.">Key::primaryKeyID</a>()<span class="keyword"> const </span>
<a name="l00704"></a>00704 <span class="keyword"></span>{
<a name="l00705"></a>00705   <a class="code" href="classKpgp_1_1Subkey.html" title="This class is used to store information about a subkey of a PGP key.">Subkey</a> *key = mSubkeys.getFirst();
<a name="l00706"></a>00706 
<a name="l00707"></a>00707   <span class="keywordflow">if</span> (key)
<a name="l00708"></a>00708     <span class="keywordflow">return</span> key-&gt;<a class="code" href="classKpgp_1_1Subkey.html#4169ebfa68e549e577b99005acf518e1" title="Returns the (short) 32 bit key ID of the subkey.">keyID</a>();
<a name="l00709"></a>00709   <span class="keywordflow">else</span>
<a name="l00710"></a>00710     <span class="keywordflow">return</span> KeyID();
<a name="l00711"></a>00711 }
<a name="l00712"></a>00712 
<a name="l00713"></a><a class="code" href="classKpgp_1_1Key.html#518d491b73a46cda46354c847dff99f6">00713</a> <span class="keyword">inline</span> QCString <a class="code" href="classKpgp_1_1Key.html#518d491b73a46cda46354c847dff99f6" title="Returns the fingerprint of the primary key or a null string if there are no subkeys...">Key::primaryFingerprint</a>()<span class="keyword"> const</span>
<a name="l00714"></a>00714 <span class="keyword"></span>{
<a name="l00715"></a>00715   <a class="code" href="classKpgp_1_1Subkey.html" title="This class is used to store information about a subkey of a PGP key.">Subkey</a> *key = mSubkeys.getFirst();
<a name="l00716"></a>00716 
<a name="l00717"></a>00717   <span class="keywordflow">if</span> (key)
<a name="l00718"></a>00718     <span class="keywordflow">return</span> key-&gt;<a class="code" href="classKpgp_1_1Subkey.html#83d437d6f99943d67053bfaa7cbe860a" title="Returns the fingerprint of the subkey.">fingerprint</a>();
<a name="l00719"></a>00719   <span class="keywordflow">else</span>
<a name="l00720"></a>00720     <span class="keywordflow">return</span> QCString();
<a name="l00721"></a>00721 }
<a name="l00722"></a>00722 
<a name="l00723"></a><a class="code" href="classKpgp_1_1Key.html#51a503fa08c9179647b1dba2c46454ca">00723</a> <span class="keyword">inline</span> <span class="keyword">const</span> UserIDList <a class="code" href="classKpgp_1_1Key.html#51a503fa08c9179647b1dba2c46454ca" title="Returns the list of userIDs.">Key::userIDs</a>()<span class="keyword"> const</span>
<a name="l00724"></a>00724 <span class="keyword"></span>{ 
<a name="l00725"></a>00725   <span class="keywordflow">return</span> mUserIDs;
<a name="l00726"></a>00726 }
<a name="l00727"></a>00727 
<a name="l00728"></a><a class="code" href="classKpgp_1_1Key.html#4e3131a3480067a33a6583c4c4198e7e">00728</a> <span class="keyword">inline</span> <span class="keyword">const</span> SubkeyList <a class="code" href="classKpgp_1_1Key.html#4e3131a3480067a33a6583c4c4198e7e" title="Returns the list of subkeys.">Key::subkeys</a>()<span class="keyword"> const</span>
<a name="l00729"></a>00729 <span class="keyword"></span>{ 
<a name="l00730"></a>00730   <span class="keywordflow">return</span> mSubkeys;
<a name="l00731"></a>00731 }
<a name="l00732"></a>00732 
<a name="l00733"></a><a class="code" href="classKpgp_1_1Key.html#a1fb7711e7f8b965d4860c705cf0bef9">00733</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classKpgp_1_1Key.html#a1fb7711e7f8b965d4860c705cf0bef9" title="Returns true if there are no user IDs or no subkeys.">Key::isNull</a>()<span class="keyword"> const</span>
<a name="l00734"></a>00734 <span class="keyword"></span>{
<a name="l00735"></a>00735   <span class="keywordflow">return</span> (mUserIDs.isEmpty() || mSubkeys.isEmpty());
<a name="l00736"></a>00736 }
<a name="l00737"></a>00737 
<a name="l00738"></a><a class="code" href="classKpgp_1_1Key.html#cf6542fb367d0a996f639d86e8b0d55b">00738</a> <span class="keyword">inline</span> time_t <a class="code" href="classKpgp_1_1Key.html#cf6542fb367d0a996f639d86e8b0d55b" title="Returns the creation date of the primary subkey.">Key::creationDate</a>()<span class="keyword"> const</span>
<a name="l00739"></a>00739 <span class="keyword"></span>{
<a name="l00740"></a>00740   <span class="keywordflow">if</span>( !mSubkeys.isEmpty() )
<a name="l00741"></a>00741     <span class="keywordflow">return</span> mSubkeys.getFirst()-&gt;creationDate();
<a name="l00742"></a>00742   <span class="keywordflow">else</span>
<a name="l00743"></a>00743     <span class="keywordflow">return</span> -1;
<a name="l00744"></a>00744 }
<a name="l00745"></a>00745 
<a name="l00746"></a><a class="code" href="classKpgp_1_1Key.html#48d0a19a02556f604d968822dbf75cda">00746</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classKpgp_1_1Key.html#a59b7570536dd1f449fa519b1d3626e4" title="Adds a user ID with the given values to the key if uid isn&amp;#39;t an empty string...">Key::addUserID</a>(<span class="keyword">const</span> <a class="code" href="classKpgp_1_1UserID.html" title="This class is used to store information about a user id of a PGP key.">UserID</a> *userID)
<a name="l00747"></a>00747 {
<a name="l00748"></a>00748   <span class="keywordflow">if</span> (userID)
<a name="l00749"></a>00749     mUserIDs.append(userID);
<a name="l00750"></a>00750 }
<a name="l00751"></a>00751 
<a name="l00752"></a><a class="code" href="classKpgp_1_1Key.html#2d44956faf2cb23a171c35540ee60155">00752</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classKpgp_1_1Key.html#cf1b5e7846cbe15faf57be7168ec3d1c" title="Adds a subkey with the given values to the key if keyID isn&amp;#39;t an empty string...">Key::addSubkey</a>(<span class="keyword">const</span> <a class="code" href="classKpgp_1_1Subkey.html" title="This class is used to store information about a subkey of a PGP key.">Subkey</a> *subkey)
<a name="l00753"></a>00753 {
<a name="l00754"></a>00754   <span class="keywordflow">if</span> (subkey)
<a name="l00755"></a>00755     mSubkeys.append(subkey);
<a name="l00756"></a>00756 }
<a name="l00757"></a>00757 
<a name="l00758"></a>00758 
<a name="l00759"></a>00759 
<a name="l00760"></a>00760 <span class="keyword">typedef</span> QPtrList&lt;Key&gt; KeyListBase;
<a name="l00761"></a>00761 <span class="keyword">typedef</span> QPtrListIterator&lt;Key&gt; KeyListIterator;
<a name="l00762"></a>00762 
<a name="l00763"></a>00763 <span class="keyword">class </span>KeyList : <span class="keyword">public</span> KeyListBase
<a name="l00764"></a>00764 {
<a name="l00765"></a>00765  <span class="keyword">public</span>:
<a name="l00766"></a>00766   ~KeyList()
<a name="l00767"></a>00767     { <a class="code" href="classKpgp_1_1Key.html#f35203c2964cc14d9814b139dd0e2768" title="Clears/resets all key data.">clear</a>(); }
<a name="l00768"></a>00768 
<a name="l00769"></a>00769  <span class="keyword">private</span>:
<a name="l00770"></a>00770   <span class="keywordtype">int</span> compareItems( QPtrCollection::Item s1, QPtrCollection::Item s2 )
<a name="l00771"></a>00771     { 
<a name="l00772"></a>00772       <span class="comment">// sort case insensitively by the primary User IDs</span>
<a name="l00773"></a>00773       <span class="keywordflow">return</span> QString::compare((static_cast&lt;Key*&gt;(s1))-&gt;<a class="code" href="classKpgp_1_1Key.html#56da6b26551845ece29869a968e58cf9" title="Returns the primary user ID or a null string if there are no user IDs.">primaryUserID</a>().lower(),
<a name="l00774"></a>00774                               (static_cast&lt;Key*&gt;(s2))-&gt;<a class="code" href="classKpgp_1_1Key.html#56da6b26551845ece29869a968e58cf9" title="Returns the primary user ID or a null string if there are no user IDs.">primaryUserID</a>().lower());
<a name="l00775"></a>00775     }
<a name="l00776"></a>00776 };
<a name="l00777"></a>00777 
<a name="l00778"></a>00778 } <span class="comment">// namespace Kpgp</span>
<a name="l00779"></a>00779 
<a name="l00780"></a>00780 <span class="preprocessor">#endif</span>
</pre></div></div>
    </div></div>


      </td>
  </tr>
  <tr>
    <td valign="top" id="leftmenu" width="25%">
      <a name="navigation"></a>
      <div class="menu_box"><h2>libkpgp</h2>
<div class="nav_list">
<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="files.html">File List</a></li><li><a href="functions.html">Class Members</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="classKpgp_1_1Config.html">kpgp::config</option>,  <option value="classKpgp_1_1Key.html">kpgp::key</option>,  <option value="classKpgp_1_1PassphraseDialog.html">kpgp::passphrasedialog</option>,  <option value="classKpgp_1_1Subkey.html">kpgp::subkey</option>,  <option value="classKpgp_1_1UserID.html">kpgp::userid</option>,
</select>
</form>
</div>
-->
</div></div>
<div class="menu_box"><h2>API Dox</h2>
<div class="nav_list">
<ul>
<li><a href="../../akregator/html/index.html">akregator</a></li><li>&nbsp;&nbsp;<a href="../../akregator/src/html/index.html">src</a></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<a href="../../akregator/src/librss/html/index.html">librss</a></li><li><a href="../../certmanager/html/index.html">certmanager</a></li><li>&nbsp;&nbsp;<a href="../../certmanager/lib/html/index.html">lib</a></li><li><a href="../../kaddressbook/html/index.html">kaddressbook</a></li><li><a href="../../kalarm/html/index.html">kalarm</a></li><li>&nbsp;&nbsp;<a href="../../kalarm/lib/html/index.html">lib</a></li><li><a href="../../kandy/html/index.html">kandy</a></li><li><a href="../../karm/html/index.html">karm</a></li><li><a href="../../kdgantt/html/index.html">kdgantt</a></li><li><a href="../../kgantt/html/index.html">kgantt</a></li><li><a href="../../kioslaves/html/index.html">kioslaves</a></li><li>&nbsp;&nbsp;<a href="../../kioslaves/imap4/html/index.html">imap4</a></li><li>&nbsp;&nbsp;<a href="../../kioslaves/mbox/html/index.html">mbox</a></li><li><a href="../../kitchensync/html/index.html">kitchensync</a></li><li><a href="../../kmail/html/index.html">kmail</a></li><li><a href="../../knotes/html/index.html">knotes</a></li><li><a href="../../konsolekalendar/html/index.html">konsolekalendar</a></li><li><a href="../../kontact/html/index.html">kontact</a></li><li><a href="../../korganizer/html/index.html">korganizer</a></li><li><a href="../../kpilot/html/index.html">kpilot</a></li><li>&nbsp;&nbsp;<a href="../../kpilot/kpilot/html/index.html">kpilot</a></li><li>&nbsp;&nbsp;<a href="../../kpilot/lib/html/index.html">lib</a></li><li><a href="../../libemailfunctions/html/index.html">libemailfunctions</a></li><li><a href="../../libkcal/html/index.html">libkcal</a></li><li><a href="../../libkdepim/html/index.html">libkdepim</a></li><li><a href="../../libkholidays/html/index.html">libkholidays</a></li><li><a href="../../libkmime/html/index.html">libkmime</a></li><li><a href="../../libkpgp/html/index.html">libkpgp</a></li><li><a href="../../libkpimidentities/html/index.html">libkpimidentities</a></li>
</ul></div></div>


        </td>
</tr>
</table>

<span class="doNotDisplay">
  <a href="http://www.kde.org/" accesskey="8">KDE Home</a> |
  <a href="http://accessibility.kde.org/" accesskey="9">KDE Accessibility Home</a> |
  <a href="http://www.kde.org/media/accesskeys.php" accesskey="0">Description of Access Keys</a>
</span>


<div style="height: 8px"></div>

<div id="footer">
  <div id="footer_left">
    Maintained by <a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;groo&#116;&#64;kde&#46;or&#x67;">Adriaan de Groot</a>
and
<a href="&#109;a&#105;&#108;&#116;&#111;&#58;w&#105;nter&#64;kde&#46;or&#x67">Allen Winter</a>.
<br/>
    KDE and K Desktop Environment are trademarks of <a href="http://www.kde.org/areas/kde-ev/" title="Homepage of the KDE non-profit Organization">KDE e.V.</a> |
    <a href="http://www.kde.org/contact/impressum.php">Legal</a>
  </div>
  <div id="footer_right"><img src="/media/images/footer_right.png" style="margin: 0px" alt="" /></div>
</div>

<!--
WARNING: DO NOT SEND MAIL TO THE FOLLOWING EMAIL ADDRESS! YOU WILL
BE BLOCKED INSTANTLY AND PERMANENTLY!
<a href="mailto:aaaatrap-425acc3b5374943f@kde.org">Block me</a>
WARNING END
-->

</body>
</html>