wlanutilities/wlansniffer/aiplugin/src/wsfsearchwlansdialog.cpp
branchRCL_3
changeset 18 981afc7d3841
parent 0 56b72877c1cb
equal deleted inserted replaced
16:8b0eae1b1d71 18:981afc7d3841
    12 * Contributors:
    12 * Contributors:
    13 *
    13 *
    14 * Description:  Implementation of CWsfSearchWlansDialog
    14 * Description:  Implementation of CWsfSearchWlansDialog
    15 *
    15 *
    16 */
    16 */
       
    17 
    17 
    18 
    18 
    19 
    19 //  EXTERNAL INCLUDES
    20 //  EXTERNAL INCLUDES
    20 #include <badesca.h>
    21 #include <badesca.h>
    21 #include <coemain.h>
    22 #include <coemain.h>
    22 #include <eiklbx.h>
    23 #include <eiklbx.h>
    23 #include <eikclbd.h>
    24 #include <eikclbd.h>
    24 #include <eikclb.h>
    25 #include <eikclb.h>
    25 #include <AknIconArray.h>
    26 #include <AknIconArray.h>
    26 #include <wsfaipluginrsc.rsg>
    27 #include <wsfaipluginrsc.rsg>
       
    28 
    27 //  INTERNAL INCLUDES
    29 //  INTERNAL INCLUDES
    28 #include "wsfsearchwlansdialog.h"
    30 #include "wsfsearchwlansdialog.h"
       
    31 #include "wsflogger.h"
    29 
    32 
    30 //  MACROS
    33 //  MACROS
    31 #ifdef _DEBUG    
    34 #ifdef _DEBUG    
    32     _LIT( KSearchDialogPanic, "CWsfSearchWlansDialog" );
    35     _LIT( KSearchDialogPanic, "CWsfSearchWlansDialog" );
    33     #define _ASS_D( cond ) __ASSERT_DEBUG( (cond), \
    36     #define _ASS_D( cond ) __ASSERT_DEBUG( (cond), \
    46     {
    49     {
    47     CWsfSearchWlansDialog* thisPtr = NewLC( aSelectedItem );
    50     CWsfSearchWlansDialog* thisPtr = NewLC( aSelectedItem );
    48     CleanupStack::Pop( thisPtr );
    51     CleanupStack::Pop( thisPtr );
    49     return thisPtr;
    52     return thisPtr;
    50     }
    53     }
    51     
    54 
       
    55 
    52 // --------------------------------------------------------------------------
    56 // --------------------------------------------------------------------------
    53 // CWsfSearchWlansDialog::NewLC
    57 // CWsfSearchWlansDialog::NewLC
    54 // --------------------------------------------------------------------------
    58 // --------------------------------------------------------------------------
    55 //    
    59 //    
    56 CWsfSearchWlansDialog* CWsfSearchWlansDialog::NewLC( TInt &aSelectedItem )
    60 CWsfSearchWlansDialog* CWsfSearchWlansDialog::NewLC( TInt &aSelectedItem )
    60     CleanupStack::PushL( thisPtr );
    64     CleanupStack::PushL( thisPtr );
    61     thisPtr->ConstructL();
    65     thisPtr->ConstructL();
    62     return thisPtr;
    66     return thisPtr;
    63     }
    67     }
    64 
    68 
       
    69 
    65 // --------------------------------------------------------------------------
    70 // --------------------------------------------------------------------------
    66 // CWsfSearchWlansDialog::~CWsfSearchWlansDialog
    71 // CWsfSearchWlansDialog::~CWsfSearchWlansDialog
    67 // --------------------------------------------------------------------------
    72 // --------------------------------------------------------------------------
    68 //    
    73 //    
    69 CWsfSearchWlansDialog::~CWsfSearchWlansDialog()
    74 CWsfSearchWlansDialog::~CWsfSearchWlansDialog()
    70     {
    75     {
    71     }
    76     }
    72     
    77 
       
    78 
    73 // --------------------------------------------------------------------------
    79 // --------------------------------------------------------------------------
    74 // CWsfSearchWlansDialog::CWsfSearchWlansDialog
    80 // CWsfSearchWlansDialog::CWsfSearchWlansDialog
    75 // --------------------------------------------------------------------------
    81 // --------------------------------------------------------------------------
    76 //    
    82 //    
    77 CWsfSearchWlansDialog::CWsfSearchWlansDialog( TInt &aSelectedItem ) : 
    83 CWsfSearchWlansDialog::CWsfSearchWlansDialog( TInt &aSelectedItem ) : 
    78     CAknListQueryDialog( &aSelectedItem ),
    84     CAknListQueryDialog( &aSelectedItem ),
    79     iSelectedItem( &aSelectedItem )
    85     iSelectedItem( &aSelectedItem )
    80     {
    86     {
    81     }
    87     }
    82     
    88 
       
    89 
    83 // --------------------------------------------------------------------------
    90 // --------------------------------------------------------------------------
    84 // CWsfSearchWlansDialog::ConstructL
    91 // CWsfSearchWlansDialog::ConstructL
    85 // --------------------------------------------------------------------------
    92 // --------------------------------------------------------------------------
    86 //    
    93 //    
    87 void CWsfSearchWlansDialog::ConstructL()
    94 void CWsfSearchWlansDialog::ConstructL()
    88     {
    95     {
    89     // nothing at the moment...
    96     // nothing at the moment...
    90     }
    97     }
    91     
    98 
       
    99 
    92 // --------------------------------------------------------------------------
   100 // --------------------------------------------------------------------------
    93 // CWsfSearchWlansDialog::ProcessCommandL
   101 // CWsfSearchWlansDialog::ProcessCommandL
    94 // --------------------------------------------------------------------------
   102 // --------------------------------------------------------------------------
    95 //    
   103 //    
    96 void CWsfSearchWlansDialog::ProcessCommandL( TInt aCommandId )
   104 void CWsfSearchWlansDialog::ProcessCommandL( TInt aCommandId )
    97     {
   105     {
       
   106     LOG_ENTERFN( "CWsfSearchWlansDialog::ProcessCommandL" );
    98     CAknListQueryDialog::ProcessCommandL( aCommandId );    
   107     CAknListQueryDialog::ProcessCommandL( aCommandId );    
    99     }
   108     }
   100     
   109 
       
   110 
   101 // --------------------------------------------------------------------------
   111 // --------------------------------------------------------------------------
   102 // CWsfSearchWlansDialog::UpdateHotSpotsL
   112 // CWsfSearchWlansDialog::UpdateHotSpotsL
   103 // --------------------------------------------------------------------------
   113 // --------------------------------------------------------------------------
   104 //    
   114 //    
   105 void CWsfSearchWlansDialog::UpdateHotSpotsL( MDesCArray* aItemTextArray,
   115 void CWsfSearchWlansDialog::UpdateHotSpotsL( MDesCArray* aItemTextArray,
   106                                              TInt aCurrentItem )
   116                                              TInt aCurrentItem )
   107     {
   117     {
       
   118     LOG_ENTERFN( "CWsfSearchWlansDialog::UpdateHotSpotsL" );
   108     _ASS_D( ListBox() );
   119     _ASS_D( ListBox() );
   109     
   120     
   110     SetItemTextArray( aItemTextArray );
   121     SetItemTextArray( aItemTextArray );
   111     SetOwnershipType( ELbmDoesNotOwnItemArray );
   122     SetOwnershipType( ELbmDoesNotOwnItemArray );
   112     ListBox()->HandleItemAdditionL();
   123     ListBox()->HandleItemAdditionL();
   117     else
   128     else
   118         {
   129         {
   119         ListBox()->SetCurrentItemIndex( aCurrentItem );     
   130         ListBox()->SetCurrentItemIndex( aCurrentItem );     
   120         }    
   131         }    
   121     }
   132     }
   122     
   133 
       
   134 
   123 // --------------------------------------------------------------------------
   135 // --------------------------------------------------------------------------
   124 // CWsfSearchWlansDialog::SelectedItem
   136 // CWsfSearchWlansDialog::SelectedItem
   125 // --------------------------------------------------------------------------
   137 // --------------------------------------------------------------------------
   126 //    
   138 //    
   127 TInt CWsfSearchWlansDialog::SelectedItem()
   139 TInt CWsfSearchWlansDialog::SelectedItem()
   128     {
   140     {
       
   141     LOG_ENTERFN( "CWsfSearchWlansDialog::SelectedItem" );
   129     _ASS_D( ListBox() );
   142     _ASS_D( ListBox() );
   130 
   143 
   131     return ListBox()->CurrentItemIndex();
   144     return ListBox()->CurrentItemIndex();
   132     }
   145     }
   133 
   146 
   134 // --------------------------------------------------------------------------
   147 
   135 // CWsfAiPlugin::StartConnectingAnimationL
   148 // --------------------------------------------------------------------------
       
   149 // CWsfSearchWlansDialog::StartConnectingAnimationL
   136 // --------------------------------------------------------------------------
   150 // --------------------------------------------------------------------------
   137 //
   151 //
   138 void CWsfSearchWlansDialog::StartConnectingAnimationL()
   152 void CWsfSearchWlansDialog::StartConnectingAnimationL()
   139     {
   153     {
   140     }
   154     LOG_ENTERFN( "CWsfSearchWlansDialog::StartConnectingAnimationL" );
       
   155     }
       
   156 
   141 
   157 
   142 // --------------------------------------------------------------------------
   158 // --------------------------------------------------------------------------
   143 // CWsfSearchWlansDialog::ForceRefreshingL
   159 // CWsfSearchWlansDialog::ForceRefreshingL
   144 // --------------------------------------------------------------------------
   160 // --------------------------------------------------------------------------
   145 //    
   161 //    
   146 void CWsfSearchWlansDialog::ForceRefreshingL()
   162 void CWsfSearchWlansDialog::ForceRefreshingL()
   147     {
   163     {
       
   164     LOG_ENTERFN( "CWsfSearchWlansDialog::ForceRefreshingL" );
   148     }
   165     }
   149 
   166 
   150 
   167 
   151 // --------------------------------------------------------------------------
   168 // --------------------------------------------------------------------------
   152 // CWsfSearchWlansDialog::MultilineControl
   169 // CWsfSearchWlansDialog::MultilineControl
   153 // --------------------------------------------------------------------------
   170 // --------------------------------------------------------------------------
   154 //
   171 //
   155 TBool CWsfSearchWlansDialog::MultilineControl() 
   172 TBool CWsfSearchWlansDialog::MultilineControl() 
   156     { 
   173     {
       
   174     LOG_ENTERFN( "CWsfSearchWlansDialog::MultilineControl" );
   157     return ETrue; 
   175     return ETrue; 
   158     }
   176     }
   159       
   177 
   160 
   178 
   161 // --------------------------------------------------------------------------
   179 // --------------------------------------------------------------------------
   162 // CWsfSearchWlansDialog::UpdateViewL
   180 // CWsfSearchWlansDialog::UpdateViewL
   163 // --------------------------------------------------------------------------
   181 // --------------------------------------------------------------------------
   164 //    
   182 //    
   165 void CWsfSearchWlansDialog::UpdateViewL( MDesCArray* /*aItemTextArray*/ )
   183 void CWsfSearchWlansDialog::UpdateViewL( MDesCArray* /*aItemTextArray*/ )
   166     {
   184     {
   167     }
   185     LOG_ENTERFN( "CWsfSearchWlansDialog::UpdateViewL" );
       
   186     }
       
   187 
   168 
   188 
   169 // --------------------------------------------------------------------------
   189 // --------------------------------------------------------------------------
   170 // CWsfSearchWlansDialog::DisplayEngineOffL
   190 // CWsfSearchWlansDialog::DisplayEngineOffL
   171 // --------------------------------------------------------------------------
   191 // --------------------------------------------------------------------------
   172 //    
   192 //    
   173 void CWsfSearchWlansDialog::DisplayEngineOffL()
   193 void CWsfSearchWlansDialog::DisplayEngineOffL()
   174     {
   194     {
   175     }
   195     LOG_ENTERFN( "CWsfSearchWlansDialog::DisplayEngineOffL" );
   176 
   196     }
   177 
   197 
   178     
   198 
   179 // --------------------------------------------------------------------------
   199 // --------------------------------------------------------------------------
   180 // CWsfSearchWlansDialog::PreLayoutDynInitL
   200 // CWsfSearchWlansDialog::PreLayoutDynInitL
   181 // --------------------------------------------------------------------------
   201 // --------------------------------------------------------------------------
   182 //    
   202 //    
   183 void CWsfSearchWlansDialog::PreLayoutDynInitL()
   203 void CWsfSearchWlansDialog::PreLayoutDynInitL()
   184     {
   204     {
       
   205     LOG_ENTERFN( "CWsfSearchWlansDialog::PreLayoutDynInitL" );
   185     _ASS_D( ListBox() );
   206     _ASS_D( ListBox() );
   186     // add the empty text here....
   207     // add the empty text here....
   187     HBufC* noWlansAvailable = iCoeEnv->AllocReadResourceLC( 
   208     HBufC* noWlansAvailable = iCoeEnv->AllocReadResourceLC( 
   188                                         R_QTN_STATUS_NO_WLANS_AVAILABLE );
   209                                         R_QTN_STATUS_NO_WLANS_AVAILABLE );
   189     
   210