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

📄 smsengine.h

📁 手机短信开发的一个案例
💻 H
字号:
/*
* ============================================================================
*  Name     : SmsEngine.h
*  Part of  : Sms Modifier
*  Created  : 20.05.2006 by Artem Marchenko
*  Description:
*  Version  : 1.0
*  Copyright: Artem Marchenko 2006
* ============================================================================
*/

#ifndef SMSENGINE_H
#define SMSENGINE_H

// INCLUDES 
#include <e32base.h> // CBase
#include <msvapi.h>  // MMsvSessionObserver
#include <flogger.h>

// FORWARD DECLARATIONS
class CClientMtmRegistry;
class CSmsClientMtm;


// CLASS DECLARATION

/**
*  Creates new messages, gets notifications about the message creation and
*  modifies the messages created earlier
*/
class CSmsEngine : public CBase, public MMsvSessionObserver
    {
    public:
	   
		/**
		* Create new CSmsEngine object
		* @return A pointer to the created instance of CSmsEngine
		*/
        static CSmsEngine* NewL();
        
		/**
		* Destructor.
		*/
		~CSmsEngine();

    public:

		/**
		* Creates the SMS message in the given folder.
        * Note that the creation event will be delivered by the Messaging
        * server to HandleSessionEventL()
		* @param aFolderId Parent folder id
		* @param aAddress
		* @param aDescription
		* @param aMsgText
		*/
	    void CreateLocalMessageL( TMsvId aFolderId, const TDesC& aAddress,
                        const TDesC& aDescription, const TDesC& aMsgText );
        
    private:

		/**
		* ConstructL()
		*/
        void ConstructL();
        
        /**
        * Clone the given entry and do some changes to its text
        */
        void CloneMessageL( TMsvEntry& entry );

    private: 
        // from MMsvSessionObserver
        void HandleSessionEventL( TMsvSessionEvent aEvent, TAny* aArg1, 
                                  TAny* aArg2, TAny* aArg3 );

    private:
	    
		// SMS client MTM interface
		CSmsClientMtm*      iSmsMtm;

		// Represents a session to the messaging server
        CMsvSession*        iSession;   

		// This registry holds details of the all the Client-side 
		// MTMs currently available on the system. 
        CClientMtmRegistry* iClientMtmReg;
        
        // The last "clone"
        TMsvId iLastChangedMessageId;
    };

#endif  // SMSENGINE_H

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -