www.pudn.com > smssend-vc.rar > csmsappui.h


/* Copyright (c) 2003, Nokia. All rights reserved */ 
 
 
#ifndef __CSMSAPPUI_H__ 
#define __CSMSAPPUI_H__ 
 
// INCLUDES 
#include  
#include  
#include  
#include  
#include  
#include  
#include  
#include  
 
// FORWARD DECLARATIONS 
class CSmsDialog; 
class CSmsHandler; 
 
// CLASS DECLARATION 
/** 
* CSmsAppUi application UI class. 
* Interacts with the user through the UI and request message processing 
* from the handler class 
*/ 
class CSmsAppUi : public CAknAppUi 
    { 
    public: // Constructors and destructor 
 
        /** 
        * CSmsAppUi. 
        * C++ default constructor. This needs to be public due to 
        * the way the framework constructs the AppUi 
        */ 
        CSmsAppUi(); 
 
        /** 
        * ~CSmsAppUi. 
        * Destructor. 
        */ 
        virtual ~CSmsAppUi(); 
 
    public: // New functions 
 
        /** 
        * MessageReceived. 
        * Called by the handler to indicate that a unread message exists. 
        */ 
        void MessageReceived(); 
 
        /** 
        * NoMoreUnread. 
        * Called by the handler to indicate that no more unread messages exist. 
        */ 
        void NoMoreUnread(); 
 
        /** 
        * ServerDown. 
        * Notificate that MSV server session has been closed. 
        * @param aReason error number 
        */ 
        void ServerDown( TInt aReason ); 
 
    private: // Constructors 
 
        /** 
        * ConstructL. 
        * 2nd phase constructor. 
        */ 
        void ConstructL(); 
 
    private: // Functions from base classes 
 
        /** 
        * From CEikAppUi, HandleCommandL. 
        * Takes care of command handling. 
        * @param aCommand Command to be handled 
        */ 
        void HandleCommandL( TInt aCommand ); 
 
        /** 
        * From CEikAppUi, HandleKeyEventL. 
        * Handles key events. 
        * @param aKeyEvent Event to handle. 
        * @param aType Type of the key event. 
        * @return Response code (EKeyWasConsumed, EKeyWasNotConsumed). 
        */ 
        TKeyResponse HandleKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ); 
 
        /** 
        * From MEikMenuObserver, DynInitMenuPaneL. 
        * Called by the framework before the menu pane is displayed. 
        * @param aResourceId Resource id of the menu pane to be initialised. 
		* @param aMenuPane The in-memory representation of the menu pane 
        */ 
        void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); 
 
    private: // Enumeration 
 
        /** 
        * TUiState, UI state enumeration. 
        */ 
        enum TUiState 
            { 
            EWrite = 1, 
            EMsgSent 
            }; 
 
    private: // Data 
 
        /** 
        * iUiState, UI state. 
        */ 
        TUiState iUiState; 
 
        /** 
        * iReceivedMessage, indicates if a unread message exist. 
        */ 
        TBool iReceivedMessage; 
 
        /** 
        * iSendDialog, dialog class. 
        * Owned by CSmsAppUi object. 
        */ 
        CSmsDialog* iSendDialog; 
 
        /** 
        * iSmsHandler, handler class. 
        * Owned by CSmsAppUi object. 
        */ 
        CSmsHandler* iSmsHandler; 
    }; 
 
#endif // __CSMSAPPUI_H__ 
 
// End of File