CTC++ Coverage Report - Execution Profile    #6/10

Directory Summary | Files Summary | Functions Summary | Execution Profile
To files: First | Previous | Next | Last | Index | No Index


File: N:\myprogram\forrrelease1\oodmonitor\oodmonitor2\src\outofdisksubscriber.cpp
Instrumentation mode: function
TER: 75 % ( 6/ 8)

Start/ End/    
True False - Line Source

  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:  COutOfDiskSubscriber implementation.
  15  *
  16 */
  17 
  18 
  19 // INCLUDES
  20 #include "outofdisksubscriber.h"
  21 #include "OodTraces.h"
  22 
  23 // CONSTANTS
  24 
  25 // ============================= MEMBER FUNCTIONS =============================
  26 
  27 // ----------------------------------------------------------------------------
  28 // COutOfDiskSubscriber::NewL()
  29 // ----------------------------------------------------------------------------
Top
12   30 COutOfDiskSubscriber* COutOfDiskSubscriber::NewL( 
  31                             MOutOfDiskPropertyResponder& aOutOfDiskPropertyResponder,
  32                             const TUid& aCategory, 
  33                             TUint aKey )
  34     {
  35     COutOfDiskSubscriber* self = new (ELeave) COutOfDiskSubscriber( aOutOfDiskPropertyResponder,
  36                                                                     aCategory, 
  37                                                                     aKey );
  38     CleanupStack::PushL( self );
  39     self->ConstructL();
  40     CleanupStack::Pop( self );
  41     return self;
  42     }
  43 
  44 // ----------------------------------------------------------------------------
  45 // COutOfDiskSubscriber::ConstructL()
  46 // ----------------------------------------------------------------------------
Top
12 12   47 void COutOfDiskSubscriber::ConstructL()
  48     {
  49     CActiveScheduler::Add( this );
  50     iProperty.Attach( iCategory, iKey );
  51     }
  52 
  53 // ----------------------------------------------------------------------------
  54 // COutOfDiskSubscriber::Subscribe()
  55 // ----------------------------------------------------------------------------
Top
12 12   56 void COutOfDiskSubscriber::Subscribe()
  57     {
  58     iProperty.Subscribe( iStatus );
  59     SetActive();
  60     }
  61 
  62 // ----------------------------------------------------------------------------
  63 // COutOfDiskSubscriber::COutOfDiskSubscriber()
  64 // ----------------------------------------------------------------------------
Top
12 12   65 COutOfDiskSubscriber::COutOfDiskSubscriber( MOutOfDiskPropertyResponder& 
  66                                                 aOutOfDiskPropertyResponder, 
  67                                             const TUid& aCategory, 
  68                                             TUint aKey ) :
  69     CActive( EPriorityStandard ),
  70     iOutOfDiskPropertyResponder( aOutOfDiskPropertyResponder ),
  71     iCategory( aCategory),
  72     iKey( aKey )
  73     {
  74     }
  75 
  76 // ----------------------------------------------------------------------------
  77 // COutOfDiskSubscriber::RunL()
  78 // ----------------------------------------------------------------------------
Top
- 79 void COutOfDiskSubscriber::RunL()
  80     {
  81     Subscribe();
  82     iOutOfDiskPropertyResponder.HandlePropertyChangedL( iCategory, iKey );
  83     }
  84 
  85 // ----------------------------------------------------------------------------
  86 // COutOfDiskSubscriber::DoCancel()
  87 // ----------------------------------------------------------------------------
Top
12 12   88 void COutOfDiskSubscriber::DoCancel()
  89     {
  90     iProperty.Cancel();
  91     }
  92 
  93 // ----------------------------------------------------------------------------
  94 // COutOfDiskSubscriber::RunError()
  95 // ----------------------------------------------------------------------------
Top
- 96 TInt COutOfDiskSubscriber::RunError( TInt aError )
  97     {    
  98     return aError;
  99     }
  100 
  101 // ----------------------------------------------------------------------------
  102 // COutOfDiskSubscriber::~COutOfDiskSubscriber()
  103 // ----------------------------------------------------------------------------
Top
  104 COutOfDiskSubscriber::~COutOfDiskSubscriber()
  105     {
  106     Cancel();
  107     iProperty.Close();
  108     }
  109 
  110 // End of File
***TER 75% (6/8) of SOURCE FILE outofdisksubscriber.cpp

Directory Summary | Files Summary | Functions Summary | Execution Profile
To files: First | Previous | Next | Last | Top | Index | No Index