|
1 /* |
|
2 * Copyright (c) 2006-2009 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: IETF SIMPLE Protocol, creating virtualgroup |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CPRESENCEPLUGINVIRTUALGROUP_H |
|
20 #define CPRESENCEPLUGINVIRTUALGROUP_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <e32std.h> |
|
24 #include <ximpbase.h> |
|
25 #include <badesca.h> |
|
26 |
|
27 #include "mpresencepluginconnectionobs.h" |
|
28 #include "presencelogger.h" |
|
29 |
|
30 class MXIMPObjectCollection; |
|
31 class CPresencePluginData; |
|
32 |
|
33 /** |
|
34 * CPresencePluginVirtualGroup |
|
35 * |
|
36 * virtual groups |
|
37 * |
|
38 * @lib presenceplugin.dll |
|
39 * @since S60 v3.2 |
|
40 */ |
|
41 NONSHARABLE_CLASS( CPresencePluginVirtualGroup ): public CBase |
|
42 { |
|
43 public: |
|
44 |
|
45 /** |
|
46 * Constructor. |
|
47 * @param aId watcher id |
|
48 * @param aSipId watcher SIP identity |
|
49 */ |
|
50 static CPresencePluginVirtualGroup* NewL( |
|
51 MPresencePluginConnectionObs& aObs, |
|
52 const TDesC16& aListName, |
|
53 CPresencePluginData* aPresenceData ); |
|
54 |
|
55 /** |
|
56 * Standard C++ destructor |
|
57 */ |
|
58 virtual ~CPresencePluginVirtualGroup(); |
|
59 |
|
60 private: |
|
61 |
|
62 /** |
|
63 * Standard C++ constructor |
|
64 * @param aObs, Presence plugin connection |
|
65 * @param aPresenceData, access to presence data |
|
66 */ |
|
67 CPresencePluginVirtualGroup( MPresencePluginConnectionObs& aObs, |
|
68 CPresencePluginData* aPresenceData ); |
|
69 |
|
70 /** |
|
71 * Performs the 2nd phase of construction. |
|
72 */ |
|
73 void ConstructL( const TDesC16& aListName ); |
|
74 |
|
75 /** |
|
76 * IdentityExists() |
|
77 * |
|
78 * @since S60 3.2 |
|
79 * @param aIdentityUri, identity url |
|
80 * @return TInt, return KErrNotFound if indentity not exists |
|
81 */ |
|
82 TInt IdentityExists( const TDesC& aIdentityUri ); |
|
83 |
|
84 public: |
|
85 |
|
86 /** |
|
87 * GetVirtualIdentityArray() |
|
88 * |
|
89 * @since S60 3.2 |
|
90 * @param aColl, XIMP object collection |
|
91 * @return none |
|
92 */ |
|
93 CDesCArray* GetVirtualIdentityArray( ); |
|
94 |
|
95 /** |
|
96 * GetOnlineEntitiesL() |
|
97 * |
|
98 * @since S60 3.2 |
|
99 * @param aColl, XIMP object collection |
|
100 * @return none |
|
101 */ |
|
102 void GetVirtualEntitiesL( MXIMPObjectCollection& aColl ); |
|
103 |
|
104 /** |
|
105 * AddOnlineEntity() |
|
106 * |
|
107 * @since S60 3.2 |
|
108 * @param aIdentityUri, identity url |
|
109 * @return none |
|
110 */ |
|
111 void AddEntityL( const TDesC& aIdentityUri ); |
|
112 |
|
113 /** |
|
114 * RemoveOnlineEntity() |
|
115 * |
|
116 * @since S60 3.2 |
|
117 * @param aIdentityUri, identity url |
|
118 * @return none |
|
119 */ |
|
120 void RemoveEntityL( const TDesC& aIdentityUri ); |
|
121 |
|
122 /** |
|
123 * HandlePresentityGroupMemberAddedL() |
|
124 * |
|
125 * @since S60 5.1 |
|
126 * @param aIdentityUri, identity url |
|
127 * @return none |
|
128 */ |
|
129 void HandlePresentityGroupMemberAddedL( const TDesC& aIdentityUri ); |
|
130 |
|
131 private: // data |
|
132 |
|
133 /** |
|
134 * XIMP Plugin connection observer |
|
135 */ |
|
136 MPresencePluginConnectionObs& iConnObs; |
|
137 |
|
138 /** |
|
139 * Access to presence data. |
|
140 * Not Own. |
|
141 */ |
|
142 CPresencePluginData* iPresenceData; |
|
143 |
|
144 /** |
|
145 * Identities/Uri of online Buddies. |
|
146 */ |
|
147 CDesCArray* iVirtualMember; |
|
148 |
|
149 /** |
|
150 * list ident |
|
151 * own |
|
152 */ |
|
153 HBufC16* iListName; |
|
154 |
|
155 SIMPLE_UNIT_TEST( T_CPresencePluginVirtualGroup ) |
|
156 SIMPLE_UNIT_TEST( T_CPresencePluginXdmUtils ) |
|
157 |
|
158 }; |
|
159 |
|
160 #endif // CPRESENCEPLUGINVIRTUALGROUP_H |