Library and media list diffing service. More...
import"sbILibraryDiffingService.idl";
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) |
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)
Definition at line 54 of file sbILibraryDiffingService.idl.
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.
aSource | The source library or list. |
aDestination | The destination library or list. |
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.
aSource | The source. |
aDestination | The destination. |
aObserver | An optional observer. |
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.
aSources | The source libraries or media lists. |
aDestination | The destination library or media list. |
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.
aSources | The source libraries or lists. |
aDestination | The destination. |
aObserver | An optional observer. |
sbILibraryChangeset sbILibraryDiffingService::getChangeset | ( | in AString | aChangesetCookie | ) |
Retreive a changeset using a changeset cookie.
aChangesetCookie |
NS_ERROR_NOT_AVAILABLE | when no changeset is available for a given cookie. |