homesync/contentmanager/cmserver/cmfillmanager/src/cmfmao.cpp
branchIOP_Improvements
changeset 40 08b5eae9f9ff
parent 39 6369bfd1b60d
child 41 b4d83ea1d6e2
equal deleted inserted replaced
39:6369bfd1b60d 40:08b5eae9f9ff
     1 /*
       
     2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Fill rule and filled data processing Active object
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "cmfmfillrulefilleddatamngr.h"
       
    20 #include "cmfmao.h"
       
    21 #include "msdebug.h"
       
    22 
       
    23 // ---------------------------------------------------------------------------
       
    24 // CCmFmAo::NewL
       
    25 // ---------------------------------------------------------------------------
       
    26 //
       
    27 CCmFmAo* CCmFmAo::NewL( CCmFmFillRuleFilledDataMngr& aMngr )
       
    28     {
       
    29     LOG(_L("[FILL MNGR]\t CCmFmAo::NewL() start"));    
       
    30     CCmFmAo* self = CCmFmAo::NewLC( aMngr );
       
    31     CleanupStack::Pop( self );
       
    32     LOG(_L("[FILL MNGR]\t CCmFmAo::NewL() end")); 
       
    33     return self;
       
    34     }
       
    35 
       
    36 // ---------------------------------------------------------------------------
       
    37 // CCmFmAo::NewLC
       
    38 // ---------------------------------------------------------------------------
       
    39 //    
       
    40 CCmFmAo* CCmFmAo::NewLC( CCmFmFillRuleFilledDataMngr& aMngr )
       
    41     {
       
    42     LOG(_L("[FILL MNGR]\t CCmFmAo::NewLC() start"));     
       
    43     CCmFmAo* self = new ( ELeave ) CCmFmAo( aMngr );
       
    44     CleanupStack::PushL( self );
       
    45     self->ConstructL();
       
    46     LOG(_L("[FILL MNGR]\t CCmFmAo::NewLC() end"));     
       
    47     return self;  
       
    48     }    
       
    49 
       
    50 // ---------------------------------------------------------------------------
       
    51 // CCmFmAo::~CCmFmAo
       
    52 // ---------------------------------------------------------------------------
       
    53 //
       
    54 CCmFmAo::~CCmFmAo()
       
    55     {
       
    56     LOG(_L("[FILL MNGR]\t CCmFmAo::~CCmFmAo() start"));
       
    57     Cancel();   
       
    58     LOG(_L("[FILL MNGR]\t CCmFmAo::~CCmFmAo() end"));
       
    59     }
       
    60 
       
    61 // ---------------------------------------------------------------------------
       
    62 // CCmFmAo::CCmFmAo
       
    63 // ---------------------------------------------------------------------------
       
    64 //            
       
    65 CCmFmAo::CCmFmAo( CCmFmFillRuleFilledDataMngr& aMngr )
       
    66     :CActive( EPriorityStandard ), iMngr( aMngr ), iIdle( ETrue )
       
    67     {
       
    68     LOG(_L("[FILL MNGR]\t CCmFmAo::CCmFmAo()"));
       
    69     CActiveScheduler::Add( this );
       
    70     }
       
    71 
       
    72 // ---------------------------------------------------------------------------
       
    73 // CCmFmAo::ConstructL
       
    74 // ---------------------------------------------------------------------------
       
    75 //  
       
    76 void CCmFmAo::ConstructL()
       
    77     { 
       
    78     LOG(_L("[FILL MNGR]\t CCmFmAo::ConstructL()"));                   
       
    79     }
       
    80 
       
    81 // ---------------------------------------------------------------------------
       
    82 // CCmFmAo::RunL
       
    83 // ---------------------------------------------------------------------------
       
    84 // 
       
    85 void CCmFmAo::RunL()
       
    86     {
       
    87     TRACE(Print(_L("[FILL MNGR]\t CCmFmAo::RunL status %d"),iStatus.Int() ));            
       
    88     if ( iIdle )
       
    89         {
       
    90         LOG(_L("[FILL MNGR]\t CCmFmAo::RunL iIdle == ETrue "));
       
    91         SetActive();
       
    92         iIdle = EFalse;
       
    93         }
       
    94     else 
       
    95         {
       
    96         LOG(_L("[FILL MNGR]\t CCmFmAo::RunL iIdle == EFalse "));
       
    97         iMngr.OperationCompletedL( iStatus.Int() );
       
    98         iIdle = ETrue;
       
    99         }
       
   100     }    
       
   101 
       
   102 // ---------------------------------------------------------------------------
       
   103 // CCmFmAo::DoCancel
       
   104 // ---------------------------------------------------------------------------
       
   105 //     
       
   106 void CCmFmAo::DoCancel()
       
   107     {
       
   108     LOG(_L("[FILL MNGR]\t CCmFmAo::DoCancel"));
       
   109     }    
       
   110 
       
   111 // ---------------------------------------------------------------------------
       
   112 // CCmFmAo::RunError( TInt aError )
       
   113 // ---------------------------------------------------------------------------
       
   114 //  
       
   115 TInt CCmFmAo::RunError( TInt aError )
       
   116     {
       
   117     TRACE(Print(_L("[FILL MNGR]\t CCmFmAo::RunError %d"), aError ));
       
   118     return aError;
       
   119     }
       
   120     
       
   121 // End of file
       
   122 
       
   123