Herqq
|
Class for specifying initialization information to HControlPoint instances. More...
#include <HControlPointConfiguration>
Public Member Functions | |
HControlPointConfiguration () | |
virtual | ~HControlPointConfiguration () |
virtual HControlPointConfiguration * | clone () const |
bool | subscribeToEvents () const |
qint32 | desiredSubscriptionTimeout () const |
bool | autoDiscovery () const |
QList< QHostAddress > | networkAddressesToUse () const |
void | setSubscribeToEvents (bool subscribeAutomatically) |
void | setDesiredSubscriptionTimeout (qint32 timeout) |
void | setAutoDiscovery (bool arg) |
bool | setNetworkAddressesToUse (const QList< QHostAddress > &addresses) |
Protected Member Functions | |
virtual void | doClone (HClonable *target) const |
virtual HControlPointConfiguration * | newInstance () const |
Class for specifying initialization information to HControlPoint instances.
This class is used to pass initialization information for HControlPoint instances. The use of this is optional and an HControlPoint instance is perfectly functional with the default configuration.
However, you can configure an HControlPoint in following ways:
Creates a new instance.
Creates a new instance with default values.
~HControlPointConfiguration | ( | ) | [virtual] |
Destroys the instance.
void doClone | ( | HClonable * | target | ) | const [protected, virtual] |
Clones the contents of this to the target
object.
Every derived class that introduces member variables that should be copied as part of a cloning operation should override this method. The implementation should be something along these lines:
void MyClonable::doClone(HClonable* target) const { MyClonable* myClonable = dynamic_cast<MyClonable*>(target); if (!myClonable) { return; } BaseClassOfMyClonable::doClone(target); // copy the variables introduced in *this* MyClonable // instance to "myClonable". }
target | specifies the target object to which the contents of this instance are cloned. |
Reimplemented from HClonable.
HControlPointConfiguration * newInstance | ( | ) | const [protected, virtual] |
Creates a new instance.
This method is used as part of object cloning. Because of that, it is important that every concrete (non-abstract) descendant class overrides this method regardless of the type location in the inheritance tree:
MyClonable* MyClonable::newInstance() const { return new MyClonable(); }
Implements HClonable.
HControlPointConfiguration * clone | ( | ) | const [virtual] |
Returns a deep copy of the instance.
Reimplemented from HClonable.
bool subscribeToEvents | ( | ) | const |
Indicates whether to automatically subscribe to all events on all services of a device when a new device is added into the control of an HControlPoint.
qint32 desiredSubscriptionTimeout | ( | ) | const |
Returns the subscription timeout a control point requests when it subscribes to an evented service.
The default value is 30 minutes.
bool autoDiscovery | ( | ) | const |
Indicates whether the control point should perform discovery upon initialization.
QList< QHostAddress > networkAddressesToUse | ( | ) | const |
Returns the network addresses a control point should use in its operations.
void setSubscribeToEvents | ( | bool | subscribeAutomatically | ) |
Defines whether a control point should automatically subscribe to all events on all services of a device when a new device is added into the control of an HControlPoint.
subscribeAutomatically | when true an HControlPoint instance should by default subscribe to all events of all services of a newly added device. |
void setDesiredSubscriptionTimeout | ( | qint32 | timeout | ) |
Sets the subscription timeout a control point requests when it subscribes to an evented service.
Values less than or equal to zero are rejected and instead the default value is used. The default value is 30 minutes.
timeout | specifies the requested timeout in seconds. |
void setAutoDiscovery | ( | bool | arg | ) |
Defines whether the control point should perform discovery upon initialization.
arg | when true an HControlPoint instance will perform discovery when it is initialized. This is the default. |
bool setNetworkAddressesToUse | ( | const QList< QHostAddress > & | addresses | ) |
Defines the network addresses the control point should use in its operations.
addresses | specifies the network addresses the control point should use in its operations. |