Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release > by-pkgid > 50facae208d4a6f280e44a513b104320 > files > 1770

qt-mobility-doc-1.2.0-13.mga5.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qversitcontactimporter.cpp -->
  <title>Qt Mobility 1.2: QVersitContactImporter Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="content"> 
    <a href="index.html" class="qtref"><span>QtMobility Reference Documentation</span></a>
  </div>
  <div class="breadcrumb toolblock">
    <ul>
      <li class="first"><a href="index.html">Home</a></li>
      <!--  Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li><a href="qtversit.html">QtVersit</a></li>
<li>QVersitContactImporter</li>
    </ul>
  </div>
</div>
<div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
<li class="level2"><a href="#extension-via-handlers">Extension via handlers</a></li>
<li class="level2"><a href="#importing-categories">Importing categories</a></li>
</ul>
</div>
<h1 class="title">QVersitContactImporter Class Reference</h1>
<!-- $$$QVersitContactImporter-brief -->
<p>The QVersitContactImporter class converts <a href="qversitdocument.html">QVersitDocuments</a> to <a href="qcontact.html">QContacts</a>. <a href="#details">More...</a></p>
<!-- @@@QVersitContactImporter -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QVersitContactImporter&gt;</span></pre><ul>
<li><a href="qversitcontactimporter-members.html">List of all members, including inherited members</a></li>
<li><a href="qversitcontactimporter-obsolete.html">Obsolete members</a></li>
</ul>
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qversitcontactimporter.html#Error-enum">Error</a></b> { NoError, InvalidDocumentError, EmptyDocumentError }</td></tr>
</table>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qversitcontactimporter.html#QVersitContactImporter">QVersitContactImporter</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qversitcontactimporter.html#QVersitContactImporter-2">QVersitContactImporter</a></b> ( const QString &amp; <i>profile</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qversitcontactimporter.html#QVersitContactImporter-3">QVersitContactImporter</a></b> ( const QStringList &amp; <i>profiles</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qversitcontactimporter.html#dtor.QVersitContactImporter">~QVersitContactImporter</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QContact&gt; </td><td class="memItemRight bottomAlign"><b><a href="qversitcontactimporter.html#contacts">contacts</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QMap&lt;int, Error&gt; </td><td class="memItemRight bottomAlign"><b><a href="qversitcontactimporter.html#errorMap">errorMap</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qversitcontactimporter.html#importDocuments">importDocuments</a></b> ( const QList&lt;QVersitDocument&gt; &amp; <i>documents</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QVersitContactImporterPropertyHandler * </td><td class="memItemRight bottomAlign"><b><a href="qversitcontactimporter.html#propertyHandler">propertyHandler</a></b> () const<tt> (deprecated)</tt></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QVersitResourceHandler * </td><td class="memItemRight bottomAlign"><b><a href="qversitcontactimporter.html#resourceHandler">resourceHandler</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qversitcontactimporter.html#setPropertyHandler">setPropertyHandler</a></b> ( QVersitContactImporterPropertyHandlerV2 * <i>handler</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qversitcontactimporter.html#setPropertyHandler-2">setPropertyHandler</a></b> ( QVersitContactImporterPropertyHandler * <i>handler</i> )<tt> (deprecated)</tt></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qversitcontactimporter.html#setResourceHandler">setResourceHandler</a></b> ( QVersitResourceHandler * <i>handler</i> )</td></tr>
</table>
<a name="details"></a>
<!-- $$$QVersitContactImporter-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QVersitContactImporter class converts <a href="qversitdocument.html">QVersitDocuments</a> to <a href="qcontact.html">QContacts</a>.</p>
<p>This class is used to convert lists of <a href="qversitdocument.html">QVersitDocuments</a> (which may be produced by a <a href="qversitreader.html">QVersitReader</a>) to lists of <a href="qcontact.html">QContacts</a> (which may be saved into a <a href="qcontactmanager.html">QContactManager</a>. Unless there is an error, there is a one-to-one mapping between Versit documents and QContacts. The importer can be extended by clients by associating resource and property handlers.</p>
<p>Here is a simple example of how to use QVersitContactImporter:</p>
<pre class="cpp"> <span class="type">QVersitContactImporter</span> importer;

 <span class="type"><a href="qversitdocument.html">QVersitDocument</a></span> document;

 <span class="type"><a href="qversitproperty.html">QVersitProperty</a></span> property;
 property<span class="operator">.</span>setName(<span class="type"><a href="http://qt.nokia.com/doc/4.7/qstring.html">QString</a></span><span class="operator">::</span>fromAscii(<span class="string">&quot;N&quot;</span>));
 property<span class="operator">.</span>setValue(<span class="string">&quot;Citizen;John;Q;;&quot;</span>);
 document<span class="operator">.</span>addProperty(property);

 property<span class="operator">.</span>setName(<span class="type"><a href="http://qt.nokia.com/doc/4.7/qstring.html">QString</a></span><span class="operator">::</span>fromAscii(<span class="string">&quot;X-UNKNOWN-PROPERTY&quot;</span>));
 property<span class="operator">.</span>setValue(<span class="string">&quot;some value&quot;</span>);
 document<span class="operator">.</span>addProperty(property);

 <span class="keyword">if</span> (importer<span class="operator">.</span>importDocuments(<span class="type"><a href="http://qt.nokia.com/doc/4.7/qlist.html">QList</a></span><span class="operator">&lt;</span><span class="type"><a href="qversitdocument.html">QVersitDocument</a></span><span class="operator">&gt;</span>() <span class="operator">&lt;</span><span class="operator">&lt;</span> document)) {
     <span class="type"><a href="http://qt.nokia.com/doc/4.7/qlist.html">QList</a></span><span class="operator">&lt;</span><span class="type"><a href="qcontact.html">QContact</a></span><span class="operator">&gt;</span> contactList <span class="operator">=</span> importer<span class="operator">.</span>contacts();
     <span class="comment">// contactList.first() now contains the &quot;N&quot; property as a QContactName</span>
     <span class="comment">// propertyHandler.mUnknownProperties contains the list of unknown properties</span>
 }</pre>
<a name="extension-via-handlers"></a>
<h3>Extension via handlers</h3>
<p>A <a href="qversitresourcehandler.html">QVersitResourceHandler</a> is associated with the importer to supply the behaviour for saving files to persistent storage. By default, this is set to a <a href="qversitdefaultresourcehandler.html">QVersitDefaultResourceHandler</a>, which does not save files to persistent storage. Note that although photos found in vCards are not saved to disk by default, the importer does add a <a href="qcontactthumbnail.html">QContactThumbnail</a> detail to the image. If a full-sized image needs to be loaded from a URL and persisted on disk, a custom <a href="qversitresourcehandler.html">QVersitResourceHandler</a> should be supplied which implements this.</p>
<p>By associating a <a href="qversitcontactimporterpropertyhandlerv2.html">QVersitContactImporterPropertyHandlerV2</a> with the importer using <a href="qversitcontactimporter.html#setPropertyHandler">setPropertyHandler</a>(), the client can pass in a handler to override the processing of properties and/or handle properties that QVersitContactImporter doesn't support. Also, handlers can be implicitly associated to an importer through the <a href="versitplugins.html">handler plugin mechanism</a>. The importer can be constructed with a profile, which gives hints about what kind of handlers should be added to it. For example, the backup profile can be used to instruct the importer to interpret properties that have been generated by a backup-profiled <a href="qversitcontactexporter.html">QVersitContactExporter</a>. To illustrate, a backup importer can be constructed with:</p>
<pre class="cpp"> <span class="type">QVersitContactImporter</span> importer(<span class="type"><a href="qversitcontacthandlerfactory.html">QVersitContactHandlerFactory</a></span><span class="operator">::</span>ProfileBackup);</pre>
<p>For more details on how the backup plugin works, see <a href="versitplugins.html">Versit Plugins</a></p>
<a name="importing-categories"></a>
<h3>Importing categories</h3>
<p>The importer imports the vCard CATEGORIES property by converting each category to a <a href="qcontacttag.html">QContactTag</a>. Some managers may not have support for <a href="qcontacttag.html">QContactTag</a>, but instead support categorization using the <a href="qcontactrelationship.html#HasMember-var">HasMember</a> <a href="qcontactrelationship.html">QContactRelationship</a> along with contacts of type <a href="qcontacttype.html#TypeGroup-var">TypeGroup</a>. For these backends, if the categorization information needs to be retained through group relationships, extra work needs to be done to do the conversion. Below is some example code that does this translation.</p>
<pre class="cpp"> <span class="comment">/*! Adds contacts in  \a newContacts into \a manager, converting categories specified
   with tags into group membership relationships.  Note that this implementation uses the
   synchronous API of QContactManager for clarity.  It is recommended that the asynchronous
   API is used in practice.

   Relationships are added so that if a contact, A, has a tag &quot;b&quot;, then a HasMember relationship is
   created between a group contact in the manager, B with display label &quot;b&quot;, and contact A.  If there
   does not exist a group contact with display label &quot;b&quot;, one is created.
   */</span>
 <span class="type">void</span> insertWithGroups(<span class="keyword">const</span> <span class="type"><a href="http://qt.nokia.com/doc/4.7/qlist.html">QList</a></span><span class="operator">&lt;</span><span class="type"><a href="qcontact.html">QContact</a></span><span class="operator">&gt;</span><span class="operator">&amp;</span> newContacts<span class="operator">,</span> <span class="type"><a href="qcontactmanager.html">QContactManager</a></span><span class="operator">*</span> manager)
 {
     <span class="comment">// Cache map from group names to QContactIds</span>
     <span class="type"><a href="http://qt.nokia.com/doc/4.7/qmap.html">QMap</a></span><span class="operator">&lt;</span><span class="type"><a href="http://qt.nokia.com/doc/4.7/qstring.html">QString</a></span><span class="operator">,</span> <span class="type"><a href="qcontactid.html">QContactId</a></span><span class="operator">&gt;</span> groupMap;

     foreach (<span class="type"><a href="qcontact.html">QContact</a></span> contact<span class="operator">,</span> newContacts) {
         <span class="keyword">if</span> (<span class="operator">!</span>manager<span class="operator">-</span><span class="operator">&gt;</span>saveContact(<span class="operator">&amp;</span>contact))
             <span class="keyword">continue</span>; <span class="comment">// In practice, better error handling may be required</span>
         foreach (<span class="keyword">const</span> <span class="type"><a href="qcontacttag.html">QContactTag</a></span><span class="operator">&amp;</span> tag<span class="operator">,</span> contact<span class="operator">.</span>details<span class="operator">&lt;</span><span class="type"><a href="qcontacttag.html">QContactTag</a></span><span class="operator">&gt;</span>()) {
             <span class="type"><a href="http://qt.nokia.com/doc/4.7/qstring.html">QString</a></span> groupName <span class="operator">=</span> tag<span class="operator">.</span>tag();
             <span class="type"><a href="qcontactid.html">QContactId</a></span> groupId;
             <span class="keyword">if</span> (groupMap<span class="operator">.</span>contains(groupName)) {
                 <span class="comment">// We've already seen a group with the right name</span>
                 groupId <span class="operator">=</span> groupMap<span class="operator">.</span>value(groupName);
             } <span class="keyword">else</span> {
                 <span class="type"><a href="qcontactdetailfilter.html">QContactDetailFilter</a></span> groupFilter;
                 groupFilter<span class="operator">.</span>setDetailDefinitionName(<span class="type"><a href="qcontacttype.html">QContactType</a></span><span class="operator">::</span>DefinitionName);
                 groupFilter<span class="operator">.</span>setValue(QLatin1String(<span class="type"><a href="qcontacttype.html">QContactType</a></span><span class="operator">::</span>TypeGroup));
                 groupFilter<span class="operator">.</span>setMatchFlags(<span class="type"><a href="qcontactfilter.html">QContactFilter</a></span><span class="operator">::</span>MatchExactly);
                 <span class="comment">// In practice, some detail other than the display label could be used</span>
                 <span class="type"><a href="qcontactdetailfilter.html">QContactDetailFilter</a></span> nameFilter <span class="operator">=</span> <span class="type"><a href="qcontactdisplaylabel.html">QContactDisplayLabel</a></span><span class="operator">::</span>match(groupName);
                 <span class="type"><a href="http://qt.nokia.com/doc/4.7/qlist.html">QList</a></span><span class="operator">&lt;</span><span class="type"><a href="qcontactid.html#QContactLocalId-typedef">QContactLocalId</a></span><span class="operator">&gt;</span> matchingGroups <span class="operator">=</span> manager<span class="operator">-</span><span class="operator">&gt;</span>contactIds(groupFilter <span class="operator">&amp;</span> nameFilter);
                 <span class="keyword">if</span> (<span class="operator">!</span>matchingGroups<span class="operator">.</span>isEmpty()) {
                     <span class="comment">// Found an existing group in the manager</span>
                     <span class="type"><a href="qcontactid.html">QContactId</a></span> groupId;
                     groupId<span class="operator">.</span>setManagerUri(manager<span class="operator">-</span><span class="operator">&gt;</span>managerUri());
                     groupId<span class="operator">.</span>setLocalId(matchingGroups<span class="operator">.</span>first());
                     groupMap<span class="operator">.</span>insert(groupName<span class="operator">,</span> groupId);
                 }
                 <span class="keyword">else</span> {
                     <span class="comment">// Make a new group</span>
                     <span class="type"><a href="qcontact.html">QContact</a></span> groupContact;
                     <span class="type"><a href="qcontactname.html">QContactName</a></span> name;
                     name<span class="operator">.</span>setCustomLabel(groupName);
                     <span class="comment">// Beware that not all managers support custom label</span>
                     groupContact<span class="operator">.</span>saveDetail(<span class="operator">&amp;</span>name);
                     <span class="keyword">if</span> (<span class="operator">!</span>manager<span class="operator">-</span><span class="operator">&gt;</span>saveContact(<span class="operator">&amp;</span>groupContact))
                         <span class="keyword">continue</span>; <span class="comment">// In practice, better error handling may be required</span>
                     groupId <span class="operator">=</span> groupContact<span class="operator">.</span>id();
                     groupMap<span class="operator">.</span>insert(groupName<span class="operator">,</span> groupId);
                 }
             }
             <span class="comment">// Add the relationship</span>
             <span class="type"><a href="qcontactrelationship.html">QContactRelationship</a></span> rel;
             rel<span class="operator">.</span>setFirst(groupId);
             rel<span class="operator">.</span>setRelationshipType(<span class="type"><a href="qcontactrelationship.html">QContactRelationship</a></span><span class="operator">::</span>HasMember);
             rel<span class="operator">.</span>setSecond(contact<span class="operator">.</span>id());
             manager<span class="operator">-</span><span class="operator">&gt;</span>saveRelationship(<span class="operator">&amp;</span>rel);
         }
     }
 }</pre>
</div>
<p><b>See also </b><a href="qversitdocument.html">QVersitDocument</a>, <a href="qversitproperty.html">QVersitProperty</a>, <a href="qversitresourcehandler.html">QVersitResourceHandler</a>, and <a href="qversitcontactimporterpropertyhandlerv2.html">QVersitContactImporterPropertyHandlerV2</a>.</p>
<!-- @@@QVersitContactImporter -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$Error$$$NoError$$$InvalidDocumentError$$$EmptyDocumentError -->
<h3 class="fn"><a name="Error-enum"></a>enum QVersitContactImporter::<span class="name">Error</span></h3>
<p>This enum specifies an error that occurred during the most recent call to <a href="qversitcontactimporter.html#importDocuments">importDocuments</a>()</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QVersitContactImporter::NoError</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">The most recent operation was successful</td></tr>
<tr><td class="topAlign"><tt>QVersitContactImporter::InvalidDocumentError</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">One of the documents is not a vCard</td></tr>
<tr><td class="topAlign"><tt>QVersitContactImporter::EmptyDocumentError</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">One of the documents is empty</td></tr>
</table>
<!-- @@@Error -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QVersitContactImporter[overload1]$$$QVersitContactImporter -->
<h3 class="fn"><a name="QVersitContactImporter"></a>QVersitContactImporter::<span class="name">QVersitContactImporter</span> ()</h3>
<p>Constructs a new importer</p>
<!-- @@@QVersitContactImporter -->
<!-- $$$QVersitContactImporter$$$QVersitContactImporterconstQString& -->
<h3 class="fn"><a name="QVersitContactImporter-2"></a>QVersitContactImporter::<span class="name">QVersitContactImporter</span> ( const <span class="type"><a href="http://qt.nokia.com/doc/4.7/qstring.html">QString</a></span> &amp; <i>profile</i> )</h3>
<p>Constructs a new importer for the given <i>profile</i>. The profile strings should be one of those defined by <a href="qversitcontacthandlerfactory.html">QVersitContactHandlerFactory</a>, or a value otherwise agreed to by a <a href="versitplugins.html">Versit plugin</a>.</p>
<p>The profile determines which plugins will be loaded to supplement the importer.</p>
<!-- @@@QVersitContactImporter -->
<!-- $$$QVersitContactImporter$$$QVersitContactImporterconstQStringList& -->
<h3 class="fn"><a name="QVersitContactImporter-3"></a>QVersitContactImporter::<span class="name">QVersitContactImporter</span> ( const <span class="type"><a href="http://qt.nokia.com/doc/4.7/qstringlist.html">QStringList</a></span> &amp; <i>profiles</i> )</h3>
<p>Constructs a new importer for the given <i>profiles</i>. The profile strings should be one of those defined by <a href="qversitcontacthandlerfactory.html">QVersitContactHandlerFactory</a>, or a value otherwise agreed to by a <a href="versitplugins.html">Versit plugin</a>.</p>
<p>The profiles determine which plugins will be loaded to supplement the importer.</p>
<!-- @@@QVersitContactImporter -->
<!-- $$$~QVersitContactImporter[overload1]$$$~QVersitContactImporter -->
<h3 class="fn"><a name="dtor.QVersitContactImporter"></a>QVersitContactImporter::<span class="name">~QVersitContactImporter</span> ()</h3>
<p>Frees the memory used by the importer</p>
<!-- @@@~QVersitContactImporter -->
<!-- $$$contacts[overload1]$$$contacts -->
<h3 class="fn"><a name="contacts"></a><span class="type"><a href="http://qt.nokia.com/doc/4.7/qlist.html">QList</a></span>&lt;<span class="type"><a href="qcontact.html">QContact</a></span>&gt; QVersitContactImporter::<span class="name">contacts</span> () const</h3>
<p>Returns the contacts imported in the most recent call to <a href="qversitcontactimporter.html#importDocuments">importDocuments</a>().</p>
<p><b>See also </b><a href="qversitcontactimporter.html#importDocuments">importDocuments</a>().</p>
<!-- @@@contacts -->
<!-- $$$errorMap[overload1]$$$errorMap -->
<h3 class="fn"><a name="errorMap"></a><span class="type"><a href="http://qt.nokia.com/doc/4.7/qmap.html">QMap</a></span>&lt;<span class="type">int</span>, <span class="type"><a href="qversitcontactimporter.html#Error-enum">Error</a></span>&gt; QVersitContactImporter::<span class="name">errorMap</span> () const</h3>
<p>Returns the map of errors encountered in the most recent call to <a href="qversitcontactimporter.html#importDocuments">importDocuments</a>(). The key is the index into the input list of documents and the value is the error that occurred on that document.</p>
<p><b>See also </b><a href="qversitcontactimporter.html#importDocuments">importDocuments</a>().</p>
<!-- @@@errorMap -->
<!-- $$$importDocuments[overload1]$$$importDocumentsconstQList<QVersitDocument>& -->
<h3 class="fn"><a name="importDocuments"></a><span class="type">bool</span> QVersitContactImporter::<span class="name">importDocuments</span> ( const <span class="type"><a href="http://qt.nokia.com/doc/4.7/qlist.html">QList</a></span>&lt;<span class="type"><a href="qversitdocument.html">QVersitDocument</a></span>&gt; &amp; <i>documents</i> )</h3>
<p>Converts <i>documents</i> into a corresponding list of QContacts. After calling this, the converted contacts can be retrieved by calling <a href="qversitcontactimporter.html#contacts">contacts</a>(). Returns true on success. If any of the documents cannot be imported as contacts (eg. they aren't vCards), false is returned and <a href="qversitcontactimporter.html#errorMap">errorMap</a>() will return a list describing the errors that occurred. The successfully imported documents will still be available via <a href="qversitcontactimporter.html#contacts">contacts</a>().</p>
<p><b>See also </b><a href="qversitcontactimporter.html#contacts">contacts</a>() and <a href="qversitcontactimporter.html#errorMap">errorMap</a>().</p>
<!-- @@@importDocuments -->
<!-- $$$propertyHandler[overload1]$$$propertyHandler -->
<h3 class="fn"><a name="propertyHandler"></a><span class="type"><a href="qversitcontactimporterpropertyhandler.html">QVersitContactImporterPropertyHandler</a></span> * QVersitContactImporter::<span class="name">propertyHandler</span> () const</h3>
<p>This function is deprecated.</p>
<p>Gets the handler for processing QVersitProperties.</p>
<p><b>See also </b><a href="qversitcontactimporter.html#setPropertyHandler">setPropertyHandler</a>().</p>
<!-- @@@propertyHandler -->
<!-- $$$resourceHandler[overload1]$$$resourceHandler -->
<h3 class="fn"><a name="resourceHandler"></a><span class="type"><a href="qversitresourcehandler.html">QVersitResourceHandler</a></span> * QVersitContactImporter::<span class="name">resourceHandler</span> () const</h3>
<p>Returns the associated resource handler.</p>
<p><b>See also </b><a href="qversitcontactimporter.html#setResourceHandler">setResourceHandler</a>().</p>
<!-- @@@resourceHandler -->
<!-- $$$setPropertyHandler[overload1]$$$setPropertyHandlerQVersitContactImporterPropertyHandlerV2* -->
<h3 class="fn"><a name="setPropertyHandler"></a><span class="type">void</span> QVersitContactImporter::<span class="name">setPropertyHandler</span> ( <span class="type"><a href="qversitcontactimporterpropertyhandlerv2.html">QVersitContactImporterPropertyHandlerV2</a></span> * <i>handler</i> )</h3>
<p>Sets <i>handler</i> to be the handler for processing QVersitProperties, or 0 to have no handler.</p>
<p>Does not take ownership of the handler. The client should ensure the handler remains valid for the lifetime of the exporter. This function is used for version 2 and higher handlers.</p>
<p>Only one property handler can be set. If another property handler (of any version) was previously set, it will no longer be associated with the importer.</p>
<p><b>See also </b><a href="qversitcontactimporter.html#propertyHandler">propertyHandler</a>().</p>
<!-- @@@setPropertyHandler -->
<!-- $$$setPropertyHandler$$$setPropertyHandlerQVersitContactImporterPropertyHandler* -->
<h3 class="fn"><a name="setPropertyHandler-2"></a><span class="type">void</span> QVersitContactImporter::<span class="name">setPropertyHandler</span> ( <span class="type"><a href="qversitcontactimporterpropertyhandler.html">QVersitContactImporterPropertyHandler</a></span> * <i>handler</i> )</h3>
<p>This function is deprecated.</p>
<p>Sets <i>handler</i> to be the handler for processing QVersitProperties, or 0 to have no handler.</p>
<p>Does not take ownership of the handler. The client should ensure the handler remains valid for the lifetime of the exporter. This function is used for version 1 handlers.</p>
<p>Only one property handler can be set. If another property handler (of any version) was previously set, it will no longer be associated with the importer.</p>
<!-- @@@setPropertyHandler -->
<!-- $$$setResourceHandler[overload1]$$$setResourceHandlerQVersitResourceHandler* -->
<h3 class="fn"><a name="setResourceHandler"></a><span class="type">void</span> QVersitContactImporter::<span class="name">setResourceHandler</span> ( <span class="type"><a href="qversitresourcehandler.html">QVersitResourceHandler</a></span> * <i>handler</i> )</h3>
<p>Sets <i>handler</i> to be the handler to save files with, or 0 to have no handler.</p>
<p>Does not take ownership of the handler. The client should ensure the handler remains valid for the lifetime of the exporter.</p>
<p><b>See also </b><a href="qversitcontactimporter.html#resourceHandler">resourceHandler</a>().</p>
<!-- @@@setResourceHandler -->
</div>
  <div class="ft">
    <span></span>
  </div>
</div> 
<div class="footer">
  <p>
     <acronym title="Copyright">&copy;</acronym> 2008-2011 Nokia Corporation and/or its
     subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation 
     in Finland and/or other countries worldwide.</p>
  <p>
     All other trademarks are property of their respective owners. <a title="Privacy Policy"
     href="http://qt.nokia.com/about/privacy-policy">Privacy Policy</a></p>
  <br />
  <p>
    Licensees holding valid Qt Commercial licenses may use this document in accordance with the    Qt Commercial License Agreement provided with the Software or, alternatively, in accordance    with the terms contained in a written agreement between you and Nokia.</p>
  <p>
    Alternatively, this document may be used under the terms of the <a href="http://www.gnu.org/licenses/fdl.html">GNU
    Free Documentation License version 1.3</a>
    as published by the Free Software Foundation.</p>
</div>
</body>
</html>