UPnPCommonUtils Class Reference

class UPnPCommonUtils

UPnP Framework's common utility functions

upnputilities.lib
Since
S60 3.0
Public Member Functions
IMPORT_C voidDeleteTempFilesL()
IMPORT_C TIntDesC8ToInt(const TDesC8 &)
IMPORT_C HBufC *FileExtensionByMimeTypeL(const TDesC8 &)
IMPORT_C CUpnpContainer *FindContainerByTitle(const CUpnpContainerList &, const TDesC8 &)
IMPORT_C HBufC8 *FixListboxItemTextL(const TDesC8 &)
IMPORT_C HBufC8 *GetMimeTypeByExtensionL(const TDesC &)
IMPORT_C HBufC8 *IntToDesC8LC(const TInt &)
IMPORT_C TBoolIsAudioSupported(const TDesC8 &)
IMPORT_C TBoolIsImageSupported(const TDesC8 &)
IMPORT_C TBoolIsPlaylistContainerL(const CUpnpObject &)
IMPORT_C TBoolIsVideoSupported(const TDesC8 &)
IMPORT_C TBoolMemoryCardStateL()
IMPORT_C HBufC *RenameFileL(const TDesC &)
IMPORT_C HBufC8 *ReplaceIllegalFilenameCharactersL(const TDesC8 &)
IMPORT_C HBufC *ReplaceIllegalFilenameCharactersL(const TDesC &)
IMPORT_C voidReplacePlaceHolderInURIL(CUpnpItem &, const TInetAddr &)
IMPORT_C TUPnPItemTypeResolveFileTypeL(const TDesC &)
IMPORT_C HBufC8 *ResolveMimeTypeL(const TDesC &)
IMPORT_C HBufC *TTimeToUPnPDateL(TTime)

Member Functions Documentation

DeleteTempFilesL()

IMPORT_C voidDeleteTempFilesL()[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 TIntDesC8ToInt(const TDesC8 &aObject)[static]
Convert TDesC8 to TInt
Since
S60 3.1

Parameters

const TDesC8 & aObjectDescriptor 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 & aListList containig containers to search
const TDesC8 & aTitleTitle 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 & aObjectTInt to convert

IsAudioSupported(const TDesC8 &)

IMPORT_C TBoolIsAudioSupported(const TDesC8 &aProtocolInfo)[static]

Checks if device supports audio

Since
S60 3.1

Parameters

const TDesC8 & aProtocolInfo

IsImageSupported(const TDesC8 &)

IMPORT_C TBoolIsImageSupported(const TDesC8 &aProtocolInfo)[static]

Checks if device supports images

Since
S60 3.1

Parameters

const TDesC8 & aProtocolInfo

IsPlaylistContainerL(const CUpnpObject &)

IMPORT_C TBoolIsPlaylistContainerL(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 TBoolIsVideoSupported(const TDesC8 &aProtocolInfo)[static]

Checks if device supports video

Since
S60 3.1

Parameters

const TDesC8 & aProtocolInfo

MemoryCardStateL()

IMPORT_C TBoolMemoryCardStateL()[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 & aFilePathoriginal 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 voidReplacePlaceHolderInURIL(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 TUPnPItemTypeResolveFileTypeL(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(TTimeaTime)[static]

Converts TTime to UPnP date string

Since
S60 3.1

Parameters

TTime aTimetime