sbIMediaItemDownloader Interface Reference

import"sbIMediaItemDownloader.idl";

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

Public Member Functions

unsigned long vote (in sbIMediaItem aMediaItem, in sbILibrary aTargetLibrary)
 
unsigned long long getDownloadSize (in sbIMediaItem aMediaItem, in sbILibrary aTargetLibrary)
 
sbIMediaItemDownloadJob createDownloadJob (in sbIMediaItem aMediaItem, in sbILibrary aTargetLibrary)
 

Public Attributes

const unsigned long VOTE_NONE = 0
 
const unsigned long VOTE_SCHEME = 100
 
const unsigned long VOTE_HOST = 200
 
const unsigned long VOTE_WHOLE_URL = 300
 
const unsigned long VOTE_MEDIA_ITEM_PROPERTIES = 400
 
const unsigned long VOTE_TARGET_LIBRARY = 500
 

Detailed Description

This interface is implemented by media item downloader components. These components provide support for downloading media items from different sources (e.g., from HTTP, Amazon, eMusic). Downloader components may be used to download media items for the main library or for a device. When downloading for a device, the downloader may choose a source file format that is compatible with the device. These components are managed by the media item download service. Media item downloader components should register themselves in the media item downloader category defined by SB_MEDIA_ITEM_DOWNLOADER_CATEGORY. Downloaders must be thread-safe.

See Also
sbIMediaItemDownloadService

Definition at line 51 of file sbIMediaItemDownloader.idl.

Member Function Documentation

sbIMediaItemDownloadJob sbIMediaItemDownloader::createDownloadJob ( in sbIMediaItem  aMediaItem,
in sbILibrary  aTargetLibrary 
)

Create and return a download job for the media item specified by aMediaItem to download for the library specified by aTargetLibrary. If aTargetLibrary is not specified, create a job for downloading for the main library.

Parameters
aMediaItemMedia item to download.
aTargetLibraryLibrary for which the media item will be downloaded.
Returns
Media item download job.
unsigned long long sbIMediaItemDownloader::getDownloadSize ( in sbIMediaItem  aMediaItem,
in sbILibrary  aTargetLibrary 
)

Return the download size of the media item specified by aMediaItem for the library specified by aTargetLibrary. If aTargetLibrary is not specified, return the size of a download for the main library.

Parameters
aMediaItemMedia item for which to get download size.
aTargetLibraryLibrary for which the media item will be downloaded.
Returns
Download size.
unsigned long sbIMediaItemDownloader::vote ( in sbIMediaItem  aMediaItem,
in sbILibrary  aTargetLibrary 
)

Vote to be the downloader used to download the media item specified by aMediaItem to the library specified by aTargetLibrary. If aTargetLibrary is not specified, the target library is the main library. The downloader that returns the highest vote value will be used to download the media item. The downloader may return one of the predefined vote values or choose its own value to return.

Parameters
aMediaItemMedia item to download.
aTargetLibraryLibrary for which the media item will be downloaded.
Returns
Downloader match value.

Member Data Documentation

const unsigned long sbIMediaItemDownloader::VOTE_HOST = 200

Downloader matched the media item content source host.

Definition at line 74 of file sbIMediaItemDownloader.idl.

const unsigned long sbIMediaItemDownloader::VOTE_MEDIA_ITEM_PROPERTIES = 400

Downloader matched the media item properties.

Definition at line 84 of file sbIMediaItemDownloader.idl.

const unsigned long sbIMediaItemDownloader::VOTE_NONE = 0

Downloader cannot download media item.

Definition at line 64 of file sbIMediaItemDownloader.idl.

const unsigned long sbIMediaItemDownloader::VOTE_SCHEME = 100

Downloader matched the media item content source scheme.

Definition at line 69 of file sbIMediaItemDownloader.idl.

const unsigned long sbIMediaItemDownloader::VOTE_TARGET_LIBRARY = 500

Downloader matched the target library.

If the target library is a device library, a special downloader may be required to download a media item in a format compatible with the device.

Definition at line 92 of file sbIMediaItemDownloader.idl.

const unsigned long sbIMediaItemDownloader::VOTE_WHOLE_URL = 300

Downloader matched the entire media item content source URL.

Definition at line 79 of file sbIMediaItemDownloader.idl.


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