connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ActiveWLANNetworkUnavailableNote.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 06 Jul 2010 14:42:41 +0300
changeset 47 cb7afde124a3
parent 0 5a93021fdf25
child 58 83ca720e2b9a
child 61 8b0c979bbe8c
permissions -rw-r--r--
Revision: 201025 Kit: 2010127

/*
* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). 
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:  Implementation of CActiveWLANNetworkUnavailableNote
*
*/


// INCLUDE FILES
#include "ActiveWLANNetworkUnavailableNote.h"

#include <connuiutilsnotif.rsg>
#include <AknGlobalNote.h>
#include <StringLoader.h>


// CONSTANTS

// ================= MEMBER FUNCTIONS =======================


// ---------------------------------------------------------
// CActiveWLANNetworkUnavailableNote::CActiveWLANNetworkUnavailableNote()
// ---------------------------------------------------------
//
CActiveWLANNetworkUnavailableNote::CActiveWLANNetworkUnavailableNote( 
                                  CConnectionDialogsNotifBase* aNotif ) :
CActive( KErrNone ), iNotif( aNotif )
    {
    CActiveScheduler::Add( this );            
    }
    
// ---------------------------------------------------------
// CActiveOfflineWlanDisabledNote::DoCancel()
// ---------------------------------------------------------
// 
void CActiveWLANNetworkUnavailableNote::DoCancel()
    {
    }
 
// ---------------------------------------------------------
// CActiveOfflineWlanDisabledNote::RunL()
// ---------------------------------------------------------
//     
void CActiveWLANNetworkUnavailableNote::RunL()
    {
    if( iStatus == KErrNone )
        {
        HBufC* stringLabel;
        
        if ( iNoteType == EWlanNote2 )
            {
            stringLabel =  StringLoader::LoadLC( 
                                 R_OCC_INFO_NO_WLAN_AVAILABLE );
                    
            }
        else
            {
            stringLabel =  StringLoader::LoadLC( 
                                   R_WLAN_NETWORK_UNAVAILABLE );
            }
                                          
        CAknGlobalNote* globalNote = CAknGlobalNote::NewLC();
        globalNote->ShowNoteL( EAknGlobalErrorNote, *stringLabel );

        CleanupStack::PopAndDestroy( globalNote );
        CleanupStack::PopAndDestroy( stringLabel );                    
        }
    
    iNotif->SetCancelledFlag( ETrue );
    iNotif->CompleteL( KErrNone );
    }
    
// ---------------------------------------------------------
// CActiveWLANNetworkUnavailableNote::LaunchWLANNetworkUnavailable()
// ---------------------------------------------------------
//    
void CActiveWLANNetworkUnavailableNote::LaunchWLANNetworkUnavailable(
                                                 const TInt aNoteType )
    {
    iNoteType = aNoteType;
    SetActive();    
    iClientStatus = &iStatus;
    User::RequestComplete( iClientStatus, KErrNone );    
    }
    
    
// ---------------------------------------------------------
// CActiveWLANNetworkUnavailableNote::CActiveWLANNetworkUnavailableNote()
// ---------------------------------------------------------
//    
CActiveWLANNetworkUnavailableNote::~CActiveWLANNetworkUnavailableNote()
    {
    Cancel();    
    }


// End of File