wlanutilities/wlansniffer/aihelper/src/wsfaihelperview.cpp
branchRCL_3
changeset 54 63be7eb3fc78
parent 52 b852595f5cbe
child 55 f28ada11abbf
equal deleted inserted replaced
52:b852595f5cbe 54:63be7eb3fc78
     1 /*
       
     2 * Copyright (c) 2007-2008 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 CWsfAiHelperView
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 // EXTERNAL INCLUDES
       
    21 #include  <aknViewAppUi.h>
       
    22 #include <wsfaihelper.rsg>
       
    23 
       
    24 //  CLASS HEADER
       
    25 #include  "wsfaihelperview.h"
       
    26 
       
    27 // INTERNAL INCLUDES
       
    28 #include "wsfaihelperappui.h"
       
    29 #include "wsfmodelobserver.h"
       
    30 #include "wsfaihelper.hrh"
       
    31 #include "wsfmodel.h"
       
    32 #include "wsfaihelperdocument.h"
       
    33 #include "wsfaihelpercontainer.h"
       
    34 #include "wsflogger.h"
       
    35 
       
    36 
       
    37 
       
    38 //  CONSTRUCTION AND DESTRUCTION
       
    39 
       
    40 // ---------------------------------------------------------------------------
       
    41 // CWsfAiHelperView::NewL
       
    42 // ---------------------------------------------------------------------------
       
    43 //
       
    44 CWsfAiHelperView* CWsfAiHelperView::NewL( CWsfAiHelperAppUi* aAppUi )
       
    45     {
       
    46     CWsfAiHelperView* self = CWsfAiHelperView::NewLC( aAppUi );
       
    47     CleanupStack::Pop( self );
       
    48     return self;
       
    49     }
       
    50 
       
    51 
       
    52 // ---------------------------------------------------------------------------
       
    53 // CWsfAiHelperView::NewLC
       
    54 // ---------------------------------------------------------------------------
       
    55 //
       
    56 CWsfAiHelperView* CWsfAiHelperView::NewLC( CWsfAiHelperAppUi* aAppUi )
       
    57     {
       
    58     CWsfAiHelperView* self = new (ELeave) CWsfAiHelperView( aAppUi );
       
    59     CleanupStack::PushL( self );
       
    60     self->ConstructL();
       
    61     return self;
       
    62     }
       
    63 
       
    64 
       
    65 // ---------------------------------------------------------------------------
       
    66 // CWsfAiHelperView::CWsfAiHelperView
       
    67 // ---------------------------------------------------------------------------
       
    68 //
       
    69 CWsfAiHelperView::CWsfAiHelperView( CWsfAiHelperAppUi* aAppUi ): 
       
    70     CAknView(),
       
    71     iAppUi( aAppUi )
       
    72     {
       
    73     }
       
    74 
       
    75 
       
    76 // ---------------------------------------------------------------------------
       
    77 // CWsfAiHelperView::~CWsfAiHelperView
       
    78 // ---------------------------------------------------------------------------
       
    79 //
       
    80 CWsfAiHelperView::~CWsfAiHelperView()
       
    81     {
       
    82     delete iContainer;
       
    83     }
       
    84 
       
    85 
       
    86 // ---------------------------------------------------------------------------
       
    87 // CWsfAiHelperView::ConstructL
       
    88 // ---------------------------------------------------------------------------
       
    89 //
       
    90 void CWsfAiHelperView::ConstructL()
       
    91     {
       
    92     BaseConstructL( R_SNIFFER_AI_HELPER_VIEW );
       
    93 
       
    94     iContainer = new (ELeave) CWsfAiHelperContainer();
       
    95     iContainer->ConstructL( ClientRect(), iAppUi );
       
    96     }
       
    97 
       
    98 
       
    99 // ---------------------------------------------------------------------------
       
   100 // CWsfAiHelperView::Id
       
   101 // ---------------------------------------------------------------------------
       
   102 //
       
   103 TUid CWsfAiHelperView::Id() const
       
   104     {
       
   105     return TUid::Uid( ESnifferAiHelperViewId );
       
   106     }
       
   107 
       
   108 
       
   109 // ---------------------------------------------------------------------------
       
   110 // CWsfAiHelperView::DoActivateL
       
   111 // ---------------------------------------------------------------------------
       
   112 //
       
   113 void CWsfAiHelperView::DoActivateL( const TVwsViewId& /*aPrevViewId*/,
       
   114                                     TUid /*aCustomMessageId*/,
       
   115                                     const TDesC8& /*aCustomMessage*/ )
       
   116     {
       
   117     LOG_ENTERFN( "CWsfAiHelperView::DoActivateL" );
       
   118     AppUi()->AddToStackL( *this, iContainer );
       
   119     }
       
   120 
       
   121 
       
   122 // ---------------------------------------------------------------------------
       
   123 // CWsfAiHelperView::DoDeactivate
       
   124 // ---------------------------------------------------------------------------
       
   125 //
       
   126 void CWsfAiHelperView::DoDeactivate()
       
   127     {
       
   128     LOG_ENTERFN( "CWsfAiHelperView::DoDeactivate" );
       
   129     if ( iContainer )
       
   130         {
       
   131         AppUi()->RemoveFromStack( iContainer );
       
   132         }
       
   133     }
       
   134 
       
   135 
       
   136 // ---------------------------------------------------------------------------
       
   137 // CWsfAiHelperView::HandleCommandL
       
   138 // ---------------------------------------------------------------------------
       
   139 //
       
   140 void CWsfAiHelperView::HandleCommandL( TInt aCommand )
       
   141     {
       
   142     LOG_ENTERFN( "CWsfAiHelperView::HandleCommandL" );
       
   143     AppUi()->HandleCommandL( aCommand );
       
   144     }
       
   145 
       
   146 
       
   147 // End of File