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 ()
void DoCancel ()
void GetSharedContainerL ( TInt , CUpnpContainer &, TRequestStatus &)
void GetSharedContainerListL ( TInt , CUpnpBrowseCriteria &, CUpnpContainerList &, TInt &, TRequestStatus &)
void GetSharedItemL ( TInt , CUpnpItem &, TRequestStatus &)
void GetSharedItemListL ( TInt , CUpnpBrowseCriteria &, CUpnpItemList &, TInt &, TRequestStatus &)
RUpnpMediaServerClient & MediaServerClient ()
IMPORT_C CUpnpFileSharingBody * NewL ()
TInt RunError ( TInt )
void RunL ()
void ShareContainerL (const TDesC8 &, CUpnpContainer &, TRequestStatus &)
void ShareItemL (const TDesC8 &, CUpnpItem &, TRequestStatus &)
void ShareItemListL (const TDesC8 &, CUpnpItemList &, TInt &, TRequestStatus &)
void ShareReferenceL ( TInt , TInt , CUpnpItem &, TRequestStatus &)
void ShareReferenceListL ( CUpnpItemList &, TInt &, TRequestStatus &)
void UnshareContainerL ( TInt , TRequestStatus &)
void UnshareItemL ( TInt , TRequestStatus &)
void UnshareItemListL ( CUpnpItemList &, TInt &, TRequestStatus &)
void UnshareRootL ( TRequestStatus &)
Private Member Functions
CUpnpFileSharingBody ()
void ConstructL ()
void FinishGetSharedContainerL ()
void FinishGetSharedContainerListL ()
void FinishGetSharedItemL ()
void FinishGetSharedItemListL ()
void FinishShareContainerL ()
void FinishShareItemL ()
void FinishShareItemListL ()
void FinishUnshareItemList ()
void FinishUnshareObject ()
void FinishUnshareRoot ()
void GetGetSharedContainerListResultL ()
void GetGetSharedContainerResultL ()
void GetGetSharedItemListResultL ()
void GetGetSharedItemResultL ()
void GetShareContainerResultL ()
void GetShareItemListResultL ()
void GetShareItemResultL ()
void HandleError ()
void LeaveIfBusyL ()
void Reset ()
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
enum TFileSharingAction {
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()

void ConstructL ( ) [private]

DoCancel()

void DoCancel ( ) [virtual]

Cancellation of ongoing asynchronous operation

FinishGetSharedContainerL()

void FinishGetSharedContainerL ( ) [private]

FinishGetSharedContainerListL()

void FinishGetSharedContainerListL ( ) [private]

FinishGetSharedItemL()

void FinishGetSharedItemL ( ) [private]

FinishGetSharedItemListL()

void FinishGetSharedItemListL ( ) [private]

FinishShareContainerL()

void FinishShareContainerL ( ) [private]

FinishShareItemL()

void FinishShareItemL ( ) [private]

FinishShareItemListL()

void FinishShareItemListL ( ) [private]

FinishUnshareItemList()

void FinishUnshareItemList ( ) [private]

FinishUnshareObject()

void FinishUnshareObject ( ) [private]

FinishUnshareRoot()

void FinishUnshareRoot ( ) [private]

GetGetSharedContainerListResultL()

void GetGetSharedContainerListResultL ( ) [private]

GetGetSharedContainerResultL()

void GetGetSharedContainerResultL ( ) [private]

GetGetSharedItemListResultL()

void GetGetSharedItemListResultL ( ) [private]

GetGetSharedItemResultL()

void GetGetSharedItemResultL ( ) [private]

GetShareContainerResultL()

void GetShareContainerResultL ( ) [private]

GetShareItemListResultL()

void GetShareItemListResultL ( ) [private]

GetShareItemResultL()

void GetShareItemResultL ( ) [private]

GetSharedContainerL(TInt, CUpnpContainer &, TRequestStatus &)

void GetSharedContainerL ( TInt aContainerId,
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 aContainerId reference to container id
CUpnpContainer & aContainer
TRequestStatus & aStatus reference to TRequestStatus which is completed when procedure is over

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

void GetSharedContainerListL ( TInt aContainerId,
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 aContainerId id of the container of which items are to be returned
CUpnpBrowseCriteria & aBrowseCriteria specifies request details, such as requestCount, startingIndes, filter
CUpnpContainerList & aContainerList reference to container list where information is updated.
TInt & aTotalMatches number of matched containers
TRequestStatus & aStatus reference to TRequestStatus which is completed when procedure is over

GetSharedItemL(TInt, CUpnpItem &, TRequestStatus &)

void GetSharedItemL ( TInt aItemId,
CUpnpItem & aItem,
TRequestStatus & aStatus
)

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

Since
S60 3.1

Parameters

TInt aItemId reference to item id
CUpnpItem & aItem reference to item where information is updated.
TRequestStatus & aStatus

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

void GetSharedItemListL ( TInt aContainerId,
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 aContainerId id of the container of which items are to be returned
CUpnpBrowseCriteria & aBrowseCriteria specifies request details, such as requestCount, startingIndes, filter
CUpnpItemList & aItemList reference to item list where information is updated.
TInt & aTotalMatches number of matched items
TRequestStatus & aStatus reference to TRequestStatus which is completed when procedure is over

HandleError()

void HandleError ( ) [private]

LeaveIfBusyL()

void LeaveIfBusyL ( ) [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()

void Reset ( ) [private]

RunError(TInt)

TInt RunError ( TInt aErr ) [virtual]

RunError

Parameters

TInt aErr

RunL()

void RunL ( ) [virtual]

RunL

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

void ShareContainerL ( 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 & aContainer reference to container which is shared.
TRequestStatus & aStatus reference to TRequestStatus which is completed when procedure is over

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

void ShareItemL ( 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 & aItem reference to item which is shared.
TRequestStatus & aStatus reference to TRequestStatus which is completed when procedure is over

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

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

Shares item list to the MediaServer

Since
S60 3.1

Parameters

const TDesC8 & aParentId information to which container the item is shared.
CUpnpItemList & aItemList reference to item list which are to be shared.
TInt & aExecStatus reference pointing to the index of item list
TRequestStatus & aStatus reference to TRequestStatus which is completed when procedure is over

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

void ShareReferenceL ( TInt aContainerId,
TInt aObjectId,
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 & aItem reference item to be filled
TRequestStatus & aStatus reference to TRequestStatus which is completed when procedure is over

ShareReferenceListL(CUpnpItemList &, TInt &, TRequestStatus &)

void ShareReferenceListL ( 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 & aExecStatus reference pointing to the index of item list
TRequestStatus & aStatus reference to TRequestStatus which is completed when procedure is over

UnshareContainerL(TInt, TRequestStatus &)

void UnshareContainerL ( TInt aContainerId,
TRequestStatus & aStatus
)

Unshares existing container from the MediaServer

Since
S60 3.1

Parameters

TInt aContainerId reference to container which is unshared
TRequestStatus & aStatus reference to TRequestStatus which is completed when procedure is over

UnshareItemL(TInt, TRequestStatus &)

void UnshareItemL ( TInt aItemId,
TRequestStatus & aStatus
)

Unshares existing item from the MediaServer

Since
S60 3.1

Parameters

TInt aItemId reference to item which is unshared
TRequestStatus & aStatus

UnshareItemListL(CUpnpItemList &, TInt &, TRequestStatus &)

void UnshareItemListL ( CUpnpItemList & aItemList,
TInt & aExecStatus,
TRequestStatus & aStatus
)

Unshares existing item list from the MediaServer

Since
S60 3.1

Parameters

CUpnpItemList & aItemList reference to item list which are to be shared.
TInt & aExecStatus reference pointing to the index of item list
TRequestStatus & aStatus reference to TRequestStatus which is completed when procedure is over

UnshareRootL(TRequestStatus &)

void UnshareRootL ( 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]