sdkcreationmw/sdkruntimes/GuiLauncher/src/EcmtGuiLogView.cpp
author Shabe Razvi <shaber@symbian.org>
Thu, 04 Nov 2010 17:22:05 +0000
changeset 4 b3b823debf08
parent 0 b26acd06ea60
permissions -rw-r--r--
Workaround for Bug 3917 - CWinsockInterface::DataSent calls NotifyDataSent which is not implemented.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     1
/*
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     2
* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     3
* All rights reserved.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     4
* This component and the accompanying materials are made available
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     6
* which accompanies this distribution, and is available
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     8
*
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     9
* Initial Contributors:
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    11
*
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    12
* Contributors:
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    13
*
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    14
* Description:  View class for LogContainer.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    15
*
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    16
*/
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    17
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    18
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    19
#include <EcmtGui.rsg>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    20
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    21
#include "EcmtGuiLogView.h"
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    22
#include "EcmtGuiLogContainer.h"
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    23
#include "EcmtGui.hrh"
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    24
#include "EcmtGuiAppUi.h"
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    25
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    26
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    27
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    28
// ======== MEMBER FUNCTIONS ========
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    29
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    30
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    31
// ---------------------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    32
// Two-phased constructor.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    33
// ---------------------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    34
//
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    35
CEcmtGuiLogView* CEcmtGuiLogView::NewL()
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    36
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    37
    CEcmtGuiLogView* self = new (ELeave) CEcmtGuiLogView;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    38
    CleanupStack::PushL(self);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    39
    self->ConstructL();
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    40
    CleanupStack::Pop(self);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    41
    return self;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    42
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    43
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    44
// ---------------------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    45
// C++ default constructor
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    46
// ---------------------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    47
//
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    48
CEcmtGuiLogView::CEcmtGuiLogView()
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    49
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    50
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    51
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    52
// ---------------------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    53
// Destructor
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    54
// ---------------------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    55
//
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    56
CEcmtGuiLogView::~CEcmtGuiLogView()
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    57
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    58
	if ( iContainer )
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    59
      {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    60
      AppUi()->RemoveFromStack( iContainer );
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    61
      delete iContainer; 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    62
      }    
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    63
  if( iMessageList )
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    64
      {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    65
      iMessageList->Reset();
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    66
      delete iMessageList;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    67
      }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    68
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    69
// ---------------------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    70
// From class CAknView.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    71
// From CAknView.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    72
// ---------------------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    73
//
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    74
TUid CEcmtGuiLogView::Id() const 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    75
    { 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    76
    return TUid::Uid(EEcmtLogViewId); 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    77
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    78
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    79
// ---------------------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    80
// From class CAknView.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    81
// Handles commands.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    82
// ---------------------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    83
//
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    84
void CEcmtGuiLogView::HandleCommandL( TInt aCommand )
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    85
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    86
    switch( aCommand )
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    87
        {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    88
        case EEcmtGuiCmdSettings:
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    89
            AppUi()->ActivateLocalViewL( TUid::Uid( EEcmtSettingsViewId ) );
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    90
            break;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    91
            
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    92
        default:
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    93
            AppUi()->HandleCommandL( aCommand ); 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    94
            break;            
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    95
        }     
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    96
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    97
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    98
// ---------------------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    99
// Symbian 2nd phase constructor can leave.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   100
// ---------------------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   101
//
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   102
void CEcmtGuiLogView::ConstructL()
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   103
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   104
    BaseConstructL(R_ECMTGUI_LOG_VIEW);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   105
    iMessageList = new (ELeave) CDesCArrayFlat(10);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   106
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   107
    
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   108
// ---------------------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   109
// From class CAknView.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   110
// Activates view.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   111
// ---------------------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   112
//
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   113
void CEcmtGuiLogView::DoActivateL( const TVwsViewId& /*aPrevViewId*/,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   114
                      TUid /*aCustomMessageId*/,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   115
                      const TDesC8& /*aCustomMessage*/ )
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   116
    {    
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   117
    iContainer = new (ELeave) CEcmtGuiLogContainer( *iMessageList );
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   118
    iContainer->SetMopParent( this );
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   119
    
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   120
    iContainer->ConstructL(ClientRect());
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   121
        
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   122
    AppUi()->AddToStackL( *this, iContainer ); 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   123
    iContainer->MakeVisible( ETrue );     
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   124
    //Start EcmtServer
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   125
    if( !iConnected )
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   126
        AppUi()->HandleCommandL( EEcmtGuiCmdStart );
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   127
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   128
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   129
// ---------------------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   130
// From class CAknView.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   131
// Deactivates view
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   132
// ---------------------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   133
//
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   134
void CEcmtGuiLogView::DoDeactivate()
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   135
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   136
    if ( iContainer )
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   137
        {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   138
        AppUi()->RemoveFromViewStack( *this, iContainer );
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   139
        delete iContainer;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   140
        iContainer = NULL;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   141
        }    
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   142
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   143
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   144
// ---------------------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   145
// From class MEikAutoMenuObserver.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   146
// Dynamically initialises a menu pane.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   147
// ---------------------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   148
//
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   149
void CEcmtGuiLogView::DynInitMenuPaneL( TInt aResourceId, 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   150
                                        CEikMenuPane *aMenuPane )
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   151
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   152
    if ( aResourceId == R_ECMTGUI_LOG_MENU )
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   153
        {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   154
        aMenuPane->SetItemDimmed( EEcmtGuiCmdStart, iConnected );
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   155
        aMenuPane->SetItemDimmed( EEcmtGuiCmdStop, !iConnected );
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   156
        aMenuPane->SetItemDimmed( EEcmtGuiCmdClearLog, 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   157
                            iMessageList->Count() < 2 );
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   158
                     
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   159
#ifndef _ENABLE_SETINGS_ON_WINS_       
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   160
#ifdef __WINS__
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   161
        aMenuPane->SetItemDimmed( EEcmtGuiCmdSettings, ETrue ); 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   162
#endif //__WINS__               
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   163
#else   //_ENABLE_SETINGS_ON_WINS_ is now defined
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   164
        aMenuPane->SetItemDimmed( EEcmtGuiCmdSettings, EFalse );      
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   165
#endif //_ENABLE_SETINGS_ON_WINS_
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   166
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   167
        }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   168
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   169
    
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   170
// ---------------------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   171
// Adds log message to the listbox.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   172
// ---------------------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   173
//
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   174
void CEcmtGuiLogView::LogMessageL( TInt aMsgResId )
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   175
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   176
    if( iContainer )
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   177
        iContainer->LogMessageL( aMsgResId );    
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   178
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   179
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   180
// ---------------------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   181
// Adds log message to the listbox.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   182
// ---------------------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   183
//
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   184
void CEcmtGuiLogView::LogMessageL( const TDesC& aMsg )
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   185
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   186
    if( iContainer )
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   187
        iContainer->LogMessageL( aMsg );    
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   188
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   189
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   190
// ---------------------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   191
// Clears the log.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   192
// ---------------------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   193
//
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   194
void CEcmtGuiLogView::ClearLogL()
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   195
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   196
    iMessageList->Reset();
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   197
    //Update Listbox
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   198
    if( iContainer )
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   199
        iContainer->ClearMessageListL();
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   200
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   201
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   202
// ---------------------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   203
// Setter for iConnected.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   204
// ---------------------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   205
//
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   206
void CEcmtGuiLogView::SetConnected( TBool aConnected )
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   207
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   208
    iConnected = aConnected;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   209
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   210
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   211
// ---------------------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   212
// Getter for Ecmt Server connectivity state.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   213
// ---------------------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   214
//
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   215
TBool CEcmtGuiLogView::IsConnected()
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   216
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   217
    return iConnected;  
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   218
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   219
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   220
// ---------------------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   221
// Called by HandleResourceChangeL() from CEcmtGuiAppUi when layout 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   222
// is changed.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   223
// ---------------------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   224
//
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   225
void CEcmtGuiLogView::HandleSizeChange( TInt aType )
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   226
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   227
    if( iContainer )
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   228
        {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   229
        iContainer->HandleResourceChange( aType );
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   230
        
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   231
        if ( aType==KEikDynamicLayoutVariantSwitch )
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   232
            {        
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   233
            TRect rect;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   234
            AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane, rect);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   235
            iContainer->SetRect(rect);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   236
            }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   237
        }       
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   238
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   239