public class MediaDownload
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
MediaDownload.Constraints
Media Download resource constrains not to be exceeded.
|
static class |
MediaDownload.ContentBase
The download content parameters.
|
static class |
MediaDownload.ContentState
Content download states
|
static class |
MediaDownload.ContentStatus
The download content status.
|
static class |
MediaDownload.DashContent
MPEG DASH content parameters
|
static interface |
MediaDownload.Listener
The Media Download Listener interface.
|
static class |
MediaDownload.SingleFileContent
Single file parameters
|
static class |
MediaDownload.SourceType
The content source type.
|
static class |
MediaDownload.State
The overall Media Download status.
|
static class |
MediaDownload.Status
The Media Download status.
|
Constructor and Description |
---|
MediaDownload()
Obtain a Media Download singleton object reference.
|
Modifier and Type | Method and Description |
---|---|
void |
addContent(java.lang.String path,
MediaDownload.ContentBase content)
Register a new content for download.
|
void |
cancelContent(java.lang.String path)
Cancel the content from download.
|
void |
finalize()
Do release if necessary.
|
void |
pause()
Pause the Media Download.
|
MediaDownload.ContentStatus |
queryContentStatus(java.lang.String path)
Query the status of the content being downloaded.
|
MediaDownload.Status |
queryStatus()
Query the Media Download status.
|
void |
release()
Release a Media Download singleton reference.
|
void |
removeListener()
Remove the listener, if any.
|
void |
resume()
Resume the Media Download.
|
void |
setConstraints(MediaDownload.Constraints constraints)
Assign the Media Download constraints.
|
void |
setListener(MediaDownload.Listener listener)
Set the listener.
|
public MediaDownload() throws ErrorCodeException
ErrorCodeException
public void release() throws ErrorCodeException
ErrorCodeException
public void finalize()
finalize
in class java.lang.Object
public void setListener(MediaDownload.Listener listener) throws ErrorCodeException, java.lang.NullPointerException
listener
- pointer to the listener object that will be copied
by the MediaDownload#setListener() functionErrorCodeException
java.lang.NullPointerException
public void removeListener() throws ErrorCodeException
ErrorCodeException
public void pause() throws ErrorCodeException
ErrorCodeException
public void resume() throws ErrorCodeException
ErrorCodeException
public void setConstraints(MediaDownload.Constraints constraints) throws ErrorCodeException, java.lang.NullPointerException
constraints
- the new constraints objectErrorCodeException
java.lang.NullPointerException
public MediaDownload.Status queryStatus() throws ErrorCodeException
ErrorCodeException
public void addContent(java.lang.String path, MediaDownload.ContentBase content) throws ErrorCodeException, java.lang.NullPointerException
path
- the unique directory path to where the newly downloaded
content will be stored. The directory may or may not exist,
but the parent directory must exist. If the directory at
path does not exist, it is created.content
- description of the content to be downloaded.ErrorCodeException
java.lang.NullPointerException
public void cancelContent(java.lang.String path) throws ErrorCodeException, java.lang.NullPointerException
path
- the unique directory path that identifies the
content being downloaded.ErrorCodeException
java.lang.NullPointerException
public MediaDownload.ContentStatus queryContentStatus(java.lang.String path) throws ErrorCodeException, java.lang.NullPointerException
path
- the unique directory path that identifies the content
being queriedErrorCodeException
java.lang.NullPointerException