S60 3rd Edition SDK for Symbian OS
Example Applications Guide

SIPExTimeOutTimer.cpp

00001 /*
00002 * ==============================================================================
00003 *  Name        : SIPExTimeOutTimer.cpp
00004 *  Part of     : SIPExSocketEngine
00005 *  Interface   : 
00006 *  Description : 
00007 *  Version     : 
00008 *
00009 *  Copyright (c) 2004-2006 Nokia Corporation.
00010 *  This material, including documentation and any related 
00011 *  computer programs, is protected by copyright controlled by 
00012 *  Nokia Corporation.
00013 * ==============================================================================
00014 */
00015 
00016 // INCLUDES
00017 #include    "SIPExTimeOutTimer.h"
00018 #include    "SIPExTimeOutNotify.h"
00019 
00020 // -----------------------------------------------------------------------------
00021 // CSIPExTimeOutTimer::NewL
00022 // Two-phased constructor.
00023 // -----------------------------------------------------------------------------
00024 //
00025 CSIPExTimeOutTimer* CSIPExTimeOutTimer::NewL( 
00026     MSIPExTimeOutNotify& aTimeOutNotify )
00027     {
00028     CSIPExTimeOutTimer* self = new( ELeave ) CSIPExTimeOutTimer( aTimeOutNotify );
00029     
00030     CleanupStack::PushL( self );
00031     self->ConstructL();
00032     CleanupStack::Pop();
00033 
00034     return self;
00035     }
00036 
00037 // -----------------------------------------------------------------------------
00038 // CSIPExTimeOutTimer::CSIPExTimeOutTimer
00039 // Constructor.
00040 // -----------------------------------------------------------------------------
00041 //
00042 CSIPExTimeOutTimer::CSIPExTimeOutTimer( MSIPExTimeOutNotify& aTimeOutNotify )
00043     : CTimer( EPriorityStandard ), iNotifier( aTimeOutNotify )
00044     {
00045     }
00046 
00047 // -----------------------------------------------------------------------------
00048 // CSIPExTimeOutTimer::ConstructL
00049 // Symbian 2nd phase constructor can leave.
00050 // -----------------------------------------------------------------------------
00051 //
00052 void CSIPExTimeOutTimer::ConstructL()
00053     {
00054         CTimer::ConstructL();
00055         CActiveScheduler::Add( this );
00056     }
00057    
00058 // -----------------------------------------------------------------------------
00059 // CSIPExTimeOutTimer::~CSIPExTimeOutTimer
00060 // Destructor.
00061 // -----------------------------------------------------------------------------
00062 //
00063 CSIPExTimeOutTimer::~CSIPExTimeOutTimer()
00064     {
00065         Cancel();
00066     }
00067 
00068 // -----------------------------------------------------------------------------
00069 // CSIPExTimeOutTimer::RunL
00070 // To inform the notifier that xx seconds is up.
00071 // -----------------------------------------------------------------------------
00072 //
00073 void CSIPExTimeOutTimer::RunL()
00074     {
00075         // Tell the notifier that times out.
00076         iNotifier.TimerExpired();
00077     }
00078 
00079 //  End of File  

© Nokia 2006

Back to top