|
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: IMPS Protocol Publishing implementation for Presence Framework |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include <badesca.h> |
|
20 |
|
21 #include <ximpbase.h> |
|
22 #include <ximpidentity.h> |
|
23 #include <ximpprotocolconnectionhost.h> |
|
24 |
|
25 #include "cossprotocolpresencepublishing.h" |
|
26 #include "ossprotocolpluginlogger.h" |
|
27 #include "cossprotocolconnectionmanager.h" |
|
28 //#include "csubscribeownpresencerequest.h" |
|
29 #include "cpresencenotificationhandler.h" |
|
30 //#include "cunsubscribeownpresencerequest.h" |
|
31 #include "cpublishownpresencerequest.h" |
|
32 //#include "csubscribepresencewatcherlistrequest.h" |
|
33 //#include "cupdateownpresencesubscriptionpifrequest.h" |
|
34 |
|
35 #include "ossprotocolpluginpanics.h" |
|
36 |
|
37 |
|
38 // ======== MEMBER FUNCTIONS ======== |
|
39 |
|
40 // --------------------------------------------------------------------------- |
|
41 // COssProtocolPresencePublishing::GetInterface() |
|
42 // --------------------------------------------------------------------------- |
|
43 // |
|
44 TAny* COssProtocolPresencePublishing::GetInterface( |
|
45 TInt32 aInterfaceId, |
|
46 TIfGetOps aOptions ) |
|
47 { |
|
48 LOGGER ( TXT("CImpsProtocolPresentityGroups::GetInterface() Start") ); |
|
49 |
|
50 |
|
51 if( aInterfaceId == MProtocolPresencePublishing::KInterfaceId ) |
|
52 { |
|
53 MProtocolPresencePublishing* self = this; |
|
54 return self; |
|
55 } |
|
56 |
|
57 if( aOptions == MXIMPBase::EPanicIfUnknown ) |
|
58 { |
|
59 User::Panic( KOSSProtocolPresencePublishing, KErrExtensionNotSupported ); |
|
60 } |
|
61 |
|
62 LOGGER ( TXT("COssProtocolPresencePublishing::GetInterface() End") ); |
|
63 return NULL; |
|
64 } |
|
65 |
|
66 |
|
67 // --------------------------------------------------------------------------- |
|
68 // COssProtocolPresencePublishing::GetInterface() |
|
69 // --------------------------------------------------------------------------- |
|
70 // |
|
71 const TAny* COssProtocolPresencePublishing::GetInterface( |
|
72 TInt32 aInterfaceId, |
|
73 TIfGetOps aOptions ) const |
|
74 { |
|
75 LOGGER ( TXT("CImpsProtocolPresentityGroups::GetInterface() Start") ); |
|
76 |
|
77 if( aInterfaceId == MProtocolPresencePublishing::KInterfaceId ) |
|
78 { |
|
79 const MProtocolPresencePublishing* self = this; |
|
80 return self; |
|
81 } |
|
82 |
|
83 if( aOptions == MXIMPBase::EPanicIfUnknown ) |
|
84 { |
|
85 User::Panic( KOSSProtocolPresencePublishing, KErrExtensionNotSupported ); |
|
86 } |
|
87 |
|
88 LOGGER ( TXT("COssProtocolPresencePublishing::GetInterface() End") ); |
|
89 return NULL; |
|
90 } |
|
91 |
|
92 |
|
93 // --------------------------------------------------------------------------- |
|
94 // COssProtocolPresencePublishing::NewInstanceLC() |
|
95 // --------------------------------------------------------------------------- |
|
96 // |
|
97 TInt32 COssProtocolPresencePublishing::GetInterfaceId() const |
|
98 { |
|
99 LOGGER ( TXT("COssProtocolPresencePublishing::GetInterfaceId() Start-End") ); |
|
100 return MProtocolPresencePublishing::KInterfaceId; |
|
101 } |
|
102 |
|
103 // --------------------------------------------------------------------------- |
|
104 // COssProtocolPresencePublishing::COssProtocolPresencePublishing() |
|
105 // --------------------------------------------------------------------------- |
|
106 // |
|
107 COssProtocolPresencePublishing::COssProtocolPresencePublishing( |
|
108 MOSSProtocolConnectionManager& aConnMan) |
|
109 :iConnMan(aConnMan) |
|
110 { |
|
111 LOGGER ( TXT("Publishing::COssProtocolPresencePublishing() Start") ); |
|
112 LOGGER ( TXT("Publishing::COssProtocolPresencePublishing() End") ); |
|
113 } |
|
114 |
|
115 |
|
116 // --------------------------------------------------------------------------- |
|
117 // COssProtocolPresencePublishing::ConstructL() |
|
118 // --------------------------------------------------------------------------- |
|
119 // |
|
120 void COssProtocolPresencePublishing::ConstructL() |
|
121 { |
|
122 LOGGER ( TXT("COssProtocolPresencePublishing::ConstructL() Start") ); |
|
123 |
|
124 //iNotificationHandler = CPresenceNotificationHandler::NewL( iConnMan ); |
|
125 |
|
126 |
|
127 LOGGER ( TXT("COssProtocolPresencePublishing::ConstructL() End") ); |
|
128 } |
|
129 |
|
130 |
|
131 // --------------------------------------------------------------------------- |
|
132 // COssProtocolPresencePublishing::NewL() |
|
133 // --------------------------------------------------------------------------- |
|
134 // |
|
135 COssProtocolPresencePublishing* COssProtocolPresencePublishing::NewL( |
|
136 MOSSProtocolConnectionManager& aConnMan ) |
|
137 |
|
138 { |
|
139 LOGGER ( TXT("COssProtocolPresencePublishing::NewL() Start") ); |
|
140 |
|
141 COssProtocolPresencePublishing* self = |
|
142 new( ELeave ) COssProtocolPresencePublishing(aConnMan); |
|
143 CleanupStack::PushL( self ); |
|
144 self->ConstructL( ); |
|
145 CleanupStack::Pop( self ); |
|
146 |
|
147 LOGGER ( TXT("COssProtocolPresencePublishing::NewL() End") ); |
|
148 return self; |
|
149 } |
|
150 |
|
151 |
|
152 // --------------------------------------------------------------------------- |
|
153 // COssProtocolPresencePublishing::~COssProtocolPresencePublishing() |
|
154 // --------------------------------------------------------------------------- |
|
155 // |
|
156 COssProtocolPresencePublishing::~COssProtocolPresencePublishing() |
|
157 { |
|
158 LOGGER ( TXT("Publishing::~COssProtocolPresencePublishing() Start") ); |
|
159 |
|
160 //delete iNotificationHandler; |
|
161 |
|
162 LOGGER ( TXT("Publishing::~COssProtocolPresencePublishing() End") ); |
|
163 } |
|
164 |
|
165 |
|
166 // --------------------------------------------------------------------------- |
|
167 // COssProtocolPresencePublishing::DoSubscribeOwnPresenceL() |
|
168 // --------------------------------------------------------------------------- |
|
169 // |
|
170 void COssProtocolPresencePublishing::DoSubscribeOwnPresenceL( |
|
171 const MPresenceInfoFilter& /*aPif*/, |
|
172 TXIMPRequestId /*aReqId*/ ) |
|
173 { |
|
174 LOGGER ( TXT("Publishing::DoSubscribeOwnPresenceL() Start") ); |
|
175 |
|
176 LOGGER ( TXT("Publishing::DoSubscribeOwnPresenceL() End") ); |
|
177 } |
|
178 |
|
179 |
|
180 |
|
181 // --------------------------------------------------------------------------- |
|
182 // COssProtocolPresencePublishing::DoUnsubscribeOwnPresenceL() |
|
183 // --------------------------------------------------------------------------- |
|
184 // |
|
185 void COssProtocolPresencePublishing::DoUnsubscribeOwnPresenceL( |
|
186 TXIMPRequestId /*aReqId*/ ) |
|
187 { |
|
188 LOGGER ( TXT("Publishing::DoUnsubscribeOwnPresenceL() Start") ); |
|
189 |
|
190 LOGGER ( TXT("Publishing::DoUnsubscribeOwnPresenceL() End") ); |
|
191 } |
|
192 |
|
193 |
|
194 |
|
195 // --------------------------------------------------------------------------- |
|
196 // COssProtocolPresencePublishing::DoUpdateOwnPresenceSubscriptionL() |
|
197 // --------------------------------------------------------------------------- |
|
198 // |
|
199 void COssProtocolPresencePublishing::DoUpdateOwnPresenceSubscriptionPifL( |
|
200 const MPresenceInfoFilter& /*aPif*/, |
|
201 TXIMPRequestId /*aReqId*/ ) |
|
202 { |
|
203 LOGGER ( TXT("Publishing::DoUpdateOwnPresenceSubscriptionPifL() Start") ); |
|
204 |
|
205 |
|
206 LOGGER ( TXT("Publishing::DoUpdateOwnPresenceSubscriptionPifL() End") ); |
|
207 } |
|
208 |
|
209 |
|
210 |
|
211 // --------------------------------------------------------------------------- |
|
212 // COssProtocolPresencePublishing::DoPublishOwnPresenceL() |
|
213 // --------------------------------------------------------------------------- |
|
214 // |
|
215 void COssProtocolPresencePublishing::DoPublishOwnPresenceL( |
|
216 const MPresenceInfo& aPresence, |
|
217 TXIMPRequestId aReqId ) |
|
218 { |
|
219 LOGGER ( TXT("Publishing::DoPublishOwnPresenceL() Start") ); |
|
220 |
|
221 |
|
222 |
|
223 CPublishOwnPresencerequest* req = |
|
224 CPublishOwnPresencerequest::NewLC( iConnMan, aReqId ); |
|
225 |
|
226 |
|
227 req->PublishOwnPresenceL(aPresence); |
|
228 |
|
229 CleanupStack::Pop( req ); |
|
230 |
|
231 LOGGER ( TXT("Publishing::DoPublishOwnPresenceL() End") ); |
|
232 } |
|
233 |
|
234 // --------------------------------------------------------------------------- |
|
235 // COssProtocolPresencePublishing::DoSubscribePresenceWatcherListL() |
|
236 // --------------------------------------------------------------------------- |
|
237 // |
|
238 void COssProtocolPresencePublishing::DoSubscribePresenceWatcherListL( |
|
239 TXIMPRequestId /*aReqId*/ ) |
|
240 { |
|
241 LOGGER ( TXT("Publishing::DoSubscribePresenceWatcherListL() Start") ); |
|
242 |
|
243 |
|
244 |
|
245 LOGGER ( TXT("Publishing::DoSubscribePresenceWatcherListL() End") ); |
|
246 } |
|
247 |
|
248 |
|
249 // --------------------------------------------------------------------------- |
|
250 // COssProtocolPresencePublishing::DoUnsubscribePresenceWatcherListL() |
|
251 // --------------------------------------------------------------------------- |
|
252 // |
|
253 void COssProtocolPresencePublishing::DoUnsubscribePresenceWatcherListL( |
|
254 TXIMPRequestId /*aReqId*/ ) |
|
255 { |
|
256 LOGGER ( TXT("Publishing::DoUnsubscribePresenceWatcherListL() Start") ); |
|
257 |
|
258 |
|
259 LOGGER ( TXT("Publishing::DoUnsubscribePresenceWatcherListL() End") ); |
|
260 } |
|
261 |
|
262 |
|
263 |
|
264 |
|
265 // End of file |
|
266 |