--- a/idlehomescreen/widgetmanager/inc/wmconfiguration.h Tue Sep 14 20:58:58 2010 +0300
+++ b/idlehomescreen/widgetmanager/inc/wmconfiguration.h Wed Sep 15 12:00:00 2010 +0300
@@ -21,6 +21,7 @@
// INCLUDE FILES
#include <e32base.h>
+#include "wmstore.h"
// FORWARD DECLARATIONS
class CRepository;
@@ -36,10 +37,11 @@
public: // constructors and destructor
- /** Operator Application type */
- enum TOpAppType
+ /** Store's Application type */
+ enum TStoreAppType
{
EUnknown,
+ EOviCwrt,
ES60,
ECwrt,
EWrt,
@@ -64,70 +66,22 @@
void ConstructL();
public: // API
-
- /**
- * Number of portal buttons (1 or more)
- */
- TInt PortalButtonCount();
-
- /**
- * Label text to be displayed on a portal button
- * @param aIndex index of the button, starting at 0
- */
- const TDesC& PortalButtonText( TInt aIndex );
-
+
/**
- * Icon to be displayed on a portal button
- * Logo syntax follows the widget icon syntax in CWmImageConverter
- * @param aIndex index of the button, starting at 0
+ * Number of Stores
*/
- const TDesC& PortalButtonIcon( TInt aIndex );
-
- /**
- * Returns url to for browser by button index
- * @param aIndex index of the button, starting at 0
- */
- const TDesC& PortalButtonBrowserUrl( TInt aIndex );
-
- /**
- * Returns client uid by button index
- * @param aIndex index of the button, starting at 0
- */
- TUid PortalButtonClientUid( TInt aIndex );
+ TInt StoreCount();
/**
- * Returns client parameter by button index
- * @param aIndex index of the button, starting at 0
+ * Returns Store configuration array ref
*/
- const TDesC& PortalButtonClientParam( TInt aIndex );
-
- /**
- * Returns bool if buttons are mirrored.
- * @return true when operator button on left on portraid and
- * on top on landscape.
- */
- TBool PortalButtonsMirrored();
+ const RPointerArray<CWmConfItem>& StoreConfArray();
/**
- * Returns application type by button index
- * @param aIndex button index
- * @return application type
- */
- TOpAppType PortalButtonApplicationType( TInt aIndex );
-
- /**
- * Returns application id as string
- * @param aIndex button index
- * @param aOperatorAppId string to get app id
- */
- void PortalButtonApplicationId( TInt aIndex, TDes& aOperatorAppId );
-
- /**
- * Returns application id as uid
- * @param aIndex button index
- * @param aOperatorAppId uid to get app id
- */
- void PortalButtonApplicationId( TInt aIndex, TUid& aOperatorAppId );
+ * To compare orders
+ */
+ static TInt CompareStoreOrder(
+ const CWmConfItem& aItemOne, const CWmConfItem& aItemTwo );
private: // New functions
@@ -137,15 +91,15 @@
void ReadInt32Parameter( TInt aKey, TInt32& aValue );
void ReadIntParameter( TInt aKey, TInt& aValue );
HBufC* ReadLocalisedParameterL( TInt aOffset );
- void ReadOperatorApplicationInfoL();
+ void ReadApplicationInfoL( TInt aKey, CWmConfItem& aConfItem );
TUid StringToUid( const TDesC& aStr );
/** Returns uid of the widget with a particular bundle identifier. */
TUid FetchWidgetUidFromRegistryL( const TDesC& aBundleId );
- /** sets operator icon to button if not already defined */
- void SetOperatorIconL( TUid aUid );
-
+ /** sets Store icon to if not already defined */
+ void SetStoreIconL( CWmConfItem& aConfItem );
+
private:
/**
@@ -163,73 +117,123 @@
* system language
*/
TInt iLanguageIndex;
-
- /**
- * OVI store button text
- */
- HBufC* iOviButtonTitle;
-
- /**
- * OVI store button icon
- */
- HBufC* iOviButtonIcon;
/**
- * OVI store button widget client param
+ * Array of configuration items. Array is in order as they should appear in UI
+ */
+ RPointerArray<CWmConfItem> iConfItems;
+ };
+
+
+/**
+ * Configuration item class for Widget Manager
+ *
+ * @class CWmConfiguration
+ */
+NONSHARABLE_CLASS( CWmConfItem ) : public CBase
+ {
+ public: // constructors and destructor
+
+ /** Two-phased constructors. */
+ static CWmConfItem* NewL();
+
+ static CWmConfItem* NewLC();
+
+ /** Destructor */
+ ~CWmConfItem();
+
+ private:
+ /** constructor */
+ CWmConfItem();
+
+ /** 2nd phase constructor */
+ void ConstructL();
+
+public: // API
+ /**
+ * Returns Store id
*/
- HBufC* iOviStoreClientParam;
+ CWmStore::TStoreId Id();
/**
- * OVI store laucher uid
+ * Returns Label text to be displayed on a Store
*/
- TUid iOviStoreUid;
+ const TDesC& Title();
/**
- * OPERATOR button text
+ * Returns Icon to be displayed on a Store
+ * Logo syntax follows the widget icon syntax in CWmImageConverter
*/
- HBufC* iOperatorButtonTitle;
-
+ const TDesC& Icon();
+
/**
- * OPERATOR store icon
+ * Returns Order of Store
*/
- HBufC* iOperatorButtonIcon;
+ TInt Order();
/**
- * OPERATOR store button browser Url
+ * Returns url to for browser
+ */
+ const TDesC& BrowserUrl();
+
+ /**
+ * Returns application type
*/
- HBufC* iOperatorButtonUrl;
+ CWmConfiguration::TStoreAppType AppType();
+
+ /**
+ * Returns application uid
+ */
+ TUid AppUid();
/**
- * OPERATOR store button application parameter
+ * Returns application parameter by index
*/
- HBufC* iOperatorParam;
+ const TDesC& AppParam();
+
+private:
+ /**
+ * Store Id
+ */
+ CWmStore::TStoreId iId;
/**
- * OPERATOR store application id as string. Used for java
+ * Store text
*/
- HBufC* iOperatorAppIdStr;
+ HBufC* iTitle;
/**
- * OPERATOR store application id as uid.
+ * Store icon
*/
- TUid iOperatorAppIdUid;
-
+ HBufC* iIcon;
+
/**
- * OPERATOR store application type
+ * Store order
*/
- TOpAppType iOperatorAppType;
-
+ TInt iOrder;
+
+ /**
+ * Store browser Url
+ */
+ HBufC* iUrl;
+
/**
- * Tells if operator button is enabled.
+ * Application type
*/
- TBool iOperatorButtonEnabled;
-
+ CWmConfiguration::TStoreAppType iAppType;
+
/**
- * Tells if buttons need to be mirrored for operator.
+ * Application uid
*/
- TBool iButtonsMirrored;
- };
-
+ TUid iAppUid;
+
+ /**
+ * Application parameter
+ */
+ HBufC* iAppParam;
+
+ friend class CWmConfiguration;
+ };
#endif // WMCONFIGURATION_H
// End of File