connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ActiveOfflineWlanDisabledNote.cpp
changeset 0 5a93021fdf25
child 41 bbb64eb3bdee
equal deleted inserted replaced
-1:000000000000 0:5a93021fdf25
       
     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:  Implementation of CActiveOfflineWlanDisabledNote.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include "ActiveOfflineWlanDisabledNote.h"
       
    21 
       
    22 #include <ConnUiUtilsNotif.rsg>
       
    23 #include <AknGlobalNote.h>
       
    24 #include <StringLoader.h>
       
    25 
       
    26 
       
    27 // ================= MEMBER FUNCTIONS =======================
       
    28 
       
    29 // ---------------------------------------------------------
       
    30 // CActiveOfflineWlanDisabledNote::CActiveOfflineWlanDisabledNote()
       
    31 // ---------------------------------------------------------
       
    32 //
       
    33 CActiveOfflineWlanDisabledNote::CActiveOfflineWlanDisabledNote( 
       
    34                                 COfflineWlanDisabledNoteNotif* aNotif )
       
    35 : CActive( KErrNone ), 
       
    36   iNotif( aNotif )
       
    37     {
       
    38     CActiveScheduler::Add( this );            
       
    39     }
       
    40     
       
    41     
       
    42 // ---------------------------------------------------------
       
    43 // CActiveOfflineWlanDisabledNote::~CActiveOfflineWlanDisabledNote()
       
    44 // ---------------------------------------------------------
       
    45 //    
       
    46 CActiveOfflineWlanDisabledNote::~CActiveOfflineWlanDisabledNote()
       
    47     {
       
    48     Cancel();    
       
    49     }
       
    50 
       
    51 
       
    52 // ---------------------------------------------------------
       
    53 // CActiveOfflineWlanDisabledNote::RunL()
       
    54 // ---------------------------------------------------------
       
    55 //     
       
    56 void CActiveOfflineWlanDisabledNote::RunL()
       
    57     {
       
    58     if( iStatus == KErrNone )
       
    59         {
       
    60         HBufC* stringLabel =  StringLoader::LoadLC( R_OFFLINE_NOT_POSSIBLE );
       
    61         CleanupStack::PushL( stringLabel );
       
    62                                           
       
    63         CAknGlobalNote* globalNote = CAknGlobalNote::NewLC();
       
    64         globalNote->ShowNoteL( EAknGlobalInformationNote, *stringLabel );
       
    65 
       
    66         CleanupStack::PopAndDestroy( globalNote );
       
    67         CleanupStack::PopAndDestroy( stringLabel );
       
    68         
       
    69         iNotif->SetCancelledFlag( ETrue );
       
    70         iNotif->CompleteL( KErrNone );                     
       
    71         }                
       
    72     }
       
    73 
       
    74     
       
    75 // ---------------------------------------------------------
       
    76 // CActiveOfflineWlanDisabledNote::DoCancel()
       
    77 // ---------------------------------------------------------
       
    78 // 
       
    79 void CActiveOfflineWlanDisabledNote::DoCancel()
       
    80     {
       
    81     }
       
    82 
       
    83  
       
    84 // ---------------------------------------------------------
       
    85 // CActiveOfflineWlanDisabledNote::LaunchOfflineWlanDisabledNote()
       
    86 // ---------------------------------------------------------
       
    87 //    
       
    88 void CActiveOfflineWlanDisabledNote::LaunchOfflineWlanDisabledNote()
       
    89     {
       
    90     SetActive();    
       
    91     iClientStatus = &iStatus;
       
    92     User::RequestComplete( iClientStatus, KErrNone );    
       
    93     }
       
    94 
       
    95 
       
    96 // End of File