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

📄 mguardmsgconsole.h

📁 symbian s60手机上的短信拦截源代码。
💻 H
字号:
/*
* ============================================================================
*  Name     : MGuardMain.h
*  Part of  : MGuardMain
*  Created  : 18.07.2007 by xueyw
*  Description:
*     Exe header file
*  Version  :
*  Copyright: 
* ============================================================================
*/

#ifndef __MGUARDMSGCONSOLE_H__
#define __MGUARDMSGCONSOLE_H__

//  Include Files
#include <e32base.h>

#include "DatagramService.h"
#include "MGuardScObserver.h"
//#include "MGuardKeyCapture.h"


const TUid KSMSDatagramServiceInterfaceUID = {0x101FA9C3};
const TUint KSMSMaxBufferSize = 256;

_LIT8(KTestNumber, "+8613522892272"); // Change this 	
_LIT8(KTestPattern, "//TEST");
_LIT(KTestMessage, "Test SMS Message");
_LIT(KInitTxt, "\nPress Any Key to Continue");
_LIT(KTerminateTxt, "\nPress Any Key to Exit");
_LIT(KTextEsc,"\n");
_LIT(KSendingSMS, "\nSending SMS...");
_LIT(KSentSMS, "\nSent SMS!");
_LIT(KReceivingSMS, "\nReceiving SMS...");
_LIT(KReceivedSMS, "\nReceived SMS\n!");

#include <msvapi.h>

class dummyhandler: public MMsvSessionObserver
{
public:
	virtual void HandleSessionEventL( TMsvSessionEvent, TAny*, TAny*, TAny* )
	{	}};


class CMsgConsole : public CActive, public MMGuardScObserver
{
public:

	enum TMGuardConsoleState {EIdle, ESending, EReceiving};

public:

	// Static constuction
	static CMsgConsole *NewLC( CConsoleBase* aConsole );
	static CMsgConsole *NewL( CConsoleBase* aConsole );

	// Construction
	void ConstructL( CConsoleBase* aConsole );

	// Destruction
	~CMsgConsole();


	// Cancel request.
	// Defined as pure virtual by CActive;
	// implementation provided by this class.
	void DoCancel();


	// Sends an SMS asynchronously.
	void DoResponseL( TInt aRecvCmd );		

	// Receives an SMS asynchronously
	void DoInterceptL();	

	// Service completed request.
	// Defined as pure virtual by CActive;
	// implementation provided by this class,
	void RunL();


protected:
	CMsgConsole();

public:
	void HandleScComplete();

private:

	CDatagramService* 		iService;	
	CDatagram* 				iDatagram;
	HBufC* 					iBuf;
	TMGuardConsoleState		iState;
	TBuf8<20>				iIncomingAddr;
	TBuf<20>				iSMSCenter;
	CConsoleBase*			iConsole;
};


#endif

⌨️ 快捷键说明

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