CSendUiFileRightsEngine Class Reference

class CSendUiFileRightsEngine : public CBase

Provides functionality for DRM file protection analyzing and content MMS compatibility resolving.

SenduiDataUtils.lib
Since
Series 60 3.0

Inherits from

Public Member Functions
~CSendUiFileRightsEngine ()
IMPORT_C TInt CalculateTotalSizeOfFiles ( CArrayPtrFlat < CSendUiAttachment > *, TBool )
void CleanupImplArray ( TAny *)
IMPORT_C void ClearValidationCounters ()
IMPORT_C void ConfirmDrmFileRightsL ( CArrayPtrFlat < CSendUiAttachment > *)
IMPORT_C void ConfirmMmsValidityL ( CArrayPtrFlat < CSendUiAttachment > *, TUid )
IMPORT_C CSendUiFileRightsEngine * NewL ( RFs &)
IMPORT_C CSendUiFileRightsEngine * NewLC ( RFs &)
IMPORT_C TBool ShowDrmAndMmsInfoL ( TUid )
IMPORT_C void ShowInformationNoteL ( TUint )
IMPORT_C void ValidateFiles ( CArrayPtrFlat < CSendUiAttachment > *)
Private Member Functions
CSendUiFileRightsEngine ( RFs &)
TBool AnalyzeMmsValidationResultL (CSendUiAttachment &, TInt &)
void ConstructL ()
void ResolveDrmQuery ( TUid , TUint &)
void ResolveErrorNoteL ( TUid , TUint &, TFREErrorNoteType &, TUint &)
void ResolveMmsUploadErrorNoteL ( TUint &, TFREErrorNoteType &, TUint &)
TBool ShowConfirmationQueryL ( TUint , TUint , TUint )
void ShowErrorNoteL ( TUint )
void ShowErrorNotificationL ( TUint , TFREErrorNoteType , TUint )
TBool ValidateFile (const TDesC &, TInt &)
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 Member Enumerations
enum TFREInvalidTypes {
ESenduiIndexDrmFLOrCCL  = 0, ESenduiIndexAlreadyInUse , ESenduiIndexMmsTooBig , ESenduiIndexMmsNotSupported , ESenduiIndexBadHandle , ESenduiIndexLastInvalid
}
enum TFREValidationResults { ESenduiIndexTotalCount  = 0, ESenduiIndexDeleted , ESenduiIndexDrmSD , ESenduiIndexLastResult }
Private Attributes
RFs iFileSession
TUint iInvalidationReason
CMsgMediaResolver * iMediaResolver
CMmsConformance * iMmsConformance
CFileProtectionResolver * iProtectionResolver
TUint iValidationResults

Constructor & Destructor Documentation

CSendUiFileRightsEngine(RFs &)

CSendUiFileRightsEngine ( RFs & aFS ) [private]

C++ default constructor.

Parameters

RFs & aFS

~CSendUiFileRightsEngine()

~CSendUiFileRightsEngine ( ) [virtual]

Destructor.

Member Functions Documentation

AnalyzeMmsValidationResultL(CSendUiAttachment &, TInt &)

TBool AnalyzeMmsValidationResultL ( CSendUiAttachment & aAttachment,
TInt & aAttachmentsSize
) [private]
AnalyzeMmsValidationResult
Since
S60 v.3.0

Parameters

CSendUiAttachment & aAttachment Attachment to be analyzed
TInt & aAttachmentsSize

CalculateTotalSizeOfFiles(CArrayPtrFlat< CSendUiAttachment > *, TBool)

IMPORT_C TInt CalculateTotalSizeOfFiles ( CArrayPtrFlat < CSendUiAttachment > * aAttachments,
TBool aLinksSupported
)

CalculateTotalSizeOfFiles

File sizes saved by ValidateFiles are used. If cached file sizes do not exist, then file sizes are solved.

Attachments If ETrue, then only attachments type of file handles are calculated total size of files. Otherwise filesize of all attachments is returned.

Parameters

CArrayPtrFlat < CSendUiAttachment > * aAttachments
TBool aLinksSupported

CleanupImplArray(TAny *)

void CleanupImplArray ( TAny * aAny ) [static]

Cleanup ECOM Implementation info array

Parameters

TAny * aAny The array

ClearValidationCounters()

IMPORT_C void ClearValidationCounters ( )

Clears all validation counter

Since
S60 v3.0

ConfirmDrmFileRightsL(CArrayPtrFlat< CSendUiAttachment > *)

IMPORT_C void ConfirmDrmFileRightsL ( CArrayPtrFlat < CSendUiAttachment > * aAttachments )

Confirms DRM rights of files

Note: files must be validated before DRM analyze. This functions also stores mimetypes of files for later use. Mimetypes are stored into the given array.

Since
S60 3.0

Parameters

CArrayPtrFlat < CSendUiAttachment > * aAttachments Attachments (Path and handle) to be validated. Return value contains valid attachments, invalid attachments are filtered away from array.

ConfirmMmsValidityL(CArrayPtrFlat< CSendUiAttachment > *, TUid)

IMPORT_C void ConfirmMmsValidityL ( CArrayPtrFlat < CSendUiAttachment > * aAttachments,
TUid aServiceId = KNullUid
)

Validates files for sending via MMS

Note: files must be validated before MMS validation.

Since
S60 3.0

Parameters

CArrayPtrFlat < CSendUiAttachment > * aAttachments Attachments to be validated. Return value contains valid attachments, invalid attachments are filtered away from array.
TUid aServiceId = KNullUid Identifies the type of MMS service (MMS/MMS upload..)

ConstructL()

void ConstructL ( ) [private]

By default Symbian 2nd phase constructor is private.

NewL(RFs &)

IMPORT_C CSendUiFileRightsEngine * NewL ( RFs & aFs ) [static]

Two-phased constructor.

Parameters

RFs & aFs

NewLC(RFs &)

IMPORT_C CSendUiFileRightsEngine * NewLC ( RFs & aFs ) [static]

Two-phased constructor.

Parameters

RFs & aFs

ResolveDrmQuery(TUid, TUint &)

void ResolveDrmQuery ( TUid aServiceId,
TUint & aResourceId
) [private]
Resolves a proper DRM query for the given service
Since
S60 v.3.0

Parameters

TUid aServiceId Service Uid
TUint & aResourceId Id for a proper query in resources.

ResolveErrorNoteL(TUid, TUint &, TFREErrorNoteType &, TUint &)

void ResolveErrorNoteL ( TUid aServiceId,
TUint & aResourceId,
TFREErrorNoteType & aNoteType,
TUint & aValueForNote
) [private]
Resolves a proper error note for the given service
Since
S60 v.3.0

Parameters

TUid aServiceId Service Uid
TUint & aResourceId Id for a proper note in resources.
TFREErrorNoteType & aNoteType Type of the note (query/info)
TUint & aValueForNote Value for the variable in the note

ResolveMmsUploadErrorNoteL(TUint &, TFREErrorNoteType &, TUint &)

void ResolveMmsUploadErrorNoteL ( TUint & aResourceId,
TFREErrorNoteType & aNoteType,
TUint & aValueForNote
) [private]
Resolves a proper error note for the MMS Upload services
Since
S60 v.3.0

Parameters

TUint & aResourceId Id for a proper note in resources.
TFREErrorNoteType & aNoteType Type of the note (query/info)
TUint & aValueForNote Value for the variable in the note

ShowConfirmationQueryL(TUint, TUint, TUint)

TBool ShowConfirmationQueryL ( TUint aTextResourceId,
TUint aNoteResourceId,
TUint aValueForNote = NULL
) const [private]
Shows a confirmation query
Since
S60 v.3.0

Parameters

TUint aTextResourceId Text id for the note
TUint aNoteResourceId Resource id for the note
TUint aValueForNote = NULL Variable value for the note

ShowDrmAndMmsInfoL(TUid)

IMPORT_C TBool ShowDrmAndMmsInfoL ( TUid aServiceId = KNullUid )
Shows DRM confirmation query and/or error note, if needed. Returns EFalse if user cancels sending.
Since
S60 v.3.0

Parameters

TUid aServiceId = KNullUid Different services get different notes.

ShowErrorNoteL(TUint)

void ShowErrorNoteL ( TUint aTextResourceId ) const [private]
Shows an error note
Since
S60 v.3.0

Parameters

TUint aTextResourceId Resource id of the note

ShowErrorNotificationL(TUint, TFREErrorNoteType, TUint)

void ShowErrorNotificationL ( TUint aResourceId,
TFREErrorNoteType aNoteType,
TUint aValueForNote
) const [private]
Resolves a proper note
Since
S60 v.3.0

Parameters

TUint aResourceId Id for a proper note in resources.
TFREErrorNoteType aNoteType Type of the note
TUint aValueForNote Value for the variable in the note

ShowInformationNoteL(TUint)

IMPORT_C void ShowInformationNoteL ( TUint aTextResourceId ) const
Shows an information note
Since
S60 v.3.0

Parameters

TUint aTextResourceId Resource id of the note

ValidateFile(const TDesC &, TInt &)

TBool ValidateFile ( const TDesC & aFileName,
TInt & aFileSize
) [private]

Validates that the given file usable

Since
S60 v3.0

Parameters

const TDesC & aFileName file path
TInt & aFileSize file size

ValidateFiles(CArrayPtrFlat< CSendUiAttachment > *)

IMPORT_C void ValidateFiles ( CArrayPtrFlat < CSendUiAttachment > * aAttachments )

ValidateFiles

This functions stores file sizes for all validated files.

Since
S60 3.0

Parameters

CArrayPtrFlat < CSendUiAttachment > * aAttachments Attachents to be validated. Return value contains valid attachments, invalid attachments are filtered away from array.

Member Enumerations Documentation

Enum TFREInvalidTypes

Enumerators

ESenduiIndexDrmFLOrCCL = 0
ESenduiIndexAlreadyInUse
ESenduiIndexMmsTooBig
ESenduiIndexMmsNotSupported
ESenduiIndexBadHandle
ESenduiIndexLastInvalid

Enum TFREValidationResults

Enumerators

ESenduiIndexTotalCount = 0
ESenduiIndexDeleted
ESenduiIndexDrmSD
ESenduiIndexLastResult

Member Data Documentation

RFs iFileSession

RFs iFileSession [private]

TUint iInvalidationReason

TUint iInvalidationReason [private]

CMsgMediaResolver * iMediaResolver

CMsgMediaResolver * iMediaResolver [private]

CMmsConformance * iMmsConformance

CMmsConformance * iMmsConformance [private]

CFileProtectionResolver * iProtectionResolver

CFileProtectionResolver * iProtectionResolver [private]

TUint iValidationResults

TUint iValidationResults [private]