CUpnpFileSharingBody Class Reference

class CUpnpFileSharingBody : public CActive

Implementation class for UPnP File Sharing class

MediaServerClient.lib
Since
S60 v3.1

Inherits from

Public Member Functions
~CUpnpFileSharingBody()
voidDoCancel()
voidGetSharedContainerL(TInt, CUpnpContainer &, TRequestStatus &)
voidGetSharedContainerListL(TInt, CUpnpBrowseCriteria &, CUpnpContainerList &, TInt &, TRequestStatus &)
voidGetSharedItemL(TInt, CUpnpItem &, TRequestStatus &)
voidGetSharedItemListL(TInt, CUpnpBrowseCriteria &, CUpnpItemList &, TInt &, TRequestStatus &)
RUpnpMediaServerClient &MediaServerClient()
IMPORT_C CUpnpFileSharingBody *NewL()
TInt RunError(TInt)
voidRunL()
voidShareContainerL(const TDesC8 &, CUpnpContainer &, TRequestStatus &)
voidShareItemL(const TDesC8 &, CUpnpItem &, TRequestStatus &)
voidShareItemListL(const TDesC8 &, CUpnpItemList &, TInt &, TRequestStatus &)
voidShareReferenceL(TInt, TInt, CUpnpItem &, TRequestStatus &)
voidShareReferenceListL(CUpnpItemList &, TInt &, TRequestStatus &)
voidUnshareContainerL(TInt, TRequestStatus &)
voidUnshareItemL(TInt, TRequestStatus &)
voidUnshareItemListL(CUpnpItemList &, TInt &, TRequestStatus &)
voidUnshareRootL(TRequestStatus &)
Private Member Functions
CUpnpFileSharingBody()
voidConstructL()
voidFinishGetSharedContainerL()
voidFinishGetSharedContainerListL()
voidFinishGetSharedItemL()
voidFinishGetSharedItemListL()
voidFinishShareContainerL()
voidFinishShareItemL()
voidFinishShareItemListL()
voidFinishUnshareItemList()
voidFinishUnshareObject()
voidFinishUnshareRoot()
voidGetGetSharedContainerListResultL()
voidGetGetSharedContainerResultL()
voidGetGetSharedItemListResultL()
voidGetGetSharedItemResultL()
voidGetShareContainerResultL()
voidGetShareItemListResultL()
voidGetShareItemResultL()
voidHandleError()
voidLeaveIfBusyL()
voidReset()
Inherited Functions
CActive::CActive(TInt)
CActive::Cancel()
CActive::Deque()
CActive::Extension_(TUint,TAny *&,TAny *)
CActive::IsActive()const
CActive::IsAdded()const
CActive::Priority()const
CActive::SetActive()
CActive::SetPriority(TInt)
CActive::~CActive()
CBase::CBase()
CBase::Delete(CBase *)
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()
Public Member Enumerations
enumTFileSharingAction {
ENoAction = 1, EShareItem, EShareItemResult, EShareContainer, EShareContainerResult, EShareItemList, EShareItemListResult, EUnshareContainer, EUnshareItem, EGetSharedItem, EGetSharedItemResult, EGetSharedItemList, EGetSharedItemListResult, EGetSharedContainer, EGetSharedContainerResult, EGetSharedContainerList, EGetSharedContainerListResult, EUnshareItemList, EUnshareRoot, EShareReference, EShareReferenceList
}
Inherited Enumerations
CActive:TPriority
Private Attributes
CUpnpContainer *iClientContainer
CUpnpContainerList *iClientContainerList
TPckg< TInt > *iClientExecStatusPkg
CUpnpItem *iClientItem
CUpnpItemList *iClientItemList
TRequestStatus *iClientStatus
RUpnpMediaServerClient iMediaServer
TFileSharingAction iPendingAction
HBufC8 *iReceiveBuffer
TPtr8 iReceiveBufferPtr
TInt iRespBufSize
TPckg< TInt >iRespBufSizePkg
HBufC8 *iSendBuffer
TPtr8 iSendBufferPtr
Inherited Attributes
CActive::iStatus

Constructor & Destructor Documentation

CUpnpFileSharingBody()

CUpnpFileSharingBody()[private]

~CUpnpFileSharingBody()

~CUpnpFileSharingBody()[virtual]

Destructor.

Member Functions Documentation

ConstructL()

voidConstructL()[private]

DoCancel()

voidDoCancel()[virtual]

Cancellation of ongoing asynchronous operation

FinishGetSharedContainerL()

voidFinishGetSharedContainerL()[private]

FinishGetSharedContainerListL()

voidFinishGetSharedContainerListL()[private]

FinishGetSharedItemL()

voidFinishGetSharedItemL()[private]

FinishGetSharedItemListL()

voidFinishGetSharedItemListL()[private]

FinishShareContainerL()

voidFinishShareContainerL()[private]

FinishShareItemL()

voidFinishShareItemL()[private]

FinishShareItemListL()

voidFinishShareItemListL()[private]

FinishUnshareItemList()

voidFinishUnshareItemList()[private]

FinishUnshareObject()

voidFinishUnshareObject()[private]

FinishUnshareRoot()

voidFinishUnshareRoot()[private]

GetGetSharedContainerListResultL()

voidGetGetSharedContainerListResultL()[private]

GetGetSharedContainerResultL()

voidGetGetSharedContainerResultL()[private]

GetGetSharedItemListResultL()

voidGetGetSharedItemListResultL()[private]

GetGetSharedItemResultL()

voidGetGetSharedItemResultL()[private]

GetShareContainerResultL()

voidGetShareContainerResultL()[private]

GetShareItemListResultL()

voidGetShareItemListResultL()[private]

GetShareItemResultL()

voidGetShareItemResultL()[private]

GetSharedContainerL(TInt, CUpnpContainer &, TRequestStatus &)

voidGetSharedContainerL(TIntaContainerId,
CUpnpContainer &aContainer,
TRequestStatus &aStatus
)

Gets shared container information from MediaServer. Information is returned to container reference. Returns the complete item/container branch below the specified container id. Container id "0" (root) returns the complete CDS hierarchy.

Since
S60 3.1

Parameters

TInt aContainerIdreference to container id
CUpnpContainer & aContainer
TRequestStatus & aStatusreference to TRequestStatus which is completed when procedure is over

GetSharedContainerListL(TInt, CUpnpBrowseCriteria &, CUpnpContainerList &, TInt &, TRequestStatus &)

voidGetSharedContainerListL(TIntaContainerId,
CUpnpBrowseCriteria &aBrowseCriteria,
CUpnpContainerList &aContainerList,
TInt &aTotalMatches,
TRequestStatus &aStatus
)

Gets shared container information from MediaServer. Information is returned to item list reference

Since
S60 3.1

Parameters

TInt aContainerIdid of the container of which items are to be returned
CUpnpBrowseCriteria & aBrowseCriteriaspecifies request details, such as requestCount, startingIndes, filter
CUpnpContainerList & aContainerListreference to container list where information is updated.
TInt & aTotalMatchesnumber of matched containers
TRequestStatus & aStatusreference to TRequestStatus which is completed when procedure is over

GetSharedItemL(TInt, CUpnpItem &, TRequestStatus &)

voidGetSharedItemL(TIntaItemId,
CUpnpItem &aItem,
TRequestStatus &aStatus
)

Gets shared item information from MediaServer. Information is returned to item reference

Since
S60 3.1

Parameters

TInt aItemIdreference to item id
CUpnpItem & aItemreference to item where information is updated.
TRequestStatus & aStatus

GetSharedItemListL(TInt, CUpnpBrowseCriteria &, CUpnpItemList &, TInt &, TRequestStatus &)

voidGetSharedItemListL(TIntaContainerId,
CUpnpBrowseCriteria &aBrowseCriteria,
CUpnpItemList &aItemList,
TInt &aTotalMatches,
TRequestStatus &aStatus
)

Gets shared items information from MediaServer. Information is returned to item list reference

Since
S60 3.1

Parameters

TInt aContainerIdid of the container of which items are to be returned
CUpnpBrowseCriteria & aBrowseCriteriaspecifies request details, such as requestCount, startingIndes, filter
CUpnpItemList & aItemListreference to item list where information is updated.
TInt & aTotalMatchesnumber of matched items
TRequestStatus & aStatusreference to TRequestStatus which is completed when procedure is over

HandleError()

voidHandleError()[private]

LeaveIfBusyL()

voidLeaveIfBusyL()[private]

MediaServerClient()

RUpnpMediaServerClient &MediaServerClient()

Returns reference to media server client

Since
S60 5.0 HN

NewL()

IMPORT_C CUpnpFileSharingBody *NewL()[static]

Two-phased constructor.

Reset()

voidReset()[private]

RunError(TInt)

TInt RunError(TIntaErr)[virtual]

RunError

Parameters

TInt aErr

RunL()

voidRunL()[virtual]

RunL

ShareContainerL(const TDesC8 &, CUpnpContainer &, TRequestStatus &)

voidShareContainerL(const TDesC8 &aParentId,
CUpnpContainer &aContainer,
TRequestStatus &aStatus
)

Shares a container asynchronously to MediaServer. One container can contain items and other containers. Metadata is fetched for the items within the interface. When API call returns, container hierarchy contains updated information.

Since
S60 3.1

Parameters

const TDesC8 & aParentId
CUpnpContainer & aContainerreference to container which is shared.
TRequestStatus & aStatusreference to TRequestStatus which is completed when procedure is over

ShareItemL(const TDesC8 &, CUpnpItem &, TRequestStatus &)

voidShareItemL(const TDesC8 &aParentId,
CUpnpItem &aItem,
TRequestStatus &aStatus
)

Shares a single item asynchronously to MediaServer. Metadata is fetched for the item within the interface. When API call returns, item contains updated information.

Since
S60 3.1

Parameters

const TDesC8 & aParentId
CUpnpItem & aItemreference to item which is shared.
TRequestStatus & aStatusreference to TRequestStatus which is completed when procedure is over

ShareItemListL(const TDesC8 &, CUpnpItemList &, TInt &, TRequestStatus &)

voidShareItemListL(const TDesC8 &aParentId,
CUpnpItemList &aItemList,
TInt &aExecStatus,
TRequestStatus &aStatus
)

Shares item list to the MediaServer

Since
S60 3.1

Parameters

const TDesC8 & aParentIdinformation to which container the item is shared.
CUpnpItemList & aItemListreference to item list which are to be shared.
TInt & aExecStatusreference pointing to the index of item list
TRequestStatus & aStatusreference to TRequestStatus which is completed when procedure is over

ShareReferenceL(TInt, TInt, CUpnpItem &, TRequestStatus &)

voidShareReferenceL(TIntaContainerId,
TIntaObjectId,
CUpnpItem &aItem,
TRequestStatus &aStatus
)

Creates a single reference to passed item asynchronously in Media Server.

Since
S60 5.0 HN

Parameters

TInt aContainerId- container id upon which the reference will be located.
TInt aObjectId- the reference is created on the basis of passed object id
CUpnpItem & aItemreference item to be filled
TRequestStatus & aStatusreference to TRequestStatus which is completed when procedure is over

ShareReferenceListL(CUpnpItemList &, TInt &, TRequestStatus &)

voidShareReferenceListL(CUpnpItemList &aItemList,
TInt &aExecStatus,
TRequestStatus &aStatus
)

Creates reference items, located at specific container, pointing specific objects

Since
S60 5.0 HN

Parameters

CUpnpItemList & aItemList'reference item' list which are to be shared
TInt & aExecStatusreference pointing to the index of item list
TRequestStatus & aStatusreference to TRequestStatus which is completed when procedure is over

UnshareContainerL(TInt, TRequestStatus &)

voidUnshareContainerL(TIntaContainerId,
TRequestStatus &aStatus
)

Unshares existing container from the MediaServer

Since
S60 3.1

Parameters

TInt aContainerIdreference to container which is unshared
TRequestStatus & aStatusreference to TRequestStatus which is completed when procedure is over

UnshareItemL(TInt, TRequestStatus &)

voidUnshareItemL(TIntaItemId,
TRequestStatus &aStatus
)

Unshares existing item from the MediaServer

Since
S60 3.1

Parameters

TInt aItemIdreference to item which is unshared
TRequestStatus & aStatus

UnshareItemListL(CUpnpItemList &, TInt &, TRequestStatus &)

voidUnshareItemListL(CUpnpItemList &aItemList,
TInt &aExecStatus,
TRequestStatus &aStatus
)

Unshares existing item list from the MediaServer

Since
S60 3.1

Parameters

CUpnpItemList & aItemListreference to item list which are to be shared.
TInt & aExecStatusreference pointing to the index of item list
TRequestStatus & aStatusreference to TRequestStatus which is completed when procedure is over

UnshareRootL(TRequestStatus &)

voidUnshareRootL(TRequestStatus &aStatus)

Parameters

TRequestStatus & aStatus

Member Enumerations Documentation

Enum TFileSharingAction

Enumerators

ENoAction = 1
EShareItem
EShareItemResult
EShareContainer
EShareContainerResult
EShareItemList
EShareItemListResult
EUnshareContainer
EUnshareItem
EGetSharedItem
EGetSharedItemResult
EGetSharedItemList
EGetSharedItemListResult
EGetSharedContainer
EGetSharedContainerResult
EGetSharedContainerList
EGetSharedContainerListResult
EUnshareItemList
EUnshareRoot
EShareReference
EShareReferenceList

Member Data Documentation

CUpnpContainer * iClientContainer

CUpnpContainer *iClientContainer[private]

CUpnpContainerList * iClientContainerList

CUpnpContainerList *iClientContainerList[private]

TPckg< TInt > * iClientExecStatusPkg

TPckg< TInt > *iClientExecStatusPkg[private]

CUpnpItem * iClientItem

CUpnpItem *iClientItem[private]

CUpnpItemList * iClientItemList

CUpnpItemList *iClientItemList[private]

TRequestStatus * iClientStatus

TRequestStatus *iClientStatus[private]

RUpnpMediaServerClient iMediaServer

RUpnpMediaServerClient iMediaServer[private]

TFileSharingAction iPendingAction

TFileSharingAction iPendingAction[private]

HBufC8 * iReceiveBuffer

HBufC8 *iReceiveBuffer[private]

TPtr8 iReceiveBufferPtr

TPtr8 iReceiveBufferPtr[private]

TInt iRespBufSize

TInt iRespBufSize[private]

TPckg< TInt > iRespBufSizePkg

TPckg< TInt >iRespBufSizePkg[private]

HBufC8 * iSendBuffer

HBufC8 *iSendBuffer[private]

TPtr8 iSendBufferPtr

TPtr8 iSendBufferPtr[private]