--- a/idlehomescreen/widgetmanager/inc/wmconfiguration.h Wed Sep 15 12:00:00 2010 +0300
+++ b/idlehomescreen/widgetmanager/inc/wmconfiguration.h Wed Oct 13 14:18:30 2010 +0300
@@ -21,7 +21,6 @@
// INCLUDE FILES
#include <e32base.h>
-#include "wmstore.h"
// FORWARD DECLARATIONS
class CRepository;
@@ -37,11 +36,10 @@
public: // constructors and destructor
- /** Store's Application type */
- enum TStoreAppType
+ /** Operator Application type */
+ enum TOpAppType
{
EUnknown,
- EOviCwrt,
ES60,
ECwrt,
EWrt,
@@ -66,22 +64,70 @@
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 );
+
/**
- * Number of Stores
+ * 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
*/
- TInt StoreCount();
+ 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 );
/**
- * Returns Store configuration array ref
+ * Returns client parameter by button index
+ * @param aIndex index of the button, starting at 0
*/
- const RPointerArray<CWmConfItem>& StoreConfArray();
+ 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();
/**
- * To compare orders
- */
- static TInt CompareStoreOrder(
- const CWmConfItem& aItemOne, const CWmConfItem& aItemTwo );
+ * 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 );
private: // New functions
@@ -91,15 +137,15 @@
void ReadInt32Parameter( TInt aKey, TInt32& aValue );
void ReadIntParameter( TInt aKey, TInt& aValue );
HBufC* ReadLocalisedParameterL( TInt aOffset );
- void ReadApplicationInfoL( TInt aKey, CWmConfItem& aConfItem );
+ void ReadOperatorApplicationInfoL();
TUid StringToUid( const TDesC& aStr );
/** Returns uid of the widget with a particular bundle identifier. */
TUid FetchWidgetUidFromRegistryL( const TDesC& aBundleId );
- /** sets Store icon to if not already defined */
- void SetStoreIconL( CWmConfItem& aConfItem );
-
+ /** sets operator icon to button if not already defined */
+ void SetOperatorIconL( TUid aUid );
+
private:
/**
@@ -117,123 +163,73 @@
* system language
*/
TInt iLanguageIndex;
+
+ /**
+ * OVI store button text
+ */
+ HBufC* iOviButtonTitle;
+
+ /**
+ * OVI store button icon
+ */
+ HBufC* iOviButtonIcon;
/**
- * 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
+ * OVI store button widget client param
*/
- CWmStore::TStoreId Id();
+ HBufC* iOviStoreClientParam;
/**
- * Returns Label text to be displayed on a Store
+ * OVI store laucher uid
*/
- const TDesC& Title();
+ TUid iOviStoreUid;
/**
- * Returns Icon to be displayed on a Store
- * Logo syntax follows the widget icon syntax in CWmImageConverter
+ * OPERATOR button text
*/
- const TDesC& Icon();
-
+ HBufC* iOperatorButtonTitle;
+
/**
- * Returns Order of Store
+ * OPERATOR store icon
*/
- TInt Order();
+ HBufC* iOperatorButtonIcon;
/**
- * Returns url to for browser
- */
- const TDesC& BrowserUrl();
-
- /**
- * Returns application type
+ * OPERATOR store button browser Url
*/
- CWmConfiguration::TStoreAppType AppType();
-
- /**
- * Returns application uid
- */
- TUid AppUid();
+ HBufC* iOperatorButtonUrl;
/**
- * Returns application parameter by index
+ * OPERATOR store button application parameter
*/
- const TDesC& AppParam();
-
-private:
- /**
- * Store Id
- */
- CWmStore::TStoreId iId;
+ HBufC* iOperatorParam;
/**
- * Store text
+ * OPERATOR store application id as string. Used for java
*/
- HBufC* iTitle;
+ HBufC* iOperatorAppIdStr;
/**
- * Store icon
- */
- HBufC* iIcon;
-
- /**
- * Store order
+ * OPERATOR store application id as uid.
*/
- TInt iOrder;
-
+ TUid iOperatorAppIdUid;
+
/**
- * Store browser Url
+ * OPERATOR store application type
*/
- HBufC* iUrl;
-
+ TOpAppType iOperatorAppType;
+
/**
- * Application type
- */
- CWmConfiguration::TStoreAppType iAppType;
-
- /**
- * Application uid
+ * Tells if operator button is enabled.
*/
- TUid iAppUid;
-
+ TBool iOperatorButtonEnabled;
+
/**
- * Application parameter
+ * Tells if buttons need to be mirrored for operator.
*/
- HBufC* iAppParam;
-
- friend class CWmConfiguration;
- };
+ TBool iButtonsMirrored;
+ };
+
#endif // WMCONFIGURATION_H
// End of File