diff -r 89d6a7a84779 -r 25a17d01db0c Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/_eikecho_8h-source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/_eikecho_8h-source.html Fri Jan 22 18:26:19 2010 +0000 @@ -0,0 +1,136 @@ + +
+00001 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +00002 // All rights reserved. +00003 // This component and the accompanying materials are made available +00004 // under the terms of "Eclipse Public License v1.0" +00005 // which accompanies this distribution, and is available +00006 // at the URL "http://www.eclipse.org/legal/epl-v10.html". +00007 // +00008 // Initial Contributors: +00009 // Nokia Corporation - initial contribution. +00010 // +00011 // Contributors: +00012 // +00013 // Description: +00014 // Header file for EIKON interface to ECHOENG +00015 // +00016 +00017 #include <basched.h> +00018 #include <eikenv.h> +00019 #include <coecntrl.h> +00020 #include <eikappui.h> +00021 #include <e32keys.h> +00022 #include <eikconso.h> +00023 #include <eikapp.h> +00024 #include <eikdoc.h> +00025 #include <eikon.rsg> +00026 #include <eikinfo.h> +00027 //#include <eikcmds.hrh> +00028 #include <eikon.hrh>//newly added +00029 #include <eikecho.rsg> +00030 #include "ECHOENG.H" +00031 +00032 #ifndef _EIKECHO_H_ +00033 #define _EIKECHO_H_ +00034 +00035 +00036 +00037 const TUid KUidEikEchoApp = {0xE800006A}; +00038 +00039 // Connection values: substitute alternative values for KInetAddr +00040 // and KInetHostName if you want to use different servers +00041 const TUint32 KInetAddr = INET_ADDR(10,159,34,198);//(193,63,255,1); // +00042 _LIT(KInetHostName,"phoenix.doc.ic.ac.uk"); +00043 +00044 // Integer formatting descriptor +00045 _LIT(KIntFormat,"%d"); +00046 +00047 +00048 // +00049 // CConsoleControl: console-type control +00050 // +00051 +00052 class CConsoleControl : public CCoeControl, public MUINotify +00053 { +00054 public: +00055 static CConsoleControl* NewL(CEchoEngine* aEchoEngine); +00056 ~CConsoleControl(); +00057 void ConstructL(CEchoEngine* aEchoEngine); +00058 +00059 // Override CCoeControl +00060 TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType); +00061 void ActivateL(); +00062 +00063 //Implement MUINotify up calls +00064 void PrintNotify(const TDesC& aDes); +00065 void PrintNotify(TInt aInt); +00066 void ErrorNotifyL(const TDesC& aErrMessage, TInt aErrCode); +00067 protected: +00068 CConsoleControl() {} +00069 private: +00070 CEikConsoleScreen* iConsole; // Standard EIKON console control +00071 CEchoEngine* iEchoEngine; // The echo engine +00072 }; +00073 +00074 // +00075 // CEchoAppUi: user interface command handling +00076 // +00077 +00078 class CEchoAppUi : public CEikAppUi +00079 { +00080 public: +00081 CEchoAppUi(CEchoEngine* aEchoEngine); +00082 void ConstructL(); +00083 void CreateConsoleL(); +00084 ~CEchoAppUi(); +00085 private: +00086 // Override CEikAppUi +00087 void HandleCommandL(TInt aCommand); +00088 private: +00089 CConsoleControl* iConsoleControl; +00090 CEchoEngine* iEchoEngine; +00091 }; +00092 +00093 // +00094 // CEchoDocument: document class, which owns the engine +00095 // +00096 +00097 class CEchoDocument : public CEikDocument +00098 { +00099 public: +00100 CEchoDocument(CEikApplication& aApp); +00101 static CEchoDocument* NewL(CEikApplication& aApp); +00102 ~CEchoDocument(); +00103 void ConstructL(); +00104 private: +00105 // Override CApaDocument +00106 CEikAppUi* CreateAppUiL(); +00107 private: +00108 CEchoEngine* iEchoEngine; // Document owns the echo engine +00109 }; +00110 +00111 // +00112 // CEchoApplication +00113 // +00114 +00115 class CEchoApplication : public CEikApplication +00116 { +00117 private: // from CApaApplication +00118 CApaDocument* CreateDocumentL(); +00119 TUid AppDllUid() const; +00120 }; +00121 #endif +00122 +00123 +00124 +