Update contrib.
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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
21 #ifndef IMPLEMENTATIONFACTORYINTF_H
22 #define IMPLEMENTATIONFACTORYINTF_H
25 Union used to provide future flexibility if extra details are needed by the abstract factory methods.
30 union TECamImplFactoryParam
33 /** explicit constructor when the union is used to represent a TAny* parameter */
34 explicit TECamImplFactoryParam(TAny* aPtrParam);
36 /** explicit constructor when the union is used to represent a TInt parameter */
37 explicit TECamImplFactoryParam(TInt aIntParam);
39 /** explicit constructor when the union is used to represent a TUint parameter */
40 explicit TECamImplFactoryParam(TUint aUintParam);
43 /** union may represent a TAny* parameter in order to provide extra information for creating concrete implementation. */
45 /** union may represent a TInt parameter in order to provide extra information for creating concrete implementation. */
47 /** union may represent a TUint parameter in order to provide extra information for creating concrete implementation. */
52 Abstract Factory Class in order to derive different concrete factory class for image processing implementation specific to
53 VideoCapture and specific Viewfinder.
55 Also used to derive concrete factory class for snapshot implementation specific to image capture and video capture.
57 Also used to derive concrete factory class for histogram implementation specific to still image, video, snapshot or specific viewfinder.
59 This may be used in other possible cases as well.
64 class MImplementationFactory
69 Releases the interface.
71 virtual void Release() =0;
74 Provides implementation handle for different implementation products.
77 Retrieves pointer to specifc interface implementation as identified by the interface uid.
82 @return any defined error code.
84 @note KErrNone should be returned only when a valid interface pointer is there. Any other error code implies that
85 interface implementation pointer is NULL.
87 @note KErrNotSupported should be returned when the concrete interface implementation is not present.
89 @note The inferface pointer is retrieved only on the basis of interface uid passed.
90 Examples of 'interface implementation pointer' - 'interface uid' are as follows:-
91 MCameraImageProcessing* - KECamMCameraImageProcessingUid;
92 MCameraImageProcessing2* - KECamMCameraImageProcessing2Uid;
93 MCameraImageProcessing3* - KECamMCameraImageProcessing3Uid;
95 MCameraSnapshot* - KECamMCameraSnapshotUid;
96 MCameraSnapshot2* - KECamMCameraSnapshot2Uid;
98 MCameraV2Histogram* - KECamMCameraV2HistogramUid;
100 Many other pairs may be possible in future. For example when image processing API/ camera snapshot API/
101 histogram API is further extended.
102 Or when same concept is being used on other ECam related sub-component.
104 virtual TInt GetImpl(TAny*& aIfPtr, TUid aIfaceUid) const=0;
107 Overloaded method which helps in retrieving the appropriate implementation pointer
108 based on extra information provided through a single 'TECamImplFactoryParam'.
110 Provides implementation handle for different implementation products.
113 Retrieves pointer to specifc interface implementation as identified by the interface uid.
119 union used to provide extra information which could a TAny*, TInt or TUint.
123 @note The inferface pointer is retrieved only on the basis of interface uid passed.
124 Examples of 'interface implementation pointer' - 'interface uid' are as follows:-
125 MCameraImageProcessing* - KECamMCameraImageProcessingUid;
126 MCameraImageProcessing2* - KECamMCameraImageProcessing2Uid;
127 MCameraImageProcessing3* - KECamMCameraImageProcessing3Uid;
129 MCameraSnapshot* - KECamMCameraSnapshotUid;
130 MCameraSnapshot2* - KECamMCameraSnapshot2Uid;
132 MCameraV2Histogram* - KECamMCameraV2HistogramUid;
134 Many other pairs may be possible in future. For example when image processing API/ camera snapshot API/
135 histogram API is further extended.
136 Or when same concept is being used on other ECam related sub-component.
138 virtual TInt GetImpl1(TAny*& aIfPtr, TUid aIfaceUid, TECamImplFactoryParam aParam1) const=0;
141 Overloaded method which helps in retrieving the appropriate implementation pointer
142 based on extra information provided through two different 'TECamImplFactoryParam'.
144 Provides implementation handle for different implementation products.
147 Retrieves pointer to specifc interface implementation as identified by the interface uid.
153 union used to provide extra information which could a TAny*, TInt or TUint.
156 union used to provide extra information which could a TAny*, TInt or TUint.
160 @note The inferface pointer is retrieved only on the basis of interface uid passed.
161 Examples of 'interface implementation pointer' - 'interface uid' are as follows:-
162 MCameraImageProcessing* - KECamMCameraImageProcessingUid;
163 MCameraImageProcessing2* - KECamMCameraImageProcessing2Uid;
164 MCameraImageProcessing3* - KECamMCameraImageProcessing3Uid;
166 MCameraSnapshot* - KECamMCameraSnapshotUid;
167 MCameraSnapshot2* - KECamMCameraSnapshot2Uid;
169 MCameraV2Histogram* - KECamMCameraV2HistogramUid;
171 Many other pairs may be possible in future. For example when image processing API/ camera snapshot API/
172 histogram API is further extended.
173 Or when same concept is being used on other ECam related sub-component.
175 virtual TInt GetImpl2(TAny*& aIfPtr, TUid aIfaceUid, TECamImplFactoryParam aParam1, TECamImplFactoryParam aParam2) const=0;
179 TECamImplFactoryParam::TECamImplFactoryParam(TAny* aPtrParam):iPtrParam(aPtrParam)
184 TECamImplFactoryParam::TECamImplFactoryParam(TInt aIntParam):iIntParam(aIntParam)
189 TECamImplFactoryParam::TECamImplFactoryParam(TUint aUintParam):iUintParam(aUintParam)
194 #endif // IMPLEMENTATIONFACTORYINTF_H