ImagePrint/ImagePrintUI/imageprinteng/inc/crealfactory.h
branchRCL_3
changeset 21 d59c248c9d36
parent 0 d11fb78c4374
equal deleted inserted replaced
20:159fc2f68139 21:d59c248c9d36
       
     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 CREALFACTORY_H
       
    20 #define CREALFACTORY_H
       
    21 
       
    22 #include <e32def.h>
       
    23 
       
    24 #include "ciffactory.h"
       
    25 #include "rimageprintclient.h"
       
    26 
       
    27 class CImagePrint;
       
    28 class CDiscoveryManager;
       
    29 class CPrintEventCatcher;
       
    30 class CPrintJobManager;
       
    31 class CSettingsManager;
       
    32 class MIdlePrintEventObserver;
       
    33 class CIdlePrintEventCatcher;
       
    34 
       
    35 //  CLASS DEFINITION
       
    36 /**
       
    37  *
       
    38  * Factory class for creating concrete interface classes for the UI
       
    39  *
       
    40  */
       
    41 class CRealFactory
       
    42     : public CIFFactory
       
    43     {
       
    44     public:     // Constructors and destructors
       
    45 
       
    46         /**
       
    47          *  Two-phase constructor
       
    48          *
       
    49          *  @param aEngine  Pointer to Image Printing Engine class instanace
       
    50          *
       
    51          *  @return Initialized instance of this factory
       
    52          */
       
    53         static CRealFactory* NewL( CImagePrintEngine* aEngine );
       
    54 
       
    55         /**
       
    56          *  Destructor
       
    57          */
       
    58         virtual ~CRealFactory();
       
    59 
       
    60     protected:      // Constructors and destructors
       
    61 
       
    62         /**
       
    63          *  Constructor
       
    64          */
       
    65         CRealFactory( CImagePrintEngine* aEngine );
       
    66 
       
    67         /**
       
    68          *  2nd phase constructor
       
    69          */
       
    70         void ConstructL( );
       
    71         
       
    72     public:         // Methods derived from CIFFactory
       
    73                 
       
    74         // The factory methods that return each of the interfaces
       
    75         virtual MDiscovery* DiscoveryIF();
       
    76         virtual MPrintSettings* SettingsIF();
       
    77         virtual MPrintJob* PrintJobIF();
       
    78         virtual MIdlePrintEventRegisterIF* IdlePrintEventRegisterIF();
       
    79         virtual RImagePrintClient ImagePrintClient();
       
    80         virtual TBool IsApplicationAlreadyInUse();
       
    81 		virtual MPrintEventObserver* PrintEventObserverIF();        
       
    82 		virtual MPrintEventRegisterIF* PrintEventRegisterIF();
       
    83         // Method for restarting Image Print Engine
       
    84         virtual  void RestartEngine();
       
    85 
       
    86     public:         // New methods
       
    87 
       
    88         /**
       
    89          *  Returns Engine
       
    90          *
       
    91          *  @return Engine
       
    92          */
       
    93         CImagePrint* Engine();
       
    94 
       
    95         /**
       
    96          *  Returns if the printing has been activated
       
    97          *  
       
    98          *  @return state of printing
       
    99          */
       
   100         TBool IsPrinting() const;
       
   101 
       
   102     protected:      // Data
       
   103 
       
   104         // The actual printin engine
       
   105         CImagePrint* iImageServer;
       
   106 
       
   107         // Discovery manager
       
   108         CDiscoveryManager* iDiscoveryMgr;
       
   109 
       
   110         // Print job manager
       
   111         CPrintJobManager* iPrintJobMgr;
       
   112 
       
   113         // Settings manager
       
   114         CSettingsManager* iSettingsMgr;
       
   115 
       
   116         // Print event catcher - listens to events coming from the server
       
   117         CPrintEventCatcher* iEventCatcher;
       
   118 
       
   119         // Idle event catcher for idle events
       
   120         CIdlePrintEventCatcher* iIdleEventCatcher;
       
   121        
       
   122         RImagePrintClient iImagePrintClient;
       
   123     };
       
   124 
       
   125 #endif //  CREALFACTORY_H
       
   126 
       
   127 //  End of File