CUpnpControlPoint Class Reference
class CUpnpControlPoint : public CBase
|
An abstract control point class. This class has an interfaces for following areas:
Device discovery Resolving properties of devices and services Action requests to the services Eventing subscriptions
Constructor & Destructor Documentation
CUpnpControlPoint()
IMPORT_C
|
CUpnpControlPoint
|
(
|
)
|
[protected]
|
Basic constructor function. Should be called in the constructor of the deriving class.
CUpnpControlPoint(MUpnpCpStackRequestor &, MUpnpCpHttpRequestor &)
For internal, automated test cases use only.
~CUpnpControlPoint()
IMPORT_C
|
~CUpnpControlPoint
|
(
|
)
|
[virtual]
|
Virtual destructor function.
Member Functions Documentation
ActionMessage(CUpnpHttpMessage *)
void
|
ActionMessage
|
(
|
CUpnpHttpMessage *
|
aHttpMessage
|
)
|
[private]
|
ActionMessage
-
Since
-
Series60 3.1
Parameters
CUpnpHttpMessage * aHttpMessage
|
|
ActionResponseReceived(CUpnpAction *)
ActionResponseReceivedL(CUpnpAction *)
void
|
ActionResponseReceivedL
|
(
|
CUpnpAction
*
|
aAction
|
)
|
[pure virtual]
|
Callback function for action responses. This function is called
-
Since
-
Series60 2.6
AddressChangedL()
This function will be invoke if IP Address of UPnP changes
AllDevicesExpired(CUpnpDevice *)
Checks if all device in tree expired
-
Since
-
Series60 3.2
CheckEventKey(const TDesC8 &, TUint32)
CheckEventKey
-
Since
-
Series60 3.2
Parameters
const
TDesC8
& aIncomingSeq
|
incoming event key in notify message
|
TUint32
aExistingSeq
|
existing event key
|
ConstructL(const CDesC8Array &)
IMPORT_C void
|
ConstructL
|
(
|
const
CDesC8Array
&
|
aTargetDeviceTypes
|
)
|
[protected]
|
One of the two ConstructL functions of
CUpnpControlPoint
has to be called in the ConstructL (or corresponding) function of the deriving class. Sets essential variables and the target device types. Examples of target device types:
-
AV control point: MediaServer:1, MediaRenderer:1
-
Lighting control point: SaunaLight:1, CandleLight:1 (an imaginary example)
-
Since
-
Series60 2.6
Parameters
const
CDesC8Array
& aTargetDeviceTypes
|
A descriptor array containing the target device types in separate descriptors.
|
ConstructL(const TDesC8 &)
IMPORT_C void
|
ConstructL
|
(
|
const
TDesC8
&
|
aTargetDeviceType
|
)
|
[protected]
|
One of the two ConstructL functions of
CUpnpControlPoint
has to be called in the ConstructL (or corresponding) function of the deriving class. Sets essential variables and the target device types. Examples of target device types:
-
Since
-
Series60 2.6
Parameters
const
TDesC8
& aTargetDeviceType
|
A descriptor containing the target device type
|
CreateSubscriptionMessageL(CUpnpService &, const TDesC8 &, TInt, THTTPMsgType)
CUpnpGenaMessage *
|
CreateSubscriptionMessageL
|
(
|
CUpnpService &
|
aService,
|
|
const
TDesC8
&
|
aPath,
|
|
TInt
|
aTimeout,
|
|
THTTPMsgType
|
aType
|
|
)
|
|
This function creates Gena subscription message, which will be used for data retrieval.
Parameters
CUpnpService & aService
|
|
const
TDesC8
& aPath
|
|
TInt
aTimeout
|
|
THTTPMsgType aType
|
|
Device(const TDesC8 &)
Device getter.
-
Since
-
Series 60 2.6
Parameters
const
TDesC8
& aUuid
|
A Universal Unique Identifier of device.
|
DeviceDisappeared(CUpnpDevice *)
DeviceDisappearedL(CUpnpDevice *)
void
|
DeviceDisappearedL
|
(
|
CUpnpDevice
*
|
aDevice
|
)
|
[pure virtual]
|
Callback function for device disappearance. This function is called once for every device that has disappeared.
Notice that before this, the device is removed from the generic control point
-
Since
-
Series60 2.6
DeviceDiscovered(CUpnpDevice *)
DeviceDiscoveredL(CUpnpDevice *)
void
|
DeviceDiscoveredL
|
(
|
CUpnpDevice
*
|
aDevice
|
)
|
[pure virtual]
|
Callback function for device discovery. This function is called once for every device. The device is already then in the device list accessible through
DeviceList()
function.
-
Since
-
Series60 2.6
DeviceFoundL(CUpnpDevice &)
DeviceList()
Returns the device list maintained by
CUpnpControlPoint
. Only target type devices are added to this list. (Recall: target types are defined in ConstructL(...) function of
CUpnpControlPoint
.
While discovering devices, the DeviceDiscovered(...) function is called once for every device after the device has been added to this list.
DeviceLostL(CUpnpDevice &)
DisableRadaDeviceL()
IMPORT_C void
|
DisableRadaDeviceL
|
(
|
)
|
|
Stops rada device synchronusly sience Series60 5.0
EnableRadaDeviceL(TRequestStatus &)
Starts rada device asynchronusly sience Series60 5.0
EnableRadaDeviceL()
IMPORT_C
TInt
|
EnableRadaDeviceL
|
(
|
)
|
|
Starts rada device synchronusly sience Series60 5.0
FindServiceInfoByGenaMessage(CUpnpGenaMessage *)
CUpnpServiceInfo
*
|
FindServiceInfoByGenaMessage
|
(
|
CUpnpGenaMessage *
|
aGenaMsg
|
)
|
[private]
|
FindServiceInfoByGenaMessage
Parameters
CUpnpGenaMessage * aGenaMsg
|
|
FindServiceInfoByService(CUpnpService *)
CUpnpServiceInfo
*
|
FindServiceInfoByService
|
(
|
CUpnpService *
|
aService
|
)
|
[private]
|
FindServiceInfoBySid(RPointerArray< CUpnpServiceInfo > &, const TDesC8 &)
GiveAddressL(const TDesC8 &)
TInetAddr
|
GiveAddressL
|
(
|
const
TDesC8
&
|
aUrl
|
)
|
|
Gets address from Url
-
Since
-
Series60 3.2
HandlePostponedInitialEventL(CUpnpGenaMessage &)
void
|
HandlePostponedInitialEventL
|
(
|
CUpnpGenaMessage &
|
aGenaMsg
|
)
|
|
Provides handling for postponed initial event that comes before subscription transaction has been completed
Parameters
CUpnpGenaMessage & aGenaMsg
|
|
HttpResponseReceived(CUpnpHttpMessage *)
void
|
HttpResponseReceived
|
(
|
CUpnpHttpMessage *
|
aMessage
|
)
|
|
Parameters
CUpnpHttpMessage * aMessage
|
|
HttpResponseReceivedL(CUpnpHttpMessage *)
void
|
HttpResponseReceivedL
|
(
|
CUpnpHttpMessage *
|
aMessage
|
)
|
[pure virtual]
|
Callback function for HTTP responses
-
Since
-
Series60 2.6
Parameters
CUpnpHttpMessage * aMessage
|
|
MapHttpError(TInt)
TInt
|
MapHttpError
|
(
|
TInt
|
aError
|
)
|
[private]
|
MapHttpError
-
Since
-
Series60 3.2
MessageReceived(CUpnpHttpMessage *)
void
|
MessageReceived
|
(
|
CUpnpHttpMessage *
|
aHttpMessage
|
)
|
|
For internal use.
-
Since
-
Series60 2.6
Parameters
CUpnpHttpMessage * aHttpMessage
|
|
NetworkEvent(CUpnpNetworkEventBase *)
It is called from bottom layer when network event occurs [callback method] sience Series60 5.0
NotifyReceivedL(CUpnpHttpMessage &)
void
|
NotifyReceivedL
|
(
|
CUpnpHttpMessage &
|
aHttpMessage
|
)
|
|
NotifyReceivedL
-
Since
-
Series60 2.6
Parameters
CUpnpHttpMessage & aHttpMessage
|
|
ParseEventUpdateStateVariablesL(CUpnpGenaMessage &, CUpnpServiceInfo &)
void
|
ParseEventUpdateStateVariablesL
|
(
|
CUpnpGenaMessage &
|
aGenaMsg,
|
|
CUpnpServiceInfo
&
|
aInfo
|
|
)
|
[private]
|
Path()
IMPORT_C const
TDesC8
&
|
Path
|
(
|
)
|
|
ProcessActionMessageL(CUpnpHttpMessage *)
void
|
ProcessActionMessageL
|
(
|
CUpnpHttpMessage *
|
aHttpMessage
|
)
|
|
ProcessActionMessageL
-
Since
-
Series60 3.2
Parameters
CUpnpHttpMessage * aHttpMessage
|
|
ProcessDeviceMessageL(CUpnpHttpMessage *)
void
|
ProcessDeviceMessageL
|
(
|
CUpnpHttpMessage *
|
aHttpMessage
|
)
|
|
ProcessDeviceMessageL
-
Since
-
Series60 5.0
Parameters
CUpnpHttpMessage * aHttpMessage
|
|
ProcessServiceMessageL(CUpnpHttpMessage *)
void
|
ProcessServiceMessageL
|
(
|
CUpnpHttpMessage *
|
aHttpMessage
|
)
|
|
ProcessServiceMessageL
-
Since
-
Series60 5.0
Parameters
CUpnpHttpMessage * aHttpMessage
|
|
RemoveActionsL(CUpnpDevice *)
void
|
RemoveActionsL
|
(
|
CUpnpDevice
*
|
aDevice
|
)
|
[private]
|
RemoveActionsL
-
Since
-
Series60 3.2
RemoveFromSubscribedList(CUpnpServiceInfo *)
void
|
RemoveFromSubscribedList
|
(
|
CUpnpServiceInfo
*
|
aServiceInfoToRemove
|
)
|
[private]
|
RemoveFromSubscribedListD
Parameters
CUpnpServiceInfo
* aServiceInfoToRemove
|
service info that will be removed from subscribed list
|
RemoveRootDeviceLD(CUpnpDevice *)
void
|
RemoveRootDeviceLD
|
(
|
CUpnpDevice
*
|
aDevice
|
)
|
[private]
|
Removes root device from device repository, and deletes passed object
-
Since
-
Series60 3.2
RemoveServicesL(CUpnpDevice *)
void
|
RemoveServicesL
|
(
|
CUpnpDevice
*
|
aDevice
|
)
|
[private]
|
RemoveServicesL
-
Since
-
Series60 3.2
ResubscribeL(CUpnpServiceInfo *)
Resubscribes to a service.
ResubscribeL(CUpnpServiceInfo &)
SearchL(const TDesC8 &)
IMPORT_C void
|
SearchL
|
(
|
const
TDesC8
&
|
aSearchString
|
)
|
|
Make a SSDP search. Search string should be some of these strings (defined in UPnP Device Architecture):
-
urn:schemas-upnp-org:device:
deviceType:v
, where
deviceType:v
should be replaced by target device type and version. Search for devices of specific type.
-
urn:schemas-upnp-org:service:
serviceType:v
, where
serviceType:v
should be replaced by target service type and version. Search for services of specific type.
-
upnp:rootdevice
Search for root devices.
-
ssdp:all
Search for any devices or services
-
Since
-
Series60 2.6
Parameters
const
TDesC8
& aSearchString
|
The search target.
|
SendErrorResponseL(CUpnpHttpMessage *, THttpStatusCode)
void
|
SendErrorResponseL
|
(
|
CUpnpHttpMessage *
|
aHttpMessage,
|
|
THttpStatusCode
|
aCode
|
|
)
|
[private]
|
Send a proper error basing on httpmsg
-
Since
-
Series60 2.6
Parameters
CUpnpHttpMessage * aHttpMessage
|
http message
|
THttpStatusCode
aCode
|
error code
|
SendL(CUpnpAction *)
Sends an action. This action can be instantiated using CUpnpService::CreateActionLC() function. Target addresses and some other necessary information are added in the action during construction. After instantiation of the action, set the arguments using e.g. CUpnpAction::SetArgument() function. After this, you are ready to call this function. After the target service has reacted to the action, it will send a response. This response is forwarded to ActionResponseReceived function.
The user of this function has the responsibility to delete the
CUpnpAction
instance.
-
Since
-
Series60 2.6
SendL(CUpnpHttpMessage *)
IMPORT_C void
|
SendL
|
(
|
CUpnpHttpMessage *
|
aMessage
|
)
|
|
Sends a HTTP message. This HTTP message can be instantiated in many ways; it's recommended to use
RUpnpHttpMessageFactory
class. When the response to this request has been receiveid, the
HttpResponseReceived()
virtual function is called.
Notice that the user of this function has the responsibility to delete the CUpnpHttpMessage instance.
-
Since
-
Series60 2.6
Parameters
CUpnpHttpMessage * aMessage
|
The message to be sent.
|
SendResponseMessageLD(CUpnpHttpMessage *)
void
|
SendResponseMessageLD
|
(
|
CUpnpHttpMessage *
|
aResponse
|
)
|
[private]
|
Sends a HTTP message that is response and destroy it. Leave safe.
Parameters
CUpnpHttpMessage * aResponse
|
|
StartIPFilteringL(TFilteringMode)
StateUpdated(CUpnpService *)
void
|
StateUpdated
|
(
|
CUpnpService *
|
aService
|
)
|
|
StateUpdatedL(CUpnpService *)
void
|
StateUpdatedL
|
(
|
CUpnpService *
|
aService
|
)
|
[pure virtual]
|
Callback function for eventing. This function is called when a) before this, we have made a subscription to the service b) at least one of the evented state variables of the service has changed
Note that you cannot see which of the evented state variables has changed. Fortunately, there are not many evented state variables.
-
Since
-
Series60 2.6
Parameters
CUpnpService * aService
|
At least one of the evented state variables of this service has changed. CUpnpControlPoint class owns the CUpnpService instance; do not delete it after inspection!
|
StopIPFilteringL(TFilteringMode)
SubscribeL(CUpnpService *)
IMPORT_C void
|
SubscribeL
|
(
|
CUpnpService *
|
aService
|
)
|
|
Subscribes to a service. This starts the eventing to this control point done by the target service. Practically, the StateUpdated virtual function is called when an event is received.
It's necessary to subscribe to a service when the service is used by this control point.
See service definitions to see the list of the evented state variables; not every state variable is evented.
It's not needed to maintain a separate list of subscribed services in the deriving class. Control point manages a such list. If the target service is already evented, this function does nothing.
-
Since
-
Series60 2.6
Parameters
CUpnpService * aService
|
The target service.
|
SubscriptionResponseReceivedL(CUpnpHttpMessage &)
void
|
SubscriptionResponseReceivedL
|
(
|
CUpnpHttpMessage &
|
aHttpMessage
|
)
|
|
SubscriptionResponseReceivedL
-
Since
-
Series60 2.6
Parameters
CUpnpHttpMessage & aHttpMessage
|
|
UnSubscriptionResponseReceived()
void
|
UnSubscriptionResponseReceived
|
(
|
)
|
|
UnSubscriptionResponseReceived
-
Since
-
Series60 3.2
UnsubscribeL(const CUpnpService *)
IMPORT_C void
|
UnsubscribeL
|
(
|
const CUpnpService *
|
aService
|
)
|
|
Removes the subscription of the target services. Practically, eventing from target service is stopped
-
Since
-
Series60 2.6
Parameters
const CUpnpService * aService
|
The target service.
|
UnsubscribeL(CUpnpService *, TBool)
void
|
UnsubscribeL
|
(
|
CUpnpService *
|
aService,
|
|
TBool
|
aSendUnsubscribeMessage
|
|
)
|
|
Removes the subscription of the target services. Practically, eventing from target service is stopped
-
Since
-
Series60 2.6
Parameters
CUpnpService * aService
|
The target service.
|
TBool
aSendUnsubscribeMessage
|
ETrue if unsubscription message is sent to remote host. Otherwise EFalse ( only remove service ).
|
ValidateEventResolveHttpResponseCode(CUpnpGenaMessage &)
THttpStatusCode
|
ValidateEventResolveHttpResponseCode
|
(
|
CUpnpGenaMessage &
|
aGenaMsg
|
)
|
[private]
|
Parameters
CUpnpGenaMessage & aGenaMsg
|
|
Member Enumerations Documentation
Enum TFilteringMode
Enumerators
EBoth
|
|
ERada
|
|
EControlPoint
|
|
Member Data Documentation
const TInt KDefaultSubscriptionTimeout
const
TInt
|
KDefaultSubscriptionTimeout
|
[static]
|
RPointerArray< CUpnpAction > iActionList
CUpnpCpbCurrentHttpClient * iCpbHttpClient
CUpnpCpbCurrentHttpClient *
|
iCpbHttpClient
|
[private]
|
CUpnpCpbDescriptionAgent * iDescriptionAgent
CUpnpCpbDescriptionAgent *
|
iDescriptionAgent
|
[private]
|
CUpnpCpbDeviceRepository * iDeviceRepository
CUpnpCpbDeviceRepository *
|
iDeviceRepository
|
[private]
|
CUpnpCpbDiscoveryAgent * iDiscoveryAgent
CUpnpCpbDiscoveryAgent *
|
iDiscoveryAgent
|
[private]
|
CUpnpCpbInitialEventRetryHandler * iInitialEventRetry
CUpnpCpbInitialEventRetryHandler *
|
iInitialEventRetry
|
[private]
|
CUpnpConnectionManagerNetworkEventProvider * iNetworkEventProvider
CUpnpConnectionManagerNetworkEventProvider *
|
iNetworkEventProvider
|
[private]
|
MUpnpCpHttpRequestor *const iPredefinedHttpRequestor
MUpnpCpStackRequestor *const iPredefinedStackRequestor
CUpnpContentHandlersController * iSaxController
CUpnpContentHandlersController *
|
iSaxController
|
[private]
|
RPointerArray< CUpnpServiceInfo > iSubscribedServicesInfos
CDesC8ArrayFlat * iTargetDeviceTypes
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.