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: Simple Protocol implementation for Presence Framework |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef CSIMPLEPLUGINWINFO_H |
|
22 #define CSIMPLEPLUGINWINFO_H |
|
23 |
|
24 #include <e32std.h> |
|
25 |
|
26 #include <msimplewinfoobserver.h> |
|
27 |
|
28 #include "simpleplugincommon.h" |
|
29 #include "msimplepluginconnectionobs.h" |
|
30 |
|
31 #include <ximpbase.h> |
|
32 |
|
33 class MSimpleWinfo; |
|
34 class MXIMPIdentity; |
|
35 class MPresenceInfoFilter; |
|
36 class MSimpleWinfoWatcher; |
|
37 class MXIMPProtocolConnectionHost; |
|
38 class MSimpleConnection; |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 /** |
|
44 * CSimplePluginWinfo |
|
45 * |
|
46 * Simple Engine Connection |
|
47 * |
|
48 * @lib ?library |
|
49 * @since s60 v5.0 |
|
50 */ |
|
51 NONSHARABLE_CLASS( CSimplePluginWinfo ) : public CBase, |
|
52 public MSimpleWinfoObserver |
|
53 { |
|
54 public: |
|
55 |
|
56 /** |
|
57 * Constructor. |
|
58 * @param aObs callback for complete requests |
|
59 * @param aConn Simple Engine connection |
|
60 */ |
|
61 static CSimplePluginWinfo* NewL( |
|
62 MSimplePluginConnectionObs& aObs, |
|
63 MSimpleConnection& aConn ); |
|
64 |
|
65 virtual ~CSimplePluginWinfo(); |
|
66 |
|
67 /** |
|
68 * SetHost |
|
69 * |
|
70 * Set PrFw Host |
|
71 * |
|
72 * @lib ?library |
|
73 * @since s60 v5.0 |
|
74 * @patam aHost PrFW Host |
|
75 */ |
|
76 void SetHost( MXIMPProtocolConnectionHost* aHost ); |
|
77 |
|
78 /** |
|
79 * SubscribeWinfoListL |
|
80 * |
|
81 * |
|
82 * @lib ?library |
|
83 * @since s60 v5.0 |
|
84 * @param aReqId PrFw req id |
|
85 */ |
|
86 void SubscribeWinfoListL( TXIMPRequestId aReqId ); |
|
87 |
|
88 /** |
|
89 * UnsubscribeWinfoListL |
|
90 * |
|
91 * |
|
92 * @lib ?library |
|
93 * @since s60 v5.0 |
|
94 * @param aReqId PrFw req id |
|
95 */ |
|
96 void UnsubscribeWinfoListL( TXIMPRequestId aReqId ); |
|
97 |
|
98 private: |
|
99 |
|
100 CSimplePluginWinfo( |
|
101 MSimplePluginConnectionObs& aObs, |
|
102 MSimpleConnection& aConn ); |
|
103 |
|
104 void ConstructL( ); |
|
105 |
|
106 |
|
107 public: |
|
108 |
|
109 // from base class MSimpleWinfoObserver |
|
110 |
|
111 // Subscribe presence grant request list |
|
112 |
|
113 /** |
|
114 * Defined in a base class |
|
115 */ |
|
116 void WinfoReqCompleteL( TInt aOpid, TInt aStatus ); |
|
117 |
|
118 /** |
|
119 * Defined in a base class |
|
120 */ |
|
121 void WinfoTerminatedL( |
|
122 TInt aOpid, TInt aReason ); |
|
123 |
|
124 /** |
|
125 * Defined in a base class |
|
126 */ |
|
127 void WinfoNotificationL( MSimpleWinfo& aWinfo ); |
|
128 |
|
129 |
|
130 private: // Data |
|
131 |
|
132 /** |
|
133 * PrFw Plugin connection observer |
|
134 */ |
|
135 MSimplePluginConnectionObs& iConnObs; |
|
136 |
|
137 /** |
|
138 * PrFw Host. |
|
139 * Not Own. |
|
140 */ |
|
141 MXIMPProtocolConnectionHost* iHost; |
|
142 |
|
143 /** |
|
144 * SIMPLE engine connection |
|
145 */ |
|
146 MSimpleConnection& iConnection; |
|
147 |
|
148 /** |
|
149 * SIMPLE engine winfo watcher. |
|
150 * Own. |
|
151 */ |
|
152 MSimpleWinfoWatcher* iWinfoWatcher; |
|
153 |
|
154 /** |
|
155 * PrFW request id |
|
156 */ |
|
157 TXIMPRequestId iPrFwId; |
|
158 |
|
159 /** |
|
160 * Simple Engine request id |
|
161 */ |
|
162 TInt iSimpleId; |
|
163 |
|
164 /** |
|
165 * Subscribed |
|
166 */ |
|
167 TInt iSubscribed; |
|
168 |
|
169 /** |
|
170 * Winfo subscribe completed |
|
171 */ |
|
172 TBool iWinfoCompleted; |
|
173 |
|
174 |
|
175 }; |
|
176 |
|
177 #endif // CSimplePluginWinfo_H |
|