email/framework/src/T_MsgTimer.cpp
branchSymbian2
changeset 1 8758140453c0
child 6 c108117318cb
equal deleted inserted replaced
0:e8c1ea2c6496 1:8758140453c0
       
     1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of the License "Symbian Foundation License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // @file 
       
    15 // 
       
    16 //
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 /* User Includes */
       
    22 #include "T_MsgTimer.h"
       
    23 
       
    24 
       
    25 /**
       
    26   Function : NewL
       
    27   Description : Creates an object of CT_MsgTimer
       
    28   @return : N/A
       
    29   @leave  :	KErrNoMemory	There is no sufficient memory	
       
    30 */
       
    31 CT_MsgTimer* CT_MsgTimer::NewL(MT_MsgTimerCallback& aCallback, TInt aPriority)
       
    32 	{
       
    33 	CT_MsgTimer*	ret=new (ELeave) CT_MsgTimer(aCallback, aPriority);
       
    34 	CleanupStack::PushL(ret);
       
    35 	ret->ConstructL();
       
    36 	CleanupStack::Pop(ret);
       
    37 	return ret;
       
    38 	}
       
    39 
       
    40 
       
    41 
       
    42 
       
    43 /**
       
    44   Function : CT_MsgTimer
       
    45   Description : Constructor
       
    46   @return : N/A
       
    47 */
       
    48 CT_MsgTimer::CT_MsgTimer(MT_MsgTimerCallback& aCallback, TInt aPriority)
       
    49 :	CTimer(aPriority)
       
    50 ,	iCallback(aCallback)
       
    51 	{
       
    52 	}
       
    53 
       
    54 
       
    55 
       
    56 /**
       
    57   Function : ConstructL
       
    58   Description : Calls the ConstrutL of CTimer class
       
    59 				and adds the object to Active Scheduler
       
    60   @return : N/A
       
    61 */
       
    62 void CT_MsgTimer::ConstructL()
       
    63 	{
       
    64 	CTimer::ConstructL();
       
    65 	CActiveScheduler::Add(this);
       
    66 	}
       
    67 
       
    68 
       
    69 /**
       
    70   Function : RunL
       
    71   Description : Signals the completion of the operation
       
    72   @return : N/A
       
    73 */
       
    74 void CT_MsgTimer::RunL()
       
    75 	{
       
    76 	iCallback.TimerCompletedL(this);
       
    77 	}