smssendhandler.h
来自「在s60 v3版本中的发送短信的示例」· C头文件 代码 · 共 64 行
H
64 行
#ifndef __MSVSENDHANDLER_H__
#define __MSVSENDHANDLER_H__
#include <e32base.h>
#include <msvapi.h>
//#include <MuiuMsvSingleOpWatcher.h> // CMsvSingleOpWatcherArray in oem
#include "msvhandler.h"
class MMsvObserver;
class CSmsSendHandler : public CMsvHandler
{
public:
enum { EMaxTelephoneNumberLength = 30 };
static CSmsSendHandler* NewL(MMsvObserver& aObserver);
static CSmsSendHandler* NewLC(MMsvObserver& aObserver);
~CSmsSendHandler();
void SendToL(const TDesC& aRecipient, const TDesC& aText );
public: // from CMsvHandler
TBool IsIdle();
public: // from MMsvSessionObserver
void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3);
protected: // from CActive
void RunL();
protected:
CSmsSendHandler(MMsvObserver& aObserver);
private:
void ConstructL();
void CreateNewMessageL();
TBool SetupSmsHeaderL();
void PopulateMessageL(TMsvEntry& aMsvEntry);
TBool InitializeMessageL();
TBool MoveMessageEntryL(TMsvId aTarget);
void SetScheduledSendingStateL(CMsvEntrySelection& aSelection);
void HandleChangedEntryL(TMsvId aEntryId);
private:
enum TPhase
{
EIdle,
EWaitingForCreate,
EWaitingForMove,
EWaitingForScheduled,
EWaitingForSent,
EWaitingForDeleted
};
// Member variables
TPhase iPhase;
TBuf<EMaxTelephoneNumberLength> iRecipientsTelNum;
TBuf<140> iText; // This is a fixed amount of message data
};
#endif // __MSVSENDHANDLER_H__
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?