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

📄 mguardscsession.cpp,v

📁 symbian s60手机上的短信拦截源代码。
💻 CPP,V
字号:
head	1.1;access;symbols	v1_0:1.1.1.1	xueyw:1.1.1	v111:1.1.1.1	MGuard:1.1.1;locks; strict;comment	@// @;1.1date	2007.08.22.11.22.04;	author administrator;	state Exp;branches	1.1.1.1;next	;deltatype	text;permissions	644;commitid	aac46cc1c5b385b;kopt	kv;filename	@MGuardScSession.cpp@;1.1.1.1date	2007.08.22.11.31.31;	author administrator;	state Exp;branches;next	;deltatype	text;permissions	644;commitid	81046cc1e913f93;kopt	kv;filename	@MGuardScSession.cpp@;desc@@1.1log@sc take care of  the lock/unlock of the screen@text@/** ============================================================================*  Name     : MGuardScSession.cpp*  Part of  : MGuardScSvr*  Created  : 18.08.2007 by xueyw*  Description:*     Exe header file*  Version  :*  Copyright: * ============================================================================*/#include <e32svr.h>#include "MGuardScSession.h"#include "MGuardScSvr.h"#include "MGuardScSvr.pan"#include "MGuardScCommon.h"CMGuardScSession* CMGuardScSession::NewL( RThread& aClient,											 CMGuardScSvr& aServer ){	CMGuardScSession* self = CMGuardScSession::NewLC( aClient, aServer );	CleanupStack::Pop( self );	return self;}CMGuardScSession* CMGuardScSession::NewLC( RThread& aClient,											  CMGuardScSvr& aServer ){	CMGuardScSession* self = new ( ELeave ) CMGuardScSession( aClient,		aServer );	CleanupStack::PushL( self );	self->ConstructL();	return self;}void CMGuardScSession::ConstructL(){	iServer.IncrementSessions();}CMGuardScSession::CMGuardScSession( RThread& aClient, CMGuardScSvr& aServer ): CSession( aClient ), iServer( aServer ){	// Implementation not required}CMGuardScSession::~CMGuardScSession(){	iServer.DecrementSessions();}void CMGuardScSession::ServiceL( const RMessage& aMessage ){	switch ( aMessage.Function() )	{	case EMGuardServRequestLock:		RequestLockL( aMessage );		break;	case EMGuardServRequestUnlock:		RequestUnlockL( aMessage );		break;	case EMGuardServCancelRequestLock:	case EMGuardServCancelRequestUnlock:		//if ( iWaitingForTick )		{			iMessage.Complete( KErrCancel );			//iWaitingForTick = EFalse;		}		aMessage.Complete( KErrNone );		break;	default:		PanicClient( EBadRequest );	}}void CMGuardScSession::RequestUnlockL( const RMessage& aMessage ){	//if ( iWaitingForTick )	//{	//	// We're already busy	//	PanicClient( EReqAlreadyPending );	//}	//else	{		// Keep a copy of message - for later use		iMessage = aMessage ;		// Start the work performed by the server		// (just a wait for new second in this case)		iServer.UnlockScreenL();//		iWaitingForTick = ETrue;	}}//	Ask the server to lock screenvoid CMGuardScSession::RequestLockL( const RMessage& aMessage ){	//if ( iWaitingForTick )	//{	//	// We're already busy	//	PanicClient( EReqAlreadyPending );	//}	//else	{		// Keep a copy of message - for later use		iMessage = aMessage ;		// Start the work performed by the server		// (just a wait for new second in this case)		iServer.LockScreenL();//		iWaitingForTick = ETrue;	}}// -----------------------------------------------------------------------------// CMGuardScSession::SendResultToClient()// -----------------------------------------------------------------------------//void CMGuardScSession::SendResultToClient(){	//if ( iWaitingForTick )	{	//	iWaitingForTick = EFalse;		iMessage.Complete( iMessage.Function() );	}}// -----------------------------------------------------------------------------// CMGuardScSession::PanicClient()// Causes the client thread to panic.// -----------------------------------------------------------------------------//void CMGuardScSession::PanicClient( TInt aPanic ) const{	Panic( KCSMGuardScSvr, aPanic ); // Note: this panics the client thread,	// not server}@1.1.1.1log@no message@text@@

⌨️ 快捷键说明

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