IToiOperationManager.idl

00001 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
00002  *--------------------------------------------------------------------
00003  *
00004  * IToiOperationManager.idl
00005  *
00006  * This file was created by the Motorola IDL backend, 
00007  * which is based on the OmniORB IDL parser.
00008  * Please do not modify.
00009  *
00010  * Copyright (c) 2009 Motorola Inc. All Rights Reserved.
00011  *
00012  *--------------------------------------------------------------------
00013  */
00014 
00015 #ifndef ITOIOPERATIONMANAGER_IDL
00016 #define ITOIOPERATIONMANAGER_IDL
00017 
00018 #include "TToiInvalidArgumentException.idl"
00019 #include "TToiNotEnoughResourcesException.idl"
00020 #include "TToiUnhandledValueException.idl"
00021 #include "IToiApplicationService.idl"
00022 
00023 #include "IToiApplicationService.idl"
00036 //@ [EventTarget(EventObserver=IToiOperationObserver)]
00037 
00038 interface IToiOperationManager {
00039 
00041   typedef long TToiOperationId;
00042   
00044   typedef long TToiOperationResult;
00045   
00047   typedef long TToiOperationError;
00048   
00054   
00059   const TToiOperationError OP_ERROR_FAILED = -1;
00060   
00065   const TToiOperationError OP_ERROR_CANCELLED = -2;
00066   
00068   
00073   typedef long TToiPropertyId;
00074   
00079   typedef string TToiPropertyValue;
00080   
00082   struct TToiProperty {
00084     IToiOperationManager::TToiPropertyId Id;
00086     IToiOperationManager::TToiPropertyValue Value;
00087   };
00088   
00090   typedef sequence < TToiProperty > TToiPropertySequence;
00091   
00094   enum TToiOperationState
00095   {
00096     
00099     //Value of OPERATION_PENDING = 0
00100     OPERATION_PENDING,
00101     
00104     //Value of OPERATION_COMPLETED = 1
00105     OPERATION_COMPLETED,
00106     
00109     //Value of OPERATION_FAILED = 2
00110     OPERATION_FAILED
00111   };
00113   struct TToiOperationInfo {
00115     IToiOperationManager::TToiOperationId Id;
00117     string UserData;
00119     IToiOperationManager::TToiOperationState State;
00122     long Progress;
00127     IToiOperationManager::TToiOperationError ErrorCode;
00130     //@ [Optional]
00131     IToiOperationManager::TToiPropertySequence Properties;
00132   };
00133   
00136   
00142   const TToiOperationResult OP_RESULT_NONE = 0;
00143   
00145   
00164   //@ [IgnoredApplicationId(Position=1)]
00165   
00166   
00167   void CreateOperation(in IToiApplicationService::TToiApplicationId applicationId, 
00168         in string userData, 
00169         out TToiOperationId operationId)
00170    raises (TToiNotEnoughResourcesException);
00171   
00183   void CancelOperation(in TToiOperationId operationId)
00184    raises (TToiInvalidArgumentException);
00185   
00199   void ReleaseOperation(in TToiOperationId operationId)
00200    raises (TToiInvalidArgumentException);
00201   
00223   void GetOperationInfo(in TToiOperationId operationId, 
00224         out TToiOperationInfo operationInfo)
00225    raises (TToiInvalidArgumentException);
00226   
00227   
00228   
00241   void RegisterObserver(in IToiApplicationService::TToiApplicationId applicationId,
00242                         in string address)
00243     raises (TToiInvalidArgumentException);
00244   
00253   void ReleaseObserver(in string address)
00254     raises (TToiInvalidArgumentException); 
00255   
00256 };
00257 
00258 #endif