Motorola Mobility Confidential Restricted.
ToiFrontendDownloader Interface Reference

Description

Technical Preview:
This interface is a TECHNICAL PREVIEW, it may change. The ToiFrontendDownloader interface provides functionality used to upgrade the STB with new software versions and/or splash screens. This interface is used for finding these downloads and get them through DSM-CC using DVB-C/T etc.

import "ToiFrontendDownloader.idl";

List of all members.

Public Member Functions

void startSearch (in ToiOperationManager::TToiOperationId operationId, in TToiDownloadType downloadType) raises (TToiInvalidArgumentException, TToiInvalidPreconditionException)
void startDownload (in ToiOperationManager::TToiOperationId operationId, in TToiDownloadType downloadType) raises (TToiInvalidArgumentException, TToiInvalidPreconditionException)
void install (in ToiOperationManager::TToiOperationId operationId) raises (TToiInvalidArgumentException, TToiInvalidPreconditionException)
ToiFrontendDownloaderDownloadInfo getDownloadInfoResult (in ToiOperationManager::TToiOperationId operationId) raises (TToiInvalidArgumentException, TToiNoDataException)
void releaseInstance ()

Public Attributes

Operation results

The result types defined for the frontend download operations. See ToiOperationManager for generic result types.

const
ToiOperationManager::TToiOperationResult 
OP_RESULT_DOWNLOAD_INFO = 1
TToiDownloadType
const TToiDownloadType DOWNLOAD_TYPE_SOFTWARE = 0
const TToiDownloadType DOWNLOAD_TYPE_SPLASH = 1
TToiDownloadAvailability
const TToiDownloadAvailability DOWNLOAD_NOT_AVAILABLE = 0
const TToiDownloadAvailability DOWNLOAD_AVAILABLE = 1

Public Types

typedef long TToiDownloadType
typedef long TToiDownloadAvailability
typedef string TToiDownloadVersion

Member Typedef Documentation

Enumeration of the different search result types.

Download types.

Download version.


Member Function Documentation

ToiFrontendDownloaderDownloadInfo ToiFrontendDownloader::getDownloadInfoResult ( in ToiOperationManager::TToiOperationId  operationId) raises (TToiInvalidArgumentException, TToiNoDataException)

Used to get the search result once the application recieve ToiOperationOperationResultEvent and the result parameter is equal to ToiFrontendDownloader::OP_RESULT_DOWNLOAD_INFO.

Parameters:
operationIdThe operation identifier recived from ToiOperationManager::createOperation() upon creation of the operation.
Return values:
downloadInfoThe resulting download information.
Exceptions:
TToiInvalidArgumentExceptionRaised if the operation identifier is invalid.
TToiNoDataExceptionRaised if no result is available.
void ToiFrontendDownloader::install ( in ToiOperationManager::TToiOperationId  operationId) raises (TToiInvalidArgumentException, TToiInvalidPreconditionException)

Install the downloaded software or splash.

When the application receives a ToiOperationOperationResultEvent call with the operation result ToiOperationManager::OP_RESULT_NONE, then the application can get the install progress from ToiOperationManagerOperationInfo.

The install operation can not be cancelled once it has been started. Calling ToiOperationManager::cancelOperation() or ToiOperationManager::releaseOperation() will do nothing.

Parameters:
operationIdThe operation identifier recived from ToiOperationManager::createOperation() upon creation of the operation.
Exceptions:
TToiInvalidArgumentExceptionRaised if the operation identifier or the download type is invalid.
TToiInvalidPreconditionExceptionRaised if no download has been performed before calling this method or one search/download/install operation is active.
See also:
ToiFrontendDownloader::startDownload()
void ToiFrontendDownloader::releaseInstance ( )

This function releases the resources used by this instance and removes all registered observers. Upon return this object will no longer be available and must not be called.

void ToiFrontendDownloader::startDownload ( in ToiOperationManager::TToiOperationId  operationId,
in TToiDownloadType  downloadType 
) raises (TToiInvalidArgumentException, TToiInvalidPreconditionException)

Downloads an update of the specified software. The software will not be used until the set-top box has been rebooted, e.g. by calling any of the reboot functions in ToiPlatformService.

When the application receives a ToiOperationOperationResultEvent call with the operation result ToiOperationManager::OP_RESULT_NONE, then the application can get the download progress from ToiOperationManagerOperationInfo.

Calling ToiOperationManager::cancelOperation() will immediatly stop an ongoing download operation. Calling ToiOperationManager::releaseOperation() will remove the operation identified by operationId. If a download is in progress, calling this method will immediatly stop it.

Parameters:
operationIdThe operation identifier recived from ToiOperationManager::createOperation() upon creation of the operation.
downloadTypeThe type of software release.
Exceptions:
TToiInvalidArgumentExceptionRaised if the operation identifier or the download type is invalid.
TToiInvalidPreconditionExceptionIf no search has been performed that has found new software of the specified download type or one search/download/install operation is active.
See also:
ToiFrontendDownloader::startSearch()
void ToiFrontendDownloader::startSearch ( in ToiOperationManager::TToiOperationId  operationId,
in TToiDownloadType  downloadType 
) raises (TToiInvalidArgumentException, TToiInvalidPreconditionException)

Start a search for upgrades of a certain software type.

This is an asynchronous operation. When the application receives a ToiOperationOperationResultEvent call with the operation result ToiOperationManager::OP_RESULT_NONE, then the application can get the search progess, its state and more from ToiOperationManagerOperationInfo. When the application receives a ToiOperationOperationResultEvent call with the operation result ToiFrontendDownloader::OP_RESULT_DOWNLOAD_INFO, then the application can get the download information by calling ToiFrontendDownloader::getDownloadInfoResult().

Calling ToiOperationManager::cancelOperation() will immediatly stop an ongoing search operation. Calling ToiOperationManager::releaseOperation() will remove the operation identified by operationId. If the search is in progress, calling this method will immediatly stop it.

Parameters:
operationIdThe operation identifier recived from ToiOperationManager::createOperation() upon creation of the operation.
downloadTypeThe type of software release.
Exceptions:
TToiInvalidArgumentExceptionRaised if the operation identifier or the download type is invalid.
TToiInvalidPreconditionExceptionRaised if one search/download/install operation is active.

Member Data Documentation

A new download was available.

This constant can also be accessed from toi.consts.ToiFrontendDownloader.DOWNLOAD_AVAILABLE.

No new download was available.

This constant can also be accessed from toi.consts.ToiFrontendDownloader.DOWNLOAD_NOT_AVAILABLE.

Software release.

This constant can also be accessed from toi.consts.ToiFrontendDownloader.DOWNLOAD_TYPE_SOFTWARE.

Splash release.

This constant can also be accessed from toi.consts.ToiFrontendDownloader.DOWNLOAD_TYPE_SPLASH.

The asynchronous operation has found new download info.

This constant can also be accessed from toi.consts.ToiFrontendDownloader.OP_RESULT_DOWNLOAD_INFO.