1 /* |
|
2 * Copyright (c) 2002-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 the License "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: Handles notification of the active object |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef SIMATKNOTIFYHANDLER_H |
|
21 #define SIMATKNOTIFYHANDLER_H |
|
22 |
|
23 // INCLUDES |
|
24 #include "notify.h" |
|
25 |
|
26 /** |
|
27 * Notify class for Test Framework TestScripter. |
|
28 * Handles notification of the active object. Signaling when |
|
29 * call back return to RunL or cancellation reaches DoCancel |
|
30 * function. Notify writes it own log file. |
|
31 * @lib SimAtkNotify.dll |
|
32 */ |
|
33 NONSHARABLE_CLASS( CSimAtkNotifyHandler ) : public CActive |
|
34 { |
|
35 public: // Constructors and destructor |
|
36 |
|
37 /** |
|
38 * Two-phased constructor. |
|
39 */ |
|
40 static CSimAtkNotifyHandler* NewL( CSimAtkNotify* aNotify, |
|
41 CStifLogger* aNotifyLog ); |
|
42 |
|
43 /** |
|
44 * Destructor. |
|
45 */ |
|
46 virtual ~CSimAtkNotifyHandler(); |
|
47 |
|
48 |
|
49 public: // New functions |
|
50 |
|
51 /** |
|
52 * Activates this active object with current iStatus |
|
53 * @param none |
|
54 * @return none |
|
55 */ |
|
56 void Activate(); |
|
57 |
|
58 /** |
|
59 * Stores notify IPC to class member |
|
60 * @param aNotifyIpc IPC of the notify |
|
61 * @return none |
|
62 */ |
|
63 void SetNotify( TSatIpc aNotifyIpc ); |
|
64 |
|
65 /** |
|
66 * returns this active object status for component |
|
67 * that uses this object |
|
68 * @param none |
|
69 * @return active object status |
|
70 */ |
|
71 TRequestStatus& Status(); |
|
72 |
|
73 |
|
74 public: // Functions from base classes |
|
75 |
|
76 /** |
|
77 * Implements cancellation of an outstanding request. |
|
78 * @param none |
|
79 * @return none |
|
80 */ |
|
81 void DoCancel(); |
|
82 |
|
83 |
|
84 /** |
|
85 * The active scheduler calls this function if this active object's |
|
86 * RunL() function leaves. This gives this active object the |
|
87 * opportunity to perform any necessary cleanup. |
|
88 * @param aError RunL error code |
|
89 * @return Symbian Os Error |
|
90 */ |
|
91 TInt RunError(TInt aError); |
|
92 |
|
93 /** |
|
94 * CompleteNotification is handled in here |
|
95 * @param none |
|
96 * @return none |
|
97 */ |
|
98 void RunL(); |
|
99 |
|
100 |
|
101 private: |
|
102 |
|
103 /** |
|
104 * C++ default constructor. |
|
105 */ |
|
106 CSimAtkNotifyHandler(); |
|
107 |
|
108 /** |
|
109 * Constructor. |
|
110 */ |
|
111 CSimAtkNotifyHandler( CSimAtkNotify* aNotify, |
|
112 CStifLogger* aNotifyLog ); |
|
113 |
|
114 /** |
|
115 * Standart ConstructL. |
|
116 */ |
|
117 void ConstructL(); |
|
118 |
|
119 |
|
120 private: // Data |
|
121 |
|
122 /** |
|
123 * Class member holding last async call |
|
124 */ |
|
125 TSatIpc iNotifyIpc; |
|
126 |
|
127 /** |
|
128 * Pointer to CNotify class |
|
129 */ |
|
130 CSimAtkNotify* iNotify; |
|
131 |
|
132 /** |
|
133 * Pointer to logger |
|
134 */ |
|
135 CStifLogger* iLog; |
|
136 |
|
137 }; |
|
138 |
|
139 #endif // SIMATKNOTIFYHANDLER_H |
|
140 |
|
141 // End of file |
|