imaging/imagingfws/src/iclextproxystubutil.h
changeset 0 5752a19fdefe
equal deleted inserted replaced
-1:000000000000 0:5752a19fdefe
       
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef ICLEXTPROXYSTUBUTIL_H
       
    17 #define ICLEXTPROXYSTUBUTIL_H
       
    18 
       
    19 #include <icl/imageconversionextensionintf.h>
       
    20 
       
    21 // forward declarations
       
    22 class TExecuteCommandParamsBase;
       
    23 class TExecuteCommandParamsAsyncBase;
       
    24 class CThreadDecoderRelay;
       
    25 class CThreadEncoderRelay;
       
    26 class MFrameworkExtAsyncInterface;
       
    27 class CImageConvProxyBase;
       
    28 class CImageConvStubBase;
       
    29 class MImageConvExtensionThreadedSupport;
       
    30 
       
    31 /*
       
    32 Static class that creates client-side proxy and plugin-side stub objects
       
    33 required for marshalling data across the ICL framework.
       
    34 */
       
    35 class ProxyStubUtility
       
    36 	{
       
    37 public:
       
    38 	static CImageConvProxyBase* GetNewProxyL(TUid aUid, MImageConvExtensionThreadedSupport* aParent);
       
    39 	static CImageConvProxyBase* GetNewStraightProxyL(TUid aUid, MFrameworkExtAsyncInterface* aStatusOwner,
       
    40 												  	 RThread& aRequestThread);
       
    41 	static CImageConvStubBase* NewStubL(TUid aUid,
       
    42 										MImageConvExtension* aExtension,
       
    43 										MFrameworkExtAsyncInterface* aStatusOwner,
       
    44 										RThread& aRequestThread);
       
    45 	};
       
    46 
       
    47 /*
       
    48 Used by the proxy/stub to identify the function call implementation of the
       
    49 MImageConvExtension interface.
       
    50 */
       
    51 enum TImgConvExtCmd
       
    52 	{
       
    53 	EImgConvExtUid = 0,
       
    54 	EImgConvExtIncrementRef = 1,
       
    55 	EImgConvExtRelease = 2
       
    56 	};
       
    57 
       
    58 /*
       
    59 Used by the proxy/stub to identify the function call implementation of the
       
    60 MImageConvOperation interface.
       
    61 */
       
    62 enum TImgConvTransformExtCmd
       
    63 	{
       
    64 	EImgConvExtCapabilities = EImgConvExtRelease+1,
       
    65 	EImgConvExtAddOperationL = EImgConvExtRelease+2,
       
    66 	EImgConvExtClearOperationStack = EImgConvExtRelease+3
       
    67 	};
       
    68 
       
    69 /*
       
    70 Used by the proxy/stub to identify the function call implementation of the
       
    71 MImageConvScaler interface.
       
    72 */
       
    73 enum TImgConvScalerExtCmd
       
    74 	{
       
    75 	EImgConvExtGetCapabilitiesScaler = EImgConvExtRelease+1,
       
    76 	EImgConvExtSetScalingLSize = EImgConvExtRelease+2,
       
    77 	EImgConvExtSetScalingLCoeff = EImgConvExtRelease+3
       
    78 	};
       
    79 	
       
    80 /*
       
    81 Used by the proxy/stub to identify the function call implementation of the
       
    82 MImageConvStreamedDecode interface.
       
    83 */
       
    84 enum TImgConvStreamedDecodeExtCmd
       
    85 	{
       
    86 	EImgConvExtGetBlocks = EImgConvExtRelease+1,
       
    87 	EImgConvExtGetBufferSize = EImgConvExtRelease+2,
       
    88 	EImgConvExtGetNextBlocks = EImgConvExtRelease+3,
       
    89 	EImgConvExtGetCapabilitiesStreamDec = EImgConvExtRelease+4,
       
    90 	EImgConvExtGetSupportedFormatsLStreamDec = EImgConvExtRelease+5,
       
    91 	EImgConvExtInitFrameLStreamDec = EImgConvExtRelease+6
       
    92 	};
       
    93 	
       
    94 /*
       
    95 Used by the proxy/stub to identify the function call implementation of the
       
    96 MImageConvStreamedEncode interface.
       
    97 */
       
    98 enum TImgConvStreamedEncodeExtCmd
       
    99 	{
       
   100 	EImgConvExtGetSupportedFormatsLStreamEnc = EImgConvExtRelease+1,
       
   101 	EImgConvExtGetCapabilitiesStreamEnc = EImgConvExtRelease+2,
       
   102 	EImgConvExtInitFrameLStreamEnc = EImgConvExtRelease+3,
       
   103 	EImgConvExtAppendBlocks = EImgConvExtRelease+4,
       
   104 	EImgConvExtAddBlocks = EImgConvExtRelease+5,
       
   105 	EImgConvExtComplete = EImgConvExtRelease+6
       
   106 	};
       
   107 
       
   108 /*
       
   109 Used by the proxy/stub to identify the function call implementation of the
       
   110 MImageConvPrepare interface.
       
   111 */
       
   112 enum TImgConvPrepareExtCmd
       
   113 	{
       
   114 	EImgConvExtPrepare = EImgConvExtRelease+1
       
   115 	};
       
   116 	
       
   117 /*
       
   118 Abstract class that all Proxy classes inherit from.  Permits the
       
   119 CImageConvExtensionCache to cleanup the Proxys correctly.
       
   120 
       
   121 @see CImageConvExtensionCache
       
   122 */
       
   123 NONSHARABLE_CLASS( CImageConvProxyBase ) : public CBase
       
   124 	{
       
   125 public:
       
   126 	virtual ~CImageConvProxyBase() {};
       
   127 	virtual void SetupExtension(MImageConvExtension*& aExtension) = 0;
       
   128 	};
       
   129 
       
   130 /*
       
   131 Abstract class that all Stub classes inherit from.  Permits the
       
   132 CSubThreadEncoderRelay to cleanup the Stubs correctly.
       
   133 
       
   134 @see CSubThreadEncoderRelay
       
   135 */
       
   136 NONSHARABLE_CLASS( CImageConvStubBase ) : public CBase
       
   137 	{
       
   138 public:
       
   139 	virtual TUid Uid() const = 0;
       
   140 	virtual void HandleExecuteCommandL(TExecuteCommandParamsBase& aExecuteCommandBase) = 0;
       
   141 	virtual void HandleExecuteAsyncCommand(TExecuteCommandParamsAsyncBase& aExecuteCommandBase) = 0;
       
   142 	};
       
   143 
       
   144 /*
       
   145 Supports ICL client side extensions in calling the plugin-side
       
   146 MImageConvOperation implementation.
       
   147 
       
   148 Used only in the single-threaded operations.
       
   149 
       
   150 @see MImageConvOperation
       
   151 */
       
   152 NONSHARABLE_CLASS( CImageConvOperationStraightProxy ) :	public CImageConvProxyBase,
       
   153 								 						public MImageConvOperation
       
   154 	{
       
   155 public:
       
   156 	static CImageConvOperationStraightProxy* NewL(MFrameworkExtAsyncInterface* aStatusOwner, RThread& aRequestThread);
       
   157 	~CImageConvOperationStraightProxy();
       
   158 	
       
   159 	// From CImageConvProxyBase
       
   160 	void SetupExtension(MImageConvExtension*& aExtension);
       
   161 	
       
   162 	// From MImageConvOperation
       
   163 	TUid Uid() const;
       
   164 	void IncrementRef();
       
   165 	void Release();
       
   166 	TUint Capabilities() const;
       
   167 	void AddOperationL(TImageConvOperation::TOperation aOperation);
       
   168 	void ClearOperationStack();
       
   169 
       
   170 private:
       
   171 	CImageConvOperationStraightProxy(MFrameworkExtAsyncInterface* aStatusOwner, RThread& aRequestThread);
       
   172 	
       
   173 private:
       
   174 	MImageConvOperation* iExtension;
       
   175 	MFrameworkExtAsyncInterface* iStatusOwner;
       
   176 	RThread* iThread;
       
   177 	};	
       
   178 
       
   179 /*
       
   180 Supports ICL client side extensions in calling the plugin-side
       
   181 MImageConvOperation implementation.
       
   182 
       
   183 Used only in the threaded operations.
       
   184 
       
   185 @see MImageConvOperation
       
   186 @see CImageConvOperationStub
       
   187 */
       
   188 NONSHARABLE_CLASS( CImageConvOperationProxy ) :	public CImageConvProxyBase,
       
   189 								 				public MImageConvOperation
       
   190 	{
       
   191 public:
       
   192 	static CImageConvOperationProxy* NewL(MImageConvExtensionThreadedSupport* aParent);
       
   193 	
       
   194 	// From CImageConvProxyBase
       
   195 	void SetupExtension(MImageConvExtension*& aExtension);
       
   196 	
       
   197 	// From MImageConvOperation
       
   198 	TUid Uid() const;
       
   199 	void IncrementRef();
       
   200 	void Release();
       
   201 	TUint Capabilities() const;
       
   202 	void AddOperationL(TImageConvOperation::TOperation aOperation);
       
   203 	void ClearOperationStack();
       
   204 
       
   205 private:
       
   206 	explicit CImageConvOperationProxy(MImageConvExtensionThreadedSupport* aParent);
       
   207 	
       
   208 private:
       
   209 	MImageConvExtensionThreadedSupport* iParent;
       
   210 	};
       
   211 
       
   212 /*
       
   213 Plugin-side stub class that relays calls from the operation proxy to the
       
   214 MImageConvOperation implementation.
       
   215 
       
   216 Used only in the threaded operations.
       
   217 
       
   218 @see MImageConvOperation
       
   219 @see CImageConvOperationProxy
       
   220 */
       
   221 NONSHARABLE_CLASS( CImageConvOperationStub ) :	public CImageConvStubBase
       
   222 	{	
       
   223 public:
       
   224 	static CImageConvOperationStub* NewL(MImageConvExtension* aExtension, MFrameworkExtAsyncInterface* aStatusOwner, RThread& aRequestThread);
       
   225 	~CImageConvOperationStub();
       
   226 	
       
   227 	// From CImageConvStubBase
       
   228 	TUid Uid() const;
       
   229 	void HandleExecuteCommandL(TExecuteCommandParamsBase& aExecuteCommandBase);
       
   230 	void HandleExecuteAsyncCommand(TExecuteCommandParamsAsyncBase& aExecuteCommandBase);
       
   231 
       
   232 private:
       
   233 	explicit CImageConvOperationStub(MImageConvExtension* aExtension, MFrameworkExtAsyncInterface* aStatusOwner, RThread& aRequestThread);
       
   234 	
       
   235 private:
       
   236 	MImageConvOperation* iExtension;
       
   237 	MFrameworkExtAsyncInterface* iStatusOwner;
       
   238 	RThread* iThread;
       
   239 	};
       
   240 
       
   241 /*
       
   242 
       
   243 Supports ICL client side extensions in calling the plugin-side
       
   244 MImageConvScaler implementation.
       
   245 
       
   246 Used only in the single-threaded operations.
       
   247 
       
   248 @see MImageConvScaler
       
   249 */
       
   250 NONSHARABLE_CLASS( CImageConvScalerStraightProxy ) : public CImageConvProxyBase, 
       
   251 							  				 		 public MImageConvScaler
       
   252 	{
       
   253 public:
       
   254 	static CImageConvScalerStraightProxy* NewL(MFrameworkExtAsyncInterface* aStatusOwner, RThread& aRequestThread);
       
   255 	~CImageConvScalerStraightProxy();
       
   256 	
       
   257 	// From CImageConvProxyBase
       
   258 	void SetupExtension(MImageConvExtension*& aExtension);
       
   259 	
       
   260 	// From MImageConvScaler
       
   261 	TUid Uid() const;
       
   262 	void IncrementRef();
       
   263 	void Release();
       
   264 	void GetCapabilities(TScalerCaps& aCaps) const;
       
   265 	void SetScalingL(const TSize& aDesiredSize, TImageConvScaler::TScalerQuality aQuality, TBool aLockAspectRatio);
       
   266 	void SetScalingL(TInt aScalingCoeff, TImageConvScaler::TScalerQuality aScalingQuality);
       
   267 
       
   268 private:
       
   269 	CImageConvScalerStraightProxy(MFrameworkExtAsyncInterface* aStatusOwner, RThread& aRequestThread);
       
   270 	
       
   271 private:
       
   272 	MImageConvScaler* iExtension;
       
   273 	MFrameworkExtAsyncInterface* iStatusOwner;
       
   274 	RThread* iThread;
       
   275 	};
       
   276 
       
   277 /*
       
   278 Supports ICL client side extensions in calling the plugin-side
       
   279 MImageConvScaler implementation.
       
   280 
       
   281 Used only in the threaded operations.
       
   282 
       
   283 @see MImageConvScaler
       
   284 @see CImageConvScalerStub
       
   285 */
       
   286 NONSHARABLE_CLASS( CImageConvScalerProxy ) : public CImageConvProxyBase, 
       
   287 							  				 public MImageConvScaler
       
   288 	{
       
   289 public:
       
   290 	static CImageConvScalerProxy* NewL(MImageConvExtensionThreadedSupport* aParent);
       
   291 	
       
   292 	// From CImageConvProxyBase
       
   293 	void SetupExtension(MImageConvExtension*& aExtension);
       
   294 	
       
   295 	// From MImageConvScaler
       
   296 	TUid Uid() const;
       
   297 	void IncrementRef();
       
   298 	void Release();
       
   299 	void GetCapabilities(TScalerCaps& aCaps) const;
       
   300 	void SetScalingL(const TSize& aDesiredSize, TImageConvScaler::TScalerQuality aQuality, TBool aLockAspectRatio);
       
   301 	void SetScalingL(TInt aScalingCoeff, TImageConvScaler::TScalerQuality aScalingQuality);
       
   302 
       
   303 private:
       
   304 	explicit CImageConvScalerProxy(MImageConvExtensionThreadedSupport* aParent);
       
   305 	
       
   306 private:
       
   307 	MImageConvExtensionThreadedSupport* iParent;
       
   308 	};
       
   309 
       
   310 /*
       
   311 Plugin-side stub class that relays calls from the scaler proxy to the
       
   312 MImageConvScaler implementation.
       
   313 
       
   314 Used only in the threaded operations.
       
   315 
       
   316 @see MImageConvScaler
       
   317 @see CImageConvScalerProxy
       
   318 */
       
   319 NONSHARABLE_CLASS( CImageConvScalerStub ) :	public CImageConvStubBase
       
   320 	{	
       
   321 public:
       
   322 	static CImageConvScalerStub* NewL(MImageConvExtension* aExtension, MFrameworkExtAsyncInterface* aStatusOwner, RThread& aRequestThread);
       
   323 	~CImageConvScalerStub();
       
   324 	
       
   325 	// From CImageConvStubBase
       
   326 	TUid Uid() const;
       
   327 	void HandleExecuteCommandL(TExecuteCommandParamsBase& aExecuteCommandBase);
       
   328 	void HandleExecuteAsyncCommand(TExecuteCommandParamsAsyncBase& aExecuteCommandBase);
       
   329 
       
   330 private:
       
   331 	explicit CImageConvScalerStub(MImageConvExtension* aExtension, MFrameworkExtAsyncInterface* aStatusOwner, RThread& aRequestThread);
       
   332 	
       
   333 private:
       
   334 	MImageConvScaler* iExtension;
       
   335 	MFrameworkExtAsyncInterface* iStatusOwner;
       
   336 	RThread* iThread;
       
   337 	};
       
   338 
       
   339 /*
       
   340 Supports ICL client side extensions in calling the plugin-side
       
   341 MImageConvStreamedDecode implementation.
       
   342 
       
   343 Used only in the single-threaded operations.
       
   344 
       
   345 @see MImageConvStreamedDecode
       
   346 */
       
   347 NONSHARABLE_CLASS( CImageConvStreamedDecodeStraightProxy ) : public CImageConvProxyBase,
       
   348 									  				 		 public MImageConvStreamedDecode
       
   349 	{
       
   350 public:
       
   351 	static CImageConvStreamedDecodeStraightProxy* NewL(MFrameworkExtAsyncInterface* aStatusOwner, RThread& aRequestThread);
       
   352 	~CImageConvStreamedDecodeStraightProxy();
       
   353 	
       
   354 	// From CImageConvProxyBase
       
   355 	void SetupExtension(MImageConvExtension*& aExtension);
       
   356 	
       
   357 	// From MImageConvStreamedDecode
       
   358 	TUid Uid() const;
       
   359 	void IncrementRef();
       
   360 	void Release();
       
   361 	void GetSupportedFormatsL(RArray<TUid>& aFormats, TUid& aOptimalFormat) const;
       
   362 	void GetCapabilities(TUid aFormat, TInt aFrameNumber, TDecodeStreamCaps& aCaps) const;
       
   363 	TInt GetBufferSize(TUid aFormat, TSize& aBlockSizeInPixels, TInt aNumBlocks) const;
       
   364 	void InitFrameL(TUid aFormat, TInt aFrameNumber, TDecodeStreamCaps::TNavigation aNavigation);
       
   365 	void GetBlocks(TRequestStatus* aStatus, CImageFrame* aFrame, TInt aSeqPosition, TInt aNumBlocksToGet, TInt* aNumBlocksRead);
       
   366 	void GetNextBlocks(TRequestStatus* aStatus, CImageFrame* aFrame, TInt aNumBlocksToGet, TInt* aNumBlocksRead, TBool* aHaveMoreBlocks);
       
   367 
       
   368 private:
       
   369 	CImageConvStreamedDecodeStraightProxy(MFrameworkExtAsyncInterface* aStatusOwner, RThread& aRequestThread);
       
   370 	
       
   371 private:
       
   372 	MImageConvStreamedDecode* iExtension;
       
   373 	MFrameworkExtAsyncInterface* iStatusOwner;
       
   374 	RThread* iThread;
       
   375 	};
       
   376 
       
   377 /*
       
   378 Supports ICL client side extensions in calling the plugin-side
       
   379 MImageConvStreamedDecode implementation.
       
   380 
       
   381 Used only in the threaded operations.
       
   382 
       
   383 @see MImageConvStreamedDecode
       
   384 @see CImageConvStreamedDecodeStub
       
   385 */
       
   386 NONSHARABLE_CLASS( CImageConvStreamedDecodeProxy ) : public CImageConvProxyBase,
       
   387 									  				 public MImageConvStreamedDecode
       
   388 	{
       
   389 public:
       
   390 	static CImageConvStreamedDecodeProxy* NewL(MImageConvExtensionThreadedSupport* aParent);
       
   391 	
       
   392 	// From CImageConvProxyBase
       
   393 	void SetupExtension(MImageConvExtension*& aExtension);	
       
   394 	
       
   395 	// From MImageConvStreamedDecode
       
   396 	TUid Uid() const;
       
   397 	void IncrementRef();
       
   398 	void Release();
       
   399 	void GetSupportedFormatsL(RArray<TUid>& aFormats, TUid& aOptimalFormat) const;
       
   400 	void GetCapabilities(TUid aFormat, TInt aFrameNumber, TDecodeStreamCaps& aCaps) const;
       
   401 	TInt GetBufferSize(TUid aFormat, TSize& aBlockSizeInPixels, TInt aNumBlocks) const;
       
   402 	void InitFrameL(TUid aFormat, TInt aFrameNumber, TDecodeStreamCaps::TNavigation aNavigation);
       
   403 	void GetBlocks(TRequestStatus* aStatus, CImageFrame* aFrame, TInt aSeqPosition, TInt aNumBlocksToGet, TInt* aNumBlocksRead);
       
   404 	void GetNextBlocks(TRequestStatus* aStatus, CImageFrame* aFrame, TInt aNumBlocksToGet, TInt* aNumBlocksRead, TBool* aHaveMoreBlocks);
       
   405 
       
   406 private:
       
   407 	explicit CImageConvStreamedDecodeProxy(MImageConvExtensionThreadedSupport* aParent);
       
   408 	
       
   409 private:
       
   410 	MImageConvExtensionThreadedSupport* iParent;
       
   411 	};
       
   412 
       
   413 /*
       
   414 Plugin-side stub class that relays calls from the streamed decode proxy to the
       
   415 MImageConvStreamedDecode implementation.
       
   416 
       
   417 Used only in the threaded operations.
       
   418 
       
   419 @see MImageConvStreamedDecode
       
   420 @see CImageConvStreamedDecodeProxy
       
   421 */
       
   422 NONSHARABLE_CLASS( CImageConvStreamedDecodeStub ) :	public CImageConvStubBase
       
   423 	{	
       
   424 public:
       
   425 	static CImageConvStreamedDecodeStub* NewL(MImageConvExtension* aExtension, MFrameworkExtAsyncInterface* aStatusOwner, RThread& aRequestThread);
       
   426 	~CImageConvStreamedDecodeStub();
       
   427 	
       
   428 	// From CImageConvStubBase
       
   429 	TUid Uid() const;
       
   430 	void HandleExecuteCommandL(TExecuteCommandParamsBase& aExecuteCommandBase);
       
   431 	void HandleExecuteAsyncCommand(TExecuteCommandParamsAsyncBase& aExecuteCommandBase);
       
   432 
       
   433 private:
       
   434 	explicit CImageConvStreamedDecodeStub(MImageConvExtension* aExtension, MFrameworkExtAsyncInterface* aStatusOwner, RThread& aRequestThread);
       
   435 	
       
   436 private:
       
   437 	MImageConvStreamedDecode* iExtension;
       
   438 	MFrameworkExtAsyncInterface* iStatusOwner;
       
   439 	RThread* iThread;
       
   440 	};
       
   441 	
       
   442 /*
       
   443 Supports ICL client side extensions in calling the plugin-side
       
   444 MImageConvStreamedEncode implementation.
       
   445 
       
   446 Used only in the single-threaded operations.
       
   447 
       
   448 @see MImageConvStreamedEncode
       
   449 */
       
   450 NONSHARABLE_CLASS( CImageConvStreamedEncodeStraightProxy ) : public CImageConvProxyBase,
       
   451 									  				 		 public MImageConvStreamedEncode
       
   452 	{
       
   453 public:
       
   454 	static CImageConvStreamedEncodeStraightProxy* NewL(MFrameworkExtAsyncInterface* aStatusOwner, RThread& aRequestThread);
       
   455 	~CImageConvStreamedEncodeStraightProxy();
       
   456 	
       
   457 	// From CImageConvProxyBase
       
   458 	void SetupExtension(MImageConvExtension*& aExtension);
       
   459 	
       
   460 	// From MImageConvStreamedEncode
       
   461 	TUid Uid() const;
       
   462 	void IncrementRef();
       
   463 	void Release();
       
   464 	void GetSupportedFormatsL(RArray<TUid>& aFormats, TUid& aOptimalFormat) const;
       
   465 	void GetCapabilities(TUid aFormat, TEncodeStreamCaps& aCaps) const;
       
   466 	void InitFrameL(TUid aFormat, TInt aFrameNumber, const TSize& aFrameSizeInPixels, const TSize& aBlockSizeInPixels, TEncodeStreamCaps::TNavigation aNavigation, const CFrameImageData* aFrameImageData);
       
   467 	void AppendBlocks(TRequestStatus* aStatus, const CImageFrame& aBlocks, TInt aNumBlocksToAdd);
       
   468 	void AddBlocks(TRequestStatus* aStatus, const CImageFrame& aBlocks, const TInt& aSeqPosition);
       
   469 	void Complete(TRequestStatus* aStatus);
       
   470 
       
   471 private:
       
   472 	CImageConvStreamedEncodeStraightProxy(MFrameworkExtAsyncInterface* aStatusOwner, RThread& aRequestThread);
       
   473 	
       
   474 private:
       
   475 	MImageConvStreamedEncode* iExtension;
       
   476 	MFrameworkExtAsyncInterface* iStatusOwner;
       
   477 	RThread* iThread;
       
   478 	};
       
   479 
       
   480 /*
       
   481 Supports ICL client side extensions in calling the plugin-side
       
   482 MImageConvStreamedEncode implementation.
       
   483 
       
   484 Used only in the threaded operations.
       
   485 
       
   486 @see MImageConvStreamedEncode
       
   487 @see CImageConvStreamedEncodeStub
       
   488 */
       
   489 NONSHARABLE_CLASS( CImageConvStreamedEncodeProxy ) : public CImageConvProxyBase,
       
   490 									  				 public MImageConvStreamedEncode
       
   491 	{
       
   492 public:
       
   493 	static CImageConvStreamedEncodeProxy* NewL(MImageConvExtensionThreadedSupport* aParent);
       
   494 
       
   495 	// From CImageConvProxyBase
       
   496 	void SetupExtension(MImageConvExtension*& aExtension);
       
   497 	
       
   498 	// From MImageConvStreamedEncode
       
   499 	TUid Uid() const;
       
   500 	void IncrementRef();
       
   501 	void Release();
       
   502 	void GetSupportedFormatsL(RArray<TUid>& aFormats, TUid& aOptimalFormat) const;
       
   503 	void GetCapabilities(TUid aFormat, TEncodeStreamCaps& aCaps) const;
       
   504 	void InitFrameL(TUid aFormat, TInt aFrameNumber, const TSize& aFrameSizeInPixels, const TSize& aBlockSizeInPixels, TEncodeStreamCaps::TNavigation aNavigation, const CFrameImageData* aFrameImageData);
       
   505 	void AppendBlocks(TRequestStatus* aStatus, const CImageFrame& aBlocks, TInt aNumBlocksToAdd);
       
   506 	void AddBlocks(TRequestStatus* aStatus, const CImageFrame& aBlocks, const TInt& aSeqPosition);
       
   507 	void Complete(TRequestStatus* aStatus);
       
   508 
       
   509 private:
       
   510 	explicit CImageConvStreamedEncodeProxy(MImageConvExtensionThreadedSupport* aParent);
       
   511 	
       
   512 private:
       
   513 	MImageConvExtensionThreadedSupport* iParent;
       
   514 	};
       
   515 
       
   516 /*
       
   517 Plugin-side stub class that relays calls from the streamed encode proxy to the
       
   518 MImageConvStreamedEncode implementation.
       
   519 
       
   520 Used only in the threaded operations.
       
   521 
       
   522 @see MImageConvStreamedEncode
       
   523 @see CImageConvStreamedEncodeProxy
       
   524 */
       
   525 NONSHARABLE_CLASS( CImageConvStreamedEncodeStub ) :	public CImageConvStubBase
       
   526 	{	
       
   527 public:
       
   528 	static CImageConvStreamedEncodeStub* NewL(MImageConvExtension* aExtension, MFrameworkExtAsyncInterface* aStatusOwner, RThread& aRequestThread);
       
   529 	~CImageConvStreamedEncodeStub();
       
   530 	
       
   531 	// From CImageConvStubBase
       
   532 	TUid Uid() const;
       
   533 	void HandleExecuteCommandL(TExecuteCommandParamsBase& aExecuteCommandBase);
       
   534 	void HandleExecuteAsyncCommand(TExecuteCommandParamsAsyncBase& aExecuteCommandBase);
       
   535 
       
   536 private:
       
   537 	explicit CImageConvStreamedEncodeStub(MImageConvExtension* aExtension, MFrameworkExtAsyncInterface* aStatusOwner, RThread& aRequestThread);
       
   538 	
       
   539 private:
       
   540 	MImageConvStreamedEncode* iExtension;
       
   541 	MFrameworkExtAsyncInterface* iStatusOwner;
       
   542 	RThread* iThread;
       
   543 	};
       
   544 
       
   545 /*
       
   546 Supports ICL client side extensions in calling the plugin-side
       
   547 MImageConvPrepare implementation.
       
   548 
       
   549 Used only in the single-threaded operations.
       
   550 
       
   551 @see MImageConvPrepare
       
   552 */
       
   553 NONSHARABLE_CLASS( CImageConvPrepareStraightProxy ) : public CImageConvProxyBase,
       
   554 									  				  public MImageConvPrepare
       
   555 	{
       
   556 public:
       
   557 	static CImageConvPrepareStraightProxy* NewL(MFrameworkExtAsyncInterface* aStatusOwner, RThread& aRequestThread);
       
   558 	~CImageConvPrepareStraightProxy();
       
   559 	
       
   560 	// From CImageConvProxyBase
       
   561 	void SetupExtension(MImageConvExtension*& aExtension);
       
   562 	
       
   563 	// From MImageConvPrepare
       
   564 	TUid Uid() const;
       
   565 	void IncrementRef();
       
   566 	void Release();
       
   567 	void Prepare(TRequestStatus* aStatus);
       
   568 
       
   569 private:
       
   570 	CImageConvPrepareStraightProxy(MFrameworkExtAsyncInterface* aStatusOwner, RThread& aRequestThread);
       
   571 	
       
   572 private:
       
   573 	MImageConvPrepare* iExtension;
       
   574 	MFrameworkExtAsyncInterface* iStatusOwner;
       
   575 	RThread* iThread;
       
   576 	};
       
   577 
       
   578 /*
       
   579 Supports ICL client side extensions in calling the plugin-side
       
   580 MImageConvPrepare implementation.
       
   581 
       
   582 Used only in the threaded operations.
       
   583 
       
   584 @see MImageConvPrepare
       
   585 @see CImageConvPrepareStub
       
   586 */
       
   587 NONSHARABLE_CLASS( CImageConvPrepareProxy ) : public CImageConvProxyBase,
       
   588 											  public MImageConvPrepare
       
   589 	{
       
   590 public:
       
   591 	static CImageConvPrepareProxy* NewL(MImageConvExtensionThreadedSupport* aParent);
       
   592 	
       
   593 	// From CImageConvProxyBase
       
   594 	void SetupExtension(MImageConvExtension*& aExtension);	
       
   595 	
       
   596 	// From MImageConvPrepare
       
   597 	TUid Uid() const;
       
   598 	void IncrementRef();
       
   599 	void Release();
       
   600 	void Prepare(TRequestStatus* aStatus);
       
   601 
       
   602 private:
       
   603 	explicit CImageConvPrepareProxy(MImageConvExtensionThreadedSupport* aParent);
       
   604 	
       
   605 private:
       
   606 	MImageConvExtensionThreadedSupport* iParent;
       
   607 	};
       
   608 
       
   609 /*
       
   610 Plugin-side stub class that relays calls from the Prepare proxy to the
       
   611 MImageConvPrepare implementation.
       
   612 
       
   613 Used only in the threaded operations.
       
   614 
       
   615 @see MImageConvPrepare
       
   616 @see CImageConvPrepareProxy
       
   617 */
       
   618 NONSHARABLE_CLASS( CImageConvPrepareStub ) :	public CImageConvStubBase
       
   619 	{	
       
   620 public:
       
   621 	static CImageConvPrepareStub* NewL(MImageConvExtension* aExtension, MFrameworkExtAsyncInterface* aStatusOwner, RThread& aRequestThread);
       
   622 	~CImageConvPrepareStub();
       
   623 	
       
   624 	// From CImageConvStubBase
       
   625 	TUid Uid() const;
       
   626 	void HandleExecuteCommandL(TExecuteCommandParamsBase& aExecuteCommandBase);
       
   627 	void HandleExecuteAsyncCommand(TExecuteCommandParamsAsyncBase& aExecuteCommandBase);
       
   628 
       
   629 private:
       
   630 	explicit CImageConvPrepareStub(MImageConvExtension* aExtension, MFrameworkExtAsyncInterface* aStatusOwner, RThread& aRequestThread);
       
   631 	
       
   632 private:
       
   633 	MImageConvPrepare* iExtension;
       
   634 	MFrameworkExtAsyncInterface* iStatusOwner;
       
   635 	RThread* iThread;
       
   636 	};
       
   637 
       
   638 #endif // ICLEXTPROXYSTUBUTIL_H