📄 mtmsexampleengine.h
字号:
#ifndef MTMS_EXAMPLE_ENGINE_H
#define MTMS_EXAMPLE_ENGINE_H
// INCLUDES
// System includes
#include <e32base.h> // CBase
#include <msvapi.h> //
#include <BADESCA.H>
// FORWARD DECLARATIONS
class CClientMtmRegistry;
class CMtmsExampleDialog;
class CSmsClientMtm;
class CMmsClientMtm;
// CLASS DECLARATION
class MMtmsExampleEngineObserver
{
public:
virtual void HandleMessageSentL(TInt aError) = 0;
};
/**
*
* @class CMtmsExampleEngine MtmsExampleEngine.h
* @brief This is the engine class which handles all interactions with the messaging server
*
* Copyright (c) EMCC Software Ltd 2003
* @version 1.0
*/
class CMtmsExampleEngine : public CActive, public MMsvSessionObserver
{
public:
static CMtmsExampleEngine* NewL(MMtmsExampleEngineObserver& aObserver);
~CMtmsExampleEngine();
public:
inline TBool IsReady() const;
void CreateSentSMSL( const TDesC& aAddress, const TDesC& aContent );
// SMS
void CreateDraftSMSL(const TDesC& aAddress, const TDesC& aContent);
TBool ValidateSMS();
void SendSMSL();
void GetFolderSMSMessageInformation(TMsvId aFolderID, CDesCArrayFlat*& aIsRead, CDesCArrayFlat*& aMobile, CDesCArrayFlat*& aMessage);
// MMS
void CreateDraftMMSL(const TDesC& aAddress);
void CreateInBoxSMSL( const TDesC& aAddress, const TDesC& aContent );
TBool ValidateMMS();
void SendMMSL();
RArray<TMsvId>* GetMessageIds()
{
return iIdArray;
}
void GetMessageAddressL( TMsvId aMessageId, TDes& aAddress );
TBool GetMessageL( TMsvId aMessageId, TDes& aMessage);
void DeleteMessageL(TInt nCurrent);
void MoveToFolderL(TInt aIndex, TMsvId aFolder);
private:
CMtmsExampleEngine(MMtmsExampleEngineObserver& aObserver);
void ConstructL();
void CompleteConstructL();
void AddMMSAttachmentsL();
private: // from CActive
virtual void DoCancel();
virtual void RunL();
private: // from MMsvSessionObserver
void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3);
private:
MMtmsExampleEngineObserver& iObserver;
CMsvOperation* iOp;
CMsvEntrySelection* iEntrySelection;
CMsvSession* iSession; // Session to the messaging server
CClientMtmRegistry* iMtmReg;
CSmsClientMtm* iSmsMtm;
CMmsClientMtm* iMmsMtm;
TBool iReady;
TMsvId iSmsId;
TMsvId iMmsId;
// Array of ids
RArray<TMsvId>* iIdArray;
};
inline TBool CMtmsExampleEngine::IsReady() const
{
return iReady;
}
#endif // #ifndef MTMS_EXAMPLE_ENGINE_H
// End of File
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -