Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

puttyappui.h

00001 /*    puttyappui.h
00002  *
00003  * Putty UI Application UI class
00004  *
00005  * Copyright 2002 Petteri Kangaslampi
00006  *
00007  * See license.txt for full copyright and license information.
00008 */
00009 
00010 #ifndef __PUTTYAPPUI_H__
00011 #define __PUTTYAPPUI_H__
00012 
00013 #include <eikappui.h>
00014 #include "puttyclient.h"
00015 #include "terminalcontrol.h"
00016 #include "dialler.h"
00017 #include "audiorecorder.h"
00018 
00019 class CPuttyAppView;
00020 class MPuttyEngine;
00021 class CEikMenuPane;
00022 
00023 
00028 class CPuttyAppUi: public CEikAppUi, public MPuttyClient,
00029                    public MTerminalObserver, public MDialObserver,
00030                    public MRecorderObserver {
00031     
00032 public:
00033     void ConstructL();
00034     CPuttyAppUi();
00035     ~CPuttyAppUi();
00036 
00037     virtual TBool ProcessCommandParametersL(TApaCommand aCommand,
00038                                             TFileName &aDocumentName,
00039                                             const TDesC8 &aTail);
00040     virtual void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane *aMenuPane);
00041 
00042     // MDialObserver methods
00043     virtual void DialCompleted(TInt anError);
00044 
00045     // MRecorderObserver methods
00046     virtual void RecordCompleted(TInt anError);
00047     
00048     // MPuttyClient methods
00049     virtual void DrawText(TInt aX, TInt aY, const TDesC &aText, TBool aBold,
00050                           TBool aUnderline, TRgb aForeground,
00051                           TRgb aBackground);
00052     virtual void ConnectionError(const TDesC &aMessage);
00053     virtual void FatalError(const TDesC &aMessage);
00054     virtual void ConnectionClosed();
00055     virtual THostKeyResponse UnknownHostKey(const TDesC &aFingerprint);
00056     virtual THostKeyResponse DifferentHostKey(const TDesC &aFingerprint);
00057     virtual TBool AcceptCipher(const TDesC &aCipherName,
00058                                TCipherDirection aDirection);
00059 
00060     // MTerminalObserver methods
00061     virtual void TerminalSizeChanged(TInt aWidth, TInt aHeight);
00062     virtual void KeyPressed(TKeyCode aCode, TUint aModifiers);
00063     virtual void RePaintWindow();
00064 
00065 private:
00066     void HandleCommandL(TInt aCommand);
00067     void ConnectionErrorL(const TDesC &aMessage);
00068     void FatalErrorL(const TDesC &aMessage);
00069     THostKeyResponse HostKeyDialogL(const TDesC &aFingerprint,
00070                                     TInt aDialogTitleRes,
00071                                     TInt aDialogFormatRes);
00072     TBool AcceptCipherL(const TDesC &aCipherName,
00073                         TCipherDirection aDirection);
00074 
00075 private:
00076     CPuttyAppView *iAppView;
00077     MPuttyEngine *iEngine;
00078     TInt iTermWidth, iTermHeight;
00079     HBufC *iFatalErrorPanic;
00080     TBool iLargeFont;
00081     TBool iFullScreen;
00082     CDialler *iDialler;
00083     CAudioRecorder *iRecorder;
00084     HBufC8 *iAudio;
00085     TPtr8 iAudioRecordDes;
00086     TBool iRecording;
00087 
00088     enum {
00089         EStateNone = 0,
00090         EStateDialing,
00091         EStateConnecting,
00092         EStateConnected
00093     } iState;
00094 };
00095 
00096 
00097 #endif

Generated on Sun Feb 9 13:01:28 2003 for PuTTY by doxygen1.2.18