Hi Felipe,<div>Briefly fro mmy phone<br><div>you can retrieve any detail from a contact with QContact::detail using QContactDETAILNAME::DefinitionName as argument.</div><div><br></div><div>IIRC QContactManager::detailDefinitions will return a map with the Details, fields... supproted by the specific backend.</div>
<div>I&#39;ve to say that Maemo5 contacts backend needs some fixes, in case you found a bug please report them to JIRA. </div><div><br></div><div>Cheers,</div><div>Antonio</div><div><br><div class="gmail_quote">On Fri, May 28, 2010 at 5:08 PM, Felipe Crochik <span dir="ltr">&lt;<a href="mailto:felipe@crochik.com">felipe@crochik.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">









<div lang="EN-US" link="blue" vlink="blue">

<div>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy">Hi Antonio, </span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy"> </span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy">I am missing some step. Would you be so
kind to check the code bellow? I can’t figure out how to find the
QContactPresence detail… By the documentation I assumed linkedDetailUris would
give me some hint on how to get but it didn’t …</span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy"> </span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy">…</span></font></p>

<pre><font size="2" face="Courier New"><span style="font-size:10.0pt">    details = m_contact.details(QContactOnlineAccount::DefinitionName);</span></font></pre><pre><font size="2" face="Courier New"><span style="font-size:10.0pt">    foreach ( QContactOnlineAccount account, details ) {</span></font></pre>
<pre><font size="2" face="Courier New"><span style="font-size:10.0pt">        qDebug() &lt;&lt; &quot;Online Acount: &quot; &lt;&lt; account.serviceProvider() &lt;&lt; &quot;: &quot; &lt;&lt; account.accountUri();</span></font></pre>
<pre><font size="2" face="Courier New"><span style="font-size:10.0pt">        foreach ( QString str, account.contexts() ) qDebug() &lt;&lt; &quot;&gt;&gt; Context: &quot; &lt;&lt; str;</span></font></pre><pre><font size="2" face="Courier New"><span style="font-size:10.0pt">        foreach ( QString str, account.capabilities() ) qDebug() &lt;&lt; &quot;&gt;&gt; Capability: &quot; &lt;&lt; str;</span></font></pre>
<pre><font size="2" face="Courier New"><span style="font-size:10.0pt">        foreach ( QString str, account.linkedDetailUris()) qDebug() &lt;&lt; &quot;&gt;&gt; LinkedDetailUri: &quot; &lt;&lt; str;</span></font></pre><pre>
<font size="2" face="Courier New"><span style="font-size:10.0pt">        foreach ( QString str, account.subTypes()) qDebug() &lt;&lt; &quot;&gt;&gt; SubType: &quot; &lt;&lt; str;</span></font></pre><pre><font size="2" color="red" face="Courier New"><span style="font-size:10.0pt;color:red">        </span></font></pre>
<pre><font size="2" color="red" face="Courier New"><span style="font-size:10.0pt;color:red">        // how do I get the QContactPresence detail?</span></font></pre><pre><font size="2" color="red" face="Courier New"><span style="font-size:10.0pt;color:red">        // …</span></font></pre>
<pre><font size="2" color="red" face="Courier New"><span style="font-size:10.0pt;color:red">        QContactPresence presence;</span></font></pre><pre><font size="2" color="red" face="Courier New"><span style="font-size:10.0pt;color:red">        qDebug() &lt;&lt; &quot;Presence: &quot; &lt;&lt; presence.presenceState();</span></font></pre>
<pre><font size="2" face="Courier New"><span style="font-size:10.0pt">    }</span></font></pre><pre><font size="2" face="Courier New"><span style="font-size:10.0pt"> </span></font></pre>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy"> </span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy">The linkDetailUris, capabilities, contexts
and subtypes seem to always be empty for my contacts. Is there a way to check to
check for the contact manager if the field is supported? Just to make sure to
not expect for it… </span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy"> </span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy">Thanks again</span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy">Felipe</span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy"> </span></font></p>

<div>

<div class="MsoNormal" align="center" style="text-align:center"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">

<hr size="2" width="100%" align="center">

</span></font></div>

<p class="MsoNormal"><b><font size="2" face="Tahoma"><span style="font-size:10.0pt;font-family:Tahoma;font-weight:bold">From:</span></font></b><font size="2" face="Tahoma"><span style="font-size:10.0pt;font-family:Tahoma"> Antonio Aloisio
[mailto:<a href="mailto:antonio.aloisio@gmail.com" target="_blank">antonio.aloisio@gmail.com</a>] <br>
<b><span style="font-weight:bold">Sent:</span></b> Friday, May 28, 2010 9:46 AM<br>
<b><span style="font-weight:bold">To:</span></b> Felipe Crochik<br>
<b><span style="font-weight:bold">Cc:</span></b> <a href="mailto:maemo-developers@maemo.org" target="_blank">maemo-developers@maemo.org</a><br>
<b><span style="font-weight:bold">Subject:</span></b> Re: QtMobility Contacts</span></font></p>

</div><div><div></div><div class="h5">

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"> </span></font></p>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">Hi Felipe,</span></font></p>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"> </span></font></p>

</div>

<div>

<div>

<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">1. I am using the QContactDetailFilter to get a list of contacts on the
n900<br>
and it takes &quot;very&quot; long compared to the standard address book and
uses up<br>
all the cpu. I don&#39;t have too many contacts on my address book (about 300).<br>
It does not seem to matter the match criteria and/or the number of records<br>
that actually get filtered (it takes about the same time to get all records<br>
or just one). Any similar experiences? Any way to improve on it?</span></font></p>

</blockquote>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">It&#39;s slow and it takes very long time because it convert every OSSO
ABook contact to</span></font></p>

</div>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">QContact then it applies the filters.</span></font></p>

</div>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">Native filtering is not complete so it&#39;s turned off.</span></font></p>

</div>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"> </span></font></p>

</div>

<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">2. Is it possible to get the contact presence status using QtMobility?
By<br>
what I found you need to get the QContactOnlineAccountand then supposedly<br>
you would find the QContactPresence using linkedDetailUris on<br>
QContactOnlineAccount but linkedDetailUris does not return any strings. The<br>
contact manager does not seem to support the QContactGlobalPresence detail.<br>
Am I doing anything wrong? How can I find out if the user is online on skype<br>
for example?</span></font></p>

</blockquote>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"> If the contact has not been added manually from the user, the
QContactPresence::FieldPresenceState field should contains the presence status.</span></font></p>

</div>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"> The QContactGlobalPresence is not yet supported.</span></font></p>

</div>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"> </span></font></p>

</div>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">Regards,</span></font></p>

</div>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">Antonio</span></font></p>

</div>

<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">_______________________________________________<br>
maemo-developers mailing list<br>
<a href="mailto:maemo-developers@maemo.org" target="_blank">maemo-developers@maemo.org</a><br>
<a href="https://lists.maemo.org/mailman/listinfo/maemo-developers" target="_blank">https://lists.maemo.org/mailman/listinfo/maemo-developers</a></span></font></p>

</blockquote>

</div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"> </span></font></p>

</div>

</div></div></div>

</div>


</blockquote></div><br></div></div>