remotestoragefw/remotefileengine/src/rsfwwaitnotemanager.cpp
changeset 13 6b4fc789785b
parent 2 c32dc0be5eb4
equal deleted inserted replaced
2:c32dc0be5eb4 13:6b4fc789785b
     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 // INCLUDE FILES
       
    20 #include <pathinfo.h>
       
    21 #include <CAknMemorySelectionDialog.h>
       
    22 #include <RemoteFileEngine.rsg>
       
    23 #include <aknnotpi.rsg>
       
    24 #include <AknGlobalConfirmationQuery.h>
       
    25 #include <StringLoader.h>
       
    26 #include <CDirectoryLocalizer.h>
       
    27 #include <AknGlobalNote.h>
       
    28 #include <bautils.h>
       
    29 
       
    30 #include "rsfwwaitnotemanager.h"
       
    31 #include "rsfwrfeserver.h"
       
    32 #include "sysutil.h"
       
    33 #include "mdebug.h"
       
    34 
       
    35 
       
    36 // ============================ MEMBER FUNCTIONS ===============================
       
    37 
       
    38 // -----------------------------------------------------------------------------
       
    39 // CRsfwWaitNoteManager::CRsfwWaitNoteManager
       
    40 // C++ default constructor can NOT contain any code, that
       
    41 // might leave.
       
    42 // -----------------------------------------------------------------------------
       
    43 //
       
    44 CRsfwWaitNoteManager::CRsfwWaitNoteManager() :
       
    45     CActive( CActive::EPriorityUserInput )
       
    46     {
       
    47     
       
    48     }
       
    49 
       
    50 // -----------------------------------------------------------------------------
       
    51 // CRsfwWaitNoteManager::ConstructL
       
    52 // Symbian 2nd phase constructor can leave.
       
    53 // -----------------------------------------------------------------------------
       
    54 //
       
    55 void CRsfwWaitNoteManager::ConstructL()
       
    56     {
       
    57     DEBUGSTRING(("CRsfwWaitNoteManager::ConstructL"));
       
    58     CActiveScheduler::Add( this );
       
    59     iOpState = ERemoteWaitNoteStateOk;
       
    60     
       
    61     // read wait note txt:s from the localization file
       
    62     TFileName resourceFile;
       
    63     resourceFile.Copy(KResourceFile);
       
    64     BaflUtils::NearestLanguageFile(CRsfwRfeServer::Env()->iFs,resourceFile);
       
    65     
       
    66     DEBUGSTRING16(("opening resource file '%S'", &resourceFile));   
       
    67     iResourceFile.OpenL(CRsfwRfeServer::Env()->iFs, resourceFile);   
       
    68     iResourceFile.ConfirmSignatureL();
       
    69     DEBUGSTRING(("resource file ok")); 
       
    70     
       
    71     // pre-read the most common strings  	
       
    72    	HBufC8* warningNoteLabel = iResourceFile.AllocReadL(R_WAIT_NOTE_DISC_WARNING);
       
    73     CleanupStack::PushL(warningNoteLabel);
       
    74     iResourceReader.SetBuffer(warningNoteLabel);
       
    75     iNoteTxt = iResourceReader.ReadHBufCL();
       
    76     CleanupStack::PopAndDestroy(warningNoteLabel);
       
    77 
       
    78 	iAvkonNoteId = 0;
       
    79    
       
    80     }
       
    81 
       
    82 // -----------------------------------------------------------------------------
       
    83 // CRsfwWaitNoteManager::NewL()
       
    84 // Two-phased constructor.
       
    85 // -----------------------------------------------------------------------------
       
    86 //
       
    87 EXPORT_C CRsfwWaitNoteManager* CRsfwWaitNoteManager::NewL()
       
    88     {
       
    89     CRsfwWaitNoteManager* self = new ( ELeave ) CRsfwWaitNoteManager();
       
    90 
       
    91     CleanupStack::PushL( self );
       
    92     self->ConstructL();
       
    93     CleanupStack::Pop();
       
    94 
       
    95     return self;
       
    96     }
       
    97 
       
    98 // -----------------------------------------------------------------------------
       
    99 // Destructor
       
   100 // -----------------------------------------------------------------------------
       
   101 //
       
   102 EXPORT_C CRsfwWaitNoteManager::~CRsfwWaitNoteManager()
       
   103     {
       
   104     Deque();
       
   105     iResourceFile.Close();
       
   106     
       
   107     
       
   108     if (iNoteTxt) 
       
   109     	{
       
   110     	delete iNoteTxt;
       
   111     	}
       
   112     if (iAuthRequest) 
       
   113         {
       
   114         delete iAuthRequest;
       
   115         }
       
   116     
       
   117     if (iGlobalNoteRequest) 
       
   118         {
       
   119         delete iGlobalNoteRequest;
       
   120         }
       
   121 
       
   122      if (iSaveToRequest) 
       
   123         {
       
   124         delete iSaveToRequest;
       
   125         iSaveToRequest = NULL;
       
   126         }
       
   127 
       
   128     iNotifier.Close();		
       
   129     
       
   130     }
       
   131     
       
   132 // -----------------------------------------------------------------------------
       
   133 // CRsfwWaitNoteManager::StartWaitNoteL
       
   134 // Start to display a wait note.
       
   135 // (other items were commented in a header).
       
   136 // -----------------------------------------------------------------------------
       
   137 //
       
   138 TInt CRsfwWaitNoteManager::StartWaitNoteL( 
       
   139 	TRemoteOperationType aOpType,
       
   140 	CRsfwWaitNoteStateMachine*  aOperation)
       
   141     {
       
   142     DEBUGSTRING16(("CRsfwWaitNoteManager::StartWaitNoteL"));
       
   143    
       
   144     // It is possible that when this function is called there already is 
       
   145     // a wait note. In this case we allow the new operation and its wait note
       
   146     // to override the ongoing concurrent operation's wait note. 
       
   147     // However, we want to protect some dialogs. 
       
   148     // These are 
       
   149     // 1) Wait note when uploading a file 
       
   150     // The reason for this is that the wait note is in fact the only indication
       
   151     // the user gets about the status of writing a file to the server.
       
   152     // 2) User query when uploading failed and we need to give time to read 
       
   153     // the dialogs about selecting a new location from a local media
       
   154     if (!((iOpState == ERemoteWaitNoteStateInProgress) && (iOpType == ERemoteSaveToLocal)))
       
   155     	{ 	    
       
   156  		iOperation = aOperation;
       
   157     
       
   158     	// cancel whatever is there currently
       
   159     	CancelWaitNoteL(iNoteId);
       
   160     	
       
   161     	DEBUGSTRING16(("CRsfwWaitNoteManager::CancelWaitNoteL returned"));
       
   162     	
       
   163     	// don't make asynchronous request when there has been already any!
       
   164     	if(!IsActive())
       
   165             {
       
   166         	if (aOpType <= ERemoteSaveToLocal) 
       
   167         	    {
       
   168         	    DEBUGSTRING16(("calling iNotifier.Connect()"));
       
   169         	    User::LeaveIfError(iNotifier.Connect());
       
   170         	    DEBUGSTRING16(("called iNotifier.Connect()"));
       
   171         	    }
       
   172       	    
       
   173         	switch( aOpType )
       
   174         		{  
       
   175         		// these "basic request" pass the method and drive friendly name
       
   176         		// drive friendly name is not needed for wait notes, only for retryrequest
       
   177         		// so there could be even more simple IPC struct without it
       
   178         		// (on the other hand, current param struct would easily allow showing the friendly name
       
   179         		// with the wait notes)
       
   180         		case ERemoteOpConnecting:
       
   181         	    case ERemoteOpDirDownloading:
       
   182         	    case ERemoteUnavailableRetry: 
       
   183         		    {
       
   184         		    iNotifier.StartNotifierAndGetResponse(iStatus, KRsfwNotifierPluginUID,
       
   185                         *iGlobalNoteRequest, *iGlobalNoteRequest);
       
   186         		    }
       
   187         		    break;
       
   188         	    case ERemoteWarnDisconnect:
       
   189         	        {
       
   190         	        CAknGlobalConfirmationQuery* iQuery = CAknGlobalConfirmationQuery::NewL();
       
   191                     iQuery->ShowConfirmationQueryL(iStatus, *iNoteTxt);
       
   192          	        break;							
       
   193         	        }
       
   194         	    case ERemoteOpAuthDialog:
       
   195         	        {
       
   196         	        DEBUGSTRING16(("calling ERemoteOpAuthDialog/ERemoteUnavailableRetry"));
       
   197         	        // same struct used for input and output params.
       
   198         	        iNotifier.StartNotifierAndGetResponse(iStatus, KRsfwNotifierPluginUID,
       
   199                         *iAuthRequest, *iAuthRequest);
       
   200         	        break;
       
   201         	        }
       
   202 
       
   203         		case ERemoteSaveToLocal:
       
   204         	    	DEBUGSTRING16(("calling ERemoteOpAuthDialog/ERemoteSaveToLocal"));
       
   205         		    iNotifier.StartNotifierAndGetResponse(iStatus, KRsfwNotifierPluginUID,
       
   206                         *iSaveToRequest, *iSaveToRequest);
       
   207         		    break;
       
   208         		}
       
   209     
       
   210     	    DEBUGSTRING16(("CRsfwWaitNoteManager calling SetActive()"));
       
   211     	    SetActive();
       
   212     	    
       
   213     	
       
   214             DEBUGSTRING16(("CRsfwWaitNoteManager::StartWaitNoteL function returns"));
       
   215        	    iOpType = aOpType;
       
   216             iOpState = ERemoteWaitNoteStateInProgress;
       
   217             return ++iNoteId;
       
   218     	    }
       
   219         else
       
   220             {
       
   221             DEBUGSTRING16(("CRsfwWaitNoteManager::StartWaitNoteL attempt to make request when object is active"));
       
   222             DEBUGSTRING16(("CRsfwWaitNoteManager::StartWaitNoteL function returns 0"));
       
   223     	    return 0;  // caller didn't "get" the note
       
   224             }
       
   225         }
       
   226     else
       
   227         {
       
   228         DEBUGSTRING16(("CRsfwWaitNoteManager::StartWaitNoteL function returns 0"));
       
   229         return 0;   // caller didn't "get" the note
       
   230         }
       
   231     }
       
   232 
       
   233 
       
   234 // -----------------------------------------------------------------------------
       
   235 // CRsfwWaitNoteManager::CancelWaitNote
       
   236 // Cancel a wait note.
       
   237 // (other items were commented in a header).
       
   238 // -----------------------------------------------------------------------------
       
   239 //
       
   240 void CRsfwWaitNoteManager::CancelWaitNoteL(TInt aNoteId)
       
   241     {
       
   242     DEBUGSTRING16(("CRsfwWaitNoteManager::CancelWaitNoteL, iOpState = %d, iOpType = %d", iOpState, iOpType));		
       
   243     // Cancel a wait note if there is one and it is the same one that
       
   244     // the caller thinks it is removing...
       
   245     if ( (iOpState == ERemoteWaitNoteStateInProgress ) && (aNoteId == iNoteId))
       
   246         {
       
   247            
       
   248         if (iOpType <= ERemoteSaveToLocal) 
       
   249             { 
       
   250             // notifier plugin dialogs
       
   251             User::LeaveIfError(iNotifier.CancelNotifier(KRsfwNotifierPluginUID));
       
   252             iNotifier.Close();
       
   253             }
       
   254        
       
   255             
       
   256         // Dismiss qlobal query 
       
   257         if ( iQuery )
       
   258             {
       
   259             iQuery->CancelConfirmationQuery();
       
   260             delete iQuery;
       
   261             iQuery = NULL;
       
   262             }    
       
   263             
       
   264 
       
   265         
       
   266         iOpState = ERemoteWaitNoteStateOk;
       
   267         }
       
   268     
       
   269     }         
       
   270     
       
   271 // -----------------------------------------------------------------------------
       
   272 // CRsfwWaitNoteManager::RunL
       
   273 // Handles an active object’s request completion event.
       
   274 // (other items were commented in a header).
       
   275 // -----------------------------------------------------------------------------
       
   276 //
       
   277 void CRsfwWaitNoteManager::RunL()
       
   278     {
       
   279     DEBUGSTRING16(("CRsfwWaitNoteManager::RunL, status=%d, optype=%d", iStatus.Int(), iOpType));
       
   280     CancelWaitNoteL(iNoteId);
       
   281     
       
   282     TInt errorCode = iStatus.Int();
       
   283     
       
   284     switch (iOpType) 
       
   285         {
       
   286         case ERemoteWarnDisconnect:
       
   287             if (iStatus == EAknSoftkeyYes)
       
   288                 {
       
   289                 errorCode = KErrNone;
       
   290                 }
       
   291             else 
       
   292                 {
       
   293                 errorCode = KErrCancel;
       
   294                 }
       
   295             break;
       
   296        case ERemoteOpAuthDialog:
       
   297             iAuthCredentials->iUserName = (*iAuthRequest)().iUserName;
       
   298             iAuthCredentials->iPassword = (*iAuthRequest)().iPassword;  
       
   299             delete iAuthRequest;
       
   300             iAuthRequest = NULL;
       
   301             break;
       
   302        case ERemoteUnavailableRetry:
       
   303        case ERemoteOpConnecting:
       
   304        case ERemoteOpDirDownloading:
       
   305             delete iGlobalNoteRequest;
       
   306             iGlobalNoteRequest = NULL; 
       
   307             break;
       
   308        case ERemoteSaveToLocal:
       
   309             iSaveParams->iFileName = (*iSaveToRequest)().iFileName;
       
   310             delete iSaveToRequest;
       
   311             iSaveToRequest = NULL;
       
   312             break;
       
   313         }
       
   314         
       
   315     if (iOperation) // is some operation waiting for info about this wait note?
       
   316         {
       
   317        if (((iOpType == ERemoteOpDirDownloading) || (iOpType == ERemoteOpConnecting))
       
   318             && (errorCode == KErrCancel))
       
   319                 {
       
   320                  DEBUGSTRING16(("calling iOperation->CancelTransaction()"));
       
   321                 // we received from the dialog information that user wants to cancel
       
   322                 // call CancelTransaction on the access protocol module
       
   323                 // this then must cancel our pending transaction
       
   324                 // so we finally get to the ErrorL() state of the state machine
       
   325                 iOperation->CancelTransaction();
       
   326                 }
       
   327  
       
   328        else 
       
   329             {
       
   330             DEBUGSTRING16(("calling iOperation->HandleRemoteAccessResponse()"));
       
   331             iOperation->HandleRemoteAccessResponse(0, errorCode);
       
   332             }
       
   333         }
       
   334                
       
   335     }
       
   336     
       
   337 // ----------------------------------------------------------------------------
       
   338 // CRsfwWaitNoteManager::RunError
       
   339 // ----------------------------------------------------------------------------
       
   340 //
       
   341 TInt CRsfwWaitNoteManager::RunError(TInt /*aError*/)
       
   342     {
       
   343     DEBUGSTRING16(("CRsfwWaitNoteManager::RunError"));		
       
   344     return KErrNone;
       
   345 	}    
       
   346     
       
   347 // -----------------------------------------------------------------------------
       
   348 // CRsfwWaitNoteManager::DoCancel
       
   349 // -----------------------------------------------------------------------------
       
   350 //  
       
   351 void CRsfwWaitNoteManager::DoCancel() 
       
   352 	{	
       
   353 	}  
       
   354 
       
   355 // -----------------------------------------------------------------------------
       
   356 // CRsfwWaitNoteManager::ShowAddressNotFoundErrorL
       
   357 // -----------------------------------------------------------------------------
       
   358 // 	
       
   359 void CRsfwWaitNoteManager::ShowAddressNotFoundErrorL(
       
   360     const TDesC& aFriendlyName) 
       
   361     {	
       
   362     DEBUGSTRING16(("CRsfwWaitNoteManager::ShowAddressNotFoundErrorL (drive '%S')", &aFriendlyName));	
       
   363 	RResourceFile resourceFile;
       
   364 	TResourceReader resourceReader; 
       
   365 	
       
   366 	// get the name of the localized resource file
       
   367 	TFileName resourceFileName;
       
   368     resourceFileName.Copy(KResourceFile);
       
   369 	BaflUtils::NearestLanguageFile(CRsfwRfeServer::Env()->iFs,resourceFileName);
       
   370 	
       
   371 	DEBUGSTRING16(("opening resource file '%S'", &resourceFileName)); 
       
   372 	// read localized string from resource file
       
   373     resourceFile.OpenL(CRsfwRfeServer::Env()->iFs, resourceFileName);
       
   374     CleanupClosePushL(resourceFile);
       
   375     resourceFile.ConfirmSignatureL();
       
   376     DEBUGSTRING(("resource file ok")); 
       
   377     HBufC8* noteBuffer = resourceFile.AllocReadLC(R_NOTE_ADDRESS_NOT_AVAILABLE);
       
   378     resourceReader.SetBuffer(noteBuffer);
       
   379     HBufC* noteText = resourceReader.ReadHBufCL();
       
   380     CleanupStack::PushL(noteText);
       
   381     
       
   382     // S60 .loc formatting
       
   383     HBufC* formattedText = HBufC::NewLC(noteText->Length() + aFriendlyName.Length());  
       
   384     TPtr fprt = formattedText->Des();  
       
   385     StringLoader::Format(fprt, *noteText , -1, aFriendlyName);
       
   386     
       
   387     // error dialog
       
   388     CAknGlobalNote* errorDialog = CAknGlobalNote::NewLC();
       
   389     errorDialog->ShowNoteL(EAknGlobalErrorNote, *formattedText);
       
   390     CleanupStack::PopAndDestroy(5); // resourceFile, noteBuffer, noteText, formattedText, errordialog
       
   391 	}
       
   392 
       
   393 
       
   394 // -----------------------------------------------------------------------------
       
   395 // CRsfwWaitNoteManager::SetAuthenticationDialogL
       
   396 // -----------------------------------------------------------------------------
       
   397 // 
       
   398 void CRsfwWaitNoteManager::SetAuthenticationDialogL(TRsfwAuthenticationDlgRequest& aAuthRequest) 
       
   399     {
       
   400     DEBUGSTRING16(("CRsfwWaitNoteManager::SetAuthenticationDialogL"));
       
   401     if (iAuthRequest) 
       
   402         {
       
   403         delete iAuthRequest;
       
   404         iAuthRequest = NULL;
       
   405         }
       
   406     iAuthRequest = new (ELeave) TRsfwAuthParamsPckg(); 
       
   407     
       
   408     (*iAuthRequest)() = aAuthRequest;
       
   409     iAuthCredentials = &aAuthRequest;
       
   410     }
       
   411 
       
   412 // -----------------------------------------------------------------------------
       
   413 // CRsfwWaitNoteManager::SetGlobalNoteRequestL
       
   414 // -----------------------------------------------------------------------------
       
   415 //
       
   416 void CRsfwWaitNoteManager::SetGlobalNoteRequestL(TRsfwNotPluginRequest& aRequestStruct)
       
   417     {
       
   418   	DEBUGSTRING16(("CRsfwWaitNoteManager::SetGlobalNoteRequestL"));
       
   419     if (iGlobalNoteRequest) 
       
   420         {
       
   421         delete iGlobalNoteRequest;
       
   422         iGlobalNoteRequest = NULL;
       
   423         }
       
   424     
       
   425     iGlobalNoteRequest = new (ELeave) TRsfwRetryParamsPckg();
       
   426     (*iGlobalNoteRequest)() = aRequestStruct;
       
   427     }
       
   428 
       
   429 // -----------------------------------------------------------------------------
       
   430 // CRsfwWaitNoteManager::SetSaveToDialogRequestL
       
   431 // -----------------------------------------------------------------------------
       
   432 //
       
   433 void CRsfwWaitNoteManager::SetSaveToDialogRequestL(TRsfwSaveToDlgRequest& aSaveToRequest) 
       
   434     {
       
   435     DEBUGSTRING16(("CRsfwWaitNoteManager::SetSaveToDialogRequestL"));	
       
   436     if (iSaveToRequest) 
       
   437         {
       
   438         delete iSaveToRequest;
       
   439         iSaveToRequest = NULL;
       
   440         }
       
   441     
       
   442     iSaveToRequest = new (ELeave) TRsfwSaveToParamsPckg();
       
   443     
       
   444     (*iSaveToRequest)() = aSaveToRequest;
       
   445     iSaveParams = &aSaveToRequest;
       
   446     }
       
   447 
       
   448 // -----------------------------------------------------------------------------
       
   449 // CRsfwWaitNoteManager::ShowFileSavedToDialogL
       
   450 // -----------------------------------------------------------------------------
       
   451 //
       
   452 void CRsfwWaitNoteManager::ShowFileSavedToDialogL(const TDesC& aPath )
       
   453     {
       
   454     DEBUGSTRING16(("CRsfwWaitNoteManager::ShowFileSavedToDialogL"));	
       
   455     HBufC8* textbuffer = iResourceFile.AllocReadL(R_CONFIRM_FILE_SAVED_TO);
       
   456     CleanupStack::PushL(textbuffer);
       
   457     iResourceReader.SetBuffer(textbuffer);
       
   458     HBufC* text = iResourceReader.ReadHBufCL();
       
   459     CleanupStack::PushL(text);
       
   460     HBufC* formattedText = NULL;
       
   461     
       
   462     // extract the path
       
   463     TParse parser;
       
   464     parser.Set(aPath, NULL, NULL);
       
   465     // try to get localized path
       
   466     CDirectoryLocalizer* localizer = CDirectoryLocalizer::NewL();
       
   467     CleanupStack::PushL(localizer);
       
   468     // S60 localizer requires also drive letter,
       
   469     // i.e. matches are like C:\\Data\\Images
       
   470     localizer->SetFullPath(parser.DriveAndPath());
       
   471     TPtrC localizedName = localizer->LocalizedName();
       
   472     
       
   473     if (localizedName != KNullDesC) 
       
   474         {
       
   475         formattedText = HBufC::NewMaxLC(text->Length() +
       
   476     								localizedName.Length());
       
   477     	
       
   478         TPtr formatPtr(formattedText->Des());
       
   479         StringLoader::Format(formatPtr, *text, -1, localizedName); 
       
   480         }
       
   481     else 
       
   482         {
       
   483         formattedText = HBufC::NewMaxLC(text->Length() +
       
   484     								aPath.Length());
       
   485     	
       
   486         TPtr formatPtr(formattedText->Des());
       
   487         StringLoader::Format(formatPtr, *text, -1, parser.Path());       
       
   488         }
       
   489     
       
   490    																				
       
   491     CAknGlobalNote* dlg = CAknGlobalNote::NewLC();
       
   492     dlg->ShowNoteL(EAknGlobalInformationNote, *formattedText );
       
   493     CleanupStack::PopAndDestroy(5); // textbuffer, text, localizer, formattedtext, dlg
       
   494     }
       
   495 
       
   496 // -----------------------------------------------------------------------------
       
   497 // CRsfwWaitNoteManager::ShowFailedSaveNoteL
       
   498 // -----------------------------------------------------------------------------
       
   499 //
       
   500 void CRsfwWaitNoteManager::ShowFailedSaveNoteL() 
       
   501     {
       
   502     DEBUGSTRING16(("CRsfwWaitNoteManager::ShowFailedSaveNoteL"));
       
   503     ShowGlobalInformationNoteL(R_SAVING_FAILED);
       
   504     }
       
   505 
       
   506 // -----------------------------------------------------------------------------
       
   507 // CRsfwWaitNoteManager::ShowFailedSaveNoteL
       
   508 // -----------------------------------------------------------------------------
       
   509 //
       
   510 void CRsfwWaitNoteManager::ShowNoNetworkCoverageNoteL() 
       
   511     {
       
   512     DEBUGSTRING16(("CRsfwWaitNoteManager::ShowNoNetworkCoverageNoteL"));
       
   513     ShowGlobalInformationNoteL(R_NO_NETWORK_COVERAGE);
       
   514     }
       
   515 
       
   516 // -----------------------------------------------------------------------------
       
   517 // CRsfwWaitNoteManager::ShowOfflineNotPossibleNoteL
       
   518 // -----------------------------------------------------------------------------
       
   519 //
       
   520 void CRsfwWaitNoteManager::ShowOfflineNotPossibleNoteL() 
       
   521     {
       
   522     DEBUGSTRING16(("CRsfwWaitNoteManager::ShowOfflineNotPossibleNoteL")); 	
       
   523     ShowGlobalInformationNoteL(R_OFFLINE_NOT_POSSIBLE);
       
   524     }
       
   525 
       
   526 // -----------------------------------------------------------------------------
       
   527 // CRsfwWaitNoteManager::ShowOutOfMemoryNoteL
       
   528 // -----------------------------------------------------------------------------
       
   529 //
       
   530 void CRsfwWaitNoteManager::ShowOutOfMemoryNoteL() 
       
   531     {
       
   532     DEBUGSTRING16(("CRsfwWaitNoteManager::ShowOutOfMemoryNoteL")); 	
       
   533     ShowGlobalInformationNoteL(R_RAM_OUT_OF_MEMORY);
       
   534     }
       
   535 
       
   536 // -----------------------------------------------------------------------------
       
   537 // CRsfwWaitNoteManager::ShowGlobalInformationNoteL
       
   538 // -----------------------------------------------------------------------------
       
   539 //
       
   540 void CRsfwWaitNoteManager::ShowGlobalInformationNoteL(TInt aResourceId) 
       
   541     {
       
   542     HBufC8* textbuffer = iResourceFile.AllocReadL(aResourceId);
       
   543     CleanupStack::PushL(textbuffer);
       
   544     iResourceReader.SetBuffer(textbuffer);
       
   545     HBufC* text = iResourceReader.ReadHBufCL();
       
   546     CleanupStack::PushL(text);
       
   547     CAknGlobalNote* dlg = CAknGlobalNote::NewLC();
       
   548     dlg->ShowNoteL(EAknGlobalInformationNote, *text );
       
   549     CleanupStack::PopAndDestroy(3); // textBuffer, text, dlg
       
   550     }
       
   551 
       
   552 // -----------------------------------------------------------------------------
       
   553 // CRsfwWaitNoteManager::ResetOperation
       
   554 // -----------------------------------------------------------------------------
       
   555 //
       
   556 void CRsfwWaitNoteManager::ResetOperation()
       
   557     {
       
   558     DEBUGSTRING16(("CRsfwWaitNoteManager::ResetOperation")); 	 	
       
   559     iOperation = NULL;
       
   560     }
       
   561 
       
   562 // -----------------------------------------------------------------------------
       
   563 
       
   564 //  End of File