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 &)
void PublishWidget ( HsWidget &)
void RemoveWidget ( std::string &, std::string &, std::string &)
void SetDataObserver ( IHsDataObserver *)
Private Member Functions
void AddItemsActionsL ( HsWidget &, TInt )
bool CheckIfWidgetExist ( std::string &, std::string &, std::string &, TBool )
std::string GetPublisherNameL ( HsWidget &)
MLiwInterface * GetServiceInterfaceL ()
std::string GetWidgetIdentifierFromPublisherNameL (const TDesC &)
HsWidget * GetWidgetL (const CLiwMap *)
void HandleWidgetActionL (const TDesC8 &, const TDesC &, HsWidget &)
int HandleWidgetItemActionL (const TDesC8 &, HsWidget &)
void InsertWidgetACLL ( CLiwDefaultMap *)
void InsertWidgetDataIdentifiersL ( HsWidget &, CLiwDefaultMap *)
void InsertWidgetDataIdentifiersL ( HsWidget &, CLiwDefaultMap *, const TDesC &)
void InsertWidgetIdentifiersL ( HsWidget &, CLiwDefaultMap *)
void InsertWidgetInfoL ( HsWidget &, CLiwDefaultMap *)
void InsertWidgetItemsL ( HsWidget &, CLiwDefaultMap *)
TInt ObtainErrorCode (const CLiwGenericParamList &)
void PublishWidgetActionsL ( HsWidget &)
void PublishWidgetDataL ( HsWidget &)
void RegisterNotificationL ( HsWidget &)
void RemoveFromCpsL ( CLiwDefaultMap *, const TDesC &)
void RemoveWidgetL ( HsWidget &)
HBufC * StdStringToUnicodeLC (const std::string &)
std::string ToStringL (const TDesC &)
std::wstring ToWideStringL (const TDesC &)
void TranslateObserverAction (const TDesC8 &, IHsDataObserver::EEvent &)
TInt TranslateServiceError ( TInt32 )
void UnegisterNotificationL ()
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)

void AddItemsActionsL ( HsWidget & aWidgetItem,
TInt aItemIndex
) [private]

Parameters

HsWidget & aWidgetItem
TInt aItemIndex

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

bool CheckIfWidgetExist ( std::string & aTemplateName,
std::string & aWidgetName,
std::string & aIdentifier,
TBool aAdjustToIdentifier
) [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 & aWidget A 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 & aPublisherName Publisher name

GetWidgetL(const CLiwMap *)

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

Parameters

const CLiwMap * aMap

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

TInt HandleNotifyL ( TInt aCmdId,
TInt aEventId,
CLiwGenericParamList & aEventParamList,
const CLiwGenericParamList & aInParamList
) [virtual]

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

Parameters

TInt aCmdId The service command associated to the event.
TInt aEventId Occured event, see LiwCommon.hrh.
CLiwGenericParamList & aEventParamList Event parameters, if any, as defined per each event.
const CLiwGenericParamList & aInParamList Input parameters, if any, given in the related HandleCommmandL.

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

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

Parameters

const TDesC8 & aActionDes
const TDesC & aContentIdDes
HsWidget & aWidget

HandleWidgetItemActionL(const TDesC8 &, HsWidget &)

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

Parameters

const TDesC8 & aActionDes
HsWidget & aWidget

InsertWidgetACLL(CLiwDefaultMap *)

void InsertWidgetACLL ( CLiwDefaultMap * aDataMap ) [private]

Parameters

CLiwDefaultMap * aDataMap

InsertWidgetDataIdentifiersL(HsWidget &, CLiwDefaultMap *)

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

Parameters

HsWidget & aWidget
CLiwDefaultMap * aDataMap

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

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

Parameters

HsWidget & aWidget
CLiwDefaultMap * aDataMap
const TDesC & aContentType

InsertWidgetIdentifiersL(HsWidget &, CLiwDefaultMap *)

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

Parameters

HsWidget & aWidget
CLiwDefaultMap * aDataMap

InsertWidgetInfoL(HsWidget &, CLiwDefaultMap *)

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

Parameters

HsWidget & aWidget
CLiwDefaultMap * aDataMap

InsertWidgetItemsL(HsWidget &, CLiwDefaultMap *)

void InsertWidgetItemsL ( 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 &)

void PublishWidget ( HsWidget & aWidget )

Parameters

HsWidget & aWidget

PublishWidgetActionsL(HsWidget &)

void PublishWidgetActionsL ( HsWidget & aWidget ) [private]

Parameters

HsWidget & aWidget

PublishWidgetDataL(HsWidget &)

void PublishWidgetDataL ( HsWidget & aWidget ) [private]

Parameters

HsWidget & aWidget

RegisterNotificationL(HsWidget &)

void RegisterNotificationL ( HsWidget & aWidget ) [private]

Parameters

HsWidget & aWidget

RemoveFromCpsL(CLiwDefaultMap *, const TDesC &)

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

Parameters

CLiwDefaultMap * aCpDataMap
const TDesC & aType

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

void RemoveWidget ( std::string & aTemplateName,
std::string & aWidgetName,
std::string & aIdentifier
)

Parameters

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

RemoveWidgetL(HsWidget &)

void RemoveWidgetL ( HsWidget & aWidget ) [private]

Parameters

HsWidget & aWidget

SetDataObserver(IHsDataObserver *)

void SetDataObserver ( 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 & aSrcString utf8-encoded std::string.

ToStringL(const TDesC &)

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

Parameters

const TDesC & aText

ToWideStringL(const TDesC &)

std::wstring ToWideStringL ( const TDesC & aText ) const [private]

Parameters

const TDesC & aText

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

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

Parameters

const TDesC8 & aActionDes
IHsDataObserver::EEvent & aAction

TranslateServiceError(TInt32)

TInt TranslateServiceError ( TInt32 aServiceErrorCode ) [private]

Parameters

TInt32 aServiceErrorCode

UnegisterNotificationL()

void UnegisterNotificationL ( ) [private]

Utf8ToUnicodeLC(const TDesC8 &)

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

Parameters

const TDesC8 & aSrcString 8-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]