sdkcreationmw/sdkruntimes/GuiLauncher/inc/EcmtGuiLogView.h
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
#ifndef __ECMTGUI_LOGVIEW_H__
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    20
#define __ECMTGUI_LOGVIEW_H__
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    21
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    22
#include <aknlists.h>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    23
#include <aknview.h>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    24
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    25
class CEcmtGuiLogContainer;
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
/**
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    29
 *  View class for the LogContainer.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    30
 *
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    31
 *  @since S60 v3.1
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    32
 */
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    33
class CEcmtGuiLogView : public CAknView
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    34
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    35
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    36
public:
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    37
 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    38
    /**
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    39
     * Two-phased constructor.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    40
     */
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    41
    static CEcmtGuiLogView* NewL();
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    42
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    43
public: //New functions
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    44
    
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    45
    /**
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    46
     * Getter for log container reference.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    47
     *
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    48
     * @return A reference to CEcmtGuiLogContainer. 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    49
     */
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    50
    CEcmtGuiLogContainer& LogContainer();
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
     * Loads log message from resource and adds it to the listbox. 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    54
     *
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    55
     * @param aMsgResId A resource id of the message.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    56
     */
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    57
    void LogMessageL( TInt aMsgResId );
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    58
    
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    59
    /**
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    60
     * Adds log message to the listbox.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    61
     *
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    62
     * @param aMsg Log message string.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    63
     */
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    64
    void LogMessageL( const TDesC& aMsg );
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    65
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    66
    /**
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    67
     * Clears the log.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    68
     */
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    69
    void ClearLogL();
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    70
    
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    71
    /**
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    72
     * Setter for iConnected.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    73
     *
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    74
     * @param aConnected A new value for iConnected.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    75
     */
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    76
    void SetConnected( TBool aConnected );
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
     * Getter for Ecmt Server connectivity state.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    80
     *
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    81
     * @return Boolean representing is Ecmt Server in connected state.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    82
     */
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    83
    TBool IsConnected();
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    84
      
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    85
    /**
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    86
     * Called by HandleResourceChangeL() from CEcmtGuiAppUi when layout 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    87
     * is changed.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    88
     *
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    89
     * @param aType Type of resources that have changed
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    90
     */
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    91
    void HandleSizeChange( TInt aType );
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    92
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    93
public: // From MEikAutoMenuObserver
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    94
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    95
		/**
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    96
     * From MEikAutoMenuObserver.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    97
     * Dynamically initialises a menu pane.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    98
     *
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    99
     * @param aResourceId Menu pane resource id.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   100
     * @param aMenuPane The in-memory representation of the menu pane.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   101
     */
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   102
    void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane *aMenuPane);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   103
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   104
private: //From CAknView.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   105
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   106
    /**
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   107
     * From CAknView.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   108
     * Returns views id.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   109
     *
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   110
     * @return Id for this view.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   111
     */
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   112
    TUid Id() const;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   113
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   114
    /**
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   115
     * From CAknView.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   116
     * Handles commands
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   117
     *
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   118
     * @param aCommand A command to be handled.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   119
     */
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   120
    void HandleCommandL( TInt aCommand );
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   121
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   122
    /**
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   123
     * From CAknView.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   124
     * Activates view
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   125
     *
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   126
     * @param aPrevViewId Specifies the view previously active.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   127
     * @param aCustomMessageId Specifies the message type.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   128
     * @param aCustomMessage The activation message.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   129
     */
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   130
    void DoActivateL( const TVwsViewId& aPrevViewId,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   131
                      TUid aCustomMessageId,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   132
                      const TDesC8& aCustomMessage );
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   133
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   134
    /**
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   135
     * From CAknView.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   136
     * Deactivates view.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   137
     */
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   138
    void DoDeactivate();
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   139
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   140
private:
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
     * By default Symbian 2nd phase constructor is private.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   144
     */
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   145
    void ConstructL();
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   146
    
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   147
    /**
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   148
     * C++ default constructor.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   149
     */
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   150
    CEcmtGuiLogView();
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   151
    
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   152
    /**
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   153
     * Destructor.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   154
     */
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   155
    ~CEcmtGuiLogView();
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   156
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   157
private:
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   158
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   159
		/**
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   160
     * Container.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   161
     * Own.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   162
     */
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   163
    CEcmtGuiLogContainer* iContainer;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   164
    
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   165
    /**
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   166
     * List for log messages. Container modifies this.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   167
     * Own.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   168
     */
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   169
    CDesCArrayFlat* iMessageList;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   170
    
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   171
    /**
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   172
     * Boolean indicating is Ecmt Server in connected state.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   173
     */
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   174
    TBool iConnected;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   175
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   176
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   177
		};
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   178
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   179
#endif // __ECMTGUI_LOGVIEW_H__