diff -r b7904b40483f -r ff572005ac23 idlefw/plugins/wrtdataplugin/inc/wrtdata.h --- a/idlefw/plugins/wrtdataplugin/inc/wrtdata.h Mon Jan 18 20:32:13 2010 +0200 +++ b/idlefw/plugins/wrtdataplugin/inc/wrtdata.h Tue Jan 26 12:11:15 2010 +0200 @@ -25,11 +25,13 @@ #include "wrtdatapluginconst.h" #include "aicontentpublisher.h" +// FORWARD DECLARATIONS class MLiwInterface; class CLiwServiceHandler; class CWrtDataObserver; class CWrtDataPlugin; +// CLASS DECLARATION /** * @ingroup group_wrtdataplugin * @@ -39,258 +41,272 @@ */ class CWrtData : public CBase { + public: + + /** + * Part of the two phased construction + * + * @param aPlugin refrence of the plugin + * @return none + */ + static CWrtData* NewL(CWrtDataPlugin* aPlugin); + + /** + * Destructor + * + * @param none + * @return none + */ + ~CWrtData(); + + public : + + /** + * Configures the subscriber and data to subscribe. + * + * @param aConfigurations Information about the subscriber + * and the data to subscribe. + * @return void + */ + void ConfigureL(RAiSettingsItemArray& aConfigurations); + + /** + * Checks is this menu item is supported by the publisher + * + * @param aMenuItem menu item name. + * @return boolean (ETrue/EFalse) + */ + TBool HasMenuItem(const TDesC16& aMenuItem ); - /** - * Part of the two phased construction - * - * @param aPlugin refrence of the plugin - * @return none - */ - static CWrtData* NewL(CWrtDataPlugin* aPlugin); - - /** - * Destructor - * - * @param none - * @return none - */ - ~CWrtData(); - + /** + * Register to CPS for all (add/delete/update/execute) action + * + * @param none + * @return void + */ + void RegisterL(); + + /** + * Update the publisher status + * + * @param None + * @return void + */ + void UpdatePublisherStatusL(); + + /** + * Publish updated data for all the items in the widget + * + * @param aObserver to publish data + * @return void + */ + void PublishDefaultImageL( MAiContentObserver* aObserver ); + + /** + * Publish the updated data + * + * @param aObserver to publish data + * @param aDataMap data map + * @return void + */ + void PublishL( MAiContentObserver* aObserver, CLiwDefaultMap* aDataMap ); + + /** + * Called by the observer to refresh the changed content + * + * @param aContentId content Id. + * @param aOperation operation (add/delete/update/execute). + * @param aDataMap data map. + * @return void + */ + void RefreshL( TDesC& aContentId, TDesC& aOperation, CLiwDefaultMap* aDataMap ); + + /** + * Tigger for execution of a action for a specific content id. + * + * @param aObjectId object Id. + * @param aTrigger name of the trigger. + * @return void + */ + void ExecuteActionL(const TDesC& aObjectId, const TDesC& aTrigger); + + /** + * Is the pugin is active to publish the data. + * + * @param None + * @return boolean (ETrue/EFalse). + */ + TBool IsPluginActive(); + + /** + * Activate the publisher + * + * @param None + * @return void + */ + void ActivateL(); + + /** + * Resume the publisher + * + * @param None + * @return void + */ + void ResumeL(); + + /** + * Suspend the publisher + * + * @param None + * @return void + */ + void SuspendL(); + + /** + * Deactivate the publisher + * + * @param None + * @return void + */ + void DeActivateL(); + + /** + * InActiveL + * + * @param None + * @return void + */ + void InActiveL(); + + /** + * OnLineL + * + * @param None + * @return void + */ + void OnLineL(); + + /** + * OffLineL + * + * @param None + * @return void + */ + void OffLineL(); + private : - /** - * Constructor - * - * @param none - * @return none - */ - CWrtData(); - - - /** - * Part of the two phased construction - * - * @param aPlugin reference of the plugin - * @return void - */ - void ConstructL(CWrtDataPlugin* aPlugin); - - /** - * Change the publisher status - * - * @param aStatus new status of the publisher - * @return void - */ - void ChangePublisherStatusL(const TDesC& aStatus); - - /** - * Gets the menu item from the publisher - * - * @param none - * @return void - */ - void GetMenuItemsL(); - - public : - - /** - * Configures the subscriber and data to subscribe. - * - * @param aConfigurations Information about the subscriber - * and the data to subscribe. - * @return void - */ - void ConfigureL(RAiSettingsItemArray& aConfigurations); - - /** - * Publish updated data for all the items in the widget - * - * @param aObserver to publish data - * @return void - */ - void PublishAllL( MAiContentObserver* aObserver ); - - /** - * Execute the command to get the data from CPS - * - * @param aInFilter input filter for the command - * @param aOutDataMap output data map - * @param aRegistry type of registry (publisher/cp_data) - * @return void - */ - void ExecuteCommandL(CLiwDefaultMap* aInFilter, - CLiwDefaultMap* aOutDataMap, const TDesC16& aRegistry ); - - /** - * Checks is this menu item is supported by the publisher - * - * @param aMenuItem menu item name. - * @return boolean (ETrue/EFalse) - */ - TBool HasMenuItem(const TDesC16& aMenuItem ); - - /** - * Publish the updated data - * - * @param aObserver to publish data - * @return void - */ - void PublishL( MAiContentObserver* aObserver ); - - /** - * Tigger for execution of a action for a specific content id. - * - * @param aObjectId object Id. - * @param aTrigger name of the trigger. - * @return void - */ - void ExecuteActionL(const TDesC& aObjectId, const TDesC& aTrigger); - - /** - * Register to CPS for all (add/delete/update/execute) action - * - * @param none - * @return void - */ - void RegisterL(); - - /** - * Called by the observer to refresh the changed content - * - * @param aPublisher publisher. - * @param aContentType content type. - * @param aContentId content Id. - * @param aOperation operation (add/delete/update/execute). - * @return void - */ - void RefreshL( TDesC& aPublisher, TDesC& aContentType, - TDesC& aContentId, TDesC& aOperation ); - - /** - * Createts the filter map - * - * @return filter map - */ - CLiwDefaultMap* CreateFilterLC( ); - - /** - * Is the pugin is active to publish the data. - * - * @param None - * @return boolean (ETrue/EFalse). - */ - TBool IsPluginActive(); - - /** - * Resume the publisher - * - * @param None - * @return void - */ - void ResumeL(); - - /** - * Suspend the publisher - * - * @param None - * @return void - */ - void SuspendL(); - - /** - * Activate the publisher - * - * @param None - * @return void - */ - void ActivateL(); - - /** - * Deactivate the publisher - * - * @param None - * @return void - */ - void DeActivateL(); - - /** - * OnLineL - * - * @param None - * @return void - */ - void OnLineL(); - - /** - * OffLineL - * - * @param None - * @return void - */ - void OffLineL(); - - /** - * InActiveL - * - * @param None - * @return void - */ - void InActiveL(); - - /** - * Update the publisher status - * - * @param None - * @return void - */ - void UpdatePublisherStatusL(); - - /** - * Resolves skin item id and Mif id from pattern - * skin( () - * mif( ) - * - * @param aPath skin pattern / mif pattern value - * @param aItemId skin item id - * @param aMifId mif id - * @param aMaskId mask id - * @param aFilename mif file name - * @return boolean (ETrue/EFalse) - */ - TBool ResolveSkinIdAndMifId( const TDesC& aPath, TAknsItemID& aItemId, - TInt& aMifId, TInt& aMaskId, TDes& aFilename ); + /** + * Default Constructor + * + */ + CWrtData(); + + /** + * Part of the two phased construction + * + * @param aPlugin reference of the plugin + * @return void + */ + void ConstructL(CWrtDataPlugin* aPlugin); + + /** + * Createts the filter map + * + * @return filter map + */ + CLiwDefaultMap* CreateFilterLC( ); + + /** + * Execute the command to get the data from CPS + * + * @param aInFilter input filter for the command + * @param aOutDataMap output data map + * @param aRegistry type of registry (publisher/cp_data) + * @return void + */ + void ExecuteCommandL(CLiwDefaultMap* aInFilter, + CLiwDefaultMap* aOutDataMap, const TDesC16& aRegistry ); + + + /** + * Change the publisher status + * + * @param aStatus new status of the publisher + * @return void + */ + void ChangePublisherStatusL(const TDesC& aStatus); + + /** + * Gets the menu item from the publisher + * + * @param none + * @return void + */ + void GetMenuItemsL(); + + /** + * Gets the widgent name and uid + * + * @param aName - widget name + * @param aAppUID - widget uid + * @return void + */ + void GetWidgetNameAndUidL(TDes& aName, TDes& aAppUID ); + + /** + * Resolves the Uid from the string + * + * @param aUidDes - uid in string + * @param aUid - uid + * @return ETure/EFalse + */ + TBool ResolveUid(const TDesC& aUidDes, TUid& aUid ); + + /** + * Creates icon from the uid + * + * @param aHandle - icon handle + * @param aMaskHandle - mask handle + * @param aAppUid - application uid + * @return ETure/EFalse + */ + void CreateIconFromUidL(TInt& aHandle, TInt& aMaskHandle, const TUid& aAppUid ); private : + + // Subscriber interface + // own + MLiwInterface* iInterface; + + // Data Observer to CPS + // Own + CWrtDataObserver* iObserver; + + // Service handler + // Own + CLiwServiceHandler* iServiceHandler; - // Subscriber interface - // own - MLiwInterface* iInterface; - - // Data Observer to CPS - // Own - CWrtDataObserver* iObserver; - - // Service handler - // Own - CLiwServiceHandler* iServiceHandler; - - // Command name in configuration Array - HBufC8* iCommandName; - - // Reference of the wrt data plugin - // Not owned - CWrtDataPlugin* iPlugin; - - // Menu item names - // Own - RPointerArray iMenuItems; - - // Trigger names for the menu items - // Own - RPointerArray iMenuTriggers; - - HBufC* iContentId; + // Command name in configuration Array + HBufC8* iCommandName; + + // Reference of the wrt data plugin + // Not owned + CWrtDataPlugin* iPlugin; + + // Menu item names + // Own + RPointerArray iMenuItems; + + // Trigger names for the menu items + // Own + RPointerArray iMenuTriggers; + + // Widgets content id. + // Own + HBufC* iContentId; + }; #endif /*WRTDATA_H*/