sbILibraryConstraintBuilder Interface Reference

import"sbILibraryConstraints.idl";

Inheritance diagram for sbILibraryConstraintBuilder:
[legend]
Collaboration diagram for sbILibraryConstraintBuilder:
[legend]

Public Member Functions

sbILibraryConstraintBuilder parseFromString (in AString aSerializedConstraint)
 Attempt to parse a serialized constraint description. This expects a string as serialized by sbILibraryConstraint::toString(). More...
 
sbILibraryConstraintBuilder includeConstraint (in sbILibraryConstraint aConstraint)
 Add an existing constraint to the builder. More...
 
sbILibraryConstraintBuilder include (in AString aProperty, in AString aValue)
 Add a property / value pair to the current group. More...
 
sbILibraryConstraintBuilder includeList (in AString aProperty, in nsIStringEnumerator aValues)
 Adds a property / value pair to the current group for each of the values supplied in the value list. This is a shortcut to calling include for every value with the same property. More...
 
sbILibraryConstraintBuilder intersect ()
 Completes the current group and starts a new one. Each group will be intersected in the result. More...
 
sbILibraryConstraint get ()
 Returns the constructed constraint. More...
 

Detailed Description

A library constraint is used to apply a filter or a search to a view. A constraint consits of:

  • A property/ value pair that selects a set of items from the view's media list
  • The result of each of the pairs are combined into a group of distinct items
  • Multiple groups may be intersected with each other

Definition at line 53 of file sbILibraryConstraints.idl.

Member Function Documentation

sbILibraryConstraint sbILibraryConstraintBuilder::get ( )

Returns the constructed constraint.

sbILibraryConstraintBuilder sbILibraryConstraintBuilder::include ( in AString  aProperty,
in AString  aValue 
)

Add a property / value pair to the current group.

Parameters
aPropertyThe property to add
aValueThe value to add
sbILibraryConstraintBuilder sbILibraryConstraintBuilder::includeConstraint ( in sbILibraryConstraint  aConstraint)

Add an existing constraint to the builder.

Parameters
aConstraintThe constraint to add
sbILibraryConstraintBuilder sbILibraryConstraintBuilder::includeList ( in AString  aProperty,
in nsIStringEnumerator  aValues 
)

Adds a property / value pair to the current group for each of the values supplied in the value list. This is a shortcut to calling include for every value with the same property.

Parameters
aPropertyThe property to add
aValueThe values to add
sbILibraryConstraintBuilder sbILibraryConstraintBuilder::intersect ( )

Completes the current group and starts a new one. Each group will be intersected in the result.

sbILibraryConstraintBuilder sbILibraryConstraintBuilder::parseFromString ( in AString  aSerializedConstraint)

Attempt to parse a serialized constraint description. This expects a string as serialized by sbILibraryConstraint::toString().

Parameters
aSerializedConstraintthe serialized string of the constraints
Exceptions
NS_ERROR_ALREADY_INITIALIZEDif constraints already exist
NS_ERROR_ILLEGAL_VALUEif the string could not be unserialized

The documentation for this interface was generated from the following file: