sipextimeouttimer.cpp

来自「an example for sip for symbian」· C++ 代码 · 共 80 行

CPP
80
字号
/*
* ==============================================================================
*  Name        : SIPExTimeOutTimer.cpp
*  Part of     : SIPExSocketEngine
*  Interface   : 
*  Description : 
*  Version     : 
*
*  Copyright (c) 2004-2006 Nokia Corporation.
*  This material, including documentation and any related 
*  computer programs, is protected by copyright controlled by 
*  Nokia Corporation.
* ==============================================================================
*/

// INCLUDES
#include    "SIPExTimeOutTimer.h"
#include    "SIPExTimeOutNotify.h"

// -----------------------------------------------------------------------------
// CSIPExTimeOutTimer::NewL
// Two-phased constructor.
// -----------------------------------------------------------------------------
//
CSIPExTimeOutTimer* CSIPExTimeOutTimer::NewL( 
    MSIPExTimeOutNotify& aTimeOutNotify )
    {
    CSIPExTimeOutTimer* self = new( ELeave ) CSIPExTimeOutTimer( aTimeOutNotify );
    
    CleanupStack::PushL( self );
    self->ConstructL();
    CleanupStack::Pop();

    return self;
    }

// -----------------------------------------------------------------------------
// CSIPExTimeOutTimer::CSIPExTimeOutTimer
// Constructor.
// -----------------------------------------------------------------------------
//
CSIPExTimeOutTimer::CSIPExTimeOutTimer( MSIPExTimeOutNotify& aTimeOutNotify )
    : CTimer( EPriorityStandard ), iNotifier( aTimeOutNotify )
    {
    }

// -----------------------------------------------------------------------------
// CSIPExTimeOutTimer::ConstructL
// Symbian 2nd phase constructor can leave.
// -----------------------------------------------------------------------------
//
void CSIPExTimeOutTimer::ConstructL()
    {
	CTimer::ConstructL();
	CActiveScheduler::Add( this );
    }
   
// -----------------------------------------------------------------------------
// CSIPExTimeOutTimer::~CSIPExTimeOutTimer
// Destructor.
// -----------------------------------------------------------------------------
//
CSIPExTimeOutTimer::~CSIPExTimeOutTimer()
    {
	Cancel();
    }

// -----------------------------------------------------------------------------
// CSIPExTimeOutTimer::RunL
// To inform the notifier that xx seconds is up.
// -----------------------------------------------------------------------------
//
void CSIPExTimeOutTimer::RunL()
    {
	// Tell the notifier that times out.
	iNotifier.TimerExpired();
    }

//  End of File  

⌨️ 快捷键说明

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