Songbird / Development / Songbird Add-Ons API Documentation

sbIPropertyInfo Interface Reference

An interface used to describe a metadata property for use by the UI and other sbILibrary interfaces (smartplaylists, etc). More...

import "sbIPropertyManager.idl";

Inheritance diagram for sbIPropertyInfo:

sbIBooleanPropertyInfo sbIDatetimePropertyInfo sbIDummyPropertyInfo sbIDurationPropertyInfo sbINumberPropertyInfo sbITextPropertyInfo sbIURIPropertyInfo sbIProgressPropertyInfo List of all members.

Public Member Functions

sbIPropertyOperator getOperator (in AString aOperator)
 Get the sbIPropertyOperator for the given operator string.
boolean validate (in AString aValue)
 Validates the string for this property type.
AString sanitize (in AString aValue)
 Sanitize a value so that it passes validation.
AString format (in AString aValue)
 Formats the value for display.
AString makeSortable (in AString aValue)
 Transforms the string into its sortable collation data equivalent.
AString makeSearchable (in AString aValue)
 Formats the value to enable proper search.

Public Attributes

readonly attribute AString OPERATOR_EQUALS
readonly attribute AString OPERATOR_NOTEQUALS
readonly attribute AString OPERATOR_GREATER
readonly attribute AString OPERATOR_GREATEREQUAL
readonly attribute AString OPERATOR_LESS
readonly attribute AString OPERATOR_LESSEQUAL
readonly attribute AString OPERATOR_CONTAINS
readonly attribute AString OPERATOR_NOTCONTAINS
readonly attribute AString OPERATOR_BEGINSWITH
readonly attribute AString OPERATOR_NOTBEGINSWITH
readonly attribute AString OPERATOR_ENDSWITH
readonly attribute AString OPERATOR_NOTENDSWITH
readonly attribute AString OPERATOR_BETWEEN
readonly attribute AString OPERATOR_ISSET
readonly attribute AString OPERATOR_ISNOTSET
const unsigned long SORT_NULL_SMALL = 0
 Causes null values to be infinitely small. This is the default.
const unsigned long SORT_NULL_BIG = 1
 Causes null values to be infinitely large.
const unsigned long SORT_NULL_FIRST = 2
 Null values always first.
const unsigned long SORT_NULL_LAST = 3
 Null values always last.
attribute unsigned long nullSort
 Set where NULL values get sorted to.
attribute sbIPropertyArray secondarySort
 When sorting by this property, additionally sort by the following properties.
attribute AString id
 Unique ID for this property.
attribute AString type
 The type property.
attribute AString displayName
 Localized display name of this property.
attribute boolean userViewable
 A user may view this property. This does not impede reading the value, it's merely meant as a guideline.
attribute boolean userEditable
 A user may edit this property. This does not impede editing the value, it's merely meant as a guideline.
attribute boolean remoteReadable
 A web site may read the value of this property.
attribute boolean remoteWritable
 A web site may write the value of this property.
attribute nsISimpleEnumerator operators
 True if this property has a selection list An enumerator of selection list values Enumerator of sbIPropertyOperator objects.
readonly attribute sbIPropertyUnitConverter unitConverter
 A unit converter to convert to and from the units in which the property can be expressed.

Detailed Description

An interface used to describe a metadata property for use by the UI and other sbILibrary interfaces (smartplaylists, etc).

See also:
sbIPropertyManager

Definition at line 131 of file sbIPropertyManager.idl.


Member Function Documentation

sbIPropertyOperator sbIPropertyInfo::getOperator ( in AString  aOperator  ) 

Get the sbIPropertyOperator for the given operator string.

Parameters:
aOperator Operator string, one of the OPERATOR_ constants
Returns:
The sbIPropertyOperator for the given string, or null of the operator is not supported by this property info

boolean sbIPropertyInfo::validate ( in AString  aValue  ) 

Validates the string for this property type.

Parameters:
aValue Value to validate
Returns:
True if the value is valid for this property, otherwise false

AString sbIPropertyInfo::sanitize ( in AString  aValue  ) 

Sanitize a value so that it passes validation.

Note:
This might format your string in an unexpected way. If you have any doubts, please look at the output string to make sure it satisfies your requirements.

AString sbIPropertyInfo::format ( in AString  aValue  ) 

Formats the value for display.

Parameters:
aValue Value to format
Returns:
The formatted value

AString sbIPropertyInfo::makeSortable ( in AString  aValue  ) 

Transforms the string into its sortable collation data equivalent.

Parameters:
aValue Value to transform.
Returns:
The collation data used for sorting the value.

AString sbIPropertyInfo::makeSearchable ( in AString  aValue  ) 

Formats the value to enable proper search.

Parameters:
aValue Value to format.
Returns:
The formatted search value.


Member Data Documentation

attribute sbIPropertyArray sbIPropertyInfo::secondarySort

When sorting by this property, additionally sort by the following properties.

A secondary list of columns to sort by for a particular property. For example, when sorting by artist, you typically want to sort by Artist, Album and Track No.

This attribute is provided as a hint and optimization only. If you want control over how a table of properties is sorted, specify it on the view.

NOTE: Setting this attribute after a property has already been registered with the manager may not work as expected. This is a shortcoming of the architecture and will be fixed with Bug 12677 – "[sorting] cached sortable values should invalidate when property implementations change" If you need to change the secondary sort for a property that may already be cached in the db, check out sbILocalDatabasePropertyCache.InvalidateSortData()

Definition at line 199 of file sbIPropertyManager.idl.


The documentation for this interface was generated from the following file:
Generated on Tue Mar 10 14:29:02 2009 for Songbird by  doxygen 1.5.2