UPnPCommonUtils Class Reference

class UPnPCommonUtils

UPnP Framework's common utility functions

upnputilities.lib
Since
S60 3.0

Member Functions Documentation

DeleteTempFilesL()

IMPORT_C void DeleteTempFilesL ( ) [static]
Delete upnp genereated temporary files from download locations both from phone memory and memory card Leave in case of fatal errors
Since
S60 3.1

DesC8ToInt(const TDesC8 &)

IMPORT_C TInt DesC8ToInt ( const TDesC8 & aObject ) [static]
Convert TDesC8 to TInt
Since
S60 3.1

Parameters

const TDesC8 & aObject Descriptor to convert

FileExtensionByMimeTypeL(const TDesC8 &)

IMPORT_C HBufC * FileExtensionByMimeTypeL ( const TDesC8 & aMimeType ) [static]

Return the file extension according a mime type

Since
S60 3.2

Parameters

const TDesC8 & aMimeType

FindContainerByTitle(const CUpnpContainerList &, const TDesC8 &)

IMPORT_C CUpnpContainer * FindContainerByTitle ( const CUpnpContainerList & aList,
const TDesC8 & aTitle
) [static]

Return container with given title from list of containers

Since
S60 3.1

Parameters

const CUpnpContainerList & aList List containig containers to search
const TDesC8 & aTitle Title to search for

FixListboxItemTextL(const TDesC8 &)

IMPORT_C HBufC8 * FixListboxItemTextL ( const TDesC8 & aText ) [static]

Removes the tab character of the given text string and returns a new fixed file title string.

Since
S60 3.2.3

Parameters

const TDesC8 & aText (const TDesC8&) listboxe item text to be checked

GetMimeTypeByExtensionL(const TDesC &)

IMPORT_C HBufC8 * GetMimeTypeByExtensionL ( const TDesC & aFileName ) [static]

Resolves the MIME type of a file by it's extension. Leaves in error cases.

Since
S60 3.0

Parameters

const TDesC & aFileName

IntToDesC8LC(const TInt &)

IMPORT_C HBufC8 * IntToDesC8LC ( const TInt & aObject ) [static]
Convert TInt to TDesC8
Since
S60 3.1

Parameters

const TInt & aObject TInt to convert

IsAudioSupported(const TDesC8 &)

IMPORT_C TBool IsAudioSupported ( const TDesC8 & aProtocolInfo ) [static]

Checks if device supports audio

Since
S60 3.1

Parameters

const TDesC8 & aProtocolInfo

IsImageSupported(const TDesC8 &)

IMPORT_C TBool IsImageSupported ( const TDesC8 & aProtocolInfo ) [static]

Checks if device supports images

Since
S60 3.1

Parameters

const TDesC8 & aProtocolInfo

IsPlaylistContainerL(const CUpnpObject &)

IMPORT_C TBool IsPlaylistContainerL ( const CUpnpObject & aContainer ) [static]

Checks if the given CUpnpObject is a playlist container. Leaves if the given object is not correctly formed.

Since
S60 3.1

Parameters

const CUpnpObject & aContainer (const CUpnpObject&) filename to be checked

IsVideoSupported(const TDesC8 &)

IMPORT_C TBool IsVideoSupported ( const TDesC8 & aProtocolInfo ) [static]

Checks if device supports video

Since
S60 3.1

Parameters

const TDesC8 & aProtocolInfo

MemoryCardStateL()

IMPORT_C TBool MemoryCardStateL ( ) [static]

Returns status whether memory card is inserted or not.

Since
S60 3.0

RenameFileL(const TDesC &)

IMPORT_C HBufC * RenameFileL ( const TDesC & aFilePath ) [static]
Rename the downloaded file to s_upnpfwtemp(s is original filename) used in play remote item on local device
Since
S60 3.1

Parameters

const TDesC & aFilePath original file path

ReplaceIllegalFilenameCharactersL(const TDesC8 &)

IMPORT_C HBufC8 * ReplaceIllegalFilenameCharactersL ( const TDesC8 & aFileName ) [static]

Replaces the illegal filename characters of the given filename string and returns a new fixed filename string. The following characters are replaced with an underscore: >, <, ", \, /, *, |, : and ?. 8bit version.

Since
S60 3.1

Parameters

const TDesC8 & aFileName (const TDesC8&) filename to be checked

ReplaceIllegalFilenameCharactersL(const TDesC &)

IMPORT_C HBufC * ReplaceIllegalFilenameCharactersL ( const TDesC & aFileName ) [static]

Replaces the illegal filename characters of the given filename string and returns a new fixed filename string. The following characters are replaced with an underscore: >, <, ", \, /, *, |, : and ?. 16bit version.

Since
S60 3.1

Parameters

const TDesC & aFileName (const TDesC&) filename to be checked

ReplacePlaceHolderInURIL(CUpnpItem &, const TInetAddr &)

IMPORT_C void ReplacePlaceHolderInURIL ( CUpnpItem & aItem,
const TInetAddr & aAddress
) [static]

Replaces IP address and port number placeholders of the RES element's URI string of the given item.

Since
S60 3.1

Parameters

CUpnpItem & aItem (CUpnpItem&) the item which RES element's URI is to be updated
const TInetAddr & aAddress (const TInetAddr&) the address and port number of the updated URI

ResolveFileTypeL(const TDesC &)

IMPORT_C TUPnPItemType ResolveFileTypeL ( const TDesC & aFileName ) [static]

Resolves the type of a file. Leaves in error cases.

Since
S60 3.0

Parameters

const TDesC & aFileName

ResolveMimeTypeL(const TDesC &)

IMPORT_C HBufC8 * ResolveMimeTypeL ( const TDesC & aFileName ) [static]

Resolves the MIME type of a file by it's content, using the platform MIME recognizer. Leaves in error cases.

Since
S60 3.0

Parameters

const TDesC & aFileName

TTimeToUPnPDateL(TTime)

IMPORT_C HBufC * TTimeToUPnPDateL ( TTime aTime ) [static]

Converts TTime to UPnP date string

Since
S60 3.1

Parameters

TTime aTime time