|
1 /* |
|
2 * Copyright (c) 2003-2005 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: Network operations for one group |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef MCAGROUPOPERATIONS_H |
|
21 #define MCAGROUPOPERATIONS_H |
|
22 |
|
23 // INCLUDES |
|
24 |
|
25 #include <e32base.h> |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class CImpsCommonGroupProps; |
|
29 class CImpsPrivateGroupProps; |
|
30 class MCAStoredGroup; |
|
31 |
|
32 // CLASS DECLARATION |
|
33 |
|
34 /** |
|
35 * MCAGroupOperations interface class. Provides network related |
|
36 * operations for one group. |
|
37 * |
|
38 * @lib CAEngine.lib |
|
39 * @since 2.1 |
|
40 */ |
|
41 class MCAGroupOperations |
|
42 { |
|
43 |
|
44 public: // New functions |
|
45 |
|
46 /** |
|
47 * Returns the operation id of current operation |
|
48 * @return Operation id |
|
49 */ |
|
50 virtual TInt OperationId() = 0; |
|
51 |
|
52 /** |
|
53 * Joins the group |
|
54 * @param aScreenName screen name |
|
55 * @param aUsers If we want the group's user list, set this to ETrue |
|
56 * @param aIsFavourite Is this group saved or not |
|
57 * @return CSP error code |
|
58 */ |
|
59 virtual TInt JoinL( const TDesC& aScreenName, TBool aUsers, |
|
60 TBool aIsFavourite ) = 0; |
|
61 |
|
62 /** |
|
63 * Creates new group to server |
|
64 * @param aScreenName screen name |
|
65 * @param aJoinGroup Should the group be joined after creation |
|
66 * @return CSP error code |
|
67 */ |
|
68 virtual TInt CreateGroupL( const TDesC& aScreenName, |
|
69 TBool aJoinGroup ) = 0; |
|
70 |
|
71 /** |
|
72 * Leaves the group |
|
73 * @return CSP error code |
|
74 */ |
|
75 virtual TInt LeaveL() = 0; |
|
76 |
|
77 /** |
|
78 * Deletes the group from server |
|
79 * @return CSP error code |
|
80 */ |
|
81 virtual TInt DeleteFromNetworkL() = 0; |
|
82 |
|
83 /** |
|
84 * Updates the group properties to server |
|
85 * @param aCommonProps Common group properties |
|
86 * @param aPrivateProps Private group properties |
|
87 * @return CSP error code |
|
88 */ |
|
89 virtual TInt UpdatePropertiesL( CImpsCommonGroupProps* aCommonProps, |
|
90 CImpsPrivateGroupProps* aPrivateProps |
|
91 ) = 0; |
|
92 |
|
93 /** |
|
94 * Adds members to group |
|
95 * @param aUserList List of users |
|
96 * @param aScreenNameList List of screen names |
|
97 * @return CSP error code |
|
98 */ |
|
99 virtual TInt AddMembersL( const CDesCArray& aUserList, |
|
100 const CDesCArray& aScreenNameList ) = 0; |
|
101 |
|
102 /** |
|
103 * Removes members from group |
|
104 * @param aUserList List of users |
|
105 * @return CSP error code |
|
106 */ |
|
107 virtual TInt RemoveMembersL( const CDesCArray& aUserList ) = 0; |
|
108 |
|
109 /** |
|
110 * Modifies members status in group |
|
111 * @param aAdminList Administrators |
|
112 * @param aModerList Moderators |
|
113 * @param aOrdinaryList Ordinary group members |
|
114 * @return CSP error code |
|
115 */ |
|
116 virtual TInt ModifyMembersL( const CDesCArray* aAdminList, |
|
117 const CDesCArray* aModerList, |
|
118 const CDesCArray* aOrdinaryList ) = 0; |
|
119 |
|
120 /** |
|
121 * Gets the properties of group |
|
122 * @param aCommonProps Common group properties |
|
123 * @param aPrivateProps Private group properties |
|
124 * @return CSP error code |
|
125 */ |
|
126 virtual TInt GetPropertiesL( CImpsCommonGroupProps*& aCommonProps, |
|
127 CImpsPrivateGroupProps*& aPrivateProps |
|
128 ) = 0; |
|
129 |
|
130 /** |
|
131 * Gets the members of group |
|
132 * @param aUserList List of users |
|
133 * @param aScreenNames List of screen names |
|
134 * @param aModers List of moderators |
|
135 * @param aAdmins List of administrators |
|
136 * @return CSP error code |
|
137 */ |
|
138 virtual TInt GetMembersL( CDesCArray& aUserList, |
|
139 CDesCArray& aScreenNames, |
|
140 CDesCArray& aModers, |
|
141 CDesCArray& aAdmins ) = 0; |
|
142 |
|
143 /** |
|
144 * Gets the banned users of group |
|
145 * @param aRejectList List of rejected users |
|
146 * @return CSP error code |
|
147 */ |
|
148 virtual TInt GetRejectListL( CDesCArray& aRejectList ) = 0; |
|
149 |
|
150 /** |
|
151 * Sets the banned users of group |
|
152 * @param aRejectList List of rejected users |
|
153 * @param aEnabledList List of users to be removed from rejected list |
|
154 * @return CSP error code |
|
155 */ |
|
156 virtual TInt SetRejectListL( const CDesCArray& aRejectedList, |
|
157 const CDesCArray& aEnabledList ) = 0; |
|
158 |
|
159 protected: // Constructors and destructor |
|
160 |
|
161 /** |
|
162 * Destructor. |
|
163 */ |
|
164 virtual ~MCAGroupOperations() {}; |
|
165 |
|
166 }; |
|
167 |
|
168 #endif // MCAGroupOperations_H |
|
169 |
|
170 // End of File |