|
1 /* |
|
2 * Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef CMCECOMCAMERASOURCE_H |
|
22 #define CMCECOMCAMERASOURCE_H |
|
23 |
|
24 #include <e32std.h> |
|
25 #include <ecam.h> |
|
26 #include "mcecommediasource.h" |
|
27 |
|
28 class TMceCameraInfo |
|
29 { |
|
30 public: |
|
31 TInt iIndex; |
|
32 TCameraInfo iInfo; |
|
33 }; |
|
34 |
|
35 |
|
36 /** |
|
37 * |
|
38 * |
|
39 * @lib |
|
40 */ |
|
41 class CMceComCameraSource : public CMceComMediaSource |
|
42 { |
|
43 |
|
44 public: // Constructors and destructor |
|
45 |
|
46 /** |
|
47 * Constructor |
|
48 */ |
|
49 static CMceComCameraSource* NewL(); |
|
50 |
|
51 /** |
|
52 * Constructor |
|
53 */ |
|
54 static CMceComCameraSource* NewLC(); |
|
55 |
|
56 /** |
|
57 * Destructor. |
|
58 */ |
|
59 ~CMceComCameraSource(); |
|
60 |
|
61 public: // from CMceComMediaSource |
|
62 |
|
63 /** |
|
64 * Internalizes flat data |
|
65 * @param aReadStream read stream |
|
66 */ |
|
67 void InternalizeFlatL( RReadStream& aReadStream ); |
|
68 |
|
69 /** |
|
70 * Externalizes flat data |
|
71 * @param aWriteStream write stream |
|
72 */ |
|
73 void ExternalizeFlatL( RWriteStream& aWriteStream ); |
|
74 |
|
75 /** |
|
76 * Traversal event handler |
|
77 * @param aEvent the event |
|
78 * @return status, if event was consumed or not or object needs update |
|
79 */ |
|
80 TInt EventReceivedL( TMceComEvent& aEvent ); |
|
81 |
|
82 /** |
|
83 * Clones this object |
|
84 * @return the cloned object |
|
85 */ |
|
86 CMceComMediaSource* CloneL(); |
|
87 |
|
88 /** |
|
89 * Updates this object |
|
90 * @param aUpdate object updates this |
|
91 */ |
|
92 void UpdateL( CMceComMediaSource& aUpdate ); |
|
93 |
|
94 |
|
95 #ifdef MCE_COMMON_SERVER_SIDE |
|
96 |
|
97 /** |
|
98 * Returns mcc type for mcc endpoint |
|
99 * @return mcc type |
|
100 */ |
|
101 const TUid MccType(); |
|
102 |
|
103 /** |
|
104 * Returns init param for mcc endpoint |
|
105 * @return mcc type |
|
106 */ |
|
107 const TDesC8& InitParamL( const CMceComCodec& aCodec ); |
|
108 |
|
109 /** |
|
110 * Called after endpoint has been prepared. |
|
111 */ |
|
112 TInt DoPrepared(); |
|
113 |
|
114 #endif//MCE_COMMON_SERVER_SIDE |
|
115 |
|
116 protected: |
|
117 |
|
118 /** |
|
119 * C++ default constructor. |
|
120 */ |
|
121 CMceComCameraSource(); |
|
122 |
|
123 |
|
124 public: // serialized data |
|
125 |
|
126 TInt iCameraIndex; |
|
127 TInt iZoomFactor; |
|
128 TInt iDigitalZoomFactor; |
|
129 TInt iContrast; |
|
130 TInt iBrightness; |
|
131 TInt iExposure; |
|
132 TInt iWhiteBalance; |
|
133 |
|
134 TInt iCamerasAvailable; |
|
135 TCameraInfo iCameraInfo; |
|
136 TBool iInitialInfoRetrieved; |
|
137 |
|
138 private: // Data |
|
139 |
|
140 HBufC8* iSettings; |
|
141 |
|
142 }; |
|
143 |
|
144 |
|
145 #endif |