⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mtmsexampleengine.h

📁 series60 应用程序开发的源代码 series60 应用程序开发的源代码
💻 H
字号:
#ifndef MTMS_EXAMPLE_ENGINE_H
#define MTMS_EXAMPLE_ENGINE_H

// INCLUDES

// System includes 
#include <e32base.h> // CBase
#include <msvapi.h>  // MMsvSessionObserver

// 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;

        //  SMS
        void CreateDraftSMSL(const TDesC& aAddress);
        TBool ValidateSMS();
        void SendSMSL();

        //  MMS
        void CreateDraftMMSL(const TDesC& aAddress);
        TBool ValidateMMS();
        void SendMMSL();

    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;
};


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 + -