IOperationManager Interface Reference


Description

This is the part of the interface to the Operation Manager that is not public.

See also:
IToiOperationManager

import "IOperationManager.idl";

List of all members.

Public Member Functions

void RegisterObserverInternal (in string address) raises (TToiInvalidArgumentException, TToiNotEnoughResourcesException)
void CreateOperationInternal (in string userData, out TToiOperationId operationId) raises (TToiNotEnoughResourcesException)
void CreateOperation (in IToiApplicationService::TToiApplicationId applicationId, in string userData, out TToiOperationId operationId) raises (TToiNotEnoughResourcesException)
void CancelOperation (in TToiOperationId operationId) raises (TToiInvalidArgumentException)
void ReleaseOperation (in TToiOperationId operationId) raises (TToiInvalidArgumentException)
void GetOperationInfo (in TToiOperationId operationId, out TToiOperationInfo operationInfo) raises (TToiInvalidArgumentException)
void RegisterObserver (in IToiApplicationService::TToiApplicationId applicationId, in string address) raises (TToiInvalidArgumentException)
void ReleaseObserver (in string address) raises (TToiInvalidArgumentException)

Public Attributes

Operation error codes

Generic error codes defined for operations.

const TToiOperationError OP_ERROR_FAILED = -1
const TToiOperationError OP_ERROR_CANCELLED = -2
Operation results

const TToiOperationResult OP_RESULT_NONE = 0

Public Types

typedef TToiOperationId TOperationId
typedef TToiOperationResult TOperationResult
typedef TToiOperationError TOperationError
typedef TToiOperationState TOperationState
typedef TToiOperationInfo TOperationInfo
enum  TToiOperationState { OPERATION_PENDING, OPERATION_COMPLETED, OPERATION_FAILED }
typedef long TToiOperationId
typedef long TToiOperationResult
typedef long TToiOperationError
typedef long TToiPropertyId
typedef string TToiPropertyValue
typedef sequence< TToiPropertyTToiPropertySequence

Member Typedef Documentation

typedef long IToiOperationManager::TToiOperationError [inherited]

Type for operation errors.

typedef long IToiOperationManager::TToiOperationId [inherited]

Type for operation identifier.

Type for operation results.

typedef long IToiOperationManager::TToiPropertyId [inherited]

Identifier for a metadata property. This with TToiPropertyValue forms a key-value pair that is used by the TToiOperationInfo to provide additional information about operation informaiton .

Sequence of property tags.

typedef string IToiOperationManager::TToiPropertyValue [inherited]

Value for a metadata property. This with TToiPropertyId forms a key-value pair that is used by the TToiOperationInfo toprovide additional information about operation informaiton .


Member Enumeration Documentation

State identifier used to identify the operation state.

Enumerator:
OPERATION_PENDING 

Asynchronous operation is currently in progress.

OPERATION_COMPLETED 

Asynchronous operation has finished and completed the request.

OPERATION_FAILED 

Asynchronous operation has failed.


Member Function Documentation

void IToiOperationManager::CancelOperation ( in TToiOperationId  operationId  )  raises (TToiInvalidArgumentException) [inherited]

Requests an operation to stop execution.

Parameters:
operationId Operation identifier.
Exceptions:
TToiInvalidArgumentException Raised if any of the parameters to the call are invalid.
void IToiOperationManager::CreateOperation ( in IToiApplicationService::TToiApplicationId  applicationId,
in string  userData,
out TToiOperationId  operationId 
) raises (TToiNotEnoughResourcesException) [inherited]

Creates a new operation. The operation identifier is used when starting a asynchronous request. When the operation is completed the operation shall either be released by calling ReleaseOperation() or reused for another request.

Parameters:
applicationId The identifier of the application.
userData The user defined data to be passed as parameter for identification in all operation callbacks.
Return values:
operationId Operation identifier.
Exceptions:
TToiNotEnoughResourcesException Raised if too many operations are active and the system cannot create another operation.
void IOperationManager::CreateOperationInternal ( in string  userData,
out TToiOperationId  operationId 
) raises (TToiNotEnoughResourcesException)

This function works the same way as the CreateOperation in IToiOperationManager. It should be used by platform services since no application id is needed.

Parameters:
userData The user defined data to be passed as parameter for identification in all operation callbacks.
Return values:
operationId Operation identifier.
Exceptions:
TToiNotEnoughResourcesException Raised if too many operations are active and the system cannot create another operation.
void IToiOperationManager::GetOperationInfo ( in TToiOperationId  operationId,
out TToiOperationInfo  operationInfo 
) raises (TToiInvalidArgumentException) [inherited]

Returns information about given operation. This method is normally not useful for an application that is listening to operation events since the same information is provided in the callback.

In some circumstances it may still be relevant to use this method and that is when the application is using a polled approach to handle operation results instead of callbacks. But also if the application do not handle an incoming callback directly and want to get the latest updated operation information.

Parameters:
operationId Operation identifier.
Return values:
operationInfo The current operation information.
Exceptions:
TToiInvalidArgumentException Raised if any of the parameters to the call are invalid.
void IToiOperationManager::RegisterObserver ( in IToiApplicationService::TToiApplicationId  applicationId,
in string  address 
) raises (TToiInvalidArgumentException) [inherited]

Register an observer of type IToiOperationObserver. The observer will receive events sent by this IToiOperationManager instance.

Parameters:
applicationId The identifier of the observing application.
address The address where the IToiOperationManager can find an IToiOperationObserver interface.
Exceptions:
TToiInvalidArgumentException Raised if the specified address is invalid or if the application has already registered itself as an observer with the same address.
See also:
IToiOperationObserver
void IOperationManager::RegisterObserverInternal ( in string  address  )  raises (TToiInvalidArgumentException, TToiNotEnoughResourcesException)

This function works the same way as the RegisterObserver in IToiOperationManager. It should be used by platform services since no application id is needed.

Parameters:
address The address to the observer implementing the IToiOperationObserver interface.
Exceptions:
TToiInvalidArgumentException Raised if the specified address is invalid.
TToiNotEnoughResourcesException Raised if the system cannot allocate resources to handle the observer.
See also:
IToiOperationManager::RegisterObserver
IToiOperationObserver
void IToiOperationManager::ReleaseObserver ( in string  address  )  raises (TToiInvalidArgumentException) [inherited]

Release an observer previously registered with RegisterObserver.

Parameters:
address The address where the IToiOperationManager can find the registered IToiOperationObserver interface.
Exceptions:
TToiInvalidArgumentException Raised if the specified address is invalid.
See also:
IToiOperationObserver
void IToiOperationManager::ReleaseOperation ( in TToiOperationId  operationId  )  raises (TToiInvalidArgumentException) [inherited]

Releases any system resources associated with the operation and if needed cancels the operation as well. This method shall be called when the application is done with the operation and will use it no more.

Parameters:
operationId Operation identifier.
Exceptions:
TToiInvalidArgumentException Raised if any of the parameters to the call are invalid.

Member Data Documentation

Operation was canceled by user.

This constant can also be accessed from toi.consts.IToiOperationManager.OP_ERROR_CANCELLED.

Operation failed for unknown reason.

This constant can also be accessed from toi.consts.IToiOperationManager.OP_ERROR_FAILED.

The operation has no result. Can be used for operations that perform some action and only indicate progress, success and failure.

This constant can also be accessed from toi.consts.IToiOperationManager.OP_RESULT_NONE.