email/framework/src/T_MsgActive.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 // This contains CT_MsgActive
       
    16 // 
       
    17 //
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 /* User includes */
       
    24 #include "T_MsgActive.h"
       
    25 
       
    26 
       
    27 /**
       
    28   Function :~CT_MsgActive
       
    29   Description : Destructor
       
    30   @return : N/A
       
    31 */
       
    32 CT_MsgActive::~CT_MsgActive()
       
    33 	{
       
    34 	Cancel();
       
    35 	}
       
    36 
       
    37 
       
    38 /**
       
    39   Function : NewL
       
    40   Description : Creates the object of CT_MsgActive
       
    41   @return : N/A
       
    42   @leave :	KErrNoMemory	There is no sufficient memory
       
    43 */
       
    44 CT_MsgActive* CT_MsgActive::NewL(MT_MsgActiveCallback& aCallback, TInt aPriority)
       
    45 	{
       
    46 	CT_MsgActive*	self=NewLC(aCallback, aPriority);
       
    47 	CleanupStack::Pop();
       
    48 	return self;
       
    49 	}
       
    50 
       
    51 
       
    52 
       
    53 /**
       
    54   Function	:	NewLC
       
    55   Description : Creates the object of CT_MsgActive and pushes the object on the stack
       
    56   @return : N/A
       
    57   @leave :	KErrNoMemory	There is no sufficient memory
       
    58 */
       
    59 
       
    60 CT_MsgActive* CT_MsgActive::NewLC(MT_MsgActiveCallback& aCallback, TInt aPriority)
       
    61 	{
       
    62 	CT_MsgActive*	self=new(ELeave) CT_MsgActive(aCallback, aPriority);
       
    63 	CleanupStack::PushL(self);
       
    64 	self->ConstructL();
       
    65 	return self;
       
    66 	}
       
    67 
       
    68 
       
    69 
       
    70 /**
       
    71   Function : CT_MsgActive
       
    72   Description : Constructor
       
    73   @return : N/A
       
    74 */
       
    75 CT_MsgActive::CT_MsgActive(MT_MsgActiveCallback& aCallback, TInt aPriority)
       
    76 :	CActive(aPriority)
       
    77 ,	iCallback(aCallback)
       
    78 	{
       
    79 	}
       
    80 
       
    81 
       
    82 /**
       
    83   Function :ConstructL
       
    84   Description : Adds the active object to the active scheduler
       
    85   @return : N/A
       
    86 */
       
    87 void CT_MsgActive::ConstructL()
       
    88 	{
       
    89 	CActiveScheduler::Add(this);
       
    90 	}