Songbird / Development / Songbird Add-Ons API Documentation

sbILibraryDiffingService Interface Reference

Library and media list diffing service. More...

import "sbILibraryDiffingService.idl";

List of all members.

Public Member Functions

sbILibraryChangeset createChangeset (in sbIMediaList aSource, in sbIMediaList aDestination)
sbILibraryChangeset createMultiChangeset (in nsIArray aSources, in sbIMediaList aDestination)
AString createChangesetAsync (in sbIMediaList aSource, in sbIMediaList aDestination,[optional] in nsIObserver aObserver)
sbILibraryChangeset createMultiChangesetAsync (in nsIArray aSources, in sbIMediaList aDestination,[optional] in nsIObserver aObserver)
sbILibraryChangeset getChangeset (in AString aChangesetCookie)


Detailed Description

Library and media list diffing service.

The library diffing service enables to create changesets for a source library or media list (or multiple libraries or lists) to a destination library or media list.

The resulting changeset can be used to make the destination the contain the same items and properties as the source (or sources combined)

See also:
sbILibraryLoggingService sbILibraryChangeset getChangeset

Definition at line 54 of file sbILibraryDiffingService.idl.


Member Function Documentation

sbILibraryChangeset sbILibraryDiffingService::createChangeset ( in sbIMediaList  aSource,
in sbIMediaList  aDestination 
)

Create a changeset from a source and destination library or media list.

The changeset will contain all the information necessary to make the destination the same as the source.

All changes in the changeset are provided in chronological order. Applying these changes out of order to the destination will have adverse effects.

Parameters:
aSource The source library or list.
aDestination The destination library or list.
Returns:
A changeset.

sbILibraryChangeset sbILibraryDiffingService::createMultiChangeset ( in nsIArray  aSources,
in sbIMediaList  aDestination 
)

Create a changeset from multiple sources and a destination library or media list.

The changeset will contain all information necessary to make the destination have the same contents and properties for items as the sources. It will _not_ give you order information though. Sortable destinations will not have the same sort order as the sources.

Applying these changes out of order to the destination will have adverse effects.

Note:
The Destination must be library.
Parameters:
aSources The source libraries or media lists.
aDestination The destination library or media list.
Returns:
A changeset.

AString sbILibraryDiffingService::createChangesetAsync ( in sbIMediaList  aSource,
in sbIMediaList  aDestination,
[optional] in nsIObserver  aObserver 
)

Create a changeset from a source and destination library or medialist in asynchronous fashion.

The changeset will contain all the information necessary to make the destination the same as the source.

All changes in the changeset are provided in chronological order. Applying these changes out of order to the destination will have adverse effects.

The observer will get called with the following arguments when the changeset is ready:

aSubject will be a sbILibraryChangeset instance. aTopic will be "library-changeset-ready". aData will be the changeset cookie. The cookie can be used to retreive the changeset for processing at a later time outside of the observer call.

The observer will be called on the thread it was created.

Parameters:
aSource The source.
aDestination The destination.
aObserver An optional observer.
Returns:
a changeset cookie.

sbILibraryChangeset sbILibraryDiffingService::createMultiChangesetAsync ( in nsIArray  aSources,
in sbIMediaList  aDestination,
[optional] in nsIObserver  aObserver 
)

Create a changeset from multiple sources to a single destination in an asynchronous fashion.

The changeset will contain all information necessary to make the destination have the same contents and properties for items as the sources. It will _not_ give you order information though. Sortable destinations will not have the same sort order as the sources.

Applying these changes out of order to the destination will have adverse effects.

The observer will get called with the following arguments when the changeset is ready:

aSubject will be a sbILibraryChangeset instance. aTopic will be "library-changeset-ready". aData will be the changeset cookie. The cookie can be used to retreive the changeset for processing at a later time outside of the observer call.

The observer will be called on the thread it was created.

If you do not wish to use an observer, you may retrieve the changeset using the cookie that is returned in conjunction with the getChangeset method.

Parameters:
aSources The source libraries or lists.
aDestination The destination.
aObserver An optional observer.
Returns:
a changeset cookie.
See also:
getChangeset

sbILibraryChangeset sbILibraryDiffingService::getChangeset ( in AString  aChangesetCookie  ) 

Retreive a changeset using a changeset cookie.

Parameters:
aChangesetCookie 
Returns:
The library changeset.
Exceptions:
NS_ERROR_NOT_AVAILABLE when no changeset is available for a given cookie.


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