usbuis/imageprintui/inc/eventmanager.h
changeset 93 2dc695882abd
parent 89 3592750162a5
equal deleted inserted replaced
89:3592750162a5 93:2dc695882abd
     1 /*
       
     2 * Copyright (c) 2006, 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:  Header file for eventmanager
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef C_EVENTMANAGER_H
       
    21 #define C_EVENTMANAGER_H
       
    22 
       
    23 #include <dpsoperation.h>
       
    24 #include <dpsparam.h>
       
    25 #include <eikenv.h>
       
    26 
       
    27 class CDpsEngine;
       
    28 class CImagePrintUiAppUi;
       
    29 
       
    30 /**
       
    31 *  Class for requesting DPS event
       
    32 */
       
    33 class CEventManager : public CActive
       
    34     {
       
    35     
       
    36 public:
       
    37 
       
    38     enum TEventNotifyType
       
    39     	{
       
    40     	ENewJobOK = 1,
       
    41     	ENewJobNOK,
       
    42     	EInkEmpty,
       
    43     	ECapabilityChange,
       
    44     	EWarning,
       
    45     	EErrorState,
       
    46     	ENotErrorState,
       
    47     	ESeriousError,
       
    48 		EShowError
       
    49     	};     
       
    50 
       
    51 public:
       
    52 
       
    53     /**
       
    54      * Two-phase constructors
       
    55      * @since S60 v3.2 
       
    56      * @param aAppUi the pointer to the AppUi instance  
       
    57      * @param aEngine   Instance of DpsEngine
       
    58      * @return  Initialiazed instance of EventManager 
       
    59      */
       
    60     static CEventManager* NewL(CImagePrintUiAppUi* aAppUi, CDpsEngine* aDpsEngine);
       
    61 
       
    62     /**
       
    63      *  Destructor.
       
    64      */	
       
    65     virtual ~CEventManager();
       
    66     
       
    67 
       
    68     
       
    69 private:
       
    70 
       
    71    /**
       
    72     *   @see CActive
       
    73     */
       
    74     void RunL();
       
    75     
       
    76    /**
       
    77 	*   @see CActive
       
    78 	*/
       
    79     void DoCancel();
       
    80     
       
    81     /**
       
    82 	*   @see CActive
       
    83 	*/
       
    84     void RunError();
       
    85 
       
    86 
       
    87 private:
       
    88 
       
    89     
       
    90     /**
       
    91      * C++ default constructor
       
    92      * @param aAppUi the pointer to the AppUi instance  
       
    93      * @param aEngine   Instance of DpsEngine
       
    94      */
       
    95     CEventManager(CImagePrintUiAppUi* aAppUi, CDpsEngine* aDpsEngine);
       
    96 
       
    97 
       
    98      /**
       
    99      * Handles return status  from PictBridge Engine.  
       
   100      * 
       
   101      */
       
   102 	void HandleReturnStatusL();
       
   103 	
       
   104 	
       
   105     /**
       
   106      * Start listening events from PictBridge Engine.  
       
   107      * 
       
   108      */
       
   109 	void StartListening();
       
   110 	
       
   111 	/**
       
   112      * Handles error status  
       
   113      * 
       
   114      */
       
   115 	void HandleErrorStatusL(TInt aStatus);
       
   116 	
       
   117 	/**
       
   118      * Handles job status  
       
   119      * 
       
   120      */
       
   121 	void HandleJobStatusL(TInt aStatus);
       
   122 	
       
   123 	/**
       
   124      * Handles hardware error.  
       
   125      * 
       
   126      */
       
   127     void HandleHardwareErrorL(TInt aError);
       
   128     
       
   129     
       
   130     /**
       
   131      * Handles ink error.  
       
   132      * 
       
   133      */
       
   134     void HandleInkErrorL(TInt aError);
       
   135     
       
   136     /**
       
   137      * Handles paper error.  
       
   138      * 
       
   139      */
       
   140     void HandlePaperErrorL(TInt aError);
       
   141     
       
   142     /**
       
   143      * Handles file error.  
       
   144      * 
       
   145      */
       
   146     void HandleFileErrorL(TInt aError);
       
   147     
       
   148 private: 
       
   149     
       
   150     CImagePrintUiAppUi* iAppUi;
       
   151     CDpsEngine*      iDpsEngine;
       
   152     TDpsEvents       iEventRequest;
       
   153     TBool            iErrorState;
       
   154    
       
   155     };
       
   156 
       
   157 
       
   158 #endif // C_EVENTMANAGER_H