|
1 /* |
|
2 * Copyright (c) 2002 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 file for the CCbsUiTopicListMonitor class. |
|
15 * |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef CCBSUITOPICLISTMONITOR_H |
|
21 #define CCBSUITOPICLISTMONITOR_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include <CbsCommon.h> |
|
26 |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class MCbs; |
|
30 class MCbsUiTopicMonitorObserver; |
|
31 |
|
32 // CLASS DEFINITIONS |
|
33 |
|
34 |
|
35 /** |
|
36 * Monitors topic related events. |
|
37 */ |
|
38 class CCbsUiTopicListMonitor : public CActive |
|
39 { |
|
40 public: // New functions |
|
41 |
|
42 /** |
|
43 * Create an instance of the class. |
|
44 * |
|
45 * @param aServer cbs server |
|
46 */ |
|
47 static CCbsUiTopicListMonitor* NewL( MCbs& aServer ); |
|
48 |
|
49 /** |
|
50 * Destructor. |
|
51 */ |
|
52 ~CCbsUiTopicListMonitor(); |
|
53 |
|
54 /** |
|
55 * Issues the request. |
|
56 */ |
|
57 void IssueRequest(); |
|
58 |
|
59 public: // From CActive |
|
60 |
|
61 /** |
|
62 * It is called when server notifies. |
|
63 */ |
|
64 void RunL(); |
|
65 |
|
66 /** |
|
67 * Cancels the request. |
|
68 */ |
|
69 void DoCancel(); |
|
70 |
|
71 public: // New functions |
|
72 |
|
73 /** |
|
74 * Adds a observer to this monitor. |
|
75 * |
|
76 * @param aObserver Observer to be added. |
|
77 */ |
|
78 void AddObserverL( MCbsUiTopicMonitorObserver* aObserver ); |
|
79 |
|
80 private: |
|
81 |
|
82 typedef CArrayFixFlat<MCbsUiTopicMonitorObserver*> |
|
83 TCbsUiMonitorObservers; |
|
84 |
|
85 /** |
|
86 * Constructor. |
|
87 * |
|
88 * @param aServer cbs server |
|
89 */ |
|
90 CCbsUiTopicListMonitor( MCbs& aServer ); |
|
91 |
|
92 /** |
|
93 * Finalizes the construction. |
|
94 */ |
|
95 void ConstructL(); |
|
96 |
|
97 private: // Data |
|
98 |
|
99 // ETrue if request is active. |
|
100 TBool iContinue; |
|
101 |
|
102 // To issue the request. |
|
103 MCbs& iServer; |
|
104 |
|
105 // Observers who are interested in topic changes. |
|
106 // Monitor doesn't own the observers. |
|
107 TCbsUiMonitorObservers* iObservers; |
|
108 |
|
109 // Which topic handle the event is conserning. |
|
110 TCbsTopicNumber iTopicNumber; |
|
111 |
|
112 // What kind of event has been. |
|
113 TCbsTopicListEvent iEvent; |
|
114 }; |
|
115 |
|
116 #endif // CCBSUITOPICLISTMONITOR_H |
|
117 |
|
118 // End of File |