Songbird / Development / Songbird Add-Ons API Documentation

sbILibraryResource Interface Reference

General interface to data resources. More...

import "sbILibraryResource.idl";

Inheritance diagram for sbILibraryResource:

sbILocalDatabaseResourceProperty sbIMediaItem sbIMediaList sbILibrary sbILocalDatabaseSmartMediaList sbIDeviceLibrary List of all members.

Public Member Functions

AString getProperty (in AString aID)
 Get the value of a property of this resource.
void setProperty (in AString aID, in AString aValue)
 Set the value of a property on this resource.
sbIPropertyArray getProperties ([optional] in sbIPropertyArray aPropertyIDs)
 Get properties from this resource in a property array.
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.
boolean equals (in sbILibraryResource aOtherLibraryResource)
 Tests the equality of two library resources.

Public Attributes

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

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

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:
aID ID of the property to get
Returns:
Value of the requested property

void sbILibraryResource::setProperty ( in AString  aID,
in AString  aValue 
)

Set the value of a property on this resource.

Parameters:
aID ID of the property to set
aValue New value for the specified property

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

Get properties from this resource in a property array.

Parameters:
aPropertyIDs A 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

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:
aProperties Properties 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


Member Data Documentation

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:
Generated on Tue Mar 10 14:28:59 2009 for Songbird by  doxygen 1.5.2