📄 cmmssreceivehandler.h
字号:
/* Copyright (c) 2004, Nokia. All rights reserved */
#ifndef __CMMSSRECEIVEHANDLER_H__
#define __CMMSSRECEIVEHANDLER_H__
// INCLUDES
#include <e32base.h>
#include <msvapi.h>
#include "CMsvHandler.h"
// FORWARD DECLARATIONS
class MMsvObserver;
// CLASS DECLARATION
/**
* discussion Provides support for notifying the MMS messages
*/
class CMmssReceiveHandler : public CMsvHandler
{
private:
/**
* Message state enumerations
*/
enum TPhase
{
EIdle,
ESentForward,
ESentReply,
EWaitingForDeleted
};
public: // constructors and destructors
/**
* NewL
* Create a CMmssReceiveHandler object using two phase construction,
* and return a pointer to the created object
* @param aObserver the object to handle updates from the server
* @result a pointer to the created instance of CMmssReceiveHandler
*/
static CMmssReceiveHandler* NewL( MMsvObserver& aObserver );
/**
* NewLC
* Create a CMmssReceiveHandler object using two phase construction,
* and return a pointer to the created object
* @param aObserver the object to handle updates from the server
* @result a pointer to the created instance of CMmssReceiveHandler
*/
static CMmssReceiveHandler* NewLC( MMsvObserver& aObserver );
/**
* ~CMmssReceiveHandler
* Destroy the object and release all memory objects
*/
virtual ~CMmssReceiveHandler();
/**
* From MsvSessionObserver, HandleSessionEventL
* Handles session event observer and calls event handling functions in
* observer. Note that if additional session event handlers are defined in
* the session, they are called before this function (as this is the
* main session observer).
* For most event types, the action that is taken, for example,
* updating the display, is client-specific. All clients though should
* respond to EMsvCloseSession and EMsvServerTerminated events.
* @param aEvent indicates the type of event
* @param aArg1 interpretation depends on event type
* @param aArg2 interpretation depends on event type
* @param aArg3 interpretation depends on event type
*/
void HandleSessionEventL( TMsvSessionEvent aEvent,
TAny* aArg1, TAny* aArg2, TAny* aArg3 );
protected:
/**
* From CActive, RunL
* Callback function. Invoked to handle responses from the server
*/
void RunL();
/**
* CMmssReceiveHandler
* Perform the first phase of two phase construction
* @param aObserver the object to be used to handle status/error reports
*/
CMmssReceiveHandler( MMsvObserver& aObserver );
private:
/**
* ConstructL
* Perform the second phase construction of a CMmsReceiveHandler object
*/
void ConstructL();
/**
* MessageReceivedL
* Handle a new message entry that has been created on the messaging
* server. This method checks if the message was targeted for this
* application and then removes it from the server.
* @param aEntryId the entry to check
*/
void MessageReceivedL( TMsvId aEntryId );
private:// Member variables
/**
* iPhase The message state variable
*/
TPhase iPhase;
};
#endif // __CMMSSRECEIVEHANDLER_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -