|
1 /* |
|
2 * Copyright (c) 2003 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: Implement SIM state observer for card removed event |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CSWIMSYSAGENTOBSERVER_H |
|
21 #define CSWIMSYSAGENTOBSERVER_H |
|
22 |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32base.h> |
|
26 #include <e32property.h> // RProperty |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class CSwimReaderIF; |
|
30 |
|
31 // CLASS DECLARATION |
|
32 |
|
33 /** |
|
34 * Publish and subscribe Observer class |
|
35 * This class listens P/S events |
|
36 * |
|
37 * @lib SwimReader.lib |
|
38 * @since Series60 1.2 |
|
39 */ |
|
40 class CSwimSysAgentObserver : public CActive |
|
41 { |
|
42 public: // Constructors and destructor |
|
43 |
|
44 /** |
|
45 * Two-phased constructor. |
|
46 * @param aReaderIF Pointer to ReaderIF owning this observer |
|
47 */ |
|
48 static CSwimSysAgentObserver* NewL( CSwimReaderIF* aReaderIF ); |
|
49 |
|
50 /** |
|
51 * Destructor. |
|
52 */ |
|
53 virtual ~CSwimSysAgentObserver(); |
|
54 |
|
55 public: // New functions |
|
56 |
|
57 /** |
|
58 * Starts listener |
|
59 * @return void |
|
60 */ |
|
61 void Start(); |
|
62 |
|
63 private: |
|
64 |
|
65 /** |
|
66 * C++ default constructor. |
|
67 * @param aReaderIF Pointer to ReaderIF owning this observer |
|
68 */ |
|
69 CSwimSysAgentObserver( CSwimReaderIF* aReaderIF ); |
|
70 |
|
71 /** |
|
72 * By default Symbian 2nd phase constructor is private. |
|
73 */ |
|
74 void ConstructL(); |
|
75 |
|
76 /** |
|
77 * This function starts listening card state from System agent |
|
78 * @return void |
|
79 */ |
|
80 void StartListening(); |
|
81 /** |
|
82 * From CActive. Handle asyncronous event response |
|
83 * @return void |
|
84 */ |
|
85 void RunL(); |
|
86 |
|
87 /** |
|
88 * From CActive. Handle Cancel call |
|
89 * @return void |
|
90 */ |
|
91 void DoCancel(); |
|
92 |
|
93 private: // Data |
|
94 // SIM status property |
|
95 RProperty iProperty; |
|
96 // Pointer to ReaderIF owning this observer. Not owned. |
|
97 CSwimReaderIF* iReaderIF; |
|
98 }; |
|
99 |
|
100 #endif // CSWIMSYSAGENTOBSERVER_H |
|
101 |
|
102 // End of File |