Hs::HsWidgetPublisherImpl Class Reference

class Hs::HsWidgetPublisherImpl : public MLiwNotifyCallback

Inherits from

Public Member Functions
HsWidgetPublisherImpl()
~HsWidgetPublisherImpl()
HsWidget &CreateWidget(std::string &, std::string &, std::string &, std::string &, std::string &)
HsWidget &GetWidget(std::string &, std::string &, std::string &)
TInt HandleNotifyL(TInt, TInt, CLiwGenericParamList &, const CLiwGenericParamList &)
voidPublishWidget(HsWidget &)
voidRemoveWidget(std::string &, std::string &, std::string &)
voidSetDataObserver(IHsDataObserver *)
Private Member Functions
voidAddItemsActionsL(HsWidget &, TInt)
boolCheckIfWidgetExist(std::string &, std::string &, std::string &, TBool)
std::string GetPublisherNameL(HsWidget &)
MLiwInterface *GetServiceInterfaceL()
std::string GetWidgetIdentifierFromPublisherNameL(const TDesC &)
HsWidget *GetWidgetL(const CLiwMap *)
voidHandleWidgetActionL(const TDesC8 &, const TDesC &, HsWidget &)
intHandleWidgetItemActionL(const TDesC8 &, HsWidget &)
voidInsertWidgetACLL(CLiwDefaultMap *)
voidInsertWidgetDataIdentifiersL(HsWidget &, CLiwDefaultMap *)
voidInsertWidgetDataIdentifiersL(HsWidget &, CLiwDefaultMap *, const TDesC &)
voidInsertWidgetIdentifiersL(HsWidget &, CLiwDefaultMap *)
voidInsertWidgetInfoL(HsWidget &, CLiwDefaultMap *)
voidInsertWidgetItemsL(HsWidget &, CLiwDefaultMap *)
TInt ObtainErrorCode(const CLiwGenericParamList &)
voidPublishWidgetActionsL(HsWidget &)
voidPublishWidgetDataL(HsWidget &)
voidRegisterNotificationL(HsWidget &)
voidRemoveFromCpsL(CLiwDefaultMap *, const TDesC &)
voidRemoveWidgetL(HsWidget &)
HBufC *StdStringToUnicodeLC(const std::string &)
std::string ToStringL(const TDesC &)
std::wstringToWideStringL(const TDesC &)
voidTranslateObserverAction(const TDesC8 &, IHsDataObserver::EEvent &)
TInt TranslateServiceError(TInt32)
voidUnegisterNotificationL()
HBufC *Utf8ToUnicodeLC(const TDesC8 &)
Inherited Functions
MLiwNotifyCallback::GetTransactionID()
Private Attributes
TInt32 iWidgetUid
IHsDataObserver *mHsDataObserver
CLiwServiceHandler *mServiceHandler
MLiwInterface *mServiceInterface
WidgetContentIdMapType mWidgetContentIds
std::vector< HsWidget * >mWidgets

Constructor & Destructor Documentation

HsWidgetPublisherImpl()

HsWidgetPublisherImpl()

~HsWidgetPublisherImpl()

~HsWidgetPublisherImpl()[virtual]

Member Functions Documentation

AddItemsActionsL(HsWidget &, TInt)

voidAddItemsActionsL(HsWidget &aWidgetItem,
TIntaItemIndex
)[private]

Parameters

HsWidget & aWidgetItem
TInt aItemIndex

CheckIfWidgetExist(std::string &, std::string &, std::string &, TBool)

boolCheckIfWidgetExist(std::string &aTemplateName,
std::string &aWidgetName,
std::string &aIdentifier,
TBoolaAdjustToIdentifier
)[private]

Parameters

std::string & aTemplateName
std::string & aWidgetName
std::string & aIdentifier
TBool aAdjustToIdentifier

CreateWidget(std::string &, std::string &, std::string &, std::string &, std::string &)

HsWidget &CreateWidget(std::string &aTemplateName,
std::string &aWidgetName,
std::string &aIdentifier,
std::string &aDescription,
std::string &aIconLocation
)

Parameters

std::string & aTemplateName
std::string & aWidgetName
std::string & aIdentifier
std::string & aDescription
std::string & aIconLocation

GetPublisherNameL(HsWidget &)

std::string GetPublisherNameL(HsWidget &aWidget)[private]

Returns publisher name that should be used with a certain widget when registering the widget, writing/deleting widget data or requesting event notification.

Parameters

HsWidget & aWidgetA valid widget object.

GetServiceInterfaceL()

MLiwInterface *GetServiceInterfaceL()[private]

GetWidget(std::string &, std::string &, std::string &)

HsWidget &GetWidget(std::string &aTemplateName,
std::string &aWidgetName,
std::string &aIdentifier
)

Parameters

std::string & aTemplateName
std::string & aWidgetName
std::string & aIdentifier

GetWidgetIdentifierFromPublisherNameL(const TDesC &)

std::string GetWidgetIdentifierFromPublisherNameL(const TDesC &aPublisherName)[private]

Parses publisher name in order to determine widget identifier. Will leave with KErrNotFound if publisher name is invalid.

Parameters

const TDesC & aPublisherNamePublisher name

GetWidgetL(const CLiwMap *)

HsWidget *GetWidgetL(const CLiwMap *aMap)[private]

Parameters

const CLiwMap * aMap

HandleNotifyL(TInt, TInt, CLiwGenericParamList &, const CLiwGenericParamList &)

TInt HandleNotifyL(TIntaCmdId,
TIntaEventId,
CLiwGenericParamList &aEventParamList,
const CLiwGenericParamList &aInParamList
)[virtual]

Handles notifications caused by an asynchronous Execute*CmdL call or an event.

Parameters

TInt aCmdIdThe service command associated to the event.
TInt aEventIdOccured event, see LiwCommon.hrh.
CLiwGenericParamList & aEventParamListEvent parameters, if any, as defined per each event.
const CLiwGenericParamList & aInParamListInput parameters, if any, given in the related HandleCommmandL.

HandleWidgetActionL(const TDesC8 &, const TDesC &, HsWidget &)

voidHandleWidgetActionL(const TDesC8 &aActionDes,
const TDesC &aContentIdDes,
HsWidget &aWidget
)[private]

Parameters

const TDesC8 & aActionDes
const TDesC & aContentIdDes
HsWidget & aWidget

HandleWidgetItemActionL(const TDesC8 &, HsWidget &)

intHandleWidgetItemActionL(const TDesC8 &aActionDes,
HsWidget &aWidget
)[private]

Parameters

const TDesC8 & aActionDes
HsWidget & aWidget

InsertWidgetACLL(CLiwDefaultMap *)

voidInsertWidgetACLL(CLiwDefaultMap *aDataMap)[private]

Parameters

CLiwDefaultMap * aDataMap

InsertWidgetDataIdentifiersL(HsWidget &, CLiwDefaultMap *)

voidInsertWidgetDataIdentifiersL(HsWidget &aWidget,
CLiwDefaultMap *aDataMap
)[private]

Parameters

HsWidget & aWidget
CLiwDefaultMap * aDataMap

InsertWidgetDataIdentifiersL(HsWidget &, CLiwDefaultMap *, const TDesC &)

voidInsertWidgetDataIdentifiersL(HsWidget &aWidget,
CLiwDefaultMap *aDataMap,
const TDesC &aContentType
)[private]

Parameters

HsWidget & aWidget
CLiwDefaultMap * aDataMap
const TDesC & aContentType

InsertWidgetIdentifiersL(HsWidget &, CLiwDefaultMap *)

voidInsertWidgetIdentifiersL(HsWidget &aWidget,
CLiwDefaultMap *aDataMap
)[private]

Parameters

HsWidget & aWidget
CLiwDefaultMap * aDataMap

InsertWidgetInfoL(HsWidget &, CLiwDefaultMap *)

voidInsertWidgetInfoL(HsWidget &aWidget,
CLiwDefaultMap *aDataMap
)[private]

Parameters

HsWidget & aWidget
CLiwDefaultMap * aDataMap

InsertWidgetItemsL(HsWidget &, CLiwDefaultMap *)

voidInsertWidgetItemsL(HsWidget &aWidget,
CLiwDefaultMap *aDataMap
)[private]

Parameters

HsWidget & aWidget
CLiwDefaultMap * aDataMap

ObtainErrorCode(const CLiwGenericParamList &)

TInt ObtainErrorCode(const CLiwGenericParamList &aOutParamList)[private]

Parameters

const CLiwGenericParamList & aOutParamList

PublishWidget(HsWidget &)

voidPublishWidget(HsWidget &aWidget)

Parameters

HsWidget & aWidget

PublishWidgetActionsL(HsWidget &)

voidPublishWidgetActionsL(HsWidget &aWidget)[private]

Parameters

HsWidget & aWidget

PublishWidgetDataL(HsWidget &)

voidPublishWidgetDataL(HsWidget &aWidget)[private]

Parameters

HsWidget & aWidget

RegisterNotificationL(HsWidget &)

voidRegisterNotificationL(HsWidget &aWidget)[private]

Parameters

HsWidget & aWidget

RemoveFromCpsL(CLiwDefaultMap *, const TDesC &)

voidRemoveFromCpsL(CLiwDefaultMap *aCpDataMap,
const TDesC &aType
)[private]

Parameters

CLiwDefaultMap * aCpDataMap
const TDesC & aType

RemoveWidget(std::string &, std::string &, std::string &)

voidRemoveWidget(std::string &aTemplateName,
std::string &aWidgetName,
std::string &aIdentifier
)

Parameters

std::string & aTemplateName
std::string & aWidgetName
std::string & aIdentifier

RemoveWidgetL(HsWidget &)

voidRemoveWidgetL(HsWidget &aWidget)[private]

Parameters

HsWidget & aWidget

SetDataObserver(IHsDataObserver *)

voidSetDataObserver(IHsDataObserver *aDataObserver)

Parameters

IHsDataObserver * aDataObserver

StdStringToUnicodeLC(const std::string &)

HBufC *StdStringToUnicodeLC(const std::string &aSrcString)const [private]

A convenient std::string to HBufC converter.

Parameters

const std::string & aSrcStringutf8-encoded std::string.

ToStringL(const TDesC &)

std::string ToStringL(const TDesC &aText)[private]

Parameters

const TDesC & aText

ToWideStringL(const TDesC &)

std::wstringToWideStringL(const TDesC &aText)const [private]

Parameters

const TDesC & aText

TranslateObserverAction(const TDesC8 &, IHsDataObserver::EEvent &)

voidTranslateObserverAction(const TDesC8 &aActionDes,
IHsDataObserver::EEvent &aAction
)[private]

Parameters

const TDesC8 & aActionDes
IHsDataObserver::EEvent & aAction

TranslateServiceError(TInt32)

TInt TranslateServiceError(TInt32aServiceErrorCode)[private]

Parameters

TInt32 aServiceErrorCode

UnegisterNotificationL()

voidUnegisterNotificationL()[private]

Utf8ToUnicodeLC(const TDesC8 &)

HBufC *Utf8ToUnicodeLC(const TDesC8 &aSrcString)const [private]

Parameters

const TDesC8 & aSrcString8-bit utf8-encoded string.

Member Data Documentation

TInt32 iWidgetUid

TInt32 iWidgetUid[private]

IHsDataObserver * mHsDataObserver

IHsDataObserver *mHsDataObserver[private]

CLiwServiceHandler * mServiceHandler

CLiwServiceHandler *mServiceHandler[private]

MLiwInterface * mServiceInterface

MLiwInterface *mServiceInterface[private]

WidgetContentIdMapType mWidgetContentIds

WidgetContentIdMapType mWidgetContentIds[private]

std::vector< HsWidget * > mWidgets

std::vector< HsWidget * >mWidgets[private]