📄 cmessageengine.h
字号:
/*
* Copyright (c) 2007,苏州丰达
* All rights reserved.
* 版权所有(C)2007-2008 苏州丰达
* 公司地址:中国,江苏省苏州市
* 网址:http://www.
*
* 文件名称:CHTTPClientEngine.cpp
* 摘 要:用于信息发送
*
* 产品版本:彩视 1.0
*
* 作 者:xxxx
* 创建日期:xxxxx
* 负责人:xxxxx
*
* 修改者:司治国
* 修改日期:2008.1.17
*
* 编译器或环境等描述:uiqsdk2.1
* 适用于VC2003+symbian 7.x的环境开发。
*
**/
#ifndef CMESSAGEENGINE_H
#define CMESSAGEENGINE_H
#include <e32base.h> // For CActive, link against: euser.lib
#include <e32std.h> // For RTimer, link against: euser.lib
#include <msvapi.h>
#include <msvids.h>
#include <msvstd.h>
#include <mtclreg.h>
#include <SMSCLNT.h>
#include <mtmdef.h>
#include <txtrich.h>
#include <smutset.h>
#include <SMUTHDR.h>
#include <smscmds.h>
#include <MmsClientMtm.h>
#include "M3UIQ2Active.h"
class CMessageEngine : public CActive, public MMsvSessionObserver
{
public:
static CMessageEngine *NewL(MImageHandlerCallback *aObserver);
// Cancel and destroy
~CMessageEngine();
//sms
void CreateDraftSMSL();
TBool ValidateSMS();
void SendSMSL();
/**
* 发送消息
**/
void SendMemberMsg(const TDesC* aServer, const TDesC* aBody);
private:
// Second-phase constructor
void ConstructL();
public: // New functions
// Function for making the initial request
void StartL(TTimeIntervalMicroSeconds32 aDelay);
private:
// C++ constructor
CMessageEngine(MImageHandlerCallback *aObserver);
// from MMsvSessionObserver
void HandleSessionEventL(TMsvSessionEvent aEvent, TAny *aArg1, TAny *aArg2, TAny *aArg3);
void CompleteConstructL();
private: // From CActive
// Handle completion
void RunL();
// How to cancel me
void DoCancel();
// Override to handle leaves from RunL(). Default implementation causes
// the active scheduler to panic.
//void RunError(TInt aError);
private:
enum TCMessageEngineState
{
EUninitialized, // Uninitialized
EInitialized, // Initalized
EError // Error condition
};
private:
TInt iState; // State of the active object
RTimer iTimer; // Provides async timing service
CMsvOperation* iOp;
CMsvEntrySelection *iEntrySelection;
CMsvSession *iSession; // Session to the messaging server
MImageHandlerCallback *iObserver;
TBool iReady;
TMsvId iSmsId;
TMsvId iMmsId;
CClientMtmRegistry *iMtmReg;
CSmsClientMtm *iSmsMtm;
HBufC* iAddress;
HBufC* iBodyContent;
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -