CUPnPFileSharingEngine Class Reference

class CUPnPFileSharingEngine : public CBase
File sharing engine class for UPnP Home Connect Application upnpapplicationengine.lib
Since
S60 3.1

Inherits from

Public Member Functions
~CUPnPFileSharingEngine ()
IMPORT_C void GetSelectionContentL ( CDesCArray &)
IMPORT_C void GetSelectionIndexesL ( CArrayFix < TInt > &)
IMPORT_C CUPnPFileSharingEngine * NewL ()
IMPORT_C CUPnPFileSharingEngine * NewLC ()
IMPORT_C MUPnPFileSharingEngineObserver * Observer ()
IMPORT_C void RefreshSharedMediaL ( THomeConnectMediaType )
IMPORT_C void RequestSelectionContentL ( THomeConnectMediaType )
IMPORT_C void RequestSelectionIndexesL ( THomeConnectMediaType )
IMPORT_C void RequestSharingProgressL ()
void SetConMonStateL ( TBool , TRequestStatus &)
IMPORT_C void SetObserver ( MUPnPFileSharingEngineObserver *)
IMPORT_C void SetSelectionIndexesL ( THomeConnectMediaType , const CArrayFix < TInt > &)
void SetShareFileComplete ( TBool )
IMPORT_C void SetSharingStateL ( TBool )
IMPORT_C void ShareMediaL ( THomeConnectMediaType )
IMPORT_C TBool SharingStateL ()
IMPORT_C void StartUploadListenerL ()
IMPORT_C void StopUploadListenerL ()
Private Member Functions
CUPnPFileSharingEngine ()
void ConnectionLost ()
void ConstructL ()
void CopyCdescArrayL (const CDesCArray &, CDesCArray &)
void CopyTintArrayL (const CArrayFix < TInt > &, CArrayFix < 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 Attributes
CUPnPFileSharingEngineAO * iAO
CUPnPConnectionMonitor * iConnMon
CUpnpContentRequestAO * iContentRequestor
RUpnpContentServerClient iContentServer
CUpnpContentShareAO * iContentSharer
CArrayFixFlat < TInt > * iImageSelections
CArrayFixFlat < TInt > * iMusicSelections
MUPnPFileSharingEngineObserver * iObserver
CUpnpProgressWatcher * iProgress
TBool iShareFileState

Constructor & Destructor Documentation

CUPnPFileSharingEngine()

CUPnPFileSharingEngine ( ) [private]

C++ default constructor.

~CUPnPFileSharingEngine()

IMPORT_C ~CUPnPFileSharingEngine ( ) [virtual]
Destructor.
Since
S60 3.1

Member Functions Documentation

ConnectionLost()

void ConnectionLost ( ) [private]
Update the sharing state variable in case WLAN connection is lost From MUPnPConnectionMonitorObserver
Since
S60 3.1

ConstructL()

void ConstructL ( ) [private]

By default Symbian 2nd phase constructor is private.

CopyCdescArrayL(const CDesCArray &, CDesCArray &)

void CopyCdescArrayL ( const CDesCArray & aSrc,
CDesCArray & aDst
) const [private]
Helper function to copy descriptors between arrays of CDesCArrays
Since
S60 3.1

Parameters

const CDesCArray & aSrc
CDesCArray & aDst

CopyTintArrayL(const CArrayFix< TInt > &, CArrayFix< TInt > &)

void CopyTintArrayL ( const CArrayFix < TInt > & aSrc,
CArrayFix < TInt > & aDst
) const [private]
Helper function to copy TInts between arrays of CArrayFix<TInt> &
Since
S60 3.1

Parameters

const CArrayFix < TInt > & aSrc
CArrayFix < TInt > & aDst

GetSelectionContentL(CDesCArray &)

IMPORT_C void GetSelectionContentL ( CDesCArray & aArray ) const
Gets the album /playlist names from upnpcontentserver once ready
Since
S60 3.1

Parameters

CDesCArray & aArray Array containng the names for the UI

GetSelectionIndexesL(CArrayFix< TInt > &)

IMPORT_C void GetSelectionIndexesL ( CArrayFix < TInt > & aMarkedItems ) const
Gets the selected albums/playlist indexes
Since
S60 3.1

Parameters

CArrayFix < TInt > & aMarkedItems The indexes of the selections user has made\ relative to selections received from GetSelectionContentL

NewL()

IMPORT_C CUPnPFileSharingEngine * NewL ( ) [static]
Two-phased constructor.
Since
S60 3.1

NewLC()

IMPORT_C CUPnPFileSharingEngine * NewLC ( ) [static]
Two-phased constructor.
Since
S60 3.1

Observer()

IMPORT_C MUPnPFileSharingEngineObserver * Observer ( )
Return handle to MUPnPFileSharingEngineObserver interface
Since
S60 3.1

RefreshSharedMediaL(THomeConnectMediaType)

IMPORT_C void RefreshSharedMediaL ( THomeConnectMediaType aType )

Parameters

THomeConnectMediaType aType Type of media to refresh

RequestSelectionContentL(THomeConnectMediaType)

IMPORT_C void RequestSelectionContentL ( THomeConnectMediaType aType )
Requests the album /playlist names Asynchronous, callback to MUPnPFileSharingEngineObserver::HandleSelectionContent
Since
S60 3.1

Parameters

THomeConnectMediaType aType Type of the media requested

RequestSelectionIndexesL(THomeConnectMediaType)

IMPORT_C void RequestSelectionIndexesL ( THomeConnectMediaType aType ) const
Gets the selected albums/playlist indexes Asynchronous, callback to MUPnPFileSharingEngineObserver::HandleSelectionIndexes
Since
S60 3.1

Parameters

THomeConnectMediaType aType Type of media selected

RequestSharingProgressL()

IMPORT_C void RequestSharingProgressL ( )
Request information about sharing statuses / progress from the contentserver. The information is received via callback
Since
S60 3.1

SetConMonStateL(TBool, TRequestStatus &)

void SetConMonStateL ( TBool aState,
TRequestStatus & aStatus
)
Start or stop connection monitoring
Since
S60 3.1

Parameters

TBool aState ETrue = Start, EFalse = Stop
TRequestStatus & aStatus TRequestStatus for async operation

SetObserver(MUPnPFileSharingEngineObserver *)

IMPORT_C void SetObserver ( MUPnPFileSharingEngineObserver * aObserver )
Sets observer for active object
Since
S60 3.1

Parameters

MUPnPFileSharingEngineObserver * aObserver

SetSelectionIndexesL(THomeConnectMediaType, const CArrayFix< TInt > &)

IMPORT_C void SetSelectionIndexesL ( THomeConnectMediaType aType,
const CArrayFix < TInt > & aMarkedItems
)
Sets the user selections
Since
S60 3.1

Parameters

THomeConnectMediaType aType Type of media selected
const CArrayFix < TInt > & aMarkedItems The indexes of the selections user has made\ relative to selections received from GetSelectionContentL

SetShareFileComplete(TBool)

void SetShareFileComplete ( TBool aShareState )
Set share file completed flag
Since
S60 3.2.3

Parameters

TBool aShareState set ETrue indicate imageandvideo or playlist shared completely, perhaps both of them shared completely. EFalse indicate imageandvideo or playlist shared incompletely, perhaps both of them shared completely.

SetSharingStateL(TBool)

IMPORT_C void SetSharingStateL ( TBool aState )
Sets sharing state to on or off Asynchronous, callback to MUPnPFileSharingEngineObserver::HandleSharingStatus
Since
S60 3.1

Parameters

TBool aState ETrue to enable sharing, otherwise EFalse

ShareMediaL(THomeConnectMediaType)

IMPORT_C void ShareMediaL ( THomeConnectMediaType aType )

Parameters

THomeConnectMediaType aType

SharingStateL()

IMPORT_C TBool SharingStateL ( )
Gets file sharing state from local MediaServer
Since
S60 3.1

StartUploadListenerL()

IMPORT_C void StartUploadListenerL ( )
Starts upload listener. Leave in case of error
Since
S60 3.1

StopUploadListenerL()

IMPORT_C void StopUploadListenerL ( )
Stops upload listener. Leave in case of error
Since
S60 3.1

Member Data Documentation

CUPnPFileSharingEngineAO * iAO

CUPnPFileSharingEngineAO * iAO [private]

Active object for asynchronous file sharing

CUPnPConnectionMonitor * iConnMon

CUPnPConnectionMonitor * iConnMon [private]

Connection monitor

CUpnpContentRequestAO * iContentRequestor

CUpnpContentRequestAO * iContentRequestor [private]

Active object class retrieving information about selections and content from upnpcontentserver

RUpnpContentServerClient iContentServer

RUpnpContentServerClient iContentServer [private]

Client side handle to upnpcontentserver

CUpnpContentShareAO * iContentSharer

CUpnpContentShareAO * iContentSharer [private]

Active object for asynchronous get responce from content server Owned.

CArrayFixFlat< TInt > * iImageSelections

CArrayFixFlat < TInt > * iImageSelections [private]

Cached image selections

CArrayFixFlat< TInt > * iMusicSelections

CArrayFixFlat < TInt > * iMusicSelections [private]

Cached music selections

MUPnPFileSharingEngineObserver * iObserver

MUPnPFileSharingEngineObserver * iObserver [private]

Observer for file sharing state

CUpnpProgressWatcher * iProgress

CUpnpProgressWatcher * iProgress [private]

Active object handling querying progress

TBool iShareFileState

TBool iShareFileState [private]

Set share file completed flag.