Motorola Mobility Confidential Restricted.
ToiAssetManagerService Interface Reference

Description

Service:
This is a service and can be accessed through toi.assetManagerService

The ToiAssetManagerService interface provides access to locally stored media assets and metadata associated with these assets.

If no local media storage is available, then this service will not be available in the system.

import "ToiAssetManagerService.idl";

Inheritance diagram for ToiAssetManagerService:
ToiEventTarget

List of all members.

Public Member Functions

ToiOperationManager getAssetOperationManager ()
TToiDirectoryId createDirectory (in TToiDirectoryId parentId, in string title) raises (TToiInvalidArgumentException, TToiNotEnoughResourcesException)
void moveDirectory (in TToiDirectoryId dirId, in TToiDirectoryId newParentId) raises (TToiInvalidArgumentException)
void setDirectoryProperties (in TToiDirectoryId dirId, in TToiPropertySequence properties) raises (TToiInvalidArgumentException)
void removeDirectoryProperties (in TToiDirectoryId dirId, in TToiPropertyIdSequence properties) raises (TToiInvalidArgumentException)
void removeDirectory (in TToiDirectoryId dirId, in boolean recursiveFlag, in boolean removeAssetsFlag) raises (TToiInvalidArgumentException, TToiPermissionDeniedException)
ToiAssetManagerServiceDirectoryInfo getDirectoryInfo (in TToiDirectoryId dirId) raises (TToiInvalidArgumentException)
TToiDirectoryIdSequence getDirectories (in TToiDirectoryId dirId) raises (TToiInvalidArgumentException)
TToiPropertyIdSequence getDefinedProperties ()
ToiAssetManagerServicePropertyDefinition getPropertyDefinition (in TToiPropertyId propertyId) raises (TToiInvalidArgumentException)
void createPropertyDefinition (in TToiPropertyId propertyId, in TToiPropertyType type, in boolean hasMultipleValueSupport) raises (TToiInvalidArgumentException)
void removePropertyDefinition (in TToiPropertyId propertyId) raises (TToiInvalidArgumentException)
TToiAssetId createAsset (in TToiAssetType assetType) raises (TToiInvalidArgumentException, TToiNotEnoughResourcesException)
TToiAssetId createAssetFromProperties (in TToiPropertySequence properties) raises (TToiOperationNotSupportedException, TToiInvalidArgumentException, TToiNotEnoughResourcesException)
void convertAsset (in ToiOperationManager::TToiOperationId operationId, in TToiAssetId assetId, in TToiAssetRecordingMode newMode, in unsigned long long startOffset) raises (TToiInvalidArgumentException, TToiOperationNotSupportedException, TToiPermissionDeniedException)
void importAsset (in ToiOperationManager::TToiOperationId operationId, in TToiAssetId assetId, in string uri, in TToiImportPolicy importPolicy) raises (TToiInvalidArgumentException, TToiNoDataException)
void removeAsset (in ToiOperationManager::TToiOperationId operationId, in TToiAssetId assetId) raises (TToiInvalidArgumentException, TToiNoDataException, TToiPermissionDeniedException)
void copyAsset (in ToiOperationManager::TToiOperationId operationId, in TToiAssetId sourceAssetId, in unsigned long long startOffset, in unsigned long long duration, in TToiAssetId destinationAssetId) raises (TToiInvalidArgumentException, TToiPermissionDeniedException)
void linkAssets (in TToiDirectoryId dirId, in TToiAssetIdSequence assetIds) raises (TToiInvalidArgumentException)
void unlinkAssets (in TToiDirectoryId dirId, in TToiAssetIdSequence assetIds) raises (TToiInvalidArgumentException)
void runQuery (in ToiOperationManager::TToiOperationId operationId, in TToiQueryConditionSequence queryConditions, in TToiPropertyIdSequence requestedProperties, in TToiSortConditionSequence sortConditions) raises (TToiInvalidArgumentException, TToiNotEnoughResourcesException)
void runQueryForDirectory (in ToiOperationManager::TToiOperationId operationId, in TToiDirectoryId directoryId, in TToiQueryConditionSequence queryConditions, in TToiPropertyIdSequence requestedProperties, in TToiSortConditionSequence sortConditions) raises (TToiInvalidArgumentException, TToiNotEnoughResourcesException)
void runCountQuery (in ToiOperationManager::TToiOperationId operationId, in TToiQueryConditionSequence queryConditions) raises (TToiInvalidArgumentException, TToiNotEnoughResourcesException)
ToiMultipleResult getAssetInfoResult (in ToiOperationManager::TToiOperationId operationId, in unsigned long maxCount) raises (TToiInvalidArgumentException, TToiNoDataException)
unsigned long getLongResult (in ToiOperationManager::TToiOperationId operationId) raises (TToiInvalidArgumentException, TToiNoDataException)
TToiPropertySequence getProperties (in TToiAssetId assetId, in TToiPropertyIdSequence requestedProperties) raises (TToiInvalidArgumentException, TToiNoDataException, TToiNotEnoughResourcesException)
TToiPropertySequence getAllProperties (in TToiAssetId assetId) raises (TToiInvalidArgumentException, TToiNoDataException, TToiNotEnoughResourcesException)
TToiAssetStorageInfoSequence getAssetStorages ()
void setProperties (in TToiAssetId id, in TToiPropertySequence properties) raises (TToiInvalidArgumentException, TToiNoDataException, TToiNotEnoughResourcesException)
void removeProperties (in TToiAssetId id, in TToiPropertyIdSequence properties) raises (TToiInvalidArgumentException, TToiNoDataException, TToiNotEnoughResourcesException)
void removeMultiValuedPropertyValue (in TToiAssetId id, in ToiAssetManagerServiceProperty property) raises (TToiInvalidArgumentException, TToiNoDataException, TToiNotEnoughResourcesException)

Public Attributes

const TToiDirectoryId ROOT_DIRECTORY = -1
Events
const long ON_ASSETS_ADDED = 300
const long ON_ASSETS_REMOVED = 301
const long ON_ASSETS_CHANGED = 302
const long ON_DIRECTORIES_ADDED = 303
const long ON_DIRECTORIES_REMOVED = 304
const long ON_DIRECTORIES_CHANGED = 305
const long ON_ASSET_STORAGE_ADDED = 306
const long ON_ASSET_STORAGE_REMOVED = 307
Operation results

The result types defined for the Asset Manager operations. See ToiOperationManager for generic result types.

const
ToiOperationManager::TToiOperationResult 
OP_RESULT_ASSET_INFO = 1
const
ToiOperationManager::TToiOperationResult 
OP_RESULT_LONG = 2
TToiConditionOperation
const TToiConditionOperation EQUALS = 0
const TToiConditionOperation NOT_EQUAL = 1
const TToiConditionOperation GREATER = 2
const TToiConditionOperation LESS = 3
const TToiConditionOperation GREATER_OR_EQUAL = 4
const TToiConditionOperation LESS_OR_EQUAL = 5
const TToiConditionOperation CONTAINS = 6
TToiPropertyType
const TToiPropertyType TYPE_BOOLEAN = 0
const TToiPropertyType TYPE_STRING = 1
const TToiPropertyType TYPE_INTEGER = 2
const TToiPropertyType TYPE_DATE = 3
const TToiPropertyType TYPE_ASSETLINK = 4
Property constants

Constants for standard and recommended asset property identifiers. Properties named system.* are set by the platform while info.* properties can be set by applications.

const string PROPERTY_SYSTEM_DURATION = "system.duration"
const string PROPERTY_SYSTEM_FILESIZE = "system.filesize"
const string PROPERTY_SYSTEM_PLAYBACKURI = "system.playbackuri"
const string PROPERTY_SYSTEM_FILENAME = "system.filename"
const string PROPERTY_SYSTEM_TYPE = "system.type"
const string PROPERTY_SYSTEM_INTEGRITY_STATUS = "system.integritystatus"
const string PROPERTY_SYSTEM_RECORDINGMODE = "system.recordingmode"
const string PROPERTY_SYSTEM_BUFFERLENGTH = "system.bufferlength"
const string PROPERTY_SYSTEM_ASSETSTORAGE = "system.assetstorage"
const string PROPERTY_INFO_TITLE = "info.title"
const string PROPERTY_INFO_DATE = "info.date"
const string PROPERTY_INFO_DESCRIPTION = "info.description"
const string PROPERTY_INFO_LONGDESCRIPTION = "info.longdescription"
const string PROPERTY_INFO_CHANNELNAME = "info.channelname"
const string PROPERTY_INFO_RECORDINGSTATUS = "info.recordingstatus"
const string PROPERTY_INFO_MATURITYRATING = "info.maturityrating"
const string PROPERTY_INFO_SHARED = "info.shared"
const string PROPERTY_INFO_COVER = "info.cover"
const string PROPERTY_INFO_CHILDREN = "info.children"
TToiAssetType
const TToiAssetType ASSET_PVR = 0
const TToiAssetType ASSET_IMAGE = 1
const TToiAssetType ASSET_AUDIO = 2
const TToiAssetType ASSET_VIDEO = 3
TToiAssetRecordingMode
const TToiAssetRecordingMode RECORDING_MODE_LINEAR = 0
const TToiAssetRecordingMode RECORDING_MODE_CIRCULAR = 1
TToiAssetIntegrityStatus
const TToiAssetIntegrityStatus INTEGRITY_UNKNOWN = 0
const TToiAssetIntegrityStatus INTEGRITY_OK = 1
const TToiAssetIntegrityStatus INTEGRITY_COULD_NOT_UPGRADE = 2
const TToiAssetIntegrityStatus INTEGRITY_COULD_NOT_REPAIR = 3
TToiImportPolicy
const TToiImportPolicy IMPORT_POLICY_COPY = 0
const TToiImportPolicy IMPORT_POLICY_MOVE = 1
typedef long TToiAssetType
const string PROPERTY_INFO_LOST_AND_FOUND = "info.lostandfound"

Public Types

typedef long TToiConditionOperation
typedef long TToiQueryId
typedef string TToiAssetId
typedef sequence< TToiAssetIdTToiAssetIdSequence
typedef long TToiPropertyType
typedef string TToiPropertyId
typedef sequence< TToiPropertyIdTToiPropertyIdSequence
typedef sequence< string > TToiPropertyValueSequence
typedef sequence
< ToiAssetManagerServiceProperty
TToiPropertySequence
typedef sequence
< ToiAssetManagerServiceAssetInfo
TToiAssetInfoSequence
typedef long TToiDirectoryId
typedef sequence< TToiDirectoryIdTToiDirectoryIdSequence
typedef long TToiAssetRecordingMode
typedef long TToiAssetIntegrityStatus
typedef sequence
< ToiAssetManagerServiceSortCondition
TToiSortConditionSequence
typedef sequence
< ToiAssetManagerServiceQueryCondition
TToiQueryConditionSequence
typedef long TToiImportPolicy
typedef sequence
< ToiAssetManagerServiceAssetStorageInfo
TToiAssetStorageInfoSequence

Member Typedef Documentation

Identifier that uniquely identifies an asset.

Sequence of asset identifiers.

Identifies integrity status of an asset.

Technical Preview:
This enum is a TECHNICAL PREVIEW, it may change. Identifies different ways of recording an asset of type ASSET_PVR.
Technical Preview:
This typedef is a TECHNICAL PREVIEW, it may change. Sequence of DVR storage identifiers.

Identifies different types of asset. This asset type is provided by the application while creating the asset.

The ToiAssetManagerService::TToiConditionOperation enumerates possible operations that can be used to define a query condition.

Identifer that uniquely identifies a directory.

Sequence of directory identifiers.

Policy to be applied when importing an asset. Note that not all policies may be valid for all URIs which are imported.

Identifier for a metadata property.

Sequence of property identifiers.

Different kind of property value types.

Sequence of property values.

Query identifier.

List of sort conditions. The list is used for sorting asset results and the sort conditions are applied in order.


Member Function Documentation

void ToiAssetManagerService::convertAsset ( in ToiOperationManager::TToiOperationId  operationId,
in TToiAssetId  assetId,
in TToiAssetRecordingMode  newMode,
in unsigned long long  startOffset 
) raises (TToiInvalidArgumentException, TToiOperationNotSupportedException, TToiPermissionDeniedException)
Technical Preview:
This interface is a TECHNICAL PREVIEW, it may change. Convert an asset from one recording mode to another (such as circular to linear). Currently this will only convert from circular to linear, which means it is converting from a limited recording to an unlimited recording.

An example use would be: 1) a circular recording is active, 2) it is now 9:38, 3) the user wants to record the show that started at 9:30. This call is used to specify the start offset from the start of the recording to 9:30. The result of the call will be an active linear recording that started at 9:30.

Parameters:
operationIdThe operation identifier created by ToiOperationManager
assetIdThe identifier of the asset.
newModeNew recording mode desired (RECORDING_MODE_LINEAR or RECORDING_MODE_CIRCULAR). Note: currently only circular to linear is supported.

. *

Parameters:
startOffsetWhere to start the conversion, in units of milliseconds. This is the delta from the start of the recording to the desired point for conversion.
Exceptions:
TToiInvalidArgumentExceptionraised for bad parameter.
TToiOperationNotSupportedExceptionraised for any platform without the OMFS file system.
TToiPermissionDeniedExceptionraised if any client is streaming from a part of the asset being converted.
void ToiAssetManagerService::copyAsset ( in ToiOperationManager::TToiOperationId  operationId,
in TToiAssetId  sourceAssetId,
in unsigned long long  startOffset,
in unsigned long long  duration,
in TToiAssetId  destinationAssetId 
) raises (TToiInvalidArgumentException, TToiPermissionDeniedException)
Technical Preview:
This method is a TECHNICAL PREVIEW, it may change. Copies data from an existing source asset to a destination asset.
Parameters:
operationIdThe operation identifier created by ToiOperationManager
sourceAssetIdThe asset identifier for the source asset.
startOffsetOffset (in milliseconds) relative to the source asset beginning to start the copy operation from.
durationThe duration (in milliseconds) to be copied.
destinationAssetIdThe asset identifier for the destination asset.
Exceptions:
TToiInvalidArgumentExceptionRaised if
  • the operation identifier is invalid
  • one or more of the asset identifiers are invalid
  • one or more of the asset types are not ASSET_PVR
  • the destination asset is not empty
  • duration is equal to zero or startOffset is not less than the source asset duration
TToiPermissionDeniedExceptionRaised if the destination asset is locked.
TToiAssetId ToiAssetManagerService::createAsset ( in TToiAssetType  assetType) raises (TToiInvalidArgumentException, TToiNotEnoughResourcesException)

Creates an asset. If the type is ASSET_PVR, the identifier of the asset can be used with a media recorder to save a media stream to disk.

Parameters:
assetTypeThe type of asset
Return values:
assetIdThe identifier of the created asset.
Exceptions:
TToiInvalidArgumentExceptionRaised if the type is not supported.
TToiNotEnoughResourcesExceptionRaised if the asset could not be created due to missing system resources.
See also:
ToiMediaRecorder::open()
TToiAssetId ToiAssetManagerService::createAssetFromProperties ( in TToiPropertySequence  properties) raises (TToiOperationNotSupportedException, TToiInvalidArgumentException, TToiNotEnoughResourcesException)
Technical Preview:
This interface is a TECHNICAL PREVIEW, it may change. Creates an asset from properties. The following property must be set: PROPERTY_SYSTEM_TYPE. The following properties are likely to be set: PROPERTY_SYSTEM_RECORDINGMODE and PROPERTY_SYSTEM_BUFFERLENGTH. The default value of PROPERTY_SYSTEM_RECORDINGMODE is RECORDING_MODE_LINEAR. The default value of PROPERTY_SYSTEM_BUFFERLENGTH is the config value minimum-buffer-length.
Parameters:
propertiesThe properties of the asset.
Return values:
assetIdThe identifier of the created asset.
Exceptions:
TToiOperationNotSupportedExceptionRaised if this method is not supported.
TToiInvalidArgumentExceptionRaised if the properties are not valid or the asset type was not provided in the property list.
TToiNotEnoughResourcesExceptionRaised if the asset could not be created due to missing system resources.
See also:
ToiMediaRecorder::open()
TToiDirectoryId ToiAssetManagerService::createDirectory ( in TToiDirectoryId  parentId,
in string  title 
) raises (TToiInvalidArgumentException, TToiNotEnoughResourcesException)

Creates a new directory.

Parameters:
parentIdThe identifier of the parent directory. Use ToiAssetManagerService::ROOT_DIRECTORY to create the top directories.
titleThe title to use for the directory.
Return values:
dirIdThe identifier of the created directory.
Exceptions:
TToiInvalidArgumentExceptionRaised if the title is invalid or already taken, or if the parent identifier is invalid.
TToiNotEnoughResourcesExceptionRaised if the directory could not be created due to missing system resources.
void ToiAssetManagerService::createPropertyDefinition ( in TToiPropertyId  propertyId,
in TToiPropertyType  type,
in boolean  hasMultipleValueSupport 
) raises (TToiInvalidArgumentException)

Creates a new property definition. This method is needed for creating properties that can have multiple values.

Parameters:
propertyIdThe identifier of the new property, a unique name.
typeThe property type.
hasMultipleValueSupportWhether the property can have multiple values.
Exceptions:
TToiInvalidArgumentExceptionRaised if the name is already in use by a property.
TToiPropertySequence ToiAssetManagerService::getAllProperties ( in TToiAssetId  assetId) raises (TToiInvalidArgumentException, TToiNoDataException, TToiNotEnoughResourcesException)

Returns all metadata properties for an asset.

Parameters:
assetIdThe asset identifier.
Return values:
propertiesThe id/value pairs of all the asset's properties.
Exceptions:
TToiInvalidArgumentExceptionRaised if the asset identifier is invalid.
TToiNoDataExceptionRaised if no data can be read for the asset.
TToiNotEnoughResourcesExceptionRaised if the needed system resources are not accessible.
ToiMultipleResult ToiAssetManagerService::getAssetInfoResult ( in ToiOperationManager::TToiOperationId  operationId,
in unsigned long  maxCount 
) raises (TToiInvalidArgumentException, TToiNoDataException)

Used to get the query results once the applications recieve ToiOperationOperationResultEvent.

Parameters:
operationIdThe operation identifier of ToiAssetManagerService::runQuery().
maxCountThe maximum number of objects the user are interested in, 0 if as many as possible shall be returned.
Return values:
objectsThe resulting asset information.
hasMoreWhen true, there are some assets info in the cache of asset manager. Additional call to this method required.
Exceptions:
TToiInvalidArgumentExceptionRaised if operation is unknown or does not support capability results.
TToiNoDataExceptionRaised if no result is available.
ToiOperationManager ToiAssetManagerService::getAssetOperationManager ( )

Returns the operation manager that handles asynchronous operations for this asset manager. The procedure of executing asynchronous operations is generic and looks like this:

  • Get a handle to the operation manager.
  • Register an observer to get operation events from the operation manager.
  • Create an operation in order to get an operation identifier.
  • Call a asynchronous operation using the operation identifier.
  • Receive progress events for the asynchronous operation.
  • When the operation is completed, get result data (if any).
  • Release the operation or reuse the identifier for another asynchronous call.
Return values:
IToiOperationManager
addressThe address to the ToiOperationManager.
TToiAssetStorageInfoSequence ToiAssetManagerService::getAssetStorages ( )
Technical Preview:
This method is a TECHNICAL PREVIEW, it may change. Returns all available asset storage indentifiers. Uses for ToiAssetManagerService::createAssetFromProperties() method call
Return values:
storageidentifiers list. Empty if no DVR storage available or configured
TToiPropertyIdSequence ToiAssetManagerService::getDefinedProperties ( )

Returns the property identifiers for all defined properties also including all properties that are currently used in the database. This lists usually more properties than only those that have been created by ToiAssetManagerService::createPropertyDefinition().

Return values:
propertiesAll defined property identifiers.
See also:
ToiAssetManagerService::createPropertyDefinition()
TToiDirectoryIdSequence ToiAssetManagerService::getDirectories ( in TToiDirectoryId  dirId) raises (TToiInvalidArgumentException)

Returns all direct directory children of given directory.

Parameters:
dirIdThe directory identifier. If it equals to ROOT all top level directory identifiers will be returned.
Return values:
childDirIdsThe list of directory identifiers.
Exceptions:
TToiInvalidArgumentExceptionRaised if the directory identifier is invalid.
ToiAssetManagerServiceDirectoryInfo ToiAssetManagerService::getDirectoryInfo ( in TToiDirectoryId  dirId) raises (TToiInvalidArgumentException)

Returns directory information.

Parameters:
dirIdThe directory identifier.
Return values:
infoThe directory and its properties.
Exceptions:
TToiInvalidArgumentExceptionRaised if the asset identifier is invalid.
unsigned long ToiAssetManagerService::getLongResult ( in ToiOperationManager::TToiOperationId  operationId) raises (TToiInvalidArgumentException, TToiNoDataException)

Used to get the count result once the applications recieve ToiOperationOperationResultEvent.

Parameters:
operationIdThe operation identifier.
Return values:
valueThe resulting long value from the operation.
Exceptions:
TToiInvalidArgumentExceptionRaised if operation is unknown or does not have a long value as result.
TToiNoDataExceptionRaised if no result is available.
TToiPropertySequence ToiAssetManagerService::getProperties ( in TToiAssetId  assetId,
in TToiPropertyIdSequence  requestedProperties 
) raises (TToiInvalidArgumentException, TToiNoDataException, TToiNotEnoughResourcesException)

Returns metadata property values for an asset.

Parameters:
assetIdThe asset identifier.
requestedPropertiesThe identifiers of the wanted properties.
Return values:
propertiesThe id/value pairs of the requested properties.
Exceptions:
TToiInvalidArgumentExceptionRaised if the asset identifier is invalid.
TToiNoDataExceptionRaised if no data can be read for the asset.
TToiNotEnoughResourcesExceptionRaised if the needed system resources are not accessible.
ToiAssetManagerServicePropertyDefinition ToiAssetManagerService::getPropertyDefinition ( in TToiPropertyId  propertyId) raises (TToiInvalidArgumentException)

Returns the property definition for a given property identifier.

Parameters:
propertyIdThe property identifier.
Return values:
definitionThe property definition.
Exceptions:
TToiInvalidArgumentExceptionRaised if the property identifier is invalid.
void ToiAssetManagerService::importAsset ( in ToiOperationManager::TToiOperationId  operationId,
in TToiAssetId  assetId,
in string  uri,
in TToiImportPolicy  importPolicy 
) raises (TToiInvalidArgumentException, TToiNoDataException)

Import an asset from an external source. This is an asynchronous operation and completion of the operation will not provide any result values, i.e. the result will always be ToiOperationManager::OP_RESULT_NONE.

Parameters:
operationIdThe operation identifier created by ToiOperationManager.
assetIdThe identifier of the asset. Currently, only assets of type ToiAssetManagerService::ASSET_IMAGE are supported.
uriURI to the source to be imported. Currently, only file:// URIs are supported.
importPolicyPolicy to be applied when importing source. For file URIs only ToiAssetManagerService::IMPORT_POLICY_COPY and ToiAssetManagerService::IMPORT_POLICY_MOVE are valid.
Exceptions:
TToiInvalidArgumentExceptionRaised if the asset type, uri, or import policy is invalid.
TToiNoDataExceptionRaised if there is a problem reading from uri or updating the new asset.
void ToiAssetManagerService::linkAssets ( in TToiDirectoryId  dirId,
in TToiAssetIdSequence  assetIds 
) raises (TToiInvalidArgumentException)

Links some assets to a directory, i.e. makes the assets visible as a member of the directory.

Parameters:
dirIdThe directory to link the assets to.
assetIdsThe assets to link.
Exceptions:
TToiInvalidArgumentExceptionRaised if the directory identifier or one of the asset ids is invalid.
void ToiAssetManagerService::moveDirectory ( in TToiDirectoryId  dirId,
in TToiDirectoryId  newParentId 
) raises (TToiInvalidArgumentException)

Moves the directory to a new parent directory.

Parameters:
dirIdThe directory identifier.
newParentIdThe new parent directory identifier.
Exceptions:
TToiInvalidArgumentExceptionRaised if either the directory identifier or the parent identifier is invalid.
void ToiAssetManagerService::removeAsset ( in ToiOperationManager::TToiOperationId  operationId,
in TToiAssetId  assetId 
) raises (TToiInvalidArgumentException, TToiNoDataException, TToiPermissionDeniedException)

Removes an asset. An asset can only be erased if the asset is not locked for playback or recording. This is an asynchronous operation and completion of the operation will not provide any result values, i.e. the result will always be ToiOperationManager::OP_RESULT_NONE.

Parameters:
operationIdThe operation identifier created by ToiOperationManager
assetIdThe asset identifier.
Exceptions:
TToiInvalidArgumentExceptionRaised if the asset identifier is invalid.
TToiNoDataExceptionRaised if there is no data to remove.
TToiPermissionDeniedExceptionRaised if the asset is locked.
void ToiAssetManagerService::removeDirectory ( in TToiDirectoryId  dirId,
in boolean  recursiveFlag,
in boolean  removeAssetsFlag 
) raises (TToiInvalidArgumentException, TToiPermissionDeniedException)

Remove a directory. The directory can only be removed if it is empty and does not contain any assets or directories. If the recursive flag is set all assets and directories will also be removed.

Parameters:
dirIdThe directory identifier.
recursiveFlagIf true all child directories are also removed.
removeAssetsFlagIf true all assets in the directories are also removed. This completely removes the asset and thus it will be removed from all directories it is linked to.
Exceptions:
TToiInvalidArgumentExceptionRaised if the directory identifier is invalid.
TToiPermissionDeniedExceptionRaised if the directory contains directories/assets and the corresponding override flag (recursive/remove) is not set.
void ToiAssetManagerService::removeDirectoryProperties ( in TToiDirectoryId  dirId,
in TToiPropertyIdSequence  properties 
) raises (TToiInvalidArgumentException)

Unsets the properties for a directory.

Parameters:
dirIdThe directory identifier.
propertiesThe list of properties.
Exceptions:
TToiInvalidArgumentExceptionRaised if the directory identifier is invalid.
void ToiAssetManagerService::removeMultiValuedPropertyValue ( in TToiAssetId  id,
in ToiAssetManagerServiceProperty  property 
) raises (TToiInvalidArgumentException, TToiNoDataException, TToiNotEnoughResourcesException)

Removes a value from a property that is multi-valued.

Parameters:
idThe asset identifier.
propertyThe id/value pair of the property from which the corresponding value should be removed.
Exceptions:
TToiInvalidArgumentExceptionRaised if the asset identifier is invalid, or if a property identifier is invalid.
TToiNoDataExceptionRaised if no data can be accessed for the asset.
TToiNotEnoughResourcesExceptionRaised if the needed system resources are not accessible.
void ToiAssetManagerService::removeProperties ( in TToiAssetId  id,
in TToiPropertyIdSequence  properties 
) raises (TToiInvalidArgumentException, TToiNoDataException, TToiNotEnoughResourcesException)

Removes metadata properties for an asset. All values are erased whether a property has a single or multiple values, i.e., the property is completely removed.

Parameters:
idThe asset identifier.
propertiesThe properties to unset.
Exceptions:
TToiInvalidArgumentExceptionRaised if the asset identifier is invalid, or if a property identifier is invalid.
TToiNoDataExceptionRaised if no data can be accessed for the asset.
TToiNotEnoughResourcesExceptionRaised if the needed system resources are not accessible.
void ToiAssetManagerService::removePropertyDefinition ( in TToiPropertyId  propertyId) raises (TToiInvalidArgumentException)

Removes a user defined property, created using ToiAssetManagerService::createPropertyDefinition().

Parameters:
propertyIdThe identifier of the property to remove.
Exceptions:
TToiInvalidArgumentExceptionRaised if the property identifier is invalid or not a user defined property.
void ToiAssetManagerService::runCountQuery ( in ToiOperationManager::TToiOperationId  operationId,
in TToiQueryConditionSequence  queryConditions 
) raises (TToiInvalidArgumentException, TToiNotEnoughResourcesException)

Starts a query that finds the number of assets that match given conditions. This is an asynchronous operation. When application gets the ToiOperationOperationResultEvent with the operation result ToiAssetManagerService::OP_RESULT_LONG, then the application should get the result by calling the ToiAssetManagerService::getLongResult() function.

Parameters:
operationIdThe operation identifier created by ToiOperationManager
queryConditionsThe conditions that define the query to be executed. Only assets with matching properties will be counted.
Exceptions:
TToiInvalidArgumentExceptionRaised if any of the conditions are invalid, or raised if the operation identifier is illegal.
TToiNotEnoughResourcesExceptionRaised if it was not enough system resources to perform the query.
void ToiAssetManagerService::runQuery ( in ToiOperationManager::TToiOperationId  operationId,
in TToiQueryConditionSequence  queryConditions,
in TToiPropertyIdSequence  requestedProperties,
in TToiSortConditionSequence  sortConditions 
) raises (TToiInvalidArgumentException, TToiNotEnoughResourcesException)

Starts a query that finds assets that match given conditions. This is an asynchronous operation. When the application receives a ToiOperationOperationResultEvent call with the operation result ToiAssetManagerService::OP_RESULT_ASSET_INFO, then the application should get the results by calling the ToiAssetManagerService::getAssetInfoResult() function. The resulting ToiAssetManagerServiceAssetInfo will only include property values for the requested properties.

Parameters:
operationIdThe operation identifier created by ToiOperationManager
queryConditionsThe conditions that define the query to be executed. Only assets with matching properties will be in the result.
requestedPropertiesThe properties that will be part of the result.
sortConditionsDefines the sorting order for the result.
Exceptions:
TToiInvalidArgumentExceptionRaised if any of the conditions are invalid, or raised if the operation identifier is illegal.
TToiNotEnoughResourcesExceptionRaised if it was not enough system resources to perform the query.
void ToiAssetManagerService::runQueryForDirectory ( in ToiOperationManager::TToiOperationId  operationId,
in TToiDirectoryId  directoryId,
in TToiQueryConditionSequence  queryConditions,
in TToiPropertyIdSequence  requestedProperties,
in TToiSortConditionSequence  sortConditions 
) raises (TToiInvalidArgumentException, TToiNotEnoughResourcesException)

Starts a query that finds assets in the specified directory that match given conditions. This is an asynchronous operation. When the application receives a ToiOperationOperationResultEvent call with the operation result ToiAssetManagerService::OP_RESULT_ASSET_INFO, then the application should get the results by calling the ToiAssetManagerService::getAssetInfoResult() function. The resulting ToiAssetManagerServiceAssetInfo will only include property values for the requested properties.

Parameters:
operationIdThe operation identifier created by ToiOperationManager
directoryIdThe directory which assets will be matched.
queryConditionsThe conditions that define the query to be executed. Only assets with matching properties will be in the result.
requestedPropertiesThe properties that will be part of the result.
sortConditionsDefines the sorting order for the result.
Exceptions:
TToiInvalidArgumentExceptionRaised if any of the conditions are invalid, or raised if the operation identifier is illegal.
TToiNotEnoughResourcesExceptionRaised if it was not enough system resources to perform the query.
void ToiAssetManagerService::setDirectoryProperties ( in TToiDirectoryId  dirId,
in TToiPropertySequence  properties 
) raises (TToiInvalidArgumentException)

Sets the properties for a directory.

Parameters:
dirIdThe directory identifier.
propertiesThe list of properties.
Exceptions:
TToiInvalidArgumentExceptionRaised if the directory identifier is invalid.
void ToiAssetManagerService::setProperties ( in TToiAssetId  id,
in TToiPropertySequence  properties 
) raises (TToiInvalidArgumentException, TToiNoDataException, TToiNotEnoughResourcesException)

Sets metadata property values for an asset. For properties that supports multiple values, any values set with this method are added to existing values.

Parameters:
idThe asset identifier.
propertiesThe properties to set data for.
Exceptions:
TToiInvalidArgumentExceptionRaised if the asset identifier is invalid, or if a property identifier is invalid.
TToiNoDataExceptionRaised if no data can be read for the asset.
TToiNotEnoughResourcesExceptionRaised if the needed system resources are not accessible.
void ToiAssetManagerService::unlinkAssets ( in TToiDirectoryId  dirId,
in TToiAssetIdSequence  assetIds 
) raises (TToiInvalidArgumentException)

Removes the links from some assets to a directory.

Parameters:
dirIdThe directory to unlink the assets from.
assetIdsThe assets to unlink.
Exceptions:
TToiInvalidArgumentExceptionRaised if the directory is identifier.

Member Data Documentation

Identifier for audio asset type, NOT YET SUPPORTED.

This constant can also be accessed from toi.consts.ToiAssetManagerService.ASSET_AUDIO.

Identifier for image asset type

This constant can also be accessed from toi.consts.ToiAssetManagerService.ASSET_IMAGE.

Identifier for recording asset type

This constant can also be accessed from toi.consts.ToiAssetManagerService.ASSET_PVR.

Identifier for video (non-recording) asset type, NOT YET SUPPORTED.

This constant can also be accessed from toi.consts.ToiAssetManagerService.ASSET_VIDEO.

Contains specified value or matching pattern

This constant can also be accessed from toi.consts.ToiAssetManagerService.CONTAINS.

Equal operation, ==

This constant can also be accessed from toi.consts.ToiAssetManagerService.EQUALS.

Greater operation, >

This constant can also be accessed from toi.consts.ToiAssetManagerService.GREATER.

Greater than or equal operation, >=

This constant can also be accessed from toi.consts.ToiAssetManagerService.GREATER_OR_EQUAL.

Import asset by copying the source. The source is kept.

This constant can also be accessed from toi.consts.ToiAssetManagerService.IMPORT_POLICY_COPY.

Import asset by moving the source. The source is deleted.

This constant can also be accessed from toi.consts.ToiAssetManagerService.IMPORT_POLICY_MOVE.

Asset has been damaged and could not be repaired. The asset can not be played.

This constant can also be accessed from toi.consts.ToiAssetManagerService.INTEGRITY_COULD_NOT_REPAIR.

Asset seems to be of an old version but could not be upgraded. The asset can not be played.

This constant can also be accessed from toi.consts.ToiAssetManagerService.INTEGRITY_COULD_NOT_UPGRADE.

Integrity is ok.

This constant can also be accessed from toi.consts.ToiAssetManagerService.INTEGRITY_OK.

Integrity is unknown.

This constant can also be accessed from toi.consts.ToiAssetManagerService.INTEGRITY_UNKNOWN.

Less operation, <

This constant can also be accessed from toi.consts.ToiAssetManagerService.LESS.

Less than or equal operation, <=

This constant can also be accessed from toi.consts.ToiAssetManagerService.LESS_OR_EQUAL.

Not equal operation, !=

This constant can also be accessed from toi.consts.ToiAssetManagerService.NOT_EQUAL.

This is an Event identifier for ToiAssetManagerAssetStorageAddedEvent.

This constant can also be accessed from toi.consts.ToiAssetManagerService.ON_ASSET_STORAGE_ADDED.

This is an Event identifier for ToiAssetManagerAssetStorageRemovedEvent.

This constant can also be accessed from toi.consts.ToiAssetManagerService.ON_ASSET_STORAGE_REMOVED.

This is an Event identifier for ToiAssetManagerAssetsAddedEvent.

This constant can also be accessed from toi.consts.ToiAssetManagerService.ON_ASSETS_ADDED.

This is an Event identifier for ToiAssetManagerAssetsChangedEvent.

This constant can also be accessed from toi.consts.ToiAssetManagerService.ON_ASSETS_CHANGED.

This is an Event identifier for ToiAssetManagerAssetsRemovedEvent.

This constant can also be accessed from toi.consts.ToiAssetManagerService.ON_ASSETS_REMOVED.

This is an Event identifier for ToiAssetManagerDirectoriesAddedEvent.

This constant can also be accessed from toi.consts.ToiAssetManagerService.ON_DIRECTORIES_ADDED.

This is an Event identifier for ToiAssetManagerDirectoriesChangedEvent.

This constant can also be accessed from toi.consts.ToiAssetManagerService.ON_DIRECTORIES_CHANGED.

This is an Event identifier for ToiAssetManagerDirectoriesRemovedEvent.

This constant can also be accessed from toi.consts.ToiAssetManagerService.ON_DIRECTORIES_REMOVED.

The asynchronous operation has asset info as result. See ToiAssetManagerService::getAssetInfoResult().

This constant can also be accessed from toi.consts.ToiAssetManagerService.OP_RESULT_ASSET_INFO.

The asynchronous operation has a long value as result. See ToiAssetManagerService::getLongResult().

This constant can also be accessed from toi.consts.ToiAssetManagerService.OP_RESULT_LONG.

const string ToiAssetManagerService::PROPERTY_INFO_CHANNELNAME = "info.channelname"

Property name for the channel name of a recorded asset.

This constant can also be accessed from toi.consts.ToiAssetManagerService.PROPERTY_INFO_CHANNELNAME.

const string ToiAssetManagerService::PROPERTY_INFO_CHILDREN = "info.children"

Property name for a list of assets which will be removed automatically when the asset is removed. Relevant for all asset types.

This constant can also be accessed from toi.consts.ToiAssetManagerService.PROPERTY_INFO_CHILDREN.

const string ToiAssetManagerService::PROPERTY_INFO_COVER = "info.cover"

Property name for the cover image associated with an asset.

This constant can also be accessed from toi.consts.ToiAssetManagerService.PROPERTY_INFO_COVER.

const string ToiAssetManagerService::PROPERTY_INFO_DATE = "info.date"

Property name for the start time of an asset.

This constant can also be accessed from toi.consts.ToiAssetManagerService.PROPERTY_INFO_DATE.

const string ToiAssetManagerService::PROPERTY_INFO_DESCRIPTION = "info.description"

Property name for the description of an asset.

This constant can also be accessed from toi.consts.ToiAssetManagerService.PROPERTY_INFO_DESCRIPTION.

const string ToiAssetManagerService::PROPERTY_INFO_LONGDESCRIPTION = "info.longdescription"

Property name for an even more detailed description of an asset.

This constant can also be accessed from toi.consts.ToiAssetManagerService.PROPERTY_INFO_LONGDESCRIPTION.

const string ToiAssetManagerService::PROPERTY_INFO_LOST_AND_FOUND = "info.lostandfound"

Property name for the lost and found flag. If this flag is set the asset has been created from a lost asset by the platform. This can happen if the asset has been updated from a legacy version or if the database has been damaged. Relevant for all asset types.

This constant can also be accessed from toi.consts.ToiAssetManagerService.PROPERTY_INFO_LOST_AND_FOUND.

const string ToiAssetManagerService::PROPERTY_INFO_MATURITYRATING = "info.maturityrating"

Property name for the maturity rating of an asset.

This constant can also be accessed from toi.consts.ToiAssetManagerService.PROPERTY_INFO_MATURITYRATING.

const string ToiAssetManagerService::PROPERTY_INFO_RECORDINGSTATUS = "info.recordingstatus"

Property name for the status of a recorded asset. Recommended values are: recording|completed|failed

This constant can also be accessed from toi.consts.ToiAssetManagerService.PROPERTY_INFO_RECORDINGSTATUS.

const string ToiAssetManagerService::PROPERTY_INFO_SHARED = "info.shared"

Property name for the flag indicating that the asset or directory shall be exposed and shared with other devices in the home network if DMS support is activated.

This constant can also be accessed from toi.consts.ToiAssetManagerService.PROPERTY_INFO_SHARED.

const string ToiAssetManagerService::PROPERTY_INFO_TITLE = "info.title"

Property name for the title of an asset.

This constant can also be accessed from toi.consts.ToiAssetManagerService.PROPERTY_INFO_TITLE.

const string ToiAssetManagerService::PROPERTY_SYSTEM_ASSETSTORAGE = "system.assetstorage"

Property that specifies the asset storage location to use for asset creation. See ToiAssetManagerService::createAssetFromProperties()

This constant can also be accessed from toi.consts.ToiAssetManagerService.PROPERTY_SYSTEM_ASSETSTORAGE.

const string ToiAssetManagerService::PROPERTY_SYSTEM_BUFFERLENGTH = "system.bufferlength"

Property that specifies the circular buffer length in seconds to use in recording mode ToiAssetManagerService::RECORDING_MODE_CIRCULAR. See ToiAssetManagerService::TToiAssetRecordingMode and ToiAssetManagerService::createAssetFromProperties(). There is a config variable named minimum-buffer-length that will be used if this property is less than minimum-buffer-length.

This constant can also be accessed from toi.consts.ToiAssetManagerService.PROPERTY_SYSTEM_BUFFERLENGTH.

const string ToiAssetManagerService::PROPERTY_SYSTEM_DURATION = "system.duration"

Property name for the time duration of an asset in seconds. Supported by all asset types except ASSET_IMAGE.

This constant can also be accessed from toi.consts.ToiAssetManagerService.PROPERTY_SYSTEM_DURATION.

const string ToiAssetManagerService::PROPERTY_SYSTEM_FILENAME = "system.filename"

Property name for the file name for imported assets (e.g. images). Supported by all asset types execpt ASSET_PVR.

This constant can also be accessed from toi.consts.ToiAssetManagerService.PROPERTY_SYSTEM_FILENAME.

const string ToiAssetManagerService::PROPERTY_SYSTEM_FILESIZE = "system.filesize"

Property name for the file size of an asset in bytes. Supported by all asset types.

This constant can also be accessed from toi.consts.ToiAssetManagerService.PROPERTY_SYSTEM_FILESIZE.

const string ToiAssetManagerService::PROPERTY_SYSTEM_INTEGRITY_STATUS = "system.integritystatus"

Property name for the integrity status of an asset. Supported by all asset types. See ToiAssetManagerService::TToiAssetIntegrityStatus for possible values.

This constant can also be accessed from toi.consts.ToiAssetManagerService.PROPERTY_SYSTEM_INTEGRITY_STATUS.

const string ToiAssetManagerService::PROPERTY_SYSTEM_PLAYBACKURI = "system.playbackuri"

Property name for the URI to use when starting playback of an asset. Supported by all asset types except ASSET_IMAGE.

This constant can also be accessed from toi.consts.ToiAssetManagerService.PROPERTY_SYSTEM_PLAYBACKURI.

const string ToiAssetManagerService::PROPERTY_SYSTEM_RECORDINGMODE = "system.recordingmode"

Property that specifies recording mode for assets of type ToiAssetManagerService::ASSET_PVR, default is ToiAssetManagerService::RECORDING_MODE_LINEAR. See ToiAssetManagerService::TToiAssetRecordingMode

This constant can also be accessed from toi.consts.ToiAssetManagerService.PROPERTY_SYSTEM_RECORDINGMODE.

const string ToiAssetManagerService::PROPERTY_SYSTEM_TYPE = "system.type"

Property name for the type of an asset. Supported by all asset types. See ToiAssetManagerService::TToiAssetType for possible values.

This constant can also be accessed from toi.consts.ToiAssetManagerService.PROPERTY_SYSTEM_TYPE.

A circular buffer recording.

This constant can also be accessed from toi.consts.ToiAssetManagerService.RECORDING_MODE_CIRCULAR.

Normal linear recording.

This constant can also be accessed from toi.consts.ToiAssetManagerService.RECORDING_MODE_LINEAR.

Identifier for the root directory.

This constant can also be accessed from toi.consts.ToiAssetManagerService.ROOT_DIRECTORY.

An asset identifier.

This constant can also be accessed from toi.consts.ToiAssetManagerService.TYPE_ASSETLINK.

Value of true/false.

This constant can also be accessed from toi.consts.ToiAssetManagerService.TYPE_BOOLEAN.

A positive integer value, seconds since the epoch.

This constant can also be accessed from toi.consts.ToiAssetManagerService.TYPE_DATE.

A signed integer value.

This constant can also be accessed from toi.consts.ToiAssetManagerService.TYPE_INTEGER.

Any string value.

This constant can also be accessed from toi.consts.ToiAssetManagerService.TYPE_STRING.