📄 mtmengine.h
字号:
#ifndef _MTMENGINE_H_
#define _MTMENGINE_H_
#include <e32base.h> // CBase
#include <msvapi.h> // MMsvSessionObserver
#include <badesca.h> // CDesCArrayFlat
// FORWARD DECLARATIONS
class CClientMtmRegistry;
class CSmsClientMtm;
class MMtmsEngineObserver;
class CMtmEngine : public CActive, public MMsvSessionObserver
{
public:
static CMtmEngine*NewL(MMtmsEngineObserver& aObserver);
~CMtmEngine();
void MoveToFolderL(TInt aIndex,TMsvId aFolder);
void MoveToFolderL(TMsvId aMessageId,TMsvId aFolder);
void DeleteMessageL(TInt aCurrent);
void SendSMSL();
TMsvEntry CreateSMSMessageL(const TDesC& aAddress,const TDesC& aMessage);
TBool ValidateCreatedSMS();
TBool GetMessageL(TMsvId aMessageId,TDes& aMessage);
void GetMessageAddressL(TMsvId aMessageId,TDes& aAddress);
TBool GetMessageIndexBodyTextL(TMsvId aMessageId,TDes& aMessage);
void GetFolderSMSMessageInformation(TMsvId aFolderID, CDesCArrayFlat*& aMobile, CDesCArrayFlat*& aMessage);
RArray<TMsvId>* GetMessageIds();
void DeleteMessageL(TMsvId aMessageId );
/**
* A constructor.
* @param aObserver Observer of this engine.
*/
CMtmEngine(MMtmsEngineObserver& aObserver);
/**
* ConstructL()
*/
void ConstructL();
/**
* Creates SMS client.
*/
void CreateMtmClientL();
private: // from CActive
virtual void DoCancel();
virtual void RunL();
private: // from MMsvSessionObserver
void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3);
private:
// SMS client MTM interface
CSmsClientMtm* m_pSmsMtm;
// Observer of this engine.
MMtmsEngineObserver& m_Observer;
// Controls asynchronous commands in the messaging system
// Get progress information about the sending.
CMsvOperation* m_pMsvOper;
// Encapsulates an array of entry IDs.
CMsvEntrySelection* m_pEntrySelection;
// Represents a session to the messaging server
CMsvSession* m_pSession;
// This registry holds details of the all the Client-side
// MTMs currently available on the system.
CClientMtmRegistry* m_pClientMtmReg;
// Array of ids
RArray<TMsvId>* m_pIdArray;
// Id of an SMS message
TMsvId m_SmsId;
};
class MMtmsEngineObserver
{
public:
virtual void HandleMessageSentL(TInt aError) = 0;
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -