CMessageData Class Reference

API published in: S60 3rd Ed

Link against: sendui.lib

Capability Information

Required Capabilities

LocalServices NetworkServices ReadDeviceData ReadUserData WriteDeviceData WriteUserData

Exceptions

The capability DRM is required in:

EXPORT_C void CSendUi::CreateAndSendMessageL( TUid aServiceUid, const CMessageData* aMessageData, TUid aBioTypeUid, TBool aLaunchEditorEmbedded )

...and...

EXPORT_C void CSendUi::ShowQueryAndSendL( const CMessageData* aMessageData, TSendingCapabilities aRequiredCapabilities, CArrayFix<TUid>* aServicesToDim, TUid aBioTypeUid, TBool aLaunchEditorEmbedded, const TDesC& aTitleText )

...and...

EXPORT_C void CSendUi::ShowTypedQueryAndSendL( TSendUiMenuType aMenuType, const CMessageData* aMessageData, TSendingCapabilities aRequiredCapabilities, CArrayFix<TUid>* aServicesToDim, TUid aBioTypeUid, TBool aLaunchEditorEmbedded, const TDesC& aTitleText )

...when the Send UI client is sending DRM protected files over MMS.


#include <cmessagedata.h>

Detailed Description

Encapsulates the message data for sending services.

Encapsulates the message data for sending services. Class supports externalazation and internalization, which are used to relay message to SendUI server application.


Public Member Functions

virtual IMPORT_C  ~CMessageData ()
  Destructor.
IMPORT_C void  SetSubjectL (const TDesC *aSubject)
  Set message subject.
IMPORT_C const TPtrC  Subject () const
  Returns message subject.
IMPORT_C void  AppendAttachmentL (const TDesC &aFilePath)
  Appends attachment file path to the array of attachment file paths.
IMPORT_C const CDesCArray &  AttachmentArray () const
  Returns the array of attachment file paths.
IMPORT_C void  ClearAttachmentArray ()
  Clears the array of attachment file paths.
IMPORT_C void  AppendToAddressL (const TDesC &aAddress, const TDesC &aAlias=KNullDesC)
  Encapsulates address and alias to CMessageAddress and adds to array.
IMPORT_C const CMessageAddressArray ToAddressArray () const
  Returns array of addresses and aliases.
IMPORT_C void  AppendCcAddressL (const TDesC &aCcAddress, const TDesC &aCcAlias=KNullDesC)
  Encapsulates CC address and alias to CMessageAddress and adds to array.
IMPORT_C const CMessageAddressArray CcAddressArray () const
  Returns array of CC addresses and aliases.
IMPORT_C void  AppendBccAddressL (const TDesC &aBccAddress, const TDesC &aBccAlias=KNullDesC)
  Encapsulates Bcc address and alias to CMessageAddress and adds to array.
IMPORT_C const CMessageAddressArray BccAddressArray () const
  Returns array of Bcc addresses and aliases.
IMPORT_C void  SetBodyTextL (const CRichText *aBodyText)
  Set message body text.
IMPORT_C const CRichText *  BodyText () const
  Returns message body text.
IMPORT_C void  AppendAttachmentHandleL (const RFile &aFileHandle)
  Appends attachment handle to the array of attachment handles.
IMPORT_C const RArray< RFile > &  AttachmentHandleArray () const
  Returns the array of attachment handles.
IMPORT_C TUid  DataType () const
  Returns data type id.
IMPORT_C void  ClearAddresses ()
  Clears all addressee arrays.
IMPORT_C void  ExternalizeL (RWriteStream &aStream) const
  Externalizes message data to a stream.
IMPORT_C void  InternalizeL (RReadStream &aStream)
  Internalizes message data to from a stream.
IMPORT_C void  SetOpaqueDataL (const TDesC8 *aData, TUid aDataType)
  Set opaque data.
IMPORT_C const TPtrC8  OpaqueData () const
  Get opaque data.

Static Public Member Functions

static IMPORT_C CMessageData NewL ()
  Two-phased constructor.
static IMPORT_C CMessageData NewLC ()
  Two-phased constructor.

Protected Member Functions

IMPORT_C  CMessageData ()
  C++ default constructor.
IMPORT_C void  ConstructL ()
  By default Symbian 2nd phase constructor is private.

Protected Attributes

TUid  iDataType
  Data type of this message.

Constructor & Destructor Documentation

virtual IMPORT_C CMessageData::~CMessageData  )  [virtual]
 

Destructor.

IMPORT_C CMessageData::CMessageData  )  [protected]
 

C++ default constructor.


Member Function Documentation

IMPORT_C void CMessageData::AppendAttachmentHandleL const RFile &  aFileHandle  ) 
 

Appends attachment handle to the array of attachment handles.

NOTE: Attachment handles should be opened using ShareProtected() file session, otherwise handles can not be transfered through client-server interface.

NOTE: When adding a temporary file as an attachment, always use this method,

Parameters:
aFileHandle  File handle of the attachment.
Returns:
None.
IMPORT_C void CMessageData::AppendAttachmentL const TDesC &  aFilePath  ) 
 

Appends attachment file path to the array of attachment file paths.

Only a link to the attachment is stored and compared to AppendAttachmentHandleL less resources is used during the send operation.

NOTE: Do not add any temporary files as an attachment. Always use AppendAttachmentHandleL for temporary files.

Parameters:
aFilePath  File path of the attachment.
Returns:
None.
IMPORT_C void CMessageData::AppendBccAddressL const TDesC &  aBccAddress,
const TDesC &  aBccAlias = KNullDesC
 

Encapsulates Bcc address and alias to CMessageAddress and adds to array.

Parameters:
aBccAddress  Real Bcc-address.
aBccAlias  Alias for the real Bcc-address.
Returns:
None.
IMPORT_C void CMessageData::AppendCcAddressL const TDesC &  aCcAddress,
const TDesC &  aCcAlias = KNullDesC
 

Encapsulates CC address and alias to CMessageAddress and adds to array.

Parameters:
aCcAddress  Real CC-address.
aCcAlias  Alias for the real CC-address.
Returns:
None.
IMPORT_C void CMessageData::AppendToAddressL const TDesC &  aAddress,
const TDesC &  aAlias = KNullDesC
 

Encapsulates address and alias to CMessageAddress and adds to array.

Parameters:
aAddress  Real address.
aAlias  Alias for the real address.
Returns:
None.
IMPORT_C const CDesCArray& CMessageData::AttachmentArray  )  const
 

Returns the array of attachment file paths.

Returns:
Array of attachment file paths.
IMPORT_C const RArray<RFile>& CMessageData::AttachmentHandleArray  )  const
 

Returns the array of attachment handles.

Returns:
Array of attachment handles.
IMPORT_C const CMessageAddressArray& CMessageData::BccAddressArray  )  const
 

Returns array of Bcc addresses and aliases.

Returns:
Array of Bcc addresses and aliases.
IMPORT_C const CRichText* CMessageData::BodyText  )  const
 

Returns message body text.

Returns:
Message body text.
IMPORT_C const CMessageAddressArray& CMessageData::CcAddressArray  )  const
 

Returns array of CC addresses and aliases.

Returns:
Array of cc addresses and aliases.
IMPORT_C void CMessageData::ClearAddresses  ) 
 

Clears all addressee arrays.

Returns:
None.
IMPORT_C void CMessageData::ClearAttachmentArray  ) 
 

Clears the array of attachment file paths.

Returns:
Array of attachment file paths.
IMPORT_C void CMessageData::ConstructL  )  [protected]
 

By default Symbian 2nd phase constructor is private.

IMPORT_C TUid CMessageData::DataType  )  const
 

Returns data type id.

This can be used for interpreting the opaque data.

Returns:
Data type id.
IMPORT_C void CMessageData::ExternalizeL RWriteStream &  aStream  )  const
 

Externalizes message data to a stream.

Returns:
None.
IMPORT_C void CMessageData::InternalizeL RReadStream &  aStream  ) 
 

Internalizes message data to from a stream.

Returns:
None.
static IMPORT_C CMessageData* CMessageData::NewL  )  [static]
 

Two-phased constructor.

Returns:
Pointer to object of CMessageData.
static IMPORT_C CMessageData* CMessageData::NewLC  )  [static]
 

Two-phased constructor.

Returns:
Pointer to object of CMessageData.
IMPORT_C const TPtrC8 CMessageData::OpaqueData  )  const
 

Get opaque data.

Returns:
aData Opaque data.
IMPORT_C void CMessageData::SetBodyTextL const CRichText *  aBodyText  ) 
 

Set message body text.

Parameters:
aBodyText  Message body text.
Returns:
None.
IMPORT_C void CMessageData::SetOpaqueDataL const TDesC8 *  aData,
TUid  aDataType
 

Set opaque data.

Parameters:
aData  Opaque data.
aDataType,Identifier  for the opaque data.
Returns:
None.
IMPORT_C void CMessageData::SetSubjectL const TDesC *  aSubject  ) 
 

Set message subject.

Parameters:
aSubject  Sets message subject. Does not take ownership.
Returns:
None.
IMPORT_C const TPtrC CMessageData::Subject  )  const
 

Returns message subject.

Returns:
Message subject.
IMPORT_C const CMessageAddressArray& CMessageData::ToAddressArray  )  const
 

Returns array of addresses and aliases.

Returns:
Array of addresses and aliases.

Field Documentation

TUid CMessageData::iDataType [protected]
 

Data type of this message.

Normally this is KSenduiMsgDataBase This can be used for interpreting the opaque data.


The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2008
Back to top