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 observer interface. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CAM_CAMERAOBSERVER_H |
|
20 #define CAM_CAMERAOBSERVER_H |
|
21 |
|
22 |
|
23 #include "camcameraevents.h" |
|
24 |
|
25 |
|
26 /** |
|
27 * MCamCameraObserver mixin. |
|
28 * |
|
29 */ |
|
30 class MCamCameraObserver |
|
31 { |
|
32 public: |
|
33 |
|
34 /** |
|
35 * Handle camera event. |
|
36 * |
|
37 * @param aStatus Status code describing the event status. |
|
38 * @param aEventId Identifier for the event. |
|
39 * @param aEventData Event associated data. If such data is provided with the event, |
|
40 * it is mentioned in the documentation of particular event id. |
|
41 * Ownership not transferred to observer. |
|
42 */ |
|
43 virtual void HandleCameraEventL( TInt aStatus, |
|
44 TCamCameraEventId aEventId, |
|
45 TAny* aEventData = NULL ) = 0; |
|
46 }; |
|
47 |
|
48 |
|
49 /** |
|
50 * MCamCameraObservable mixin. |
|
51 */ |
|
52 class MCamCameraObservable |
|
53 { |
|
54 public: |
|
55 |
|
56 /** |
|
57 * Attach a new observer. |
|
58 * @param aObserver Observer to attach. If given observer is already attached, |
|
59 * duplicate is not added and no error is reported. |
|
60 * @param aInterest Observer event interest info. |
|
61 * TCamCameraEventClassId values ORed. |
|
62 * If observer needs to change the interest info, it should |
|
63 * first detach itself and then attach with new info. |
|
64 */ |
|
65 virtual void AttachObserverL( const MCamCameraObserver* aObserver, |
|
66 const TUint& aInterest ) = 0; |
|
67 |
|
68 |
|
69 /** |
|
70 * Detach an observer. |
|
71 * @param aObserver Observer to detach. If given observer is not found |
|
72 * among attached observers, such an is simply ignored. |
|
73 */ |
|
74 virtual void DetachObserver( const MCamCameraObserver* aObserver ) = 0; |
|
75 }; |
|
76 |
|
77 |
|
78 #endif // M_CAM_ENGINEOBSERVER_H |
|
79 |
|
80 // end of file |
|