|
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: Interface for group operations |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MCAGROUPPC_H |
|
20 #define MCAGROUPPC_H |
|
21 |
|
22 |
|
23 // INCLUDES |
|
24 |
|
25 #include "TEnumsPC.h" |
|
26 #include "badesca.h" |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class MCAGroupObserverPC; |
|
30 class MCAGroupEventObserverPC; |
|
31 class MCAServerContactsArrayPC; |
|
32 |
|
33 |
|
34 |
|
35 // CLASS DECLARATION |
|
36 /** |
|
37 * Group interface for UI and Engine. |
|
38 * |
|
39 * @lib wvuiprocessng.lib |
|
40 * @since 3.2 |
|
41 */ |
|
42 class MCAGroupPC |
|
43 |
|
44 { |
|
45 public: |
|
46 |
|
47 /** |
|
48 * Set the current group |
|
49 * @param aGroupId groupid of the active group in the local list. |
|
50 */ |
|
51 virtual void SetActiveGroupChatL( const TDesC& aGroupId ) = 0; |
|
52 |
|
53 /** |
|
54 * To register the UI component as an observer |
|
55 * to listen to the chat related events |
|
56 * @param aGroupObserverPC - Ptr to the group observer to be added |
|
57 * for chat/message error related events |
|
58 */ |
|
59 virtual void RegisterGroupObserver( MCAGroupObserverPC* |
|
60 aGroupObserverPC ) = 0; |
|
61 /** |
|
62 * To unregister the UI side observer |
|
63 */ |
|
64 virtual void UnRegisterGroupObserver() = 0; |
|
65 |
|
66 /** |
|
67 * Set an observer for events of individual group (join, leave, etc.) |
|
68 * @param aGroupId The group id |
|
69 * @param aGroupEventObserverPC The observer to be added |
|
70 */ |
|
71 virtual void SetGroupEventObserverL( MCAGroupEventObserverPC* aGroupEventObserverPC, |
|
72 const TDesC& aGroupId ) = 0; |
|
73 |
|
74 /** |
|
75 * Part of container identifier which contains this message |
|
76 * @return Identifier to identify container which contains this message |
|
77 */ |
|
78 virtual const TDesC& ActiveGroupId() = 0; |
|
79 |
|
80 /** |
|
81 * Part of identification of container |
|
82 * @return Screen name of container owner. |
|
83 */ |
|
84 virtual const TDesC& ScreenName() const = 0; |
|
85 |
|
86 /** |
|
87 * InitialiseResourcesL - intialise iGroupId |
|
88 * and some other members like read/write interface |
|
89 * @param aGroupId - the current groupid |
|
90 */ |
|
91 virtual void InitialiseResourcesL( const TDesC& aGroupId ) = 0; |
|
92 |
|
93 |
|
94 /** |
|
95 * Tests whether the logging is on or not. |
|
96 * @return ETrue if on EFalse if not. |
|
97 */ |
|
98 virtual TBool IsLoggingOn() const = 0; |
|
99 |
|
100 /** |
|
101 * Release all resources that was initialised |
|
102 */ |
|
103 virtual void ReleaseResources() = 0; |
|
104 |
|
105 /** |
|
106 * Name of the group |
|
107 * @return name of the group |
|
108 */ |
|
109 virtual TPtrC GroupName() const = 0; |
|
110 |
|
111 |
|
112 /** |
|
113 * Ends the logging in a specified group. |
|
114 */ |
|
115 virtual void EndLoggingL() = 0; |
|
116 |
|
117 |
|
118 /** |
|
119 * Is private messages allowed |
|
120 * @return EImpsPropYes if allowed |
|
121 */ |
|
122 virtual TEnumsPC::TImpsPropertyBoolPC IsPrivateAllowed() = 0; |
|
123 |
|
124 |
|
125 /** |
|
126 * Is group open or closed |
|
127 * @return EImpsPropYes if open |
|
128 */ |
|
129 virtual TEnumsPC::TImpsPropertyBoolPC IsOpen() = 0; |
|
130 |
|
131 |
|
132 |
|
133 /** |
|
134 * Count of stored groups |
|
135 * @return Count of groups |
|
136 */ |
|
137 virtual TInt GroupCount( TBool aOnlyVisible ) const = 0; |
|
138 |
|
139 |
|
140 /** |
|
141 * Count of stored contacts |
|
142 * @param aSkipOfflineContacts ETrue skip offline contacts. |
|
143 * EFalse Do not skip. |
|
144 * @return Count of contacts |
|
145 */ |
|
146 virtual TInt ContactCount( |
|
147 TBool aSkipOfflineContacts = EFalse ) const = 0; |
|
148 |
|
149 |
|
150 /** |
|
151 * Gets the properties of group |
|
152 * @param aIsGroupProps return ETrue if |
|
153 * Common group properties are defined |
|
154 */ |
|
155 virtual TInt GetPropertiesL( TBool& aIsGroupProps ) = 0; |
|
156 |
|
157 |
|
158 /** |
|
159 * SendMessageL |
|
160 * @param aMessageBuffer: message to be sent |
|
161 * @param aRecipients: List of all recipients to whom |
|
162 * message has to be sent |
|
163 */ |
|
164 virtual void SendMessageL( const TDesC& aMessageBuffer, |
|
165 CDesCArrayFlat& aRecipients ) = 0; |
|
166 |
|
167 /** |
|
168 * To populate the two arrays of group names and goup ids |
|
169 * @return - Fills and returns groupname along with the ID |
|
170 * Ownership is transferred to the caller |
|
171 */ |
|
172 virtual MCAServerContactsArrayPC* GetGroupPairArrayLC() = 0; |
|
173 |
|
174 /** |
|
175 * To Check whether a GroupChat Id is the current active one |
|
176 * in groupChatView |
|
177 * @param aGroupId - Group Id |
|
178 * @return ETrue - if "aGroupId" is current active one in ChatView |
|
179 * else EFalse |
|
180 */ |
|
181 virtual TBool IsActiveGroupChat( const TDesC& aGroupId ) = 0; |
|
182 |
|
183 /** |
|
184 * Saves the group conversation |
|
185 * @param aLogFilename - log file name in which group conversation would be saved |
|
186 */ |
|
187 virtual void SaveChatL( const TDesC& aLogFilename ) = 0; |
|
188 |
|
189 |
|
190 /** |
|
191 * Gets the message count from ReadInterface |
|
192 */ |
|
193 virtual TInt MessageCount() = 0; |
|
194 |
|
195 public: |
|
196 |
|
197 /** |
|
198 * Destructor. |
|
199 */ |
|
200 virtual ~MCAGroupPC() |
|
201 { |
|
202 |
|
203 }; |
|
204 |
|
205 |
|
206 }; |
|
207 |
|
208 #endif // MCAGROUPPC_H |
|
209 |
|
210 // End of File |