Hi<div><br></div><div>I want to create a contact list channel using the connection object. I always get an error message: Not Implemented. </div><div><br></div><div>I guess I must be passing the parameters incorrectly to createChannel. Can someone point out where I'm making mistakes?</div>
<div><br></div><div>Here is my code:</div><div><br></div><div>telepathytest.h</div><div><br></div><div><meta name="qrichtext" content="1"><style type="text/css">
p, li { white-space: pre-wrap; }
</style>
<table style="-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;">
<tbody><tr>
<td style="border: none;">
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;">#ifndef</span><span style=" color:#c0c0c0;"> </span>TELEPATHYTEST_H</pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;">#define</span><span style=" color:#c0c0c0;"> </span>TELEPATHYTEST_H</pre>
<pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;">#include</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;"><QObject></span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;">#include</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;"><TelepathyQt4/AccountManager></span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;">#include</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;"><TelepathyQt4/PendingOperation></span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;">#include</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;"><TelepathyQt4/PendingReady></span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;">#include</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;"><TelepathyQt4/PendingChannel></span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#008000;"><meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: arial; white-space: normal; "><pre style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">
<span style="color: rgb(0, 0, 128); ">#include</span><span style="color: rgb(192, 192, 192); "> </span><span style="color: rgb(0, 128, 0); "><TelepathyQt4/PendingChannelRequest></span></pre></span></span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;">#include</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;"><TelepathyQt4/Account></span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;">#include</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;"><TelepathyQt4/AccountSet></span></pre>
<pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#808000;">class</span><span style=" color:#c0c0c0;"> </span>TelepathyTest<span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">:</span><span style=" color:#c0c0c0;"> </span><span style=" color:#808000;">public</span><span style=" color:#c0c0c0;"> </span><span style=" color:#800080;">QObject</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000000;">{</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span><span style=" color:#800080;">Q_OBJECT</span></pre>
<pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#808000;">public</span><span style=" color:#000000;">:</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span>TelepathyTest<span style=" color:#000000;">(</span><span style=" color:#800080;">QObject</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">*</span>parent<span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000080;">0</span><span style=" color:#000000;">);</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">~</span>TelepathyTest<span style=" color:#000000;">()</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">{</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">}</span></pre>
<pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#808000;">private</span><span style=" color:#c0c0c0;"> </span><span style=" color:#800080;">Q_SLOTS</span><span style=" color:#000000;">:</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span><span style=" color:#808000;">void</span><span style=" color:#c0c0c0;"> </span>onAccountManagerReady<span style=" color:#000000;">(</span>Tp<span style=" color:#000000;">::</span>PendingOperation<span style=" color:#000000;">*);</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span><span style=" color:#808000;">void</span><span style=" color:#c0c0c0;"> </span>bringOnline<span style=" color:#000000;">();</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span><span style=" color:#808000;">void</span><span style=" color:#c0c0c0;"> </span>checkCurrentPresence<span style=" color:#000000;">(</span>Tp<span style=" color:#000000;">::</span>PendingOperation<span style=" color:#000000;">*);</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span><span style=" color:#808000;">void</span><span style=" color:#c0c0c0;"> </span>setupConnection<span style=" color:#000000;">();</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span><span style=" color:#808000;">void</span><span style=" color:#c0c0c0;"> </span>setupConnection<span style=" color:#000000;">(</span><span style=" color:#808000;">const</span><span style=" color:#c0c0c0;"> </span>Tp<span style=" color:#000000;">::</span>SimplePresence<span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">&</span>value<span style=" color:#000000;">);</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span><span style=" color:#808000;">void</span><span style=" color:#c0c0c0;"> </span>onConnectionReady<span style=" color:#000000;">(</span>Tp<span style=" color:#000000;">::</span>PendingOperation<span style=" color:#000000;">*);</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span><span style=" color:#808000;">void</span><span style=" color:#c0c0c0;"> </span>getChannel<span style=" color:#000000;">();</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span><span style=" color:#808000;">void</span><span style=" color:#c0c0c0;"> </span>gotChannel<span style=" color:#000000;">(</span>Tp<span style=" color:#000000;">::</span>PendingOperation<span style=" color:#000000;">*);</span></pre>
<pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#808000;">private</span><span style=" color:#000000;">:</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span>Tp<span style=" color:#000000;">::</span>AccountManagerPtr<span style=" color:#c0c0c0;"> </span>am<span style=" color:#000000;">;</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span>Tp<span style=" color:#000000;">::</span>AccountPtr<span style=" color:#c0c0c0;"> </span>account<span style=" color:#000000;">;</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span>Tp<span style=" color:#000000;">::</span>ConnectionPtr<span style=" color:#c0c0c0;"> </span>conn<span style=" color:#000000;">;</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000000;">};</span></pre>
<pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;">#endif</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">//</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">TELEPATHYTEST_H</span></pre>
<pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></pre></td></tr></tbody></table></div><div><br></div><div>telepathytest.cpp</div>
<div></div><div><font class="Apple-style-span" color="#000080" face="monospace"><span class="Apple-style-span" style="white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: medium; "><br>
</span></font></div><div>
<table style="margin-top:4px;margin-bottom:4px;margin-left:4px;margin-right:4px">
<tbody><tr>
<td style="border:none">
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#000080">#include</span><span style="color:#c0c0c0"> </span><span style="color:#008000">"telepathytest.h"</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><font class="Apple-style-span" color="#000080"><br></font></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">TelepathyTest<span style="color:#000000">::</span>TelepathyTest<span style="color:#c0c0c0"> </span><span style="color:#000000">(</span><span style="color:#800080">QObject</span><span style="color:#c0c0c0"> </span><span style="color:#000000">*</span>parent<span style="color:#000000">)</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#000000">:</span><span style="color:#c0c0c0"> </span><span style="color:#800080">QObject</span><span style="color:#000000">(</span>parent<span style="color:#000000">),</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span>am<span style="color:#000000">(</span>Tp<span style="color:#000000">::</span>AccountManager<span style="color:#000000">::</span>create<span style="color:#000000">())</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#000000">{</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span>connect<span style="color:#000000">(</span>am<span style="color:#000000">-></span>becomeReady<span style="color:#000000">(),</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#808000">SIGNAL</span><span style="color:#000000">(</span>finished<span style="color:#000000">(</span>Tp<span style="color:#000000">::</span>PendingOperation<span style="color:#000000">*)),</span><span style="color:#c0c0c0"> </span><span style="color:#808000">this</span><span style="color:#000000">,</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#808000">SLOT</span><span style="color:#000000">(</span>onAccountManagerReady<span style="color:#000000">(</span>Tp<span style="color:#000000">::</span>PendingOperation<span style="color:#000000">*)));</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#000000">}</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#808000">void</span><span style="color:#c0c0c0"> </span>TelepathyTest<span style="color:#000000">::</span>onAccountManagerReady<span style="color:#c0c0c0"> </span><span style="color:#000000">(</span>Tp<span style="color:#000000">::</span>PendingOperation<span style="color:#c0c0c0"> </span><span style="color:#000000">*</span>op<span style="color:#000000">)</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#000000">{</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#808000">if</span><span style="color:#c0c0c0"> </span><span style="color:#000000">(</span>op<span style="color:#000000">-></span>isError<span style="color:#000000">())</span><span style="color:#c0c0c0"> </span><span style="color:#000000">{</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span>qWarning<span style="color:#000000">()</span><span style="color:#c0c0c0"> </span><span style="color:#000000"><<</span><span style="color:#c0c0c0"> </span><span style="color:#008000">"Account</span><span style="color:#c0c0c0"> </span><span style="color:#008000">manager</span><span style="color:#c0c0c0"> </span><span style="color:#008000">cannot</span><span style="color:#c0c0c0"> </span><span style="color:#008000">become</span><span style="color:#c0c0c0"> </span><span style="color:#008000">ready:"</span><span style="color:#c0c0c0"> </span><span style="color:#000000"><<</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span>op<span style="color:#000000">-></span>errorName<span style="color:#000000">()</span><span style="color:#c0c0c0"> </span><span style="color:#000000"><<</span><span style="color:#c0c0c0"> </span><span style="color:#008000">"-"</span><span style="color:#c0c0c0"> </span><span style="color:#000000"><<</span><span style="color:#c0c0c0"> </span>op<span style="color:#000000">-></span>errorMessage<span style="color:#000000">();</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#808000">return</span><span style="color:#000000">;</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#000000">}</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#008000">//</span><span style="color:#c0c0c0"> </span><span style="color:#008000">AccountManager</span><span style="color:#c0c0c0"> </span><span style="color:#008000">is</span><span style="color:#c0c0c0"> </span><span style="color:#008000">now</span><span style="color:#c0c0c0"> </span><span style="color:#008000">ready</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span>qDebug<span style="color:#000000">()</span><span style="color:#c0c0c0"> </span><span style="color:#000000"><<</span><span style="color:#c0c0c0"> </span><span style="color:#008000">"Valid</span><span style="color:#c0c0c0"> </span><span style="color:#008000">accounts:"</span><span style="color:#000000">;</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#808000">foreach</span><span style="color:#c0c0c0"> </span><span style="color:#000000">(</span><span style="color:#808000">const</span><span style="color:#c0c0c0"> </span><span style="color:#800080">QString</span><span style="color:#c0c0c0"> </span><span style="color:#000000">&</span>path<span style="color:#000000">,</span><span style="color:#c0c0c0"> </span>am<span style="color:#000000">-></span>validAccountPaths<span style="color:#000000">())</span><span style="color:#c0c0c0"> </span><span style="color:#000000">{</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span>qDebug<span style="color:#000000">()</span><span style="color:#c0c0c0"> </span><span style="color:#000000"><<</span><span style="color:#c0c0c0"> </span><span style="color:#008000">"</span><span style="color:#c0c0c0"> </span><span style="color:#008000">path:"</span><span style="color:#c0c0c0"> </span><span style="color:#000000"><<</span><span style="color:#c0c0c0"> </span>path<span style="color:#000000">;</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#000000">}</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span>qDebug<span style="color:#000000">()</span><span style="color:#c0c0c0"> </span><span style="color:#000000"><<</span><span style="color:#c0c0c0"> </span><span style="color:#008000">"Getting</span><span style="color:#c0c0c0"> </span><span style="color:#008000">Skype</span><span style="color:#c0c0c0"> </span><span style="color:#008000">Accounts"</span><span style="color:#000000">;</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#800080">QVariantMap</span><span style="color:#c0c0c0"> </span>filter<span style="color:#000000">;</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span>filter<span style="color:#000000">.</span>insert<span style="color:#000000">(</span><span style="color:#800080">QLatin1String</span><span style="color:#000000">(</span><span style="color:#008000">"protocolName"</span><span style="color:#000000">),</span><span style="color:#c0c0c0"> </span><span style="color:#800080">QLatin1String</span><span style="color:#000000">(</span><span style="color:#008000">"skype"</span><span style="color:#000000">));</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span>Tp<span style="color:#000000">::</span>AccountSetPtr<span style="color:#c0c0c0"> </span>filteredAccountSet<span style="color:#000000">=</span>am<span style="color:#000000">-></span>filterAccounts<span style="color:#000000">(</span>filter<span style="color:#000000">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#800080">QList</span><span style="color:#c0c0c0"> </span><span style="color:#000000"><</span>Tp<span style="color:#000000">::</span>AccountPtr<span style="color:#000000">></span><span style="color:#c0c0c0"> </span>accounts<span style="color:#c0c0c0"> </span><span style="color:#000000">=</span><span style="color:#c0c0c0"> </span>filteredAccountSet<span style="color:#000000">-></span>accounts<span style="color:#000000">();</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#808000">if</span><span style="color:#c0c0c0"> </span><span style="color:#000000">(</span>accounts<span style="color:#000000">.</span>count<span style="color:#000000">()></span><span style="color:#000080">0</span><span style="color:#000000">)</span><span style="color:#c0c0c0"> </span><span style="color:#000000">{</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#808000">foreach</span><span style="color:#c0c0c0"> </span><span style="color:#000000">(</span>Tp<span style="color:#000000">::</span>AccountPtr<span style="color:#c0c0c0"> </span>t<span style="color:#000000">,</span><span style="color:#c0c0c0"> </span>accounts<span style="color:#000000">)</span><span style="color:#c0c0c0"> </span><span style="color:#000000">{</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span>qDebug<span style="color:#000000">()</span><span style="color:#c0c0c0"> </span><span style="color:#000000"><<</span><span style="color:#c0c0c0"> </span>t<span style="color:#000000">-></span>nickname<span style="color:#000000">();</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span>qDebug<span style="color:#000000">()</span><span style="color:#c0c0c0"> </span><span style="color:#000000"><<</span><span style="color:#c0c0c0"> </span>t<span style="color:#000000">-></span>protocolName<span style="color:#000000">();</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span>account<span style="color:#000000">=</span>t<span style="color:#000000">;</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#808000">break</span><span style="color:#000000">;</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#000000">}</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#808000">if</span><span style="color:#000000">(</span>account<span style="color:#000000">-></span>isEnabled<span style="color:#000000">())</span><span style="color:#c0c0c0"> </span><span style="color:#000000">{</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span>qDebug<span style="color:#000000">()<<</span><span style="color:#008000">"Account</span><span style="color:#c0c0c0"> </span><span style="color:#008000">is</span><span style="color:#c0c0c0"> </span><span style="color:#008000">Enabled"</span><span style="color:#000000">;</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#000000">}</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#808000">if</span><span style="color:#000000">(</span>account<span style="color:#000000">-></span>isOnline<span style="color:#000000">())</span><span style="color:#c0c0c0"> </span><span style="color:#000000">{</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span>qDebug<span style="color:#000000">()<<</span><span style="color:#008000">"Account</span><span style="color:#c0c0c0"> </span><span style="color:#008000">is</span><span style="color:#c0c0c0"> </span><span style="color:#008000">Online"</span><span style="color:#000000">;</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#008000">/*</span><span style="color:#c0c0c0"> </span><span style="color:#008000">Tried</span><span style="color:#c0c0c0"> </span><span style="color:#008000">this</span><span style="color:#c0c0c0"> </span><span style="color:#008000">also</span><span style="color:#c0c0c0"> </span><span style="color:#008000">getting</span><span style="color:#c0c0c0"> </span><span style="color:#008000">same</span><span style="color:#c0c0c0"> </span><span style="color:#008000">error</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#008000">QVariantMap</span><span style="color:#c0c0c0"> </span><span style="color:#008000">map;</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#008000">map.insert("org.freedesktop.Telepathy.Channel.ChannelType",QVariant("org.freedeskop.Telepathy.Channel.Type.ContactList"));</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#008000">map.insert("org.freedesktop.Telepathy.Channel.TargetHandleType",</span><span style="color:#c0c0c0"> </span><span style="color:#008000">QVariant(uint(3)));</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#008000">map.insert("org.freedesktop.Telepathy.Channel.TargetID",QVariant("subscribe"));</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#008000">Tp::PendingChannelRequest*</span><span style="color:#c0c0c0"> </span><span style="color:#008000">pch=</span><span style="color:#c0c0c0"> </span><span style="color:#008000">account->ensureChannel(map);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#008000">connect(pch,</span><span style="color:#c0c0c0"> </span><span style="color:#008000">SIGNAL(finished(Tp::PendingOperation*)),</span><span style="color:#c0c0c0"> </span><span style="color:#008000">SLOT(gotChannel(Tp::PendingOperation*)));*/</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span>setupConnection<span style="color:#000000">();</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#000000">}</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#808000">else</span><span style="color:#c0c0c0"> </span><span style="color:#000000">{</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span>qDebug<span style="color:#000000">()<<</span><span style="color:#008000">"Account</span><span style="color:#c0c0c0"> </span><span style="color:#008000">offline.</span><span style="color:#c0c0c0"> </span><span style="color:#008000">Bringing</span><span style="color:#c0c0c0"> </span><span style="color:#008000">it</span><span style="color:#c0c0c0"> </span><span style="color:#008000">online"</span><span style="color:#000000">;</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span>bringOnline<span style="color:#000000">();</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#000000">}</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#000000">}</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#000000">}</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#808000">void</span><span style="color:#c0c0c0"> </span>TelepathyTest<span style="color:#000000">::</span>bringOnline<span style="color:#000000">()</span><span style="color:#c0c0c0"> </span><span style="color:#000000">{</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span>Tp<span style="color:#000000">::</span>SimplePresence<span style="color:#c0c0c0"> </span>value<span style="color:#000000">;</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span>value<span style="color:#000000">.</span>status<span style="color:#000000">=</span><span style="color:#008000">"available"</span><span style="color:#000000">;</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span>value<span style="color:#000000">.</span>type<span style="color:#000000">=</span><span style="color:#000080">2</span><span style="color:#000000">;</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span>value<span style="color:#000000">.</span>statusMessage<span style="color:#000000">=</span><span style="color:#008000">"available"</span><span style="color:#000000">;</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span>connect<span style="color:#000000">(</span>account<span style="color:#000000">-></span>setRequestedPresence<span style="color:#000000">(</span>value<span style="color:#000000">),</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#808000">SIGNAL</span><span style="color:#000000">(</span>finished<span style="color:#000000">(</span>Tp<span style="color:#000000">::</span>PendingOperation<span style="color:#000000">*)),</span><span style="color:#808000">this</span><span style="color:#000000">,</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#808000">SLOT</span><span style="color:#000000">(</span>checkCurrentPresence<span style="color:#000000">(</span>Tp<span style="color:#000000">::</span>PendingOperation<span style="color:#000000">*)));</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#000000">}</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#808000">void</span><span style="color:#c0c0c0"> </span>TelepathyTest<span style="color:#000000">::</span>checkCurrentPresence<span style="color:#000000">(</span>Tp<span style="color:#000000">::</span>PendingOperation<span style="color:#c0c0c0"> </span><span style="color:#000000">*</span>op<span style="color:#000000">)</span><span style="color:#c0c0c0"> </span><span style="color:#000000">{</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#808000">if</span><span style="color:#000000">(</span>op<span style="color:#000000">-></span>isError<span style="color:#000000">())</span><span style="color:#c0c0c0"> </span><span style="color:#000000">{</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span>qDebug<span style="color:#000000">()<<</span><span style="color:#008000">"Error</span><span style="color:#c0c0c0"> </span><span style="color:#008000">Occurred.</span><span style="color:#c0c0c0"> </span><span style="color:#008000">Couldn't</span><span style="color:#c0c0c0"> </span><span style="color:#008000">set</span><span style="color:#c0c0c0"> </span><span style="color:#008000">requested</span><span style="color:#c0c0c0"> </span><span style="color:#008000">presence"</span><span style="color:#000000">;</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span>qDebug<span style="color:#000000">()</span><span style="color:#c0c0c0"> </span><span style="color:#000000"><<</span><span style="color:#c0c0c0"> </span>op<span style="color:#000000">-></span>errorName<span style="color:#000000">();</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span>qDebug<span style="color:#000000">()</span><span style="color:#c0c0c0"> </span><span style="color:#000000"><<</span><span style="color:#c0c0c0"> </span>op<span style="color:#000000">-></span>errorMessage<span style="color:#000000">();</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#808000">return</span><span style="color:#000000">;</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#000000">}</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span>qDebug<span style="color:#000000">()</span><span style="color:#c0c0c0"> </span><span style="color:#000000"><<</span><span style="color:#c0c0c0"> </span><span style="color:#008000">"Checking</span><span style="color:#c0c0c0"> </span><span style="color:#008000">for</span><span style="color:#c0c0c0"> </span><span style="color:#008000">current</span><span style="color:#c0c0c0"> </span><span style="color:#008000">presence</span><span style="color:#c0c0c0"> </span><span style="color:#008000">changed"</span><span style="color:#000000">;</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span>connect<span style="color:#000000">(</span>account<span style="color:#000000">.</span>data<span style="color:#000000">(),</span><span style="color:#808000">SIGNAL</span><span style="color:#000000">(</span>currentPresenceChanged<span style="color:#000000">(</span><span style="color:#808000">const</span><span style="color:#c0c0c0"> </span>Tp<span style="color:#000000">::</span>SimplePresence<span style="color:#000000">&)),</span><span style="color:#808000">this</span><span style="color:#000000">,</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#808000">SLOT</span><span style="color:#000000">(</span>setupConnection<span style="color:#000000">(</span><span style="color:#808000">const</span><span style="color:#c0c0c0"> </span>Tp<span style="color:#000000">::</span>SimplePresence<span style="color:#000000">&)));</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#000000">}</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#808000">void</span><span style="color:#c0c0c0"> </span>TelepathyTest<span style="color:#000000">::</span>setupConnection<span style="color:#000000">(</span><span style="color:#808000">const</span><span style="color:#c0c0c0"> </span>Tp<span style="color:#000000">::</span>SimplePresence<span style="color:#c0c0c0"> </span><span style="color:#000000">&</span>value<span style="color:#000000">)</span><span style="color:#c0c0c0"> </span><span style="color:#000000">{</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#808000">if</span><span style="color:#000000">(</span>value<span style="color:#000000">.</span>type<span style="color:#000000">==</span><span style="color:#000080">2</span><span style="color:#000000">)</span><span style="color:#c0c0c0"> </span><span style="color:#000000">{</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span>qDebug<span style="color:#000000">()<<</span><span style="color:#008000">"Account</span><span style="color:#c0c0c0"> </span><span style="color:#008000">is</span><span style="color:#c0c0c0"> </span><span style="color:#008000">now</span><span style="color:#c0c0c0"> </span><span style="color:#008000">Online"</span><span style="color:#000000">;</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span>setupConnection<span style="color:#000000">();</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#000000">}</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#000000">}</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#808000">void</span><span style="color:#c0c0c0"> </span>TelepathyTest<span style="color:#000000">::</span>setupConnection<span style="color:#000000">()</span><span style="color:#c0c0c0"> </span><span style="color:#000000">{</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#808000">if</span><span style="color:#000000">(</span>account<span style="color:#000000">-></span>haveConnection<span style="color:#000000">())</span><span style="color:#c0c0c0"> </span><span style="color:#000000">{</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span>qDebug<span style="color:#000000">()<<</span><span style="color:#008000">"Account</span><span style="color:#c0c0c0"> </span><span style="color:#008000">has</span><span style="color:#c0c0c0"> </span><span style="color:#008000">connection"</span><span style="color:#000000">;</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span>conn<span style="color:#000000">=</span>account<span style="color:#000000">-></span>connection<span style="color:#000000">();</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span>connect<span style="color:#000000">(</span>conn<span style="color:#000000">-></span>becomeReady<span style="color:#000000">(),</span><span style="color:#808000">SIGNAL</span><span style="color:#000000">(</span>finished<span style="color:#000000">(</span>Tp<span style="color:#000000">::</span>PendingOperation<span style="color:#000000">*)),</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#808000">SLOT</span><span style="color:#000000">(</span>onConnectionReady<span style="color:#000000">(</span>Tp<span style="color:#000000">::</span>PendingOperation<span style="color:#000000">*)));</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#000000">}</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#000000">}</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#808000">void</span><span style="color:#c0c0c0"> </span>TelepathyTest<span style="color:#000000">::</span>onConnectionReady<span style="color:#000000">(</span>Tp<span style="color:#000000">::</span>PendingOperation<span style="color:#c0c0c0"> </span><span style="color:#000000">*</span>op<span style="color:#000000">)</span><span style="color:#c0c0c0"> </span><span style="color:#000000">{</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#808000">if</span><span style="color:#000000">(</span>op<span style="color:#000000">-></span>isError<span style="color:#000000">())</span><span style="color:#c0c0c0"> </span><span style="color:#000000">{</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span>qDebug<span style="color:#000000">()<<</span><span style="color:#008000">"Couldn't</span><span style="color:#c0c0c0"> </span><span style="color:#008000">create</span><span style="color:#c0c0c0"> </span><span style="color:#008000">connection"</span><span style="color:#000000">;</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span>qDebug<span style="color:#000000">()</span><span style="color:#c0c0c0"> </span><span style="color:#000000"><<</span><span style="color:#c0c0c0"> </span>op<span style="color:#000000">-></span>errorName<span style="color:#000000">();</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span>qDebug<span style="color:#000000">()</span><span style="color:#c0c0c0"> </span><span style="color:#000000"><<</span><span style="color:#c0c0c0"> </span>op<span style="color:#000000">-></span>errorMessage<span style="color:#000000">();</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#808000">return</span><span style="color:#000000">;</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#000000">}</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span>qDebug<span style="color:#000000">()<<</span><span style="color:#008000">"Connection</span><span style="color:#c0c0c0"> </span><span style="color:#008000">is</span><span style="color:#c0c0c0"> </span><span style="color:#008000">ready"</span><span style="color:#000000">;</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span>getChannel<span style="color:#000000">();</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#000000">}</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#808000">void</span><span style="color:#c0c0c0"> </span>TelepathyTest<span style="color:#000000">::</span>getChannel<span style="color:#000000">()</span><span style="color:#c0c0c0"> </span><span style="color:#000000">{</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#008000">//</span><span style="color:#c0c0c0"> </span><span style="color:#008000">Maybe</span><span style="color:#c0c0c0"> </span><span style="color:#008000">I'm</span><span style="color:#c0c0c0"> </span><span style="color:#008000">passing</span><span style="color:#c0c0c0"> </span><span style="color:#008000">the</span><span style="color:#c0c0c0"> </span><span style="color:#008000">parameters</span><span style="color:#c0c0c0"> </span><span style="color:#008000">wrong?</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#800080">QVariantMap</span><span style="color:#c0c0c0"> </span>map<span style="color:#000000">;</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span>map<span style="color:#000000">.</span>insert<span style="color:#000000">(</span><span style="color:#008000">"org.freedesktop.Telepathy.Channel.ChannelType"</span><span style="color:#000000">,</span><span style="color:#800080">QVariant</span><span style="color:#000000">(</span><span style="color:#008000">"org.freedeskop.Telepathy.Channel.Type.ContactList"</span><span style="color:#000000">));</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span>map<span style="color:#000000">.</span>insert<span style="color:#000000">(</span><span style="color:#008000">"org.freedesktop.Telepathy.Channel.TargetHandleType"</span><span style="color:#000000">,</span><span style="color:#c0c0c0"> </span><span style="color:#800080">QVariant</span><span style="color:#000000">(</span>uint<span style="color:#000000">(</span><span style="color:#000080">3</span><span style="color:#000000">)));</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span>map<span style="color:#000000">.</span>insert<span style="color:#000000">(</span><span style="color:#008000">"org.freedesktop.Telepathy.Channel.TargetID"</span><span style="color:#000000">,</span><span style="color:#800080">QVariant</span><span style="color:#000000">(</span><span style="color:#008000">"subscribe"</span><span style="color:#000000">));</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span>Tp<span style="color:#000000">::</span>PendingChannel<span style="color:#000000">*</span><span style="color:#c0c0c0"> </span>pch<span style="color:#c0c0c0"> </span><span style="color:#000000">=</span><span style="color:#c0c0c0"> </span>conn<span style="color:#000000">-></span>createChannel<span style="color:#000000">(</span>map<span style="color:#000000">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span>connect<span style="color:#000000">(</span>pch<span style="color:#000000">,</span><span style="color:#c0c0c0"> </span><span style="color:#808000">SIGNAL</span><span style="color:#000000">(</span>finished<span style="color:#000000">(</span>Tp<span style="color:#000000">::</span>PendingOperation<span style="color:#000000">*)),</span><span style="color:#c0c0c0"> </span><span style="color:#808000">SLOT</span><span style="color:#000000">(</span>gotChannel<span style="color:#000000">(</span>Tp<span style="color:#000000">::</span>PendingOperation<span style="color:#000000">*)));</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#000000">}</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#808000">void</span><span style="color:#c0c0c0"> </span>TelepathyTest<span style="color:#000000">::</span>gotChannel<span style="color:#000000">(</span>Tp<span style="color:#000000">::</span>PendingOperation<span style="color:#000000">*</span>op<span style="color:#000000">)</span><span style="color:#c0c0c0"> </span><span style="color:#000000">{</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#808000">if</span><span style="color:#000000">(</span>op<span style="color:#000000">-></span>isError<span style="color:#000000">())</span><span style="color:#c0c0c0"> </span><span style="color:#000000">{</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span>qDebug<span style="color:#000000">()</span><span style="color:#c0c0c0"> </span><span style="color:#000000"><<</span><span style="color:#c0c0c0"> </span><span style="color:#008000">"Couldn't</span><span style="color:#c0c0c0"> </span><span style="color:#008000">get</span><span style="color:#c0c0c0"> </span><span style="color:#008000">requested</span><span style="color:#c0c0c0"> </span><span style="color:#008000">channel"</span><span style="color:#000000">;</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span>qDebug<span style="color:#000000">()</span><span style="color:#c0c0c0"> </span><span style="color:#000000"><<</span><span style="color:#c0c0c0"> </span>op<span style="color:#000000">-></span>errorName<span style="color:#000000">();</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span>qDebug<span style="color:#000000">()</span><span style="color:#c0c0c0"> </span><span style="color:#000000"><<</span><span style="color:#c0c0c0"> </span>op<span style="color:#000000">-></span>errorMessage<span style="color:#000000">();</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#808000">return</span><span style="color:#000000">;</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span><span style="color:#000000">}</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0"> </span>qDebug<span style="color:#000000">()</span><span style="color:#c0c0c0"> </span><span style="color:#000000"><<</span><span style="color:#c0c0c0"> </span><span style="color:#008000">"Got</span><span style="color:#c0c0c0"> </span><span style="color:#008000">channel"</span><span style="color:#000000">;</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#000000">}</span></pre></td></tr></tbody></table></div>