sbILibraryResource Interface Reference

General interface to data resources. More...

import"sbILibraryResource.idl";

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

Public Member Functions

AString getProperty (in AString aID)
 Get the value of a property of this resource. More...
 
void setProperty (in AString aID, in AString aValue)
 Set the value of a property on this resource. More...
 
sbIPropertyArray getProperties ([optional] in sbIPropertyArray aPropertyIDs)
 Get properties from this resource in a property array. More...
 
void setProperties (in sbIPropertyArray aProperties)
 Sets the properties and values in the supplied property array to this resource. This works as if you called setProperty on each property in the array. More...
 
boolean equals (in sbILibraryResource aOtherLibraryResource)
 Tests the equality of two library resources. More...
 

Public Attributes

readonly attribute AString guid
 The guid of this resource. More...
 
readonly attribute long long created
 The creation time of this resource as a unix timestamp. More...
 
readonly attribute long long updated
 The last update time of this resource as a unix timestamp. More...
 
readonly attribute
nsIStringEnumerator 
propertyIDs
 Returns a string enumerator of the IDs of all the properties set on this resource. More...
 
readonly attribute boolean userEditable
 True if users should be allowed to modify the resource. More...
 

Detailed Description

General interface to data resources.

This interface should be implemented by each object of the data model, including libraries, media items, and media lists.

See Also
sbILibraryPropertiesManager

Definition at line 48 of file sbILibraryResource.idl.

Member Function Documentation

boolean sbILibraryResource::equals ( in sbILibraryResource  aOtherLibraryResource)

Tests the equality of two library resources.

sbIPropertyArray sbILibraryResource::getProperties ( [optional] in sbIPropertyArray  aPropertyIDs)

Get properties from this resource in a property array.

Parameters
aPropertyIDsA property array containing the IDs of the properties you wish to retrieve. The values of these properties are disregarded. If this parameter is null or not specified, all properties will be returned
Returns
A property array containing the requested properties and values
AString sbILibraryResource::getProperty ( in AString  aID)

Get the value of a property of this resource.

This method will never throw. If a value doesn't exist it will return a special "void" string that behaves just like an empty string except that the IsVoid() method will return PR_TRUE for those who care.

Parameters
aIDID of the property to get
Returns
Value of the requested property
void sbILibraryResource::setProperties ( in sbIPropertyArray  aProperties)

Sets the properties and values in the supplied property array to this resource. This works as if you called setProperty on each property in the array.

Parameters
aPropertiesProperties to set to this resource
Note
Until bug 3694 is fixed, it is possible for this method to throw NS_ERROR_INVALID_ARG if one of the property values in the array is not valid. This will have no side effects – if an error is thrown, the resource will not be modified. This will go away when the bug is fixed as it will then be impossible to have invalid properties in the array
void sbILibraryResource::setProperty ( in AString  aID,
in AString  aValue 
)

Set the value of a property on this resource.

Parameters
aIDID of the property to set
aValueNew value for the specified property

Member Data Documentation

readonly attribute long long sbILibraryResource::created

The creation time of this resource as a unix timestamp.

Definition at line 86 of file sbILibraryResource.idl.

readonly attribute AString sbILibraryResource::guid

The guid of this resource.

Definition at line 69 of file sbILibraryResource.idl.

readonly attribute nsIStringEnumerator sbILibraryResource::propertyIDs

Returns a string enumerator of the IDs of all the properties set on this resource.

Definition at line 110 of file sbILibraryResource.idl.

readonly attribute long long sbILibraryResource::updated

The last update time of this resource as a unix timestamp.

Definition at line 104 of file sbILibraryResource.idl.

readonly attribute boolean sbILibraryResource::userEditable

True if users should be allowed to modify the resource.

See Also
sbIMediaList.userEditableContent

Definition at line 116 of file sbILibraryResource.idl.


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