1 /* |
|
2 * Copyright (c) 2007-2008 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: Oss Protocol implementation for Presence Framework |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __COSSPROTOCLPRESENCEAUTHORISATION_H_ |
|
20 #define __COSSPROTOCLPRESENCEAUTHORISATION_H_ |
|
21 |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include <ximpcontext.h> |
|
26 #include <protocolpresenceauthorization.h> |
|
27 #include <ximpprotocolconnection.h> |
|
28 |
|
29 |
|
30 |
|
31 // FORWARD DECLARATIONS |
|
32 |
|
33 class MXIMPServiceInfo; |
|
34 class MOSSProtocolConnectionManager; |
|
35 |
|
36 |
|
37 /** |
|
38 * COssProtocolPresenceAuthorization |
|
39 * |
|
40 * Oss Protocol Authorization Request Handling |
|
41 * |
|
42 */ |
|
43 |
|
44 class COssProtocolPresenceAuthorization: |
|
45 public CBase, |
|
46 public MProtocolPresenceAuthorization |
|
47 { |
|
48 public: |
|
49 |
|
50 static COssProtocolPresenceAuthorization* NewL(MOSSProtocolConnectionManager& aConnManager); |
|
51 |
|
52 |
|
53 ~COssProtocolPresenceAuthorization(); |
|
54 |
|
55 |
|
56 private: |
|
57 |
|
58 COssProtocolPresenceAuthorization(MOSSProtocolConnectionManager& aConnManager); |
|
59 |
|
60 |
|
61 void ConstructL(); |
|
62 |
|
63 public: // from MXIMPBase |
|
64 |
|
65 /** |
|
66 * @see MXIMPBase |
|
67 */ |
|
68 TAny* GetInterface( TInt32 aInterfaceId, |
|
69 TIfGetOps aOptions ); |
|
70 /** |
|
71 * @see MXIMPBase |
|
72 */ |
|
73 const TAny* GetInterface( TInt32 aInterfaceId, |
|
74 TIfGetOps aOptions ) const; |
|
75 /** |
|
76 * @see MXIMPBase |
|
77 */ |
|
78 TInt32 GetInterfaceId() const; |
|
79 |
|
80 public: //from MProtocolPresenceAuthorization |
|
81 |
|
82 /** |
|
83 * @see MProtocolPresenceAuthorization |
|
84 */ |
|
85 void DoSubscribePresenceGrantRequestListL( |
|
86 TXIMPRequestId aReqId ); |
|
87 /** |
|
88 * @see MProtocolPresenceAuthorization |
|
89 */ |
|
90 void DoUnsubscribePresenceGrantRequestListL( |
|
91 TXIMPRequestId aReqId ); |
|
92 |
|
93 public: // Granting presence information access to single presentities |
|
94 |
|
95 /** |
|
96 * @see MProtocolPresenceAuthorization |
|
97 */ |
|
98 void DoGrantPresenceForPresentityL( |
|
99 const MXIMPIdentity& aPresentityId, |
|
100 const MPresenceInfoFilter& aPif, |
|
101 TXIMPRequestId aReqId ); |
|
102 /** |
|
103 * @see MProtocolPresenceAuthorization |
|
104 */ |
|
105 void DoUpdatePresenceGrantPifForPresentityL( |
|
106 const MXIMPIdentity& aPresentityId, |
|
107 const MPresenceInfoFilter& aPif, |
|
108 TXIMPRequestId aReqId ); |
|
109 /** |
|
110 * @see MProtocolPresenceAuthorization |
|
111 */ |
|
112 void DoWithdrawPresenceGrantFromPresentityL( |
|
113 const MXIMPIdentity& aPresentityId, |
|
114 TXIMPRequestId aReqId ); |
|
115 |
|
116 public: // Granting presence information access to presentity group members |
|
117 |
|
118 /** |
|
119 * @see MProtocolPresenceAuthorization |
|
120 */ |
|
121 void DoGrantPresenceForPresentityGroupMembersL( |
|
122 const MXIMPIdentity& aGroupId, |
|
123 const MPresenceInfoFilter& aPif, |
|
124 TXIMPRequestId aReqId ); |
|
125 /** |
|
126 * @see MProtocolPresenceAuthorization |
|
127 */ |
|
128 void DoUpdatePresenceGrantPifForPresentityGroupMembersL( |
|
129 const MXIMPIdentity& aGroupId, |
|
130 const MPresenceInfoFilter& aPif, |
|
131 TXIMPRequestId aReqId ); |
|
132 /** |
|
133 * @see MProtocolPresenceAuthorization |
|
134 */ |
|
135 void DoWithdrawPresenceGrantFromPresentityGroupMembersL( |
|
136 const MXIMPIdentity& aGroupId, |
|
137 TXIMPRequestId aReqId ); |
|
138 |
|
139 public: // Granting presence information access to everyone |
|
140 |
|
141 /** |
|
142 * @see MProtocolPresenceAuthorization |
|
143 */ |
|
144 void DoGrantPresenceForEveryoneL( |
|
145 const MPresenceInfoFilter& aPif, |
|
146 TXIMPRequestId aReqId ); |
|
147 |
|
148 /** |
|
149 * @see MProtocolPresenceAuthorization |
|
150 */ |
|
151 void DoUpdatePresenceGrantPifForEveryoneL( |
|
152 const MPresenceInfoFilter& aPif, |
|
153 TXIMPRequestId aReqId ); |
|
154 |
|
155 /** |
|
156 * @see MProtocolPresenceAuthorization |
|
157 */ |
|
158 void DoWithdrawPresenceGrantFromEveryoneL( |
|
159 TXIMPRequestId aReqId ); |
|
160 public: // Subscribe presence block list |
|
161 |
|
162 /** |
|
163 * @see MProtocolPresenceAuthorization |
|
164 */ |
|
165 void DoSubscribePresenceBlockListL( |
|
166 TXIMPRequestId aReqId ); |
|
167 |
|
168 |
|
169 /** |
|
170 * @see MProtocolPresenceAuthorization |
|
171 */ |
|
172 void DoUnsubscribePresenceBlockListL( |
|
173 TXIMPRequestId aReqId ); |
|
174 |
|
175 public: // Blocking presence information access from single presentities |
|
176 |
|
177 /** |
|
178 * @see MProtocolPresenceAuthorization |
|
179 */ |
|
180 void DoBlockPresenceForPresentityL( |
|
181 const MXIMPIdentity& aPresentityId, |
|
182 TXIMPRequestId aReqId ); |
|
183 |
|
184 /** |
|
185 * @see MProtocolPresenceAuthorization |
|
186 */ |
|
187 void DoCancelPresenceBlockFromPresentityL( |
|
188 const MXIMPIdentity& aPresentityId, |
|
189 TXIMPRequestId aReqId ); |
|
190 |
|
191 |
|
192 public: |
|
193 |
|
194 /** |
|
195 * Creates data handler |
|
196 */ |
|
197 void CreateDataHandlerL(); |
|
198 |
|
199 private: |
|
200 |
|
201 /** |
|
202 * Request Id from ximpfw |
|
203 */ |
|
204 TXIMPRequestId iRequestId; |
|
205 |
|
206 |
|
207 /** |
|
208 * Oss Protocol Plugin Connection Manager |
|
209 * Not own. *** Write "Not own" if some other class owns this object. |
|
210 */ |
|
211 MOSSProtocolConnectionManager& iConnMan; |
|
212 |
|
213 |
|
214 |
|
215 }; |
|
216 |
|
217 #endif // __COSSPROTOCLPRESENCEAUTHORISATION_H_ |
|
218 |
|
219 |
|
220 |
|
221 |
|
222 |
|
223 |
|
224 |
|
225 |
|
226 |
|
227 |
|
228 |
|
229 |
|