|
1 /* |
|
2 * Copyright (c) 2002-2004 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: Active object for each spontaneous event from Radio Server. |
|
15 * Notifies MRadioEventObserver upon receiving a new event. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef RADIOEVENTHANDLER_H |
|
22 #define RADIOEVENTHANDLER_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32base.h> |
|
26 #include <e32property.h> |
|
27 |
|
28 #include "RadioSession.h" |
|
29 |
|
30 // CLASS DECLARATION |
|
31 |
|
32 /** |
|
33 * Implements active object for spontaneous event. |
|
34 * |
|
35 * @lib RadioSession.lib |
|
36 * @since Series 60 3.0 |
|
37 */ |
|
38 class CRadioEventHandler : public CActive |
|
39 { |
|
40 public: // Constructors and destructor |
|
41 |
|
42 /** |
|
43 * Two-phased constructor. |
|
44 */ |
|
45 static CRadioEventHandler* NewLC( MRadioObserver& aObserver, RRadioSession& aSession, TUint aKey ); |
|
46 |
|
47 /** |
|
48 * Destructor. |
|
49 */ |
|
50 virtual ~CRadioEventHandler(); |
|
51 |
|
52 private: // Functions from base classes |
|
53 |
|
54 /** |
|
55 * From CActive |
|
56 * Cancel outstanding request |
|
57 */ |
|
58 void DoCancel(); |
|
59 |
|
60 /** |
|
61 * From CActive |
|
62 * Implementation of CActive::RunL. Called when server request has completed. |
|
63 **/ |
|
64 void RunL(); |
|
65 |
|
66 private: |
|
67 |
|
68 /** |
|
69 * C++ default constructor. |
|
70 */ |
|
71 CRadioEventHandler( MRadioObserver& aObserver,RRadioSession& aSession, TUint aKey ); |
|
72 |
|
73 /** |
|
74 * By default Symbian 2nd phase constructor is private. |
|
75 */ |
|
76 void ConstructL(); |
|
77 |
|
78 private: // Data |
|
79 |
|
80 // Radio session |
|
81 RRadioSession& iSession; |
|
82 // Property |
|
83 RProperty iProperty; |
|
84 // Property key |
|
85 TUint iKey; |
|
86 |
|
87 MRadioObserver& iObserver; |
|
88 }; |
|
89 |
|
90 #endif // RADIOEVENTHANDLER_H |
|
91 |
|
92 // End of File |