1 /* |
|
2 * Copyright (c) 2008-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: Open Conversations |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef MIMCVENGINEOPENCHATS_H_H |
|
21 #define MIMCVENGINEOPENCHATS_H_H |
|
22 |
|
23 |
|
24 //forward declarations |
|
25 |
|
26 |
|
27 enum TOpenChatsEventType |
|
28 { |
|
29 EUnReadCountChanged, |
|
30 ENewChat, |
|
31 EChatClosed, |
|
32 EChatAllClosed, |
|
33 EReadCountChanged |
|
34 }; |
|
35 |
|
36 |
|
37 //Observer Class |
|
38 class MIMCVEngineOpenChatsObserver |
|
39 { |
|
40 public: |
|
41 |
|
42 /** |
|
43 * Handle Chnage events for Open Conversations |
|
44 * @param aIndex Index of the Item Change. |
|
45 * @param aChangeType, Change Type listed above |
|
46 */ |
|
47 virtual void HandleChangeL(TInt aServiceId, TInt aIndex, TOpenChatsEventType aChangeType) = 0; |
|
48 |
|
49 /*set the status msg.When uses is in conversation one user and receive |
|
50 *msg from some other user. |
|
51 *@param aIndex Index of the Item which sent message. |
|
52 */ |
|
53 virtual void SetStatusMsgL(TInt aServiceId, TInt aIndex,const TDesC & aMsg)= 0; |
|
54 |
|
55 /** |
|
56 * Virtual destructor |
|
57 */ |
|
58 virtual ~MIMCVEngineOpenChatsObserver() |
|
59 { |
|
60 |
|
61 }; |
|
62 }; |
|
63 |
|
64 |
|
65 |
|
66 // CLASS DECLARATION |
|
67 |
|
68 /** |
|
69 * Interface for Open Conversations |
|
70 * |
|
71 * @lib imcvuiengine.dll |
|
72 * @since 5.0 |
|
73 */ |
|
74 class MIMCVEngineOpenChats |
|
75 { |
|
76 |
|
77 public: |
|
78 |
|
79 /** |
|
80 * GetDisplayNameL: returns the Identification |
|
81 * @param aIndex - Index of the item for which Identification |
|
82 * is required |
|
83 * @return TPtrC - Identification |
|
84 */ |
|
85 virtual TPtrC GetDisplayNameL(TInt aIndex) const = 0; |
|
86 |
|
87 |
|
88 /** |
|
89 * GetTargetIdL: returns the Conversation Party ID |
|
90 * @param aIndex - Index of the item |
|
91 * @return Conversation Party ID |
|
92 */ |
|
93 virtual const TDesC& GetTargetIdL(TInt aIndex) const = 0; |
|
94 |
|
95 |
|
96 /** |
|
97 * Count: Returns the number of items |
|
98 * @return TInt - Total number of openchats item |
|
99 */ |
|
100 virtual TInt Count() const = 0; |
|
101 |
|
102 |
|
103 /** |
|
104 * SetActiveItemL: Sets the item as the current active one |
|
105 * @param aIndex - Index of the item |
|
106 * @return void |
|
107 */ |
|
108 virtual void SetActiveItemL( const TInt aIndex ) = 0; |
|
109 |
|
110 |
|
111 /** |
|
112 * GetActiveItem: Gets the current active conversation |
|
113 * @return Active Conversation Party Id |
|
114 */ |
|
115 virtual const TDesC& GetActiveItem() const = 0; |
|
116 |
|
117 /** |
|
118 * Returns the pending messages status of the contact item |
|
119 * @param aIndex - Index of the item |
|
120 * @return bool: true if the conversation item has pending messages |
|
121 * else return false |
|
122 */ |
|
123 virtual TBool IsMsgPendingL( const TInt aIndex ) const = 0; |
|
124 |
|
125 /** |
|
126 * Find the index of the item in the Conversation List |
|
127 * @param aItem - Conversation Party Id |
|
128 * @return aIndex - Index of the item |
|
129 */ |
|
130 virtual TInt FindIndexL(const TDesC& aItem) = 0; |
|
131 |
|
132 /** |
|
133 * Register observer for chat events. Remember to unregister |
|
134 * when not needed |
|
135 * @param aObserver Observer which is registered. |
|
136 */ |
|
137 virtual void RegisterObserver(MIMCVEngineOpenChatsObserver* aChatObserver) = 0; |
|
138 |
|
139 |
|
140 /** |
|
141 * Unregister observer for chat events. |
|
142 * |
|
143 */ |
|
144 virtual void UnRegisterObserver() = 0; |
|
145 |
|
146 virtual void ResetL() = 0; |
|
147 |
|
148 |
|
149 /** |
|
150 * Virtual destructor |
|
151 */ |
|
152 virtual ~MIMCVEngineOpenChats() |
|
153 { |
|
154 }; |
|
155 |
|
156 |
|
157 }; |
|
158 |
|
159 #endif // MIMCVENGINEOPENCHATS_H_H |
|
160 |
|
161 // End of File |
|