|
1 // Copyright (c) 2004-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 /** |
|
17 @file |
|
18 @publishedPartner |
|
19 @released |
|
20 */ |
|
21 |
|
22 #ifndef ECAMINFOPLUGIN_H |
|
23 #define ECAMINFOPLUGIN_H |
|
24 |
|
25 #include <ecam.h> |
|
26 |
|
27 class CCameraPlugin; |
|
28 |
|
29 /** |
|
30 Plugin used to supply static data for CCamera. |
|
31 */ |
|
32 class CCameraInfoPlugin : public CBase |
|
33 { |
|
34 friend class CCameraPlugin; |
|
35 |
|
36 public: |
|
37 |
|
38 /** |
|
39 Default destructor for this class. |
|
40 */ |
|
41 IMPORT_C ~CCameraInfoPlugin(); |
|
42 |
|
43 /** |
|
44 Determines the number of cameras on the device. |
|
45 |
|
46 @return Count of cameras present on the device. |
|
47 */ |
|
48 virtual TInt CamerasAvailable()=0; |
|
49 |
|
50 protected: |
|
51 |
|
52 /** |
|
53 Default constructor for this class. |
|
54 */ |
|
55 IMPORT_C CCameraInfoPlugin(); |
|
56 |
|
57 private: |
|
58 /** |
|
59 Loads the plugin and returns a pointer to it. |
|
60 |
|
61 @return Pointer to the plugin. |
|
62 */ |
|
63 static CCameraInfoPlugin* NewL(); |
|
64 |
|
65 private: |
|
66 TUid iDestructorKey; |
|
67 |
|
68 }; |
|
69 |
|
70 /** |
|
71 @publishedPartner |
|
72 @prototype |
|
73 |
|
74 'Property' in the Publish/Subscribe API. |
|
75 Used by the ECAM implementation as property sub-keys while defining the property within the category given by |
|
76 current process's secureID. |
|
77 */ |
|
78 static const TUint KUidECamPropertyCameraIndex0ReservedStatus = 0x102831F1; |
|
79 |
|
80 /** |
|
81 @publishedPartner |
|
82 @prototype |
|
83 |
|
84 'Property' in the Publish/Subscribe API. |
|
85 Used by the ECAM implementation as property sub-keys while defining the property within the category given by |
|
86 current process's secureID. |
|
87 */ |
|
88 static const TUint KUidECamPropertyCameraIndex1ReservedStatus = 0x102831FA; |
|
89 |
|
90 /** |
|
91 @publishedPartner |
|
92 @prototype |
|
93 |
|
94 'Property' in the Publish/Subscribe API. |
|
95 Used by the ECAM implementation as property sub-keys while defining the property within the category given by |
|
96 current process's secureID. |
|
97 */ |
|
98 static const TUint KUidECamPropertyCameraIndex2ReservedStatus = 0x102831FB; |
|
99 |
|
100 /** |
|
101 @publishedPartner |
|
102 @prototype |
|
103 |
|
104 'Property' in the Publish/Subscribe API. |
|
105 Used by the ECAM implementation as property sub-keys while defining the property within the category given by |
|
106 current process's secureID. |
|
107 */ |
|
108 static const TUint KUidECamPropertyCameraIndex3ReservedStatus = 0x102831FC; |
|
109 |
|
110 /** |
|
111 @publishedPartner |
|
112 @prototype |
|
113 |
|
114 'Property' in the Publish/Subscribe API. |
|
115 Used by the ECAM implementation as property sub-keys while defining the property within the category given by |
|
116 current process's secureID. |
|
117 */ |
|
118 static const TUint KUidECamPropertyCameraIndex4ReservedStatus = 0x102831FD; |
|
119 |
|
120 /** |
|
121 @publishedPartner |
|
122 @prototype |
|
123 |
|
124 'Property' in the Publish/Subscribe API. |
|
125 Used by the ECAM implementation as property sub-keys while defining the property within the category given by |
|
126 current process's secureID. |
|
127 */ |
|
128 static const TUint KUidECamPropertyCameraIndex5ReservedStatus = 0x102831FE; |
|
129 |
|
130 /** |
|
131 @publishedPartner |
|
132 @prototype |
|
133 |
|
134 'Property' in the Publish/Subscribe API. |
|
135 Used by the ECAM implementation as property sub-keys while defining the property within the category given by |
|
136 current process's secureID. |
|
137 */ |
|
138 static const TUint KUidECamPropertyCameraIndex6ReservedStatus = 0x102831FF; |
|
139 |
|
140 /** |
|
141 @publishedPartner |
|
142 @prototype |
|
143 |
|
144 'Property' in the Publish/Subscribe API. |
|
145 Used by the ECAM implementation as property sub-keys while defining the property within the category given by |
|
146 current process's secureID. |
|
147 */ |
|
148 static const TUint KUidECamPropertyCameraIndex7ReservedStatus = 0x10283200; |
|
149 |
|
150 /** |
|
151 Plugin used to retrieve the secure ID of the process where serialized part of the ECam implementation runs. |
|
152 |
|
153 Meant for implementation by the ECam implementers. |
|
154 |
|
155 Implementation has to define and publish the properties as given by the keys KUidECamPropertyCameraIndex0ReservedStatus |
|
156 to KUidECamPropertyCameraIndex7ReservedStatus. Client's responsibility is to subscribe to these properties using |
|
157 TReservedInfo::SubscribeReserveInfoL and hence implement the interface MReserveObserver. |
|
158 |
|
159 @publishedPartner |
|
160 @prototype |
|
161 */ |
|
162 class MSecureIdPlugin |
|
163 { |
|
164 public: |
|
165 virtual void Release() =0; |
|
166 /** |
|
167 Used to retrieve the Secure ID of the process where serialized part of the ECam implementation runs. Secure ID will be |
|
168 internally used to attach to the Properties for which the Reserve notification will be subscribed for. |
|
169 |
|
170 @param aSecureId |
|
171 The secure ID of the process where serialized part of the ECam implementation runs. |
|
172 |
|
173 @leave May leave with any error code. |
|
174 |
|
175 @note Serialized part of the ECam implementation is supposed to define and publish those Properties. |
|
176 */ |
|
177 virtual void GetSecureIdL(TInt& aSecureId) const =0; |
|
178 }; |
|
179 |
|
180 #endif // ECAMINFOPLUGIN_H |