|
1 /* |
|
2 * Copyright (c) 2007 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: Camera setting preview handler interface. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CAM_MCAMSETTINGPREVIEWHANDLER_H |
|
20 #define CAM_MCAMSETTINGPREVIEWHANDLER_H |
|
21 |
|
22 #include "CamSettingsInternal.hrh" |
|
23 |
|
24 /** |
|
25 * MCamSettingPreviewHandler mixin. |
|
26 */ |
|
27 class MCamSettingPreviewHandler |
|
28 { |
|
29 public: |
|
30 |
|
31 /** |
|
32 * Activates preview for one setting. |
|
33 * Returns the preview value as setting value in ProvideCameraSettingL |
|
34 * until Commit or Cancel is called. |
|
35 * @param aSettingId The setting for which preview is set |
|
36 * @param aSettingValue The setting value used for preview |
|
37 * @leave Any system error code. |
|
38 */ |
|
39 virtual void ActivatePreviewL( const TCamSettingItemIds& aSettingId, |
|
40 TInt aSettingValue ) = 0; |
|
41 |
|
42 /** |
|
43 * Cancels the preview for one setting. |
|
44 * After this call ProvideCameraSettingL returns the actual setting value. |
|
45 * If the setting does not have active preview, such error is ignored. |
|
46 * @param aSettingId Id of the setting for which the preview is cancelled. |
|
47 */ |
|
48 virtual void CancelPreview( const TCamSettingItemIds& aSettingId ) = 0; |
|
49 |
|
50 |
|
51 /** |
|
52 * Cancels the preview for a set of settings. |
|
53 * If some of the settings do not have active preview, such error is ignored. |
|
54 */ |
|
55 virtual void CancelPreviews( const RArray<TCamSettingItemIds> aSettingIds ) = 0; |
|
56 |
|
57 /** |
|
58 * Cancels all previews. |
|
59 * No error reported, if no previews active. |
|
60 */ |
|
61 virtual void CancelAllPreviews() = 0; |
|
62 |
|
63 /** |
|
64 * Commits the preview value for the given set of settings. |
|
65 * After this call completes, the preview is no more active for the setting. |
|
66 * If the call completes successfully, the preview is stored as the |
|
67 * actual setting value. If leave occurs, the preview is not stored. |
|
68 * @param aSettingId Id of the setting for which the preview is committed. |
|
69 * @leave KErrArgument There was no preview value for the given setting. |
|
70 * @leave Any system error code. |
|
71 */ |
|
72 virtual void CommitPreviewL( const TCamSettingItemIds& aSettingId ) = 0; |
|
73 |
|
74 /** |
|
75 * Commits the preview for a set of settings. |
|
76 * If some of the settings do not have active preview, such error is ignored. |
|
77 */ |
|
78 virtual void CommitPreviewsL( const RArray<TCamSettingItemIds>& aSettingIds ) = 0; |
|
79 |
|
80 /** |
|
81 * Commit previews for all settings with active preview. |
|
82 * @leave Any system error code. |
|
83 */ |
|
84 virtual void CommitAllPreviewsL() = 0; |
|
85 |
|
86 /** |
|
87 * Get the set of settings with active preview. |
|
88 * Preview is active if it has been set with ActivatePreviewL |
|
89 * but not cancelled or committed after that. |
|
90 * @param aSettingIds Return the ids of the active settings in this array. |
|
91 */ |
|
92 virtual void ActivePreviewsL( RArray<TCamSettingItemIds>& aSettingIds ) const = 0; |
|
93 |
|
94 /** |
|
95 * Virtual destructor. |
|
96 * Need to be defined in order to be able to gracefully delete |
|
97 * inherited class entities through MCamCameraPreviewHandler pointer. |
|
98 * If not declared here, User-42 panic occurs on delete. |
|
99 */ |
|
100 virtual ~MCamSettingPreviewHandler() {}; |
|
101 }; |
|
102 |
|
103 #endif // CAM_MCAMSETTINGPREVIEWHANDLER_H |
|
104 |
|
105 // end of file |