📄 class_c_address_book_engine.html
字号:
<a class="anchor" name="49c5d4b00d914807d1d3e5b4f0b9779c"></a><!-- doxytag: member="CAddressBookEngine::NewL" ref="49c5d4b00d914807d1d3e5b4f0b9779c" args="(MAddressBookEngineObserver &aObserver)" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"><a class="el" href="class_c_address_book_engine.html">CAddressBookEngine</a> * CAddressBookEngine::NewL </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="class_m_address_book_engine_observer.html">MAddressBookEngineObserver</a> & </td> <td class="mdname1" valign="top" nowrap> <em>aObserver</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [static]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Two-phased constructor <p>Definition at line <a class="el" href="_address_book_engine_8cpp-source.html#l00069">69</a> of file <a class="el" href="_address_book_engine_8cpp-source.html">AddressBookEngine.cpp</a>.<p>References <a class="el" href="_address_book_engine_8cpp-source.html#l00034">CAddressBookEngine()</a>, and <a class="el" href="_address_book_engine_8cpp-source.html#l00084">ConstructL()</a>.<div class="fragment"><pre class="fragment"><a name="l00071"></a>00071 {<a name="l00072"></a>00072 <a class="code" href="class_c_address_book_engine.html">CAddressBookEngine</a>* newEngine = <span class="keyword">new</span> (ELeave) <a class="code" href="class_c_address_book_engine.html#8216643f0db69c602b5e810edec1bdd3">CAddressBookEngine</a>(aObserver);<a name="l00073"></a>00073 CleanupStack::PushL(newEngine);<a name="l00074"></a>00074 newEngine-><a class="code" href="class_c_address_book_engine.html#9ce34ba0b947863222da3c63d0481044">ConstructL</a>();<a name="l00075"></a>00075 CleanupStack::Pop(newEngine);<a name="l00076"></a>00076 <span class="keywordflow">return</span> newEngine;<a name="l00077"></a>00077 }</pre></div><p> </td> </tr></table><a class="anchor" name="747630896453ebd94401850077f9ce1e"></a><!-- doxytag: member="CAddressBookEngine::SendSearchL" ref="747630896453ebd94401850077f9ce1e" args="(const TDesC &aSearchPattern)" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">void CAddressBookEngine::SendSearchL </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const TDesC & </td> <td class="mdname1" valign="top" nowrap> <em>aSearchPattern</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>This function is called after an user has selected Search from the GUI and typed a request. Function creates a search pattern from the descriptor and send it to the WSP. The message from server is received through <a class="el" href="class_c_address_book_engine.html#6f6aab8e9e405117f0c28455489d2b8a">HandleMessageL()</a> or an error is received through <a class="el" href="class_c_address_book_engine.html#d19d90d4095917ffb09489ecd08cb5ad">HandleErrorL()</a>. <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>aSearchPattern</em> </td><td>- descriptor on Searching note that an user has typed </td></tr> </table></dl><p>Definition at line <a class="el" href="_address_book_engine_8cpp-source.html#l00369">369</a> of file <a class="el" href="_address_book_engine_8cpp-source.html">AddressBookEngine.cpp</a>.<p>References <a class="el" href="class_m_address_book_engine_observer.html#b3a39294ac41ecd9ba1eaae63fc36346">MAddressBookEngineObserver::ErrorL()</a>, <a class="el" href="_address_book_engine_8cpp-source.html#l00267">GenerateQueryRequestL()</a>, <a class="el" href="_address_book_engine_8h-source.html#l00292">iConnection</a>, <a class="el" href="_address_book_engine_8h-source.html#l00300">iErrorState</a>, and <a class="el" href="_address_book_engine_8h-source.html#l00297">iObserver</a>.<div class="fragment"><pre class="fragment"><a name="l00370"></a>00370 { <a name="l00371"></a>00371 _LIT( KSendSearchL, <span class="stringliteral">"CAddressBookEngine::SendSearchL()"</span>);<a name="l00372"></a>00372 LOG(KSendSearchL);<a name="l00373"></a>00373 <a class="code" href="class_c_address_book_engine.html#b07a7dadac01652ed3d4d68d40d79a15">iErrorState</a> = ENoError;<a name="l00374"></a>00374 <span class="keywordflow">if</span> (!<a class="code" href="class_c_address_book_engine.html#f702971f167e073a81134fd2876d0298">iConnection</a>)<a name="l00375"></a>00375 {<a name="l00376"></a>00376 _LIT( KConnNotReady, <span class="stringliteral">"Connection not ready."</span>);<a name="l00377"></a>00377 LOG(KConnNotReady);<a name="l00378"></a>00378 <a class="code" href="class_c_address_book_engine.html#5598d19cc10719afd28055422087a200">iObserver</a>.<a class="code" href="class_m_address_book_engine_observer.html#b3a39294ac41ecd9ba1eaae63fc36346">ErrorL</a>(EConnectionNotReady);<a name="l00379"></a>00379 <span class="keywordflow">return</span>;<a name="l00380"></a>00380 }<a name="l00381"></a>00381 <a name="l00382"></a>00382 <span class="comment">//Get the xml query to be sent to service</span><a name="l00383"></a>00383 HBufC8* stSearch= <a class="code" href="class_c_address_book_engine.html#95d3e261b03f0a2bf7f648406a80904f">GenerateQueryRequestL</a>(aSearchPattern);<a name="l00384"></a>00384 CleanupStack::PushL(stSearch);<a name="l00385"></a>00385 <a name="l00386"></a>00386 <span class="comment">//Send the query to service</span><a name="l00387"></a>00387 <a class="code" href="class_c_address_book_engine.html#f702971f167e073a81134fd2876d0298">iConnection</a>->SendL(*stSearch);<a name="l00388"></a>00388 <a name="l00389"></a>00389 CleanupStack::PopAndDestroy(stSearch);<a name="l00390"></a>00390 }</pre></div><p> </td> </tr></table><a class="anchor" name="e8a170fa40d8d9d67f0cebf751b96e87"></a><!-- doxytag: member="CAddressBookEngine::ConnectL" ref="e8a170fa40d8d9d67f0cebf751b96e87" args="()" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">void CAddressBookEngine::ConnectL </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Makes a connection to an ID-WSF service. When <a class="el" href="class_c_address_book_engine.html#e8a170fa40d8d9d67f0cebf751b96e87">ConnectL()</a> is called the first time, authentication and discovery services are connected and the user is therefore authenticated and the service is connected. When <a class="el" href="class_c_address_book_engine.html#e8a170fa40d8d9d67f0cebf751b96e87">ConnectL()</a> is called again and the credentials received from authentication and discovery services are valid, there are no need to connect to them again. This means that <a class="el" href="class_c_address_book_engine.html#0faeae2b736ff345e0f3392bc5ade7e4">SetStatus()</a> will be called almost immediately with value CONNECTED, but in device GPRS or data connection is not opened yet (but instead it is opened when search occurs). <p>Definition at line <a class="el" href="_address_book_engine_8cpp-source.html#l00656">656</a> of file <a class="el" href="_address_book_engine_8cpp-source.html">AddressBookEngine.cpp</a>.<p>References <a class="el" href="_address_book_engine_8h-source.html#l00292">iConnection</a>, and <a class="el" href="_address_book_engine_8cpp-source.html#l00554">RegisterIdentityProviderL()</a>.<div class="fragment"><pre class="fragment"><a name="l00657"></a>00657 {<a name="l00658"></a>00658 _LIT (KConnectL, <span class="stringliteral">"CAddressBookEngine::ConnectL()"</span>);<a name="l00659"></a>00659 LOG( KConnectL);<a name="l00660"></a>00660 <a class="code" href="class_c_address_book_engine.html#27169094a7dab01d3a23984924dc0819">RegisterIdentityProviderL</a>();<a name="l00661"></a>00661 <a name="l00662"></a>00662 CSenXmlServiceDescription* pattern = CSenXmlServiceDescription::NewLC();<a name="l00663"></a>00663 pattern->SetContractL(KPpContract());<a name="l00664"></a>00664 <span class="keyword">delete</span> <a class="code" href="class_c_address_book_engine.html#f702971f167e073a81134fd2876d0298">iConnection</a>;<a name="l00665"></a>00665 <a class="code" href="class_c_address_book_engine.html#f702971f167e073a81134fd2876d0298">iConnection</a> = NULL;<a name="l00666"></a>00666 <a class="code" href="class_c_address_book_engine.html#f702971f167e073a81134fd2876d0298">iConnection</a> = CSenServiceConnection::NewL(*<span class="keyword">this</span>, *pattern);<a name="l00667"></a>00667 CleanupStack::PopAndDestroy(pattern); <a name="l00668"></a>00668 }</pre></div><p> </td> </tr></table><a class="anchor" name="4b0394a07927e23c977c81ec024a8060"></a><!-- doxytag: member="CAddressBookEngine::Connected" ref="4b0394a07927e23c977c81ec024a8060" args="()" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">TBool CAddressBookEngine::Connected </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>sets a state of connection as KSenConnectionStatusReady <p>Definition at line <a class="el" href="_address_book_engine_8cpp-source.html#l00675">675</a> of file <a class="el" href="_address_book_engine_8cpp-source.html">AddressBookEngine.cpp</a>.<p>References <a class="el" href="_address_book_engine_8h-source.html#l00291">iConnectionState</a>.<div class="fragment"><pre class="fragment"><a name="l00676"></a>00676 {<a name="l00677"></a>00677 <span class="keywordflow">return</span> (<a class="code" href="class_c_address_book_engine.html#20b48b0c027e674d1e8d373e2c83cc84">iConnectionState</a> == KSenConnectionStatusReady);<a name="l00678"></a>00678 }</pre></div><p> </td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -