Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

Constraint Class Reference
(QDrmRights::Constraint)
[QtBaseModule]

The Constraint class describes a constraint placed on the usage of DRM content. More...

    #include <QDrmRights>

Public Functions


Detailed Description

The Constraint class describes a constraint placed on the usage of DRM content.

A constraint is typically a simple name value pair where the name describes the type of constraint the value represents. A constraint on the the number of times a content item may be rendered may have the name 'Allowed uses' and a value of 5.

Additionally a constraint may be assigned any number of name/value attributes to convey more complex information. For example a constraint restricting the duration content can be accessed may include the duration as the value of the constraint and include the times the duration started and will end as attributes.


Member Function Documentation

Constraint::Constraint ()

Constructs an empty constraint.

Constraint::Constraint ( const QString & name, const QVariant & value )

Constructs a constraint with the name name and value value.

Constraint::Constraint ( const QString & name, const QVariant & value, const QList<QPair<QString, QVariant> > & attributes )

Constructs a constraint with the name name, value value and attributes attributes.

Constraint::Constraint ( const Constraint & other )

Constructs a copy of the constraint other.

Constraint::~Constraint ()

Destroys a constraint.

int Constraint::attributeCount () const

Returns the number of attributes the constraint has.

QString Constraint::attributeName ( int index ) const

Returns the name or type of the attribute at the index index.

QVariant Constraint::attributeValue ( int index ) const

Returns the value of the attribute at the index index.

QString Constraint::name () const

Returns the name or type of the constraint.

QVariant Constraint::value () const

Returns the value of the constraint.

Constraint & Constraint::operator= ( const Constraint & other )

Assigns the value of other to a constraint.


Copyright © 2009 Nokia Trademarks
Qt Extended 4.4.3