Nokia N97 SDK
Example Applications Guide

AIWConsumerBasicsAppUI.h

00001 /*  Copyright (c) 2005-2006 Nokia Corporation.
00002  *  This material, including documentation and any related
00003  *  computer programs, is protected by copyright controlled by
00004  *  Nokia Corporation.
00005  */
00006 
00007 #ifndef __AIWCONSUMERBASICSAPPUI_H__
00008 #define __AIWCONSUMERBASICSAPPUI_H__
00009 
00010 // INCLUDES
00011 #include <aknappui.h>
00012 
00013 // FORWARD DECLARATIONS
00014 class CAIWConsumerBasicsAppView;
00015 class CAiwServiceHandler;
00016 class CAiwGenericParamList;
00017 
00018 // CLASS DECLARATION
00019 /**
00020 * CAIWConsumerBasicsAppUi application UI class.
00021 * Interacts with the user through the UI and request message processing
00022 * from the handler class
00023 */
00024 class CAIWConsumerBasicsAppUi : public CAknAppUi
00025     {
00026     public: // Constructors and destructor
00027 
00028         /**
00029         * 2nd phase constructor.
00030         */
00031         void ConstructL();
00032 
00033         /**
00034         * C++ default constructor. This needs to be public due to
00035         * the way the framework constructs the AppUi
00036         */
00037         CAIWConsumerBasicsAppUi();
00038 
00039         /**
00040         * Virtual Destructor.
00041         */
00042         virtual ~CAIWConsumerBasicsAppUi();
00043 
00044     public: // Functions from base classes
00045 
00046         /**
00047         * From MEikMenuObserver
00048         * Dynamically initialises a menu pane.
00049         * @param aResourceId Menu resource id.
00050         * @param aMenuPane The in-memory representation of the menu pane. 
00051         */        
00052         void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane *aMenuPane);
00053         
00054     public: // New functions  
00055     
00056         /**
00057         * Returns whether the consumer interest is attached to ServiceHandler.
00058         * @return ETrue if attached. EFalse otherwise.
00059         */     
00060         TBool IsAttached() const; 
00061         
00062         /**
00063         * Returns the number of providers attached to the consumer's interest.
00064         * @return Number of providers available.
00065         */             
00066         TInt NumberOfProviders() const;
00067         
00068         
00069     private: // Functions from base classes
00070         /**
00071         * From CEikAppUi.
00072         * Takes care of command handling.
00073         * @param aCommand Command to be handled.
00074         */
00075         void HandleCommandL( TInt aCommand );
00076 
00077         /**
00078         * Called by the framework when the application status pane
00079                 * size is changed.
00080         */
00081                 void HandleStatusPaneSizeChange();
00082                 
00083     private: // New functions           
00084         /**
00085         * Sets up the Help context parameters.
00086         * @return Generic param list ready to be forwarded to AIW framework. 
00087         */    
00088         CAiwGenericParamList& SetupGenericParamListL() const;    
00089         
00090     private: // Data
00091         /**
00092         * The application view
00093         * Owned by CAIWConsumerBasicsAppUi
00094         */
00095         CAIWConsumerBasicsAppView* iAppView;
00096         
00097         /**
00098         * ServiceHandler object.
00099         * This object is used for AIW command handling.
00100         */        
00101         CAiwServiceHandler* iServiceHandler; 
00102         
00103         /**
00104         * Indicates whether the consumer is attached its interest to ServiceHandler.
00105         */ 
00106         TBool iIsAttached;
00107     };
00108 
00109 #endif // __AIWCONSUMERBASICSAPPUI_H__
00110 
00111 // End of File

© Nokia 2009

Back to top