CUpnpFileSharing Class Reference
class CUpnpFileSharing : public CBase |
Interface class for UPnP File Sharing
MediaServerClient.lib
- Since
- S60 v3.1
Public Member Functions |
---|
| ~CUpnpFileSharing() |
IMPORT_C void | DropAllContentL(TRequestStatus &) |
IMPORT_C void | GetSharedContainerL(TInt, CUpnpContainer &, TRequestStatus &) |
IMPORT_C void | GetSharedContainerListL(TInt, CUpnpBrowseCriteria &, CUpnpContainerList &, TInt &, TRequestStatus &) |
IMPORT_C void | GetSharedItemL(TInt, CUpnpItem &, TRequestStatus &) |
IMPORT_C void | GetSharedItemListL(TInt, CUpnpBrowseCriteria &, CUpnpItemList &, TInt &, TRequestStatus &) |
IMPORT_C RUpnpMediaServerClient & | MediaServerClient() |
IMPORT_C CUpnpFileSharing * | NewL() |
IMPORT_C void | ShareContainerL(const TDesC8 &, CUpnpContainer &, TRequestStatus &) |
IMPORT_C void | ShareItemL(const TDesC8 &, CUpnpItem &, TRequestStatus &) |
IMPORT_C void | ShareItemListL(const TDesC8 &, CUpnpItemList &, TInt &, TRequestStatus &) |
IMPORT_C void | ShareReferenceL(TInt, TInt, CUpnpItem &, TRequestStatus &) |
IMPORT_C void | ShareReferenceListL(CUpnpItemList &, TInt &, TRequestStatus &) |
IMPORT_C void | UnshareContainerL(TInt, TRequestStatus &) |
IMPORT_C void | UnshareItemL(TInt, TRequestStatus &) |
IMPORT_C void | UnshareItemListL(CUpnpItemList &, TInt &, TRequestStatus &) |
Constructor & Destructor Documentation
CUpnpFileSharing()
CUpnpFileSharing | ( | ) | [private] |
~CUpnpFileSharing()
~CUpnpFileSharing | ( | ) | [virtual] |
Member Functions Documentation
ConstructL()
void | ConstructL | ( | ) | [private] |
By default Symbian 2nd phase constructor is private.
DropAllContentL(TRequestStatus &)
Database Clearing function Stops mediaserver, delete database file and starts mediaserver
Parameters
TRequestStatus & aStatus | reference to TRequestStatus which is completed when procedure is over |
GetSharedContainerL(TInt, CUpnpContainer &, TRequestStatus &)
Gets shared container information from Media Server. Nested container and items are not returned. This operation returns all properties. Browse criteria is not used. Information is returned to container reference.
Parameters
TInt aItemId | |
CUpnpContainer & aContainer | reference to container where information is updated. |
TRequestStatus & aStatus | reference to TRequestStatus which is completed when procedure is over |
GetSharedContainerListL(TInt, CUpnpBrowseCriteria &, CUpnpContainerList &, TInt &, TRequestStatus &)
Gets shared containers information from Media Server according to supported browse criteria. Note: There are only two possible values of filter:
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 & aItem | |
TInt & aTotalMatches | |
TRequestStatus & aStatus | reference to TRequestStatus which is completed when procedure is over |
GetSharedItemL(TInt, CUpnpItem &, TRequestStatus &)
Gets shared item information from MediaServer. This operation returns all properties. Browse criteria is not used. Information is returned to item reference.
Parameters
TInt aItemId | item id |
CUpnpItem & aItem | reference to item where information is updated. |
TRequestStatus & aStatus | reference to TRequestStatus which is completed when procedure is over |
GetSharedItemListL(TInt, CUpnpBrowseCriteria &, CUpnpItemList &, TInt &, TRequestStatus &)
Gets shared items information from Media Server according to supported browse criteria. Note: There are only two possible values of filter:
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 | |
TRequestStatus & aStatus | reference to TRequestStatus which is completed when procedure is over |
MediaServerClient()
Returns reference to media server client
ShareContainerL(const TDesC8 &, CUpnpContainer &, TRequestStatus &)
Shares a single container asynchronously to Media Server. Nested container and items are ignored. The container is created with parent id passed as an argument to this operation (object field iParentId value is ignored). Parent id existence is checked by Media Server. After creation input object is updated with the current:
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 &)
Shares a single item asynchronously to Media Server. Symbian data base doesn't support foreign key constraints. In order to avoid adding item with nonexistent parent container, parent id existence is checked by Media Server. The item is created with parent id passed as an argument to this operation (object field iParentId value is ignored). After creation input object is updated with:
iId - generated object identifier
"res" element value - in offline sharing there is no possible to set ip:port information in URL. "Res" value example: http:///00000001/filename. For consistency the same approach will be used in online mode.
Parameters
const TDesC8 & aContainerId | information to which container the item is shared. |
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 &)
Shares a list of items asynchronously to Media Server. Each CUpnpItem of CUpnpItemList is created with the same parent id passed as an argument to this operation (object field iParentId value is ignored). Parent id existence is checked by Media Server - only once for this operation. Database transaction is committed each 11 objects created into database. This empirical value is hard coded in current implementation. If an execution of task fails when creating object (e.g. 776-th item on list) error code is retuned (aExecStatus), which points to last successfully created item index [1...total count] (e.g. aExecutionStatus = 770 last item in database is object number 770, if no object is cretated index = 0, if all are created index = total count).
Note: There is no support for chunked operations (splitting long operation into sequence of asynchronical calls). Each operation is atomic from Media Server Engine perspective. Long lasting operations may block Media Server Engine. In such case switching Media Server to offline mode is recommended.
For each created item respective input object is updated with:
Parameters
const TDesC8 & aContainerId | 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 &)
Creates a single reference upon passed item asynchronously in Media Server.
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 &)
Creates some reference items, located at specific container, pointing specific objects
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 &)
Unshares existing container from the Media Server. Container with its whole branch is removed from database regardless "restricted" property value for this container and any object in branch. Object removing is a bottom-up process. If removing of particular object fails whole operation is broken and error is returned.
Note: This method removes uploaded file associated with item being destroyed. Shared files are never removed.
Note: The iId value is not verified whether it points to a container or item. Therefore, clients must not use UnshareContainer method with ids pointing to an item or other way round.
Parameters
TInt aItemId | |
TRequestStatus & aStatus | reference to TRequestStatus which is completed when procedure is over |
UnshareItemL(TInt, TRequestStatus &)
Unshares existing item from the Media Server. Item with specified id is removed from database regardless "restricted" property value. Note: This method removes uploaded file associated with item being destroyed. Shared files are never removed.
Parameters
TInt aItemId | item which is unshared |
TRequestStatus & aStatus | reference to TRequestStatus which is completed when procedure is over |
UnshareItemListL(CUpnpItemList &, TInt &, TRequestStatus &)
Unshares existing items from the MediaServer. Each Item from list is removed from database regardless "restricted" property value. Database transaction is committed each 11 objects removed database. If an execution of task fails when creating object error code is retuned, which points to last successfully removed item index.
Note: This method removes uploaded file associated with item being destroyed. Shared files are never removed.
Parameters
CUpnpItemList & aItemList | list of items which are to be unshared |
TInt & aExecStatus | reference pointing to the index of item list |
TRequestStatus & aStatus | reference to TRequestStatus which is completed when procedure is over |
Member Data Documentation
CUpnpFileSharingBody * iBody
Actual implementation class for the interface Own.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.