|
1 /* |
|
2 * Copyright (c) 2006 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: header of EventAO class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_CEVENTAO_H |
|
20 #define C_CEVENTAO_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 |
|
25 namespace multimedia |
|
26 { |
|
27 |
|
28 // Observer |
|
29 /** |
|
30 * Observer that monitors the Source State changes |
|
31 * @lib EnhancedMediaClient.lib |
|
32 * @since S60 v3.2 |
|
33 */ |
|
34 class MSourceStateObserver |
|
35 { |
|
36 public: |
|
37 virtual void SourceStateChanged() = 0; |
|
38 }; |
|
39 |
|
40 /** |
|
41 * Active Object that monitors the Source State Change |
|
42 * Event from the Source Side |
|
43 * @lib EnhancedMediaClient.lib |
|
44 * @since S60 v3.2 |
|
45 */ |
|
46 class CEventAO : public CActive |
|
47 { |
|
48 public: // Constructors and destructor |
|
49 /** |
|
50 * Function to Create the Object. |
|
51 * @param aObserver Observer to callback the Event. |
|
52 */ |
|
53 static CEventAO* NewL(MSourceStateObserver& aObserver); |
|
54 /** |
|
55 * Destructor. |
|
56 */ |
|
57 virtual ~CEventAO(); |
|
58 |
|
59 /** |
|
60 * From CActive. |
|
61 * Indicates that this active object has issued a |
|
62 * request and that it is now outstanding |
|
63 * |
|
64 * @since S60 v3.2 |
|
65 */ |
|
66 void SetActive(); |
|
67 |
|
68 /** |
|
69 * From CEventAO. |
|
70 * Returns the Error Stoted on Completion of the Request |
|
71 * |
|
72 * @since S60 v3.2 |
|
73 */ |
|
74 TInt Error(); |
|
75 |
|
76 protected: |
|
77 // From CActive |
|
78 void RunL(); |
|
79 void DoCancel(); |
|
80 TInt RunError( TInt aError ); |
|
81 |
|
82 private: |
|
83 CEventAO( MSourceStateObserver& aObserver ); |
|
84 void ConstructL(); |
|
85 |
|
86 private: |
|
87 /** |
|
88 * Observer stored to Callback |
|
89 */ |
|
90 MSourceStateObserver& iObserver; |
|
91 /** |
|
92 * Error Stored upon Request Completion |
|
93 */ |
|
94 TInt iError; |
|
95 }; |
|
96 |
|
97 } // namespace multimedia |
|
98 |
|
99 #endif // C_CEVENTAO_H |
|
100 |
|
101 // End of File |