networkingutils/ipadministrationtool/inc/ipadm.h
branchRCL_3
changeset 19 4ca382093dae
parent 5 6beaa9cf4752
child 20 493058e57c8c
equal deleted inserted replaced
5:6beaa9cf4752 19:4ca382093dae
     1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // ipadm.h - IP administration tool main module
       
    15 //
       
    16 
       
    17 
       
    18 
       
    19 /**
       
    20  @internalComponent
       
    21 */
       
    22 
       
    23 #ifndef __IPADM_H
       
    24 #define __IPADM_H
       
    25 
       
    26 //#include <coecntrl.h>
       
    27 #include <coeccntx.h>
       
    28 
       
    29 #include <eikenv.h>
       
    30 #include <eikappui.h>
       
    31 #include <eikapp.h>
       
    32 #include <eikdoc.h>
       
    33 #include <techview/eiktbar.h>
       
    34 #include <techview/eikconso.h>
       
    35 
       
    36 #include <ipadm.rsg>
       
    37 #include "ipadm.hrh"
       
    38 
       
    39 const TUid KUidIpAdmApp = {0x10000887}; 
       
    40 // 
       
    41 // CSimpleConsole
       
    42 //
       
    43 enum TMessageControlFontStyle
       
    44     {
       
    45     EStyleElementBold=EMenuCommandBold,
       
    46     EStyleElementItalic=EMenuCommandItalic,
       
    47     EStyleElementInverse=EMenuCommandInverse,
       
    48     EStyleElementUnderline=EMenuCommandUnderline,
       
    49     EStyleElementColor=EMenuCommandColor
       
    50     };
       
    51 
       
    52 class CConsoleControl : public CCoeControl
       
    53 	{
       
    54 public:
       
    55 	CConsoleControl() {}
       
    56 	~CConsoleControl();
       
    57 	void ConstructL(const TPoint& aLeftTop, const TSize& aSize, TInt aFlags);
       
    58     void HandleCommandL(TInt aCommand);
       
    59     void ActivateL();
       
    60 	void SetScrollBarVisibilityL(CEikScrollBarFrame::TScrollBarVisibility aHBarVisibility, CEikScrollBarFrame::TScrollBarVisibility aVBarVisibility);
       
    61 	void DrawCursor();
       
    62 	void Write(const TDesC &aDes);
       
    63 	CEikConsoleControl *ConsoleControl() const;
       
    64 	TBool UpdateScrollBars();
       
    65 	void ClearScreen();
       
    66 	void Redraw(const TRect &aRect);
       
    67 	void Lf();
       
    68 protected:
       
    69     void FocusChanged(TDrawNow aDrawNow);
       
    70 private:
       
    71     void ToggleFontStyleAndRedrawL(TMessageControlFontStyle aStyleElement);
       
    72 	
       
    73 private:
       
    74 	CEikConsoleScreen* iConsole;
       
    75 	TInt iHistory;
       
    76 	};
       
    77 
       
    78 
       
    79 //
       
    80 // class CIpAdmView
       
    81 //
       
    82 class CIpAdmEngine;
       
    83 class CIpAdmView : public CCoeControl, public MCoeControlBrushContext
       
    84     {
       
    85 public:
       
    86 	~CIpAdmView();
       
    87     void ConstructL(const TRect& aRect);
       
    88 	
       
    89 	void StartL();
       
    90 	void StopL();
       
    91 	TInt CountComponentControls() const;
       
    92 	CCoeControl* ComponentControl(TInt aIndex) const;
       
    93 	void Write(const TDesC &aDes);
       
    94 	void ClearScreenL();
       
    95 	void ShowError(TInt aId);
       
    96 
       
    97 	void HandleCommandL(TInt aCommand);
       
    98 private: 
       
    99 	void Draw(const TRect& /*aRect*/) const;
       
   100 
       
   101 	//Component Controls
       
   102 	void CreateBigConsoleL(TInt aFlags);
       
   103 
       
   104 	void ShowError(const TDes &msg);
       
   105 	void ShowError(const TDes &msg, TInt aErr);
       
   106 
       
   107 private:
       
   108 	CConsoleControl* iConsole;
       
   109 	
       
   110 	CIpAdmEngine *iModel;
       
   111 	TBool iRunning;
       
   112     };
       
   113 
       
   114 
       
   115 //
       
   116 //	CIpAdmAppUi
       
   117 //
       
   118 class CIpAdmAppUi : public CEikAppUi
       
   119     {
       
   120 public:
       
   121     void ConstructL();
       
   122 	~CIpAdmAppUi();
       
   123 
       
   124 private:
       
   125 	void HandleCommandL(TInt aCommand);
       
   126 	//	TBool LaunchOptionsDialog(CUDPSendEngine* aModel);
       
   127 	// void LaunchAboutDialog();
       
   128 private:
       
   129     CIpAdmView* iAppView;
       
   130 //	CHelpTask *iHelp;
       
   131     };
       
   132 
       
   133 //
       
   134 // CIpAdmDocument
       
   135 //
       
   136 class CIpAdmDocument : public CEikDocument
       
   137 	{
       
   138 public:
       
   139 	CIpAdmDocument(CEikApplication& aApp);
       
   140 private:
       
   141 	CEikAppUi* CreateAppUiL();
       
   142 	};
       
   143 
       
   144 //
       
   145 // CIpAdmAppUi
       
   146 //
       
   147 class CIpAdmApplication : public CEikApplication
       
   148 	{
       
   149 private: // from CApaApplication
       
   150 	CApaDocument* CreateDocumentL();
       
   151 	TUid AppDllUid() const;
       
   152 	};
       
   153 
       
   154 
       
   155 #endif