examples/ForumNokia/SMSExample/GUI/inc/SMSExampleAppui.h

00001 /*
00002  * Copyright © 2008 Nokia Corporation.
00003  */
00004 
00005 #ifndef SMSEXAMPLEAPPUI_H
00006 #define SMSEXAMPLEAPPUI_H
00007 
00008 // INCLUDES
00009 #include <aknappui.h>
00010 #include <eikapp.h>
00011 #include <eikdoc.h>
00012 #include <e32std.h>
00013 #include <coeccntx.h>
00014 #include <aknViewAppUi.h>
00015 
00016 #include "SMSExample.hrh"
00017 #include "SMSExampleParser.h"
00018 #include "SMSEngine.h"
00019 
00020 // FORWARD DECLARATIONS
00021 class CSMSExampleRTEContainer;
00022 class CLogView;
00023 class CListboxView;
00024 
00025 // CLASS DECLARATION
00026 
00031 class CSMSExampleAppUi : public CAknViewAppUi,
00032                          public MSmsEngineObserver
00033     {
00034     public: // // Constructors and destructor
00035 
00039         void ConstructL();
00040 
00044         ~CSMSExampleAppUi();
00045 
00046     public: // New functions
00047 
00052         TInt GetAddressL();
00053 
00058         TInt QueryMessageL();
00059 
00066         void QueryMessagesAndExecuteL(TInt aMode, TMsvId aOriginFolderID,
00067                                      TMsvId aDestinationFolderID);
00068 
00073         void ShowMessageL(const TDesC& aMsg) const;
00074 
00079         void ShowErrorL(TInt aErrorCode) const;
00080 
00081     public:
00085         void SendingMessage();
00086         void MessageSent();
00087         void MessageReceived(const TDesC& addr, const TDesC& msg);
00088         void SmsEngineInitialized();
00089         void SmsEngineError(TInt aErrorCode);
00090         void MessageDeleted(); //if automatic deletion is on
00091 
00092 
00093     public:
00097         void HandleResourceChangeL(TInt aType);
00098 
00099     private:
00103         void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane);
00104 
00105     private:
00110         void HandleCommandL(TInt aCommand);
00111 
00118         virtual TKeyResponse HandleKeyEventL(
00119             const TKeyEvent& aKeyEvent,TEventCode aType);
00120 
00121     private:
00122         void HandleReceivedMessageL(const TDesC& aAddress, const TDesC& aMessage);
00123 
00124     private: // Data members
00125 
00126         // The application view 1
00127         CLogView* iLogView;
00128 
00130         CListboxView* iListboxView;
00131 
00132         //The SMS engine
00133         CSmsEngine* iSmsEngine;
00134 
00135         // Parser that searches "phone numbers"
00136         CSMSExampleParser* iParser;
00137 
00138         // Recipient address
00139         TBuf<EMtmsExampleMaxAddressLength> iAddress;
00140 
00141         // Message body
00142         TBuf<KSmsMessageLength> iMessage;
00143 
00144         // ETrue is automatic delete is on, EFalse otherwise
00145         TBool iAutomaticDelete;
00146 
00147     };
00148 
00149 #endif

Generated by  doxygen 1.6.2