remotestoragefw/remotefileengine/inc/rsfwwaitnotemanager.h
branchRCL_3
changeset 15 88ee4cf65e19
parent 12 87c71b25c937
child 16 1aa8c82cb4cb
equal deleted inserted replaced
12:87c71b25c937 15:88ee4cf65e19
     1 /*
       
     2 * Copyright (c) 2005 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:  Global wait notes used in Remote File Engine
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_RSFWWAITNOTEMANAGER_H
       
    20 #define C_RSFWWAITNOTEMANAGER_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 #include <barsc.h>
       
    25 #include <barsread.h>
       
    26 #include "rsfwwaitnotestatemachine.h"
       
    27 #include "rsfwauthenticationdlgrequest.h"
       
    28 #include "rsfwsavetodlgrequest.h"
       
    29 
       
    30 // CONSTANTS
       
    31 _LIT(KResourceFile, "Z:\\resource\\remotefileengine.rsc");
       
    32 
       
    33 // FORWARD DECLARATIONS
       
    34 class TRsfwAuthenticationDlgRequest;
       
    35 class TRsfwAuthenticationDlgResponse;
       
    36 class CAknGlobalConfirmationQuery;
       
    37 
       
    38 // CLASS DECLARATION
       
    39 
       
    40 /**
       
    41 *  CRsfwWaitNoteManager class
       
    42 *
       
    43 *  Wait Note Manager class for Remote File Engine
       
    44 */
       
    45 class CRsfwWaitNoteManager : public CActive                                       
       
    46     {
       
    47  public: // Constructors and destructor
       
    48 
       
    49         /**
       
    50         * Symbian OS two-phased constructor
       
    51         * @return Pointer to this component.
       
    52         */
       
    53         IMPORT_C static CRsfwWaitNoteManager* NewL();
       
    54 
       
    55         /**
       
    56         * C++ default destructor.
       
    57         */
       
    58         virtual ~CRsfwWaitNoteManager();
       
    59 
       
    60  private:
       
    61 
       
    62         /**
       
    63         * C++ default constructor.
       
    64         */
       
    65         CRsfwWaitNoteManager();
       
    66 
       
    67         /**
       
    68         * Symbian OS default constructor.
       
    69         */
       
    70         void ConstructL();
       
    71 
       
    72         void ShowGlobalInformationNoteL(TInt aResourceId);
       
    73 
       
    74  public: // New functions
       
    75 
       
    76         /**
       
    77         * Start to display wait note. 
       
    78         * Note: A new wait note can only be activated when the previous one is 
       
    79         *       dismissed.
       
    80         * @since 3.1
       
    81         * @param aOpType Wait Note operation type.
       
    82         */
       
    83         TInt StartWaitNoteL( TRemoteOperationType aOpType, 
       
    84         					 CRsfwWaitNoteStateMachine*  aOperation );
       
    85 
       
    86 
       
    87         /**
       
    88         * Server or path not found, when connecting 
       
    89         */
       
    90         void ShowAddressNotFoundErrorL(const TDesC& aFriendlyName);
       
    91 
       
    92 		void SetAuthenticationDialogL(TRsfwAuthenticationDlgRequest& aAuthRequest);
       
    93 		
       
    94 		void SetGlobalNoteRequestL(TRsfwNotPluginRequest& aRequestStruct);
       
    95 		
       
    96         void SetSaveToDialogRequestL(TRsfwSaveToDlgRequest& aSaveRequest);
       
    97 
       
    98         void ShowFileSavedToDialogL(const TDesC& aValue);
       
    99         
       
   100         void ShowFailedSaveNoteL();
       
   101  
       
   102         void ShowNoNetworkCoverageNoteL();
       
   103         
       
   104         void ShowOfflineNotPossibleNoteL();
       
   105 
       
   106         void ShowOutOfMemoryNoteL();
       
   107        
       
   108         // inform the wait note manager that no operation is waiting for 
       
   109         // it to trigger its state anymore
       
   110         void ResetOperation();
       
   111        
       
   112         /**
       
   113         * Cancel wait note.
       
   114         * Note: Please make sure the system is still able to handle key press 
       
   115         *       events during an operation.
       
   116         * @since 3.1
       
   117         */
       
   118         void CancelWaitNoteL(TInt aNoteId);
       
   119         
       
   120    
       
   121 private:    // Functions from base classes
       
   122 
       
   123         /**
       
   124         * Handles an active object’s request completion event.
       
   125         */
       
   126         void RunL();  
       
   127 
       
   128  		/**
       
   129     	*Implements cancellation of an outstanding request.
       
   130 		*/
       
   131 		void DoCancel();
       
   132 
       
   133  		/**
       
   134     	* Called in case RunL() leaves
       
   135 		*/
       
   136         TInt RunError(TInt aError);
       
   137         
       
   138 private:    // Data
       
   139 
       
   140 	    // Current operation type
       
   141         TRemoteOperationType	iOpType;
       
   142         
       
   143          // Operation state
       
   144         TRemoteWaitNoteStates	iOpState;
       
   145         
       
   146          // sequental id for the curren note
       
   147         // this is unique unlike CAknGlobalNote's id
       
   148         TInt					iNoteId;
       
   149                 
       
   150         // standard global confirmation query
       
   151         CAknGlobalConfirmationQuery* 		iQuery;
       
   152         
       
   153          // note Id of the active CAknGlobalNote
       
   154         TInt 					iAvkonNoteId;
       
   155         
       
   156         // custom global notes server 
       
   157         RNotifier iNotifier;
       
   158         
       
   159         // IPC parameters struct for authentication dialog
       
   160         TRsfwAuthParamsPckg* iAuthRequest;
       
   161        
       
   162         // pointer to the mount state machines auth info
       
   163         // so that new username and/or passwd can be written
       
   164         TRsfwAuthenticationDlgRequest* iAuthCredentials;
       
   165                 
       
   166         // IPC parameters struct for wait notes and the retry note
       
   167         TRsfwRetryParamsPckg *iGlobalNoteRequest;
       
   168         
       
   169         // IPC parameters struct for saveto dialog
       
   170         TRsfwSaveToParamsPckg* iSaveToRequest;
       
   171         
       
   172         // pointer to state machine's save to params
       
   173         TRsfwSaveToDlgRequest* iSaveParams;
       
   174                
       
   175         // buffer for the disconnect warning note txt
       
   176         HBufC*					iNoteTxt;
       
   177         
       
   178         // resource file reading
       
   179         RResourceFile iResourceFile;
       
   180         TResourceReader iResourceReader; 
       
   181         
       
   182 		CRsfwWaitNoteStateMachine* iOperation;
       
   183     };
       
   184 
       
   185 #endif  // REMOTEWAITNOTEMANAGER_H
       
   186 
       
   187 // End of File