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

📄 mmsexamplecontainer.h

📁 有关mms的源代码
💻 H
字号:
/*
* ============================================================================
*  Name     : CMMSExampleContainer from MMSExampleContainer.h
*  Part of  : MMSExample
*  Created  : 04.11.2006 by Forum Nokia
*  Description:
*     Declares main application class.
*  Version  : 2.0
*  Copyright: Nokia Corporation
* ============================================================================
*/

#ifndef MMSEXAMPLECONTAINER_H
#define MMSEXAMPLECONTAINER_H

// INCLUDES
#include <msvapi.h>                         // for MMsvSessionObserver 
#include <mmsclient.h>                      // for CMmsClientMtm
#include <coecntrl.h>
#include <MMSExample.rsg>
#include <eikrted.h>						//Richtext Editor

// Forward declarations
class CClientMtmRegistry;
class CMsvSession;

//
// Container class to draw text on screen
//
class CMMSExampleContainer : public CCoeControl, public MMsvSessionObserver
    {
public:
	//Symbian default constructor.
    void ConstructL(const TRect& aRect);
    //Symbian default destructor.
    ~CMMSExampleContainer();
    /*
     * Creates client MTM registry when session is ready for use. 
     * This completes model construction and is called after 'server
     * ready' event is received after async opening of CMsvSession.
     */ 
    void CompleteConstructL();
    /**
     *  Initialize a new message and ask the user for a recipient address.
     *	Return values:      ETrue or EFalse
     */
    TBool InitializeCommunicationsL();
    /*
     * CMMSExampleContainer::CreateNewMessageL()
     * Creates a new message server entry and set up default values.
     * In case the attachment file does not found method return EFalse
     * otherwise ETrue.
     * There are differenses how to add attachment file between 2nd and 3rd edition.
     */  
     TBool CreateNewMessageL();
    /**
     * Send the message.
     * Return values: ETrue or EFalse
     */
    TBool SendMessageL();
    //Display the info messages using RichTextEditor
    void EchoL(const TDesC &aMessage);
        
private:    
	// from MMsvSessionObserver
    void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3);
  
private:
	
	//Simple Draw method
    void Draw(const TRect& aRect) const;
    //From CoeControl, SizeChanged.
    void SizeChanged();
    //From CoeControl,CountComponentControls.
    TInt CountComponentControls() const;
    //From CCoeControl,ComponentControl.
    CCoeControl* ComponentControl(TInt aIndex) const;
    //From CCoeControl,OfferKeyEventL.
	TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
    
private:

	HBufC* iRecipient;              // recipients address
    CMsvSession* iSession;          // Client session on the message server
    CMmsClientMtm* iMmsMtm;         // Message Type Module (MMS)
    CClientMtmRegistry* iMtmReg;    // Mtm client registry for creating new mtms
    CEikRichTextEditor* iRtEd; 		// Rich Text Editor
    CMsvEntry* iMsvEntry;			// CMsvEntry accesses and acts upon a particular Message Server entry
    };
    
#endif

⌨️ 快捷键说明

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