Motorola Mobility Confidential Restricted.
ToiResourceService Interface Reference

Description

Technical Preview:
This interface is a TECHNICAL PREVIEW, it may change. This service expose the free system resources. This service is just for tracking the resources and notifying the application as and when there is any change in free resources through ToiResourceObserver.
Service:
This is a service and can be accessed through toi.resourceService

import "ToiResourceService.idl";

Inheritance diagram for ToiResourceService:
ToiEventTarget

List of all members.

Public Member Functions

TToiActivityInfoSequence getActivities ()
TToiActivityInfoSequence getSessionActivities (in ToiMediaSession::TToiSessionId sessionId) raises (TToiInvalidArgumentException)
TToiResourceInfoSequence getResources ()

Public Attributes

Events
const long ON_RESOURCES_ADDED = 1500
const long ON_RESOURCES_REMOVED = 1501
const long ON_RESOURCES_CHANGED = 1502
const long ON_ACTIVITIES_ADDED = 1503
const long ON_ACTIVITIES_REMOVED = 1504
TToiResource
const TToiResource RESOURCE_TUNER = 0
const TToiResource RESOURCE_NETWORK_INPUT = 1
const TToiResource RESOURCE_DECRYPTOR = 2
const TToiResource RESOURCE_DISK_READER = 3
const TToiResource RESOURCE_DISK_WRITER = 4
const TToiResource RESOURCE_NETWORK_OUTPUT = 5
TToiActivityType
const TToiActivityType ACTIVITY_PLAYER = 0
const TToiActivityType ACTIVITY_RECORDER = 1
const TToiActivityType ACTIVITY_DISTRIBUTOR = 2
const TToiActivityType ACTIVITY_STANDALONE = 3
TToiAvailability
const TToiAvailability AVAILABILITY_ALLOCATED = 0
const TToiAvailability AVAILABILITY_PARTLY_ALLOCATED = 1
const TToiAvailability AVAILABILITY_FREE = 2
TToiActivityState
const TToiActivityState STATE_ACTIVE = 0
const TToiActivityState STATE_INACTIVE = 1
TToiResourceType
const TToiResourceType RESOURCE_TYPE_ENUMERABLE = 0
const TToiResourceType RESOURCE_TYPE_DYNAMIC_POOL = 1
const TToiResourceType RESOURCE_TYPE_DYNAMIC_ALLOCATION = 2

Public Types

typedef long TToiResource
typedef long TToiActivityType
typedef long TToiAvailability
typedef string TToiResourceName
typedef sequence
< TToiResourceName
TToiResourceNameSequence
typedef long TToiActivityId
typedef sequence< TToiActivityIdTToiActivityIdSequence
typedef long TToiActivityState
typedef long TToiResourceType
typedef sequence
< ToiResourceServiceResourceInfo
TToiResourceInfoSequence
typedef sequence
< ToiResourceServiceActivityInfo
TToiActivityInfoSequence

Member Typedef Documentation

Activity identifier.

Sequence of activity identifiers.

State identifier used to identify the activity state.

Indicates the availability/Status of a resource.

Different kind of system resources.

Name of the resource.

Sequence of resource names.

Different types of resources.


Member Function Documentation

TToiActivityInfoSequence ToiResourceService::getActivities ( )

Get all the active activities.

Return values:
activitiesInformation of all the active activities.
TToiResourceInfoSequence ToiResourceService::getResources ( )

Get the information of all the system resources.

Return values:
resourcesAll available and allocated resources.
TToiActivityInfoSequence ToiResourceService::getSessionActivities ( in ToiMediaSession::TToiSessionId  sessionId) raises (TToiInvalidArgumentException)

Get list of activities in a session.

Parameters:
sessionIdSessionId of the session of which activity info is required.
Return values:
activitiesInformation of all the active activities.
Exceptions:
TToiInvalidArgumentExceptionRaised if SessionId is not valid.

Member Data Documentation

const TToiActivityType ToiResourceService::ACTIVITY_DISTRIBUTOR = 2

Distributor activity.

This constant can also be accessed from toi.consts.ToiResourceService.ACTIVITY_DISTRIBUTOR.

const TToiActivityType ToiResourceService::ACTIVITY_PLAYER = 0

Player activity.

This constant can also be accessed from toi.consts.ToiResourceService.ACTIVITY_PLAYER.

const TToiActivityType ToiResourceService::ACTIVITY_RECORDER = 1

Recorder activity.

This constant can also be accessed from toi.consts.ToiResourceService.ACTIVITY_RECORDER.

const TToiActivityType ToiResourceService::ACTIVITY_STANDALONE = 3

Activity to be used for Standalone sessions like Extended or consumer.

This constant can also be accessed from toi.consts.ToiResourceService.ACTIVITY_STANDALONE.

The resource is allocated. This state is currently used for resources of type ToiResourceService::RESOURCE_TYPE_ENUMERABLE and ToiResourceService::RESOURCE_TYPE_DYNAMIC_ALLOCATION, or when the resource can't be instantiated any more for resource of ToiResourceService::RESOURCE_TYPE_DYNAMIC_POOL.

This constant can also be accessed from toi.consts.ToiResourceService.AVAILABILITY_ALLOCATED.

The resource is free.

This constant can also be accessed from toi.consts.ToiResourceService.AVAILABILITY_FREE.

This state is only for the resource of type ToiResourceService::RESOURCE_TYPE_DYNAMIC_POOL to indicate that the resource is partly allocated. It means part of resource of type ToiResourceService::RESOURCE_TYPE_DYNAMIC_POOL is instantiated to type ToiResourceService::RESOURCE_TYPE_DYNAMIC_ALLOCATION, but quota is still available to permit more instantiations. When it is not possible to instantiate more, state of ToiResourceService::RESOURCE_TYPE_DYNAMIC_POOL changes to ToiResourceService::AVAILABILITY_ALLOCATED.

This constant can also be accessed from toi.consts.ToiResourceService.AVAILABILITY_PARTLY_ALLOCATED.

This is an Event identifier for ToiResourceActivitiesAddedEvent.

This constant can also be accessed from toi.consts.ToiResourceService.ON_ACTIVITIES_ADDED.

This is an Event identifier for ToiResourceActivitiesRemovedEvent.

This constant can also be accessed from toi.consts.ToiResourceService.ON_ACTIVITIES_REMOVED.

This is an Event identifier for ToiResourceResourcesAddedEvent.

This constant can also be accessed from toi.consts.ToiResourceService.ON_RESOURCES_ADDED.

This is an Event identifier for ToiResourceResourcesChangedEvent.

This constant can also be accessed from toi.consts.ToiResourceService.ON_RESOURCES_CHANGED.

This is an Event identifier for ToiResourceResourcesRemovedEvent.

This constant can also be accessed from toi.consts.ToiResourceService.ON_RESOURCES_REMOVED.

Decryptor resources.

This constant can also be accessed from toi.consts.ToiResourceService.RESOURCE_DECRYPTOR.

Disk reader resources.

This constant can also be accessed from toi.consts.ToiResourceService.RESOURCE_DISK_READER.

Disk writer resources.

This constant can also be accessed from toi.consts.ToiResourceService.RESOURCE_DISK_WRITER.

Network input resource.

This constant can also be accessed from toi.consts.ToiResourceService.RESOURCE_NETWORK_INPUT.

Network output resource.

This constant can also be accessed from toi.consts.ToiResourceService.RESOURCE_NETWORK_OUTPUT.

Tuner resource.

This constant can also be accessed from toi.consts.ToiResourceService.RESOURCE_TUNER.

A dynamic resource that is instantiated when a resource of type ToiResourceService::RESOURCE_TYPE_DYNAMIC_POOL is allocated.

This constant can also be accessed from toi.consts.ToiResourceService.RESOURCE_TYPE_DYNAMIC_ALLOCATION.

A non enumerable or dynamic resource pool. When a resource is allocated from this pool it will cause instantiation of dynamic resource of type ToiResourceService::RESOURCE_TYPE_DYNAMIC_ALLOCATION.

This constant can also be accessed from toi.consts.ToiResourceService.RESOURCE_TYPE_DYNAMIC_POOL.

Normal enumerable resource.

This constant can also be accessed from toi.consts.ToiResourceService.RESOURCE_TYPE_ENUMERABLE.

The activity has been granted resources and is active.

This constant can also be accessed from toi.consts.ToiResourceService.STATE_ACTIVE.

The activity has released all resources and is inactive.

This constant can also be accessed from toi.consts.ToiResourceService.STATE_INACTIVE.