Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/_s_m_s_example_mtms_engine_8h_source.html
author Dominic Pinkman <dominic.pinkman@nokia.com>
Fri, 13 Aug 2010 16:47:46 +0100
changeset 14 578be2adaf3e
parent 6 43e37759235e
permissions -rw-r--r--
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>TB9.2 Example Applications: examples/ForumNokia/SMSExample/Engine/inc/SMSExampleMtmsEngine.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.2 -->
<h1>examples/ForumNokia/SMSExample/Engine/inc/SMSExampleMtmsEngine.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> * Copyright © 2008 Nokia Corporation.</span>
<a name="l00003"></a>00003 <span class="comment"> */</span>
<a name="l00004"></a>00004 
<a name="l00005"></a>00005 <span class="preprocessor">#ifndef SMS_EXAMPLE_ENGINE</span>
<a name="l00006"></a>00006 <span class="preprocessor"></span><span class="preprocessor">#define SMS_EXAMPLE_ENGINE</span>
<a name="l00007"></a>00007 <span class="preprocessor"></span>
<a name="l00008"></a>00008 <span class="comment">// INCLUDES </span>
<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;e32base.h&gt;</span> <span class="comment">// CBase</span>
<a name="l00010"></a>00010 <span class="preprocessor">#include &lt;msvapi.h&gt;</span>  <span class="comment">// MMsvSessionObserver</span>
<a name="l00011"></a>00011 <span class="preprocessor">#include &lt;badesca.h&gt;</span> <span class="comment">// CDesCArrayFlat</span>
<a name="l00012"></a>00012 
<a name="l00013"></a>00013 <span class="comment">// FORWARD DECLARATIONS</span>
<a name="l00014"></a>00014 <span class="keyword">class </span>CClientMtmRegistry;
<a name="l00015"></a>00015 <span class="keyword">class </span>CSmsClientMtm;
<a name="l00016"></a>00016 <span class="keyword">class </span><a class="code" href="class_m_s_m_s_example_mtms_engine_observer.html">MSMSExampleMtmsEngineObserver</a>;
<a name="l00017"></a>00017 
<a name="l00018"></a>00018 <span class="comment">// CLASS DECLARATION</span>
<a name="l00019"></a>00019 
<a name="l00024"></a><a class="code" href="class_c_s_m_s_example_mtms_engine.html">00024</a> <span class="keyword">class </span><a class="code" href="class_c_s_m_s_example_mtms_engine.html">CSMSExampleMtmsEngine</a> : <span class="keyword">public</span> CActive, <span class="keyword">public</span> MMsvSessionObserver
<a name="l00025"></a>00025     {
<a name="l00026"></a>00026     <span class="keyword">public</span>:
<a name="l00027"></a>00027        
<a name="l00034"></a>00034         <span class="keyword">static</span> <a class="code" href="class_c_s_m_s_example_mtms_engine.html">CSMSExampleMtmsEngine</a>* <a class="code" href="class_c_s_m_s_example_mtms_engine.html#ae9012c6beffaf400409c0d2966838474">NewL</a>(<a class="code" href="class_m_s_m_s_example_mtms_engine_observer.html">MSMSExampleMtmsEngineObserver</a>&amp; 
<a name="l00035"></a>00035                                            aObserver);
<a name="l00036"></a>00036         
<a name="l00040"></a>00040         <a class="code" href="class_c_s_m_s_example_mtms_engine.html#a7873afb32e7c26392959cc6d5bae3925">~CSMSExampleMtmsEngine</a>();
<a name="l00041"></a>00041 
<a name="l00042"></a>00042     <span class="keyword">public</span>:
<a name="l00043"></a>00043 
<a name="l00049"></a>00049         <span class="keywordtype">void</span> <a class="code" href="class_c_s_m_s_example_mtms_engine.html#a5290be4e1e51624dd93a32481cd232ab">MoveToFolderL</a>( TMsvId aMessageId,  TMsvId aFolder );
<a name="l00050"></a>00050 
<a name="l00055"></a>00055         <span class="keywordtype">void</span> <a class="code" href="class_c_s_m_s_example_mtms_engine.html#a984ee82d84638e17466f90e3361518dc">DeleteMessageL</a>( TMsvId aMessageId );
<a name="l00056"></a>00056 
<a name="l00062"></a>00062         <span class="keywordtype">void</span> <a class="code" href="class_c_s_m_s_example_mtms_engine.html#a97fe65f73c36e75f95dfa5f74fccb3f2">CopyMessageL</a>( TMsvId aMessageId, TMsvId aFolder );
<a name="l00063"></a>00063 
<a name="l00069"></a>00069         <span class="keywordtype">void</span> <a class="code" href="class_c_s_m_s_example_mtms_engine.html#a77cafdea7482dfe45f713806ea98aff0">GetMessageAddressL</a>( TMsvId aMessageId, TDes&amp; aAddress );
<a name="l00070"></a>00070 
<a name="l00078"></a>00078         TBool <a class="code" href="class_c_s_m_s_example_mtms_engine.html#a47cec0be7fbd4b7c3eeb5c568a560693">GetMessageL</a>( TMsvId aMessageId, TDes&amp; aMessage );
<a name="l00079"></a>00079 
<a name="l00087"></a>00087         TBool <a class="code" href="class_c_s_m_s_example_mtms_engine.html#aaf1586b4d36213206e5ad65915538354">GetMessageIndexBodyTextL</a>( TMsvId aMessageId, TDes&amp; aMessage );
<a name="l00088"></a>00088 
<a name="l00094"></a>00094         <span class="keywordtype">void</span> <a class="code" href="class_c_s_m_s_example_mtms_engine.html#a190337cfafc2bd34b742af77e6c40a3e">GetFolderSMSMessageInformationL</a>( TMsvId aFolderID, 
<a name="l00095"></a>00095                                               CDesCArrayFlat*&amp; aAddresses, 
<a name="l00096"></a>00096                                               CDesCArrayFlat*&amp; aMessages );
<a name="l00097"></a>00097 
<a name="l00103"></a>00103         RArray&lt;TMsvId&gt;* <a class="code" href="class_c_s_m_s_example_mtms_engine.html#ab5f0023ce3f3d8d4214a43019671d9f9">GetMessageIds</a>();
<a name="l00104"></a>00104 
<a name="l00105"></a>00105     <span class="keyword">private</span>:
<a name="l00110"></a>00110         <a class="code" href="class_c_s_m_s_example_mtms_engine.html">CSMSExampleMtmsEngine</a>(<a class="code" href="class_m_s_m_s_example_mtms_engine_observer.html">MSMSExampleMtmsEngineObserver</a>&amp; aObserver);
<a name="l00111"></a>00111 
<a name="l00115"></a>00115         <span class="keywordtype">void</span> ConstructL();
<a name="l00116"></a>00116 
<a name="l00120"></a>00120         <span class="keywordtype">void</span> CreateMtmClientL();
<a name="l00121"></a>00121 
<a name="l00122"></a>00122     <span class="keyword">private</span>: <span class="comment">// from CActive</span>
<a name="l00123"></a>00123         <span class="keyword">virtual</span> <span class="keywordtype">void</span> DoCancel();
<a name="l00124"></a>00124         <span class="keyword">virtual</span> <span class="keywordtype">void</span> RunL();
<a name="l00125"></a>00125 
<a name="l00126"></a>00126 
<a name="l00127"></a>00127     <span class="keyword">private</span>: <span class="comment">// from MMsvSessionObserver</span>
<a name="l00128"></a>00128         <span class="keywordtype">void</span> HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, 
<a name="l00129"></a>00129                                  TAny* aArg2, TAny* aArg3);
<a name="l00130"></a>00130 
<a name="l00131"></a>00131     <span class="keyword">private</span>:
<a name="l00132"></a>00132 
<a name="l00133"></a>00133         <span class="comment">// SMS client MTM interface</span>
<a name="l00134"></a>00134         CSmsClientMtm*      iSmsMtm;
<a name="l00135"></a>00135 
<a name="l00136"></a>00136         <span class="comment">// Observer of this engine.</span>
<a name="l00137"></a>00137         <a class="code" href="class_m_s_m_s_example_mtms_engine_observer.html">MSMSExampleMtmsEngineObserver</a>&amp; iObserver;
<a name="l00138"></a>00138 
<a name="l00139"></a>00139         <span class="comment">// Controls asynchronous commands in the messaging system</span>
<a name="l00140"></a>00140         <span class="comment">// Get progress information about the sending.</span>
<a name="l00141"></a>00141         CMsvOperation*      iMsvOper;
<a name="l00142"></a>00142 
<a name="l00143"></a>00143         <span class="comment">// Encapsulates an array of entry IDs.</span>
<a name="l00144"></a>00144         CMsvEntrySelection* iEntrySelection;
<a name="l00145"></a>00145 
<a name="l00146"></a>00146         <span class="comment">// Represents a session to the messaging server</span>
<a name="l00147"></a>00147         CMsvSession*        iSession;   
<a name="l00148"></a>00148 
<a name="l00149"></a>00149         <span class="comment">// This registry holds details of the all the Client-side </span>
<a name="l00150"></a>00150         <span class="comment">// MTMs currently available on the system. </span>
<a name="l00151"></a>00151         CClientMtmRegistry* iClientMtmReg;
<a name="l00152"></a>00152        
<a name="l00153"></a>00153         <span class="comment">// Array of ids</span>
<a name="l00154"></a>00154         RArray&lt;TMsvId&gt;*     iIdArray;
<a name="l00155"></a>00155        
<a name="l00156"></a>00156         <span class="comment">// Id of an SMS message</span>
<a name="l00157"></a>00157         TMsvId              iSmsId;
<a name="l00158"></a>00158     };
<a name="l00159"></a>00159 
<a name="l00163"></a><a class="code" href="class_m_s_m_s_example_mtms_engine_observer.html">00163</a> <span class="keyword">class </span><a class="code" href="class_m_s_m_s_example_mtms_engine_observer.html">MSMSExampleMtmsEngineObserver</a>
<a name="l00164"></a>00164     {
<a name="l00165"></a>00165     <span class="keyword">public</span>:
<a name="l00166"></a>00166         <span class="keyword">virtual</span> <span class="keywordtype">void</span> HandleMessageSentL(TInt aError) = 0;
<a name="l00167"></a>00167     };
<a name="l00168"></a>00168 
<a name="l00169"></a>00169 
<a name="l00170"></a>00170 <span class="preprocessor">#endif  // SMS_EXAMPLE_ENGINE</span>
<a name="l00171"></a>00171 <span class="preprocessor"></span>
</pre></div></div>
<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
</body>
</html>