|
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 Conversation Process Component |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef MCACONVERSATIONPC_H |
|
21 #define MCACONVERSATIONPC_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32std.h> |
|
25 #include <badesca.h> |
|
26 |
|
27 #include "MCAMessageRWInterfacePC.h" |
|
28 #include "TEnumsPC.h" |
|
29 |
|
30 class MCAConversationObserverPC; |
|
31 class MCAMessage; |
|
32 class MCAMessagesReadInterface; |
|
33 class MCAMessagesWriteInterface; |
|
34 class MCAMessageUtils; |
|
35 class MCAServerContactsArrayPC; |
|
36 |
|
37 // CLASS DECLARATION |
|
38 |
|
39 /** |
|
40 * Interface for conversations |
|
41 * |
|
42 * @lib wvuiprocessng.dll |
|
43 * @since 3.2 |
|
44 */ |
|
45 class MCAConversationPC |
|
46 { |
|
47 public: // Interface |
|
48 |
|
49 |
|
50 /** |
|
51 * AddConversationContactsObserverL: To add the UI component as an observer |
|
52 * to listen to the contact related events |
|
53 * @param MCAConversationChatObserverPC - Ptr to the object to be added |
|
54 */ |
|
55 virtual void AddObserver( MCAConversationObserverPC* aObserver ) = 0; |
|
56 |
|
57 |
|
58 /** |
|
59 * RemoveConversationObserver : To remove the added observer |
|
60 */ |
|
61 virtual void RemoveObserver() = 0; |
|
62 |
|
63 |
|
64 |
|
65 /** |
|
66 * Delete identified chat container |
|
67 * @param aServerAddress Part of identifier to identify container. |
|
68 * @param aUserId Part of identifier to identify container. |
|
69 * @param aTargetId Part of identifier to identify container. |
|
70 */ |
|
71 virtual void DeleteChatL( const TDesC& aServerAddress, |
|
72 const TDesC& aUserId, |
|
73 const TDesC& aTargetId ) = 0; |
|
74 |
|
75 |
|
76 /** |
|
77 * InitialiseResourcesL |
|
78 * @param aContactId - the current conversation wvid |
|
79 */ |
|
80 virtual void InitialiseResourcesL( const TDesC& aContactId ) = 0; |
|
81 |
|
82 /** |
|
83 * ReleaseResourcesL |
|
84 * |
|
85 */ |
|
86 virtual void ReleaseResources() = 0; |
|
87 |
|
88 |
|
89 /** |
|
90 * GetIdentification |
|
91 * @param aContactId - wvid |
|
92 * @return Identification of contact. |
|
93 * Alias if nickname is not set and alias is enabled. |
|
94 * Wvid without domain and prefix if nickname does not |
|
95 exists and alias is not enabled or not exists. |
|
96 */ |
|
97 virtual const TPtrC GetIdentification( const TDesC& aContactId ) = 0; |
|
98 |
|
99 |
|
100 /** |
|
101 * Part of container identifier which contains this message |
|
102 * @return Identifier to identify container which contains this message |
|
103 */ |
|
104 virtual const TDesC& GetReadInterfaceId() = 0; |
|
105 |
|
106 |
|
107 /** |
|
108 * GetLogFileName |
|
109 * @param ref to TPtr - This will be set within this function and |
|
110 * returned to the caller |
|
111 */ |
|
112 virtual void GetLogFileName( TPtr& aLogFileNamePtr ) = 0; |
|
113 |
|
114 /** |
|
115 * Starts logging in a specified group. |
|
116 * @param aLogFileName is the file name which will be shown in the |
|
117 * first line of the notepad memo (after end logging). |
|
118 */ |
|
119 virtual void RecordChatL( const TDesC& aLogFilename ) = 0; |
|
120 |
|
121 |
|
122 /** |
|
123 * SendMessageL |
|
124 * @param aMessageBuffer. |
|
125 */ |
|
126 virtual void SendMessageL( const TDesC& aMessageBuffer ) = 0; |
|
127 |
|
128 /** |
|
129 * PopulateGroupDetailsLC |
|
130 * @return - Fills and returns groupname along with the ID |
|
131 * Ownership is transferred to the caller |
|
132 */ |
|
133 virtual MCAServerContactsArrayPC* PopulateGroupDetailsLC() = 0; |
|
134 |
|
135 |
|
136 /** |
|
137 * Get name of chat. |
|
138 * @return Name of chat. |
|
139 */ |
|
140 virtual TPtrC GetReadInterfaceName() = 0; |
|
141 |
|
142 |
|
143 /** |
|
144 * Set the current conversation |
|
145 * @param aIndex of the chat in the local list. |
|
146 */ |
|
147 virtual void SetActiveConversationL( const TDesC& aWvId ) = 0; |
|
148 |
|
149 /** |
|
150 * Find any contact which id is aContactId |
|
151 * @param aContactId Contactid to recognize contact. |
|
152 * @return ETrue if found else EFalse |
|
153 */ |
|
154 virtual TBool FindAnyContact( const TDesC& aContactId ) = 0; |
|
155 |
|
156 /** |
|
157 * Count of stored groups |
|
158 * @return Count of groups |
|
159 */ |
|
160 virtual TInt GroupCount( TBool aOnlyVisible ) = 0; |
|
161 |
|
162 /** |
|
163 * Count of stored contacts |
|
164 * @return Count of contacts |
|
165 */ |
|
166 virtual TInt ContactCount() = 0; |
|
167 |
|
168 /** |
|
169 * CheckReply |
|
170 * @param aWvid - contact id |
|
171 * @param aContactInlist - also checks whether the contact is in contact list |
|
172 */ |
|
173 virtual void CheckReply( TPtrC& aWvid, TBool& aContactInlist ) = 0; |
|
174 |
|
175 |
|
176 |
|
177 /** |
|
178 * IsActiveConversation |
|
179 * @param aContactId - contact id |
|
180 * @return ETrue - if the passed contactID is the current active conversation |
|
181 * EFalse - Otherwise |
|
182 */ |
|
183 virtual TBool IsActiveConversation( const TDesC& aContactId ) = 0; |
|
184 |
|
185 /** |
|
186 * SetMessageReadInterfaceL: Calls the MessageReadInterface() of engine component |
|
187 * to set the read interface |
|
188 * @param aWvId - wv user id |
|
189 * @return void |
|
190 */ |
|
191 virtual void SetMessageReadInterfaceL( const TDesC& aWvId ) = 0; |
|
192 |
|
193 /** |
|
194 * SetMessageWriteInterfaceL: Calls the MessageWriteInterface() of engine component |
|
195 * to set the write interface |
|
196 * @return void |
|
197 */ |
|
198 virtual void SetMessageWriteInterfaceL() = 0; |
|
199 |
|
200 |
|
201 /** |
|
202 * Closes all open conversations |
|
203 */ |
|
204 virtual void CloseConversations() = 0; |
|
205 |
|
206 /** |
|
207 * Leaves every joined group. |
|
208 */ |
|
209 virtual void LeaveJoinedGroupsL() = 0; |
|
210 |
|
211 /** |
|
212 * Gets the message count from ReadInterface |
|
213 */ |
|
214 virtual TInt MessageCount() = 0; |
|
215 |
|
216 /** |
|
217 * Destructor |
|
218 */ |
|
219 virtual ~MCAConversationPC() {} |
|
220 |
|
221 |
|
222 }; |
|
223 |
|
224 |
|
225 #endif // MCACONVERSATIONPC_H |
|
226 |
|
227 // End of File |