CSendUiImpl Class Reference

class CSendUiImpl : public CBase

Implementation of SendUI API

Can be used to show "Send" list query and to create and send messages via available services. Sending services can be based on the MTM or ECom architecture. Created messages are sent directly or message editor is opened for editing, depending on the type of selected service. sendui.lib
Since
S60 v3.0

Inherits from

Public Member Functions
~CSendUiImpl()
voidAddTypedMenuItemL(CSendUi::TSendUiMenuType, CEikMenuPane &, TInt, TInt, TSendingCapabilities)
voidAvailableServicesL(RPointerArray< CSendingServiceInfo > &, TUid)
voidCreateAndSendMessageL(TUid, const CMessageData *, TBool)
voidGetServicesL()
TBool IsEmailAppendableL(TMsvEntry)
TBool IsMailboxAvailableL(void)
TBool IsThirdPartyMailService(TUid)
CSendUiImpl *NewL()
TBool QueryCapabilities(TInt, TSendingCapabilities)
TInt ResolveServiceIndex(TUid)
TInt SendMessageL(TUid, const CMessageData *, TBool)
voidSendMessageViaServerL(TUid, const CMessageData *, TBool)
TInt ServiceCapabilities(TUid, TSendingCapabilities &)
voidShowTypedQueryAndSendL(CSendUi::TSendUiMenuType, const CMessageData *, TSendingCapabilities, CArrayFix< TUid > *, TBool, const TDesC &)
TUid ShowTypedQueryL(CSendUi::TSendUiMenuType, const CMessageData *, TSendingCapabilities, CArrayFix< TUid > *, const TDesC &)
TUid TechnologyType(TUid)
TBool ValidateAttachmentsL(const CMessageData *)
Private Member Functions
CSendUiImpl()
TBool CanSendContentL(TUid, TUid, const CMessageData *, TDataType *)
TBool CheckServiceCapabilities(TUid, TSendingCapabilities)
voidConstructL()
voidFeatureStatus(TInt, TInt &, TInt)
voidFilterServicesL(CDesCArrayFlat &, CArrayFix< TUid > &, TSendingCapabilities, const CMessageData *, CSendUi::TSendUiMenuType)
voidResetIsSending(TAny *)
TUid ShowListQueryL(MDesCArray *, const CArrayFix< TUid > &, const TDesC &, CSendUi::TSendUiMenuType)
voidSortListL(CDesCArrayFlat &, CArrayFix< TUid > &)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Private Attributes
CCoeEnv *iCoeEnv
TBool iEmailClientIntegration
TBool iEmailFramework
RFs &iFs
TBool iIsSending
CPropertyObserver *iPropertyObserver
TFileName iResourceFileName
RConeResourceLoader iResourceLoader
RSendUiServiceClient *iSendUiClient
CArrayFixFlat< TInt32 > *iSendUiServicesOrderArray
RPointerArray< CSendingServiceInfo >iSendingServices
TBool iServerAppLaunch
CArrayFixFlat< TUid > *iServicesToDim
CSendUiSingleton *iSingleton

Constructor & Destructor Documentation

CSendUiImpl()

CSendUiImpl()[private]

~CSendUiImpl()

~CSendUiImpl()[virtual]

Member Functions Documentation

AddTypedMenuItemL(CSendUi::TSendUiMenuType, CEikMenuPane &, TInt, TInt, TSendingCapabilities)

voidAddTypedMenuItemL(CSendUi::TSendUiMenuTypeaMenuType,
CEikMenuPane &aMenuPane,
TIntaIndex,
TIntaCommandId,
TSendingCapabilitiesaRequiredCapabilities = KCapabilitiesForAllServices
)

Adds menu item of given type to menupane.

Since
Series 60 3.0

Parameters

CSendUi::TSendUiMenuType aMenuTypeType of the menu, e.g. "ESendMenu" or "EWriteMenu"
CEikMenuPane & aMenuPaneMenupane where the menu item should be added.
TInt aIndexThe place of the menu item in menupane.
TInt aCommandIdCommand id for the menu item.
TSendingCapabilities aRequiredCapabilities = KCapabilitiesForAllServicesCapabilities required by services to be shown in "Send" list query. If no capabilities are required (KCapabilitiesForAllServices), all available services are shown in "Send" list query.

AvailableServicesL(RPointerArray< CSendingServiceInfo > &, TUid)

voidAvailableServicesL(RPointerArray< CSendingServiceInfo > &aServiceList,
TUidaServiceProvider = KNullUid
)

Populates given list with the information about services provided by specified ECom service provider. Each service provider can provide 1..n services. Ownership of the pointed objects are transfered to caller.

Can be used for ex. when creating own "Send" menu, which needs to include ECom based services.

NOTE: Can be used only for ECom based services, also for MTMs

Since
Series 60 2.8

Parameters

RPointerArray< CSendingServiceInfo > & aServiceListService list to be populated.
TUid aServiceProvider = KNullUidId of the specified service provider. KNullId means all service providers. Service providers are defined in SendUiConsts.h

CanSendContentL(TUid, TUid, const CMessageData *, TDataType *)

TBool CanSendContentL(TUidaServiceUid,
TUidaServiceProviderUid,
const CMessageData *aMessageData,
TDataType *aMimeType
)[private]

Filtering services by their content

Since
Series 60 3.0

Parameters

TUid aServiceUid
TUid aServiceProviderUid
const CMessageData * aMessageDataMessage data, which is base of the content filtering.
TDataType * aMimeTypeThe mimetype of the first attachment.

CheckServiceCapabilities(TUid, TSendingCapabilities)

TBool CheckServiceCapabilities(TUidaServiceUid,
TSendingCapabilitiesaRequiredCapabilities
)[private]
Compares ECom service sending capabilities to required capabilities.
Since
Series 60 3.0

Parameters

TUid aServiceUidUid of the sending service.
TSendingCapabilities aRequiredCapabilitiesCapabilities required for the sending service.

ConstructL()

voidConstructL()[private]

CreateAndSendMessageL(TUid, const CMessageData *, TBool)

voidCreateAndSendMessageL(TUidaServiceUid,
const CMessageData *aMessageData,
TBoolaLaunchEditorEmbedded = ETrue
)

Creates the message and launches the editor for editing the message or sends the message directly without opening the editor. Functionality depends on the type of selected service.

Since
Series 60 3.0

Parameters

TUid aServiceUidUid of the sending service.
const CMessageData * aMessageDataData for the message.
TBool aLaunchEditorEmbedded = ETrue

FeatureStatus(TInt, TInt &, TInt)

voidFeatureStatus(TIntaFeature,
TInt &aNewFeatures,
TIntaFeatureFlag
)[private]
Checks if the feature is supported by feature manager.
Since
Series 60 3.2.3

Parameters

TInt aFeatureFeature manager id of the sending service.
TInt & aNewFeaturesTo keep track of which feature is modified
TInt aFeatureFlagUid of the sending service used for central repository storage.

FilterServicesL(CDesCArrayFlat &, CArrayFix< TUid > &, TSendingCapabilities, const CMessageData *, CSendUi::TSendUiMenuType)

voidFilterServicesL(CDesCArrayFlat &aListItems,
CArrayFix< TUid > &aListItemUids,
TSendingCapabilitiesaRequiredCapabilities,
const CMessageData *aMessageData,
CSendUi::TSendUiMenuTypeaMenuType
)[private]
Since
Series 60 3.0

Parameters

CDesCArrayFlat & aListItems
CArrayFix< TUid > & aListItemUids
TSendingCapabilities aRequiredCapabilities
const CMessageData * aMessageData
CSendUi::TSendUiMenuType aMenuType

GetServicesL()

voidGetServicesL()

Copies sending service information from Central Repository to local data

Since
S60 v3.2

IsEmailAppendableL(TMsvEntry)

TBool IsEmailAppendableL(TMsvEntrytentry)

Checks if Email entry is valid to be appended

Since
S60 v5.0

Parameters

TMsvEntry tentry

IsMailboxAvailableL(void)

TBool IsMailboxAvailableL(void)

Checks if Device has any mailbox or not

Since
S60 v5.0

Parameters

void

IsThirdPartyMailService(TUid)

TBool IsThirdPartyMailService(TUidaUid)

Checks if Device has any ThirdParty Mail Services or not

Since
S60 v5.0

Parameters

TUid aUid

NewL()

CSendUiImpl *NewL()[static]

QueryCapabilities(TInt, TSendingCapabilities)

TBool QueryCapabilities(TIntaServiceIndex,
TSendingCapabilitiesaCap
)

Compares service capabilities with the required capabilities

Since
S60 v3.2

Parameters

TInt aServiceIndexIndex of the service
TSendingCapabilities aCap

ResetIsSending(TAny *)

voidResetIsSending(TAny *aAny)[private, static]
Resets sending state flag.
Since
Series 60 3.0

Parameters

TAny * aAny

ResolveServiceIndex(TUid)

TInt ResolveServiceIndex(TUidaUid)

Returns the index of the service in service array

Since
Series 60 3.2

Parameters

TUid aUid

SendMessageL(TUid, const CMessageData *, TBool)

TInt SendMessageL(TUidaServiceUid,
const CMessageData *aMessageData,
TBoolaLaunchEditorEmbedded
)

Creates the message and launches the editor for editing the message or sends the message directly without opening the editor. Functionality depends on the type of selected service.

Since
Series 60 3.2

Parameters

TUid aServiceUidUid of the sending service.
const CMessageData * aMessageDataData for the message.
TBool aLaunchEditorEmbedded

SendMessageViaServerL(TUid, const CMessageData *, TBool)

voidSendMessageViaServerL(TUidaServiceUid,
const CMessageData *aMessageData,
TBoolaLaunchEditorEmbedded
)

Launches server application, which will eventually call SendMessageL with the same parameters.

Since
Series 60 3.2

Parameters

TUid aServiceUidUid of the sending service.
const CMessageData * aMessageDataData for the message.
TBool aLaunchEditorEmbedded

ServiceCapabilities(TUid, TSendingCapabilities &)

TInt ServiceCapabilities(TUidaServiceUid,
TSendingCapabilities &aServiceCapabilities
)
Returns sending capabilities of the sending service.
Since
Series 60 3.0

Parameters

TUid aServiceUidUid of the sending service.
TSendingCapabilities & aServiceCapabilitiesTSendingCapabilities of the sending service as a return value.

ShowListQueryL(MDesCArray *, const CArrayFix< TUid > &, const TDesC &, CSendUi::TSendUiMenuType)

TUid ShowListQueryL(MDesCArray *aListItems,
const CArrayFix< TUid > &aListItemUids,
const TDesC &aTitleText,
CSendUi::TSendUiMenuTypeaMenuType
)[private]
Since
Series 60 3.0

Parameters

MDesCArray * aListItems
const CArrayFix< TUid > & aListItemUids
const TDesC & aTitleTextTitle of the pop-up list query. If no title is defined, then the localised default title is used.
CSendUi::TSendUiMenuType aMenuType

ShowTypedQueryAndSendL(CSendUi::TSendUiMenuType, const CMessageData *, TSendingCapabilities, CArrayFix< TUid > *, TBool, const TDesC &)

voidShowTypedQueryAndSendL(CSendUi::TSendUiMenuTypeaMenuType,
const CMessageData *aMessageData,
TSendingCapabilitiesaRequiredCapabilities = KCapabilitiesForAllServices,
CArrayFix< TUid > *aServicesToDim = NULL,
TBoolaLaunchEditorEmbedded = ETrue,
const TDesC &aTitleText =  KNullDesC
)

First displays list query and then creates the message. Editor is launched for editing the message or the message is sent directly without opening the editor. Functionality depends on the type of selected service.

List query can be manipulated in three ways. All three methods can be used or just some of those.

The first option is to set the required capabilities for services. Eg. attachments supported. Sending services not matching to required capabilities are filtered away. Capabilities are defined in TSendingCapabilities.h.

The second option is content based filtering. Filtering is based on the files intended to send. Those files can be set as part of message data. Filtering is done according the predefined rules.

The third option is to set the array of service uids not wanted to be shown in list query. Uid can be the technology type, service provider or service id. These sending services are filtered away even if those match to required capabilities.

Since
Series 60 3.0

Parameters

CSendUi::TSendUiMenuType aMenuTypeType of the menu, e.g. "ESendMenu" or "EWriteMenu"
const CMessageData * aMessageDataData for the message.
TSendingCapabilities aRequiredCapabilities = KCapabilitiesForAllServicesCapabilities required by sending services to be shown in "Send" pop-up list query. If no capabilities are required (KCapabilitiesForAllServices), all available services are shown in "Send" pop-up list query.
CArrayFix< TUid > * aServicesToDim = NULLArray of service uids (service uid, service provider's uid or service's TechnologyType) _NOT_ wanted to "Send" list query. See predefined sending service uids in SendUiConsts.h .
TBool aLaunchEditorEmbedded = ETrueETrue if the editor should be launched embedded. Otherwise the editor is launched stand-alone. Note: some services sends the messages without launching the editor at all.
const TDesC & aTitleText =  KNullDesC Title of the list query. If no title is defined, then the localised default title is used, e.g. "Send" or "Write".

ShowTypedQueryL(CSendUi::TSendUiMenuType, const CMessageData *, TSendingCapabilities, CArrayFix< TUid > *, const TDesC &)

TUid ShowTypedQueryL(CSendUi::TSendUiMenuTypeaMenuType,
const CMessageData *aMessageData = NULL,
TSendingCapabilitiesaRequiredCapabilities = KCapabilitiesForAllServices,
CArrayFix< TUid > *aServicesToDim = NULL,
const TDesC &aTitleText =  KNullDesC
)

Displays list query and returns the user selection.

List query can be manipulated in three ways. All three methods can be used or just some of those.

The first option is to set the required capabilities for services. Eg. attachments supported. Sending services not matching to required capabilities are filtered away. Capabilities are defined in TSendingCapabilities.h.

The second option is content based filtering. Filtering is based on the files intended to send. Those files can be set as part of message data. Filtering is done according the predefined rules.

The third option is to set the array of service uids not wanted to be shown in list query. These sending services are filtered away even if those match to required capabilities.

Since
Series 60 3.0

Parameters

CSendUi::TSendUiMenuType aMenuTypeType of the menu, e.g. "ESendMenu" or "EWriteMenu"
const CMessageData * aMessageData = NULLData for the message. Attachments are used for content based filtering.
TSendingCapabilities aRequiredCapabilities = KCapabilitiesForAllServicesCapabilities required by sending services to be shown in list query. If no capabilities are required (KCapabilitiesForAllServices), all available services are shown in list query.
CArrayFix< TUid > * aServicesToDim = NULLArray of service uids (service uid, service provider's uid or service's TechnologyType) _NOT_ wanted to "Send" list query. See predefined sending service uids in SendUiConsts.h .
const TDesC & aTitleText =  KNullDesC Title of the list query. If no title is defined, then the localised default title is used, e.g. "Send" or "Write"

SortListL(CDesCArrayFlat &, CArrayFix< TUid > &)

voidSortListL(CDesCArrayFlat &aListItems,
CArrayFix< TUid > &aListItemUids
)[private]

Sorts service lists

Since
S60 v3.0

Parameters

CDesCArrayFlat & aListItemsNames of items in array
CArrayFix< TUid > & aListItemUidsUids of items in array

TechnologyType(TUid)

TUid TechnologyType(TUidaServiceUid)

Returns the technology type of a service

Since
Series 60 3.0

Parameters

TUid aServiceUid

ValidateAttachmentsL(const CMessageData *)

TBool ValidateAttachmentsL(const CMessageData *aMessageData)

Validates if all the attachments are DRM protected

Since
S60 v5.0

Parameters

const CMessageData * aMessageData

Member Data Documentation

CCoeEnv * iCoeEnv

CCoeEnv *iCoeEnv[private]

Pointer to Control environment Not own.

TBool iEmailClientIntegration

TBool iEmailClientIntegration[private]

TBool iEmailFramework

TBool iEmailFramework[private]

Variable to know if Cmail Feature is on

RFs & iFs

RFs &iFs[private]

Pointer to File Server Session. Initialized from CCoeEnv->FsSession. Not own.

TBool iIsSending

TBool iIsSending[private]

Indicates whether or not the sending process is in progress.

CPropertyObserver * iPropertyObserver

CPropertyObserver *iPropertyObserver[private]

TFileName iResourceFileName

TFileName iResourceFileName[private]

Resource file name and path. Own.

RConeResourceLoader iResourceLoader

RConeResourceLoader iResourceLoader[private]

For UI resource loading Own.

RSendUiServiceClient * iSendUiClient

RSendUiServiceClient *iSendUiClient[private]

IPC client with SendUiLauncherApp Own.

CArrayFixFlat< TInt32 > * iSendUiServicesOrderArray

CArrayFixFlat< TInt32 > *iSendUiServicesOrderArray[private]

The requested order of sending services in the menu. Read from resources. Own.

RPointerArray< CSendingServiceInfo > iSendingServices

RPointerArray< CSendingServiceInfo >iSendingServices[private]

Array of available sending service Own.

TBool iServerAppLaunch

TBool iServerAppLaunch[private]

CArrayFixFlat< TUid > * iServicesToDim

CArrayFixFlat< TUid > *iServicesToDim[private]

Services to be dimmed Own.

CSendUiSingleton * iSingleton

CSendUiSingleton *iSingleton[private]

Pointer to CSendUiSingleton Own.