ImagePrint/ImagePrintUI/imageprinteng/inc/cidleprinteventcatcher.h
branchGCC_SURGE
changeset 25 59ea2209bb67
parent 23 08cc4cc059d4
parent 15 a92d00fca574
equal deleted inserted replaced
23:08cc4cc059d4 25:59ea2209bb67
     1 /*
       
     2 * Copyright (c) 2004-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:  
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CIDLEPRINTEVENTCATCHER_H
       
    20 #define CIDLEPRINTEVENTCATCHER_H
       
    21 
       
    22 #include <e32std.h>
       
    23 #include <e32base.h>
       
    24 
       
    25 #include "imageprint.h"
       
    26 #include "midleprinteventregisterif.h"
       
    27 
       
    28 //  FORWARD DECLARATIONS
       
    29 class CRealFactory;
       
    30 class MIdlePrintEventObserver;
       
    31 class MIdlePrintEventRegisterIF;
       
    32 
       
    33 // CLASS DEFINITION
       
    34 
       
    35 /**
       
    36  * This class catches idle events from Image Print engine.
       
    37  */
       
    38 class CIdlePrintEventCatcher :
       
    39     public CBase,
       
    40     public MIdleObserver,
       
    41     public MIdlePrintEventRegisterIF
       
    42     {
       
    43     public:     // Construction and destruction
       
    44 
       
    45         /**
       
    46          *  Two phase constructor
       
    47          *
       
    48          *  @param aFactory The factory
       
    49          *  @param aIdleUIObserver  Observer to notify UI about idle events
       
    50          *
       
    51          *  @return Initialized instance of the engine
       
    52          */
       
    53         static CIdlePrintEventCatcher* NewL(
       
    54             CRealFactory* aFactory /*, MIdlePrintEventObserver* aIdleUIObserver*/ );
       
    55         static CIdlePrintEventCatcher* NewLC(
       
    56             CRealFactory* aFactory /*, MIdlePrintEventObserver* aIdleUIObserver*/ );
       
    57 
       
    58         /**
       
    59          *  Destructor
       
    60          */
       
    61         virtual ~CIdlePrintEventCatcher();
       
    62 
       
    63     private:    // Construction and destruction
       
    64 
       
    65         /**
       
    66          *  Constructor
       
    67          *
       
    68          *  @param aFactory The factory
       
    69          *  @param aIdleUIObserver  Observer to notify UI about idle events
       
    70          */
       
    71         CIdlePrintEventCatcher( CRealFactory* aFactory /*,
       
    72                                 MIdlePrintEventObserver* aIdleUIObserver*/ );
       
    73 
       
    74         /**
       
    75          *  2nd phase constructor
       
    76          */
       
    77         void ConstructL();
       
    78 
       
    79     public:     // Methods derived from MIdleObserver
       
    80 
       
    81         void StatusEvent(const TEvent &aEvent, TInt aError, TInt aMsgCode);
       
    82 
       
    83     public: // Methods derived from MIdlePrintEventRegisterIF
       
    84 
       
    85         void RegisterObserver( MIdlePrintEventObserver* aIdleObserver );
       
    86         void UnRegisterObserver( MIdlePrintEventObserver* aIdleObserver );
       
    87 
       
    88     private:    // Data
       
    89 
       
    90         // Interface factory
       
    91         CRealFactory* iFactory;
       
    92 
       
    93         // Observer to notify UI about idle print events
       
    94         MIdlePrintEventObserver* iIdleUIObserver;
       
    95     
       
    96         MIdlePrintEventObserver* iIdleUIObserver2;
       
    97         
       
    98         RPointerArray<MIdlePrintEventObserver> iObservers;
       
    99         
       
   100         HBufC* iBuf;
       
   101 
       
   102     };
       
   103 
       
   104 
       
   105 #endif  // CIDLEPRINTEVENTCATCHER_H
       
   106 
       
   107 //  End of File