RUpnpMediaServerClient Class Reference
class RUpnpMediaServerClient : public RUpnpSessionBase |
This class provides the client-side interface to the media server session
Public Member Functions |
---|
| RUpnpMediaServerClient() |
IMPORT_C void | AddIcon(CUpnpIcon *, TRequestStatus &) |
void | CancelStatusChangeNotify() |
IMPORT_C void | Close() |
IMPORT_C TInt | Connect() |
IMPORT_C TInt | GetAddress(TInetAddr &) |
IMPORT_C void | GetAddressL(TInetAddr &, TRequestStatus &) |
void | GetSharedContainer(TInt, TDes8 &, TRequestStatus &) |
void | GetSharedContainerList(TInt, TDes8 &, TDes8 &, TRequestStatus &) |
void | GetSharedContainerListResult(TDes8 &, TDes8 &, TRequestStatus &) |
void | GetSharedContainerResult(TDes8 &, TRequestStatus &) |
void | GetSharedItem(TInt, TDes8 &, TRequestStatus &) |
void | GetSharedItemList(TInt, TDes8 &, TDes8 &, TRequestStatus &) |
void | GetSharedItemListResult(TDes8 &, TDes8 &, TRequestStatus &) |
void | GetSharedItemResult(TDes8 &, TRequestStatus &) |
void | GetTransferEventBody(TDes8 &, TRequestStatus &) |
void | ListenTransferEvent(TDes8 &, TRequestStatus &) |
IMPORT_C void | RemoveIcon(TDes8 &, TRequestStatus &) |
IMPORT_C void | RemoveIcons(TRequestStatus &) |
IMPORT_C TInt | Restart() |
IMPORT_C void | SetUploadDirectoryL(const TDesC &, TRequestStatus &) |
void | ShareContainer(TDes8 &, TDes8 &, TRequestStatus &) |
void | ShareContainerResult(TDes8 &, TRequestStatus &) |
void | ShareItem(TDes8 &, TDes8 &, TRequestStatus &) |
void | ShareItemList(TDes8 &, TDes8 &, TRequestStatus &) |
void | ShareItemListResult(TDes8 &, TDes8 &, TRequestStatus &) |
void | ShareItemResult(TDes8 &, TRequestStatus &) |
void | ShareReference(TDes8 &, TDes8 &, TRequestStatus &) |
void | ShareReferenceList(TDes8 &, TDes8 &, TRequestStatus &) |
IMPORT_C TInt | Start() |
IMPORT_C void | Start(TRequestStatus &) |
IMPORT_C TInt | StartOffline() |
IMPORT_C TInt | Status(TInt &) |
void | StatusChangeNotify(TRequestStatus &) |
IMPORT_C TInt | Stop(TServerStopMode) |
IMPORT_C TInt | Stop() |
void | SubscribeEvents(TRequestStatus &) |
void | UnshareContainer(TInt, TRequestStatus &) |
void | UnshareItem(TInt, TRequestStatus &) |
void | UnshareItemListL(TDes8 &, TDes8 &, TRequestStatus &) |
void | UnshareRoot(TRequestStatus &) |
void | UnsubscribeEvents() |
IMPORT_C void | UpdateIcon(TDes8 &, CUpnpIcon *, TRequestStatus &) |
Inherited Functions |
---|
| RHandleBase::Attributes()const |
| RHandleBase::BTraceId()const |
| RHandleBase::DoExtendedClose() |
| RHandleBase::Duplicate(const RThread &,TOwnerType) |
| RHandleBase::FullName()const |
| RHandleBase::FullName(TDes &)const |
| RHandleBase::Handle()const |
| RHandleBase::HandleInfo(THandleInfo *) |
| RHandleBase::Name()const |
| RHandleBase::NotifyDestruction(TRequestStatus &) |
| RHandleBase::Open(const TFindHandleBase &,TOwnerType) |
| RHandleBase::OpenByName(const TDesC &,TOwnerType,TInt) |
| RHandleBase::RHandleBase() |
| RHandleBase::RHandleBase(TInt) |
| RHandleBase::SetHandle(TInt) |
| RHandleBase::SetHandleNC(TInt) |
| RSessionBase::CreateSession(RServer2,const TVersion &) |
| RSessionBase::CreateSession(RServer2,const TVersion &,TInt) |
| RSessionBase::CreateSession(RServer2,const TVersion &,TInt,TIpcSessionType,const TSecurityPolicy *,TRequestStatus *) |
| RSessionBase::CreateSession(const TDesC &,const TVersion &) |
| RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt) |
| RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt,TIpcSessionType,const TSecurityPolicy *,TRequestStatus *) |
| RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt,TRequestStatus *) |
| RSessionBase::Open(RMessagePtr2,TInt,TOwnerType) |
| RSessionBase::Open(RMessagePtr2,TInt,const TSecurityPolicy &,TOwnerType) |
| RSessionBase::Open(TInt,TOwnerType) |
| RSessionBase::Open(TInt,const TSecurityPolicy &,TOwnerType) |
| RSessionBase::Send(TInt)const |
| RSessionBase::Send(TInt,const TIpcArgs &)const |
| RSessionBase::SendReceive(TInt)const |
| RSessionBase::SendReceive(TInt,TRequestStatus &)const |
| RSessionBase::SendReceive(TInt,const TIpcArgs &)const |
| RSessionBase::SendReceive(TInt,const TIpcArgs &,TRequestStatus &)const |
| RSessionBase::SetReturnedHandle(TInt) |
| RSessionBase::SetReturnedHandle(TInt,RHandleBase &) |
| RSessionBase::SetReturnedHandle(TInt,const TSecurityPolicy &) |
| RSessionBase::ShareAuto() |
| RSessionBase::ShareProtected() |
| RUpnpSessionBase::Connect(const TDesC &,TVersion,TInt,TInt,const TDesC &,TUid) |
Constructor & Destructor Documentation
RUpnpMediaServerClient()
IMPORT_C | RUpnpMediaServerClient | ( | ) | |
Member Functions Documentation
AddIcon(CUpnpIcon *, TRequestStatus &)
Adds new icon to Media Server. Media Server performs the following operations:
copies file from path specified aIcon object to its private directory,
adds icon element to its device description XML file
CancelStatusChangeNotify()
void | CancelStatusChangeNotify | ( | ) | |
Cancel notifycation about media server operational status
Connect()
RMediaServerClient checks if Media Server Engine exists. If not creates new process. During Media Server Engine process initialization the CUpnpMediaServer class is instantiated. When Media Server Engine is created RMediaServerClient creates session to it. Each time session is created the session counter is incremented. Note: During a first start the private directory structure is created and device/service description files are copied there from Z: drive.
GetAddress(TInetAddr &)
Gets media server inet address
GetAddressL(TInetAddr &, TRequestStatus &)
Gets media server inet address asynchronously
GetSharedContainer(TInt, TDes8 &, TRequestStatus &)
GetSharedContainerList(TInt, TDes8 &, TDes8 &, TRequestStatus &)
Gets shared container list
GetSharedContainerListResult(TDes8 &, TDes8 &, TRequestStatus &)
Gets shared container list results
GetSharedContainerResult(TDes8 &, TRequestStatus &)
Gets shared container result
GetSharedItem(TInt, TDes8 &, TRequestStatus &)
GetSharedItemList(TInt, TDes8 &, TDes8 &, TRequestStatus &)
GetSharedItemListResult(TDes8 &, TDes8 &, TRequestStatus &)
Gets shared item list result
GetSharedItemResult(TDes8 &, TRequestStatus &)
GetTransferEventBody(TDes8 &, TRequestStatus &)
Requests single events list body
ListenTransferEvent(TDes8 &, TRequestStatus &)
Requests single events list
Parameters
TDes8 & aEventSize | size of buffer for events list to be allocated by client |
TRequestStatus & aStatus | request status |
RemoveIcon(TDes8 &, TRequestStatus &)
Removes icon of given url. Media Server performs the following operations:
deletes its private copy of icon file,
deletes respective icon element from description XML flie Usage example:
iIcon = CUpnpIcon::NewL(aPath, aWidth, aHeight, aDepth, aMimeType); iDevice.SetIcon( iIcon );
RemoveIcons(TRequestStatus &)
Removes all icons Media Server performs the following operations:
Restart()
This operation performs restart on CUpnpDevice only. This causes sending "bye-bye" and "alive" notification to the network. In order to activate changes in Central Repository use Stop()/Start() sequence.
SetUploadDirectoryL(const TDesC &, TRequestStatus &)
Method performs 2 steps: 1. Changes Central Repository KUpnpMediaServerUploadDirectory key value, 2. Forces Media Server to switch to new upload directory.
Note: In case of Media Server is not started request status is set to KErrNotReady, but Central Repository key is changed. During starting Media Server is initiated with new value. First param aPath should end with double backslash ('\'). for example default value equals c:\Download\Media\
ShareContainer(TDes8 &, TDes8 &, TRequestStatus &)
ShareContainerResult(TDes8 &, TRequestStatus &)
Gets share container result
ShareItem(TDes8 &, TDes8 &, TRequestStatus &)
ShareItemList(TDes8 &, TDes8 &, TRequestStatus &)
ShareItemListResult(TDes8 &, TDes8 &, TRequestStatus &)
ShareItemResult(TDes8 &, TRequestStatus &)
ShareReference(TDes8 &, TDes8 &, TRequestStatus &)
Creates a single reference upon given object
ShareReferenceList(TDes8 &, TDes8 &, TRequestStatus &)
Creates some reference items, located at specific container, pointing specific objects
Start()
Starts media server - UPnP device. Sets device description values accoriding to Content Directory settings. After that instantiates services needed for Media Server operation:
Panic occurs if session is not connected. Returns one of the system-wide error codes in case of wrong Central Repository settings:
KErrNotFound if following Central Repository settings has empty values.
KUpnpMediaServerFriendlyName
KUpnpMediaServerManufacturer
KUpnpMediaServerModelName
Start(TRequestStatus &)
Starts media server (asynchonous version) See Start() description for details
StartOffline()
IMPORT_C TInt | StartOffline | ( | ) | |
Starts media server in offline mode, Media Server is not visible in UPnP network It instantiate only Content Directory without Upnp framework. This mode is used for local sharing purpose.
Status(TInt &)
Gets media server operational status
StatusChangeNotify(TRequestStatus &)
Notify about media server operational status
Stop(TServerStopMode)
Stops the media server. This operation is complementary to Start operation. It destroys all services and device itself. The Media Server process is not terminated, it goes to a idle state.
Note: Process is terminated when last session is disconnected and media Server Engine is stopped. To disconnect session use: RMediaServerClient::Close() which is inherited from RSessionBase();
Parameters
TServerStopMode aMode | one of the following modes:EStopNormal - ssdp:bye-bye messages are sent before stop (the same as stop)EStopSilent - server is stopped silently without ssdp:bye-bye messages |
Stop()
Stops media server. It equals to the Stop( EStopNormal ).
SubscribeEvents(TRequestStatus &)
Subscribe Media Server events
UnshareContainer(TInt, TRequestStatus &)
UnshareItem(TInt, TRequestStatus &)
UnshareItemListL(TDes8 &, TDes8 &, TRequestStatus &)
UnshareRoot(TRequestStatus &)
UnsubscribeEvents()
Unsubscribe Media Server events
UpdateIcon(TDes8 &, CUpnpIcon *, TRequestStatus &)
Updates icon of given url. Media Server performs the following operations:
replaces its private copy of icon file,
replaces respective icon element from description XML flie url value remains unchanged
Member Enumerations Documentation
Enum TServerStatus
Enumerators
EStartedOnline | |
EStartedOffline | |
EStopped | |
Member Data Documentation
TPckg< TInetAddr > * iAddressPkg
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.