#include <mw/sendui.h>
class CSendUi : public CBase |
Public Member Enumerations | |
---|---|
enum | TSendUiMenuType { ESendMenu, EWriteMenu } |
Offers "Send" pop-up list and message creation and sending services.
Can be used to display "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.
IMPORT_C void | AddSendMenuItemL | ( | CEikMenuPane & | aMenuPane, |
TInt | aIndex, | |||
TInt | aCommandId, | |||
TSendingCapabilities | aRequiredCapabilities = KCapabilitiesForAllServices | |||
) |
Adds "Send" menu item to menupane.
Parameter | Description |
---|---|
aMenuPane | Menupane where the "Send" menu item should be added. |
aIndex | The place of the "Send" menu item in menupane. |
aCommandId | Command id for the "Send" menu item. |
aRequiredCapabilities | Capabilities 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. |
Returns: None.
IMPORT_C void | AddTypedMenuItemL | ( | TSendUiMenuType | aMenuType, |
CEikMenuPane & | aMenuPane, | |||
TInt | aIndex, | |||
TInt | aCommandId, | |||
TSendingCapabilities | aRequiredCapabilities = KCapabilitiesForAllServices | |||
) |
Adds menu item of given type to menupane.
Parameter | Description |
---|---|
aMenuType | Type of the menu, "ESendMenu" or "EWriteMenu" |
aMenuPane | Menupane where the menu item should be added. |
aIndex | The place of the menu item in menupane. |
aCommandId | Command id for the menu item. |
aRequiredCapabilities | Capabilities required from services to be shown in list query. If no capabilities are required (KCapabilitiesForAllServices), all available services are shown in list query. |
Returns: None.
IMPORT_C void | AvailableServicesL | ( | RPointerArray< CSendingServiceInfo > & | aServiceList, |
TUid | aServiceProvider = 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
Parameter | Description |
---|---|
aServiceList | Service list to be populated. |
aServiceProvider | Id of the specified service provider. KNullId means all service providers. Service providers are defined in SendUiConsts.h |
Returns: none
IMPORT_C void | CreateAndSendMessageL | ( | TUid | aServiceUid, |
const CMessageData * | aMessageData, | |||
TUid | aBioTypeUid = KNullUid, | |||
TBool | aLaunchEditorEmbedded = 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.
Parameter | Description |
---|---|
aServiceUid | Uid of the sending service (MTM or ECom). |
aMessageData | Data for the message. |
aBioTypeUid | BIO message type uid. Deprecated. |
aLaunchEditorEmbedded | ETrue if the editor should be launched embedded. Otherwise the editor is launched stand-alone. Note: some sending services sends the messages without launching the editor at all. |
Returns: None.
IMPORT_C TInt | ServiceCapabilitiesL | ( | TUid | aServiceUid, |
TSendingCapabilities & | aServiceCapabilities | |||
) |
Parameter | Description |
---|---|
aServiceUid | Uid of the sending service (MTM or ECom). |
aServiceCapabilities | TSendingCapabilities of the sending service as a return value. |
Returns: Return KErrNone if successful, or one of the system wide errors if unsuccessful.
IMPORT_C void | ShowQueryAndSendL | ( | const CMessageData * | aMessageData, |
TSendingCapabilities | aRequiredCapabilities = KCapabilitiesForAllServices, | |||
CArrayFix< TUid > * | aServicesToDim = NULL, | |||
TUid | aBioTypeUid = KNullUid, | |||
TBool | aLaunchEditorEmbedded = ETrue, | |||
const TDesC & | aTitleText = KNullDesC | |||
) |
First displays "Send" pop-up 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.
"Send" pop-up 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. Eg. If oversized file is intended to send, MMS is filtered away from "Send" pop-up list.
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.
Parameter | Description |
---|---|
aMessageData | Data for the message. |
aRequiredCapabilities | Capabilities 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. |
aServicesToDim | Array 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 . |
aBioTypeUid | BIO message type uid. Deprecated. |
aLaunchEditorEmbedded | ETrue 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. |
aTitleText | Title of the "Send" pop-up list query. If no title is defined, then the localised default title "Send:" is used. |
Returns: None.
IMPORT_C TUid | ShowSendQueryL | ( | const CMessageData * | aMessageData = NULL, |
TSendingCapabilities | aRequiredCapabilities = KCapabilitiesForAllServices, | |||
CArrayFix< TUid > * | aServicesToDim = NULL, | |||
const TDesC & | aTitleText = KNullDesC | |||
) |
Displays "Send" pop-up list query and returns the user selection.
"Send" pop-up 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. Eg. If oversized file is intended to send, MMS is filtered away from "Send" pop-up list.
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.
Parameter | Description |
---|---|
aMessageData | Data for the message. Attachments are used for content based filtering. |
aRequiredCapabilities | Capabilities 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. |
aServicesToDim | Array 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 . |
aTitleText | Title of the "Send" pop-up list query. If no title is defined, then the localised default title "Send:" is used. |
Returns: Uid of the selected service (MTM or ECom). KNullId is returned if user selects cancel.
IMPORT_C void | ShowTypedQueryAndSendL | ( | TSendUiMenuType | aMenuType, |
const CMessageData * | aMessageData, | |||
TSendingCapabilities | aRequiredCapabilities = KCapabilitiesForAllServices, | |||
CArrayFix< TUid > * | aServicesToDim = NULL, | |||
TUid | aBioTypeUid = KNullUid, | |||
TBool | aLaunchEditorEmbedded = ETrue, | |||
const TDesC & | aTitleText = KNullDesC | |||
) |
Displays list query and creates message. See ShowQueryAndSendL.
Parameter | Description |
---|---|
aMenuType | Type of the menu, e.g. "ESendMenu" or "EWriteMenu" |
aMessageData | Data for the message. |
aRequiredCapabilities | Capabilities 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. |
aServicesToDim | Array 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 . |
aBioTypeUid | BIO message type uid. Deprecated. |
aLaunchEditorEmbedded | ETrue 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. |
aTitleText | Title of the list query. If no title is defined, then the localised default title is used, e.g. "Send" or "Write". |
Returns: None.
IMPORT_C TUid | ShowTypedQueryL | ( | TSendUiMenuType | aMenuType, |
const CMessageData * | aMessageData = NULL, | |||
TSendingCapabilities | aRequiredCapabilities = KCapabilitiesForAllServices, | |||
CArrayFix< TUid > * | aServicesToDim = NULL, | |||
const TDesC & | aTitleText = KNullDesC | |||
) |
Displays list query and returns the user selection. See ShowSendQueryL.
Parameter | Description |
---|---|
aMenuType | Type of the menu, e.g. "ESendMenu" or "EWriteMenu" |
aMessageData | Data for the message. Attachments are used for content based filtering. |
aRequiredCapabilities | Capabilities required by sending services to be shown in list query. If no capabilities are required (KCapabilitiesForAllServices), all available services are shown in list query. |
aServicesToDim | Array 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 . |
aTitleText | Title of the list query. If no title is defined, then the localised default title is used, e.g. "Send" or "Write" |
Returns: Uid of the selected service (MTM or ECom). KNullId is returned if user selects cancel.
IMPORT_C TBool | ValidateServiceL | ( | TUid | aServiceUid, |
TSendingCapabilities | aRequiredCapabilities | |||
) |
Parameter | Description |
---|---|
aServiceUid | Uid of the sending service (MTM or ECom). |
aRequiredCapabilities | Capabilities required for the sending service. |
Returns: ETrue if service is available and it has required capabilities,otherwise EFalse.