|
1 /* |
|
2 * Copyright (c) 2007 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: This is a utility class for server. Server stores plugin |
|
15 * information through this class. Also used in while sending |
|
16 * pending notification to client |
|
17 * |
|
18 */ |
|
19 |
|
20 #ifndef __C_CS_CONVERSATION_EVENT_H__ |
|
21 #define __C_CS_CONVERSATION_EVENT_H__ |
|
22 |
|
23 // SYSTEM INCLUDES |
|
24 |
|
25 //USER INCLUDES |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class CCsClientConversation; |
|
29 |
|
30 // CLASS DECLARATION |
|
31 /** |
|
32 * This is a utility class for server. Server stores plugin |
|
33 * information through this class. Also used in while sending |
|
34 * pending notification to client |
|
35 * |
|
36 * @remarks Lib: CsServerClientAPI.lib |
|
37 * @since S60 v5.0 |
|
38 */ |
|
39 class CCsConversationEvent: public CBase |
|
40 { |
|
41 public: |
|
42 |
|
43 /** |
|
44 * Two phase construction |
|
45 * @return Instance of CCsConversationEvent |
|
46 */ |
|
47 static CCsConversationEvent* NewL(); |
|
48 |
|
49 /** |
|
50 * Destructor |
|
51 */ |
|
52 ~CCsConversationEvent(); |
|
53 |
|
54 public: |
|
55 |
|
56 /** |
|
57 * Get the client conversation object |
|
58 * |
|
59 * @return CCsClientConversation instance |
|
60 */ |
|
61 CCsClientConversation* ClientConversation() const; |
|
62 |
|
63 /** |
|
64 * Sets the client conversation of this object |
|
65 * |
|
66 * @param aEntry The ClientConversation object |
|
67 */ |
|
68 void SetClientConversationL( |
|
69 const CCsClientConversation& aClientConversation); |
|
70 |
|
71 /** |
|
72 * Sets the conversation event |
|
73 * |
|
74 * @param aConversationEvent Event(add,modify,delete) |
|
75 */ |
|
76 void SetEvent( |
|
77 const TUint32 aConversationEvent); |
|
78 |
|
79 /** |
|
80 * Get the conversation event |
|
81 * |
|
82 * @return - event |
|
83 */ |
|
84 TUint32 Event() const; |
|
85 |
|
86 /** |
|
87 * Compares 2 CCsConversationEvent objects based on ConversationEntryId |
|
88 * |
|
89 * @param aObj1 Reference to CCsConversationEntry. |
|
90 * @param aObj2 Reference to CCsConversationEntry |
|
91 * @return ETrue if ConvEntryId of 2 objects are same else EFalse |
|
92 */ |
|
93 static TBool CompareByEntryId( |
|
94 const CCsConversationEvent& aObj1, |
|
95 const CCsConversationEvent& aObj2); |
|
96 |
|
97 /** |
|
98 * Is new conversation list event set in this object |
|
99 * |
|
100 * @return TBool ETrue/EFalse |
|
101 */ |
|
102 TBool IsNewConversationListEventSet() const; |
|
103 |
|
104 /** |
|
105 * Is update conversation list event set in this object |
|
106 * |
|
107 * @return TBool ETrue/EFalse |
|
108 */ |
|
109 TBool IsUpdateConversationListEventSet() const; |
|
110 |
|
111 /** |
|
112 * Is delete conversation list event set in this object |
|
113 * |
|
114 * @return TBool ETrue/EFalse |
|
115 */ |
|
116 TBool IsDeleteConversationListEventSet() const; |
|
117 |
|
118 /** |
|
119 * Is new conversation event set in this object |
|
120 * |
|
121 * @return TBool ETrue/EFalse |
|
122 */ |
|
123 TBool IsNewConversationEventSet() const; |
|
124 |
|
125 /** |
|
126 * Is update conversation event set in this object |
|
127 * |
|
128 * @return TBool ETrue/EFalse |
|
129 */ |
|
130 TBool IsUpdateConversationEventSet() const; |
|
131 |
|
132 /** |
|
133 * Is delete conversation event set in this object |
|
134 * |
|
135 * @return TBool ETrue/EFalse |
|
136 */ |
|
137 TBool IsDeleteConversationEventSet() const; |
|
138 |
|
139 /** |
|
140 * Refresh conversation list event set. |
|
141 * @return TBool ETrue/EFalse |
|
142 */ |
|
143 TBool IsRefreshConversationListEventSet() const; |
|
144 |
|
145 /** |
|
146 * Refresh conversation event set. |
|
147 * @return TBool ETrue/EFalse |
|
148 */ |
|
149 TBool IsRefreshConversationEventSet() const; |
|
150 |
|
151 private: // functions |
|
152 |
|
153 /** |
|
154 * Default Constructor |
|
155 */ |
|
156 CCsConversationEvent(); |
|
157 |
|
158 /** |
|
159 * Second phase constructor |
|
160 */ |
|
161 void ConstructL(); |
|
162 |
|
163 private: // data members |
|
164 |
|
165 /** |
|
166 * ClientConversation object containing Conversation entry |
|
167 * Own. |
|
168 */ |
|
169 CCsClientConversation* iClientConversation; |
|
170 |
|
171 /** |
|
172 * Conversation Event received from plugins |
|
173 * like new, update, delete events. |
|
174 * Opration performed will be Bitwise |
|
175 */ |
|
176 TUint32 iEvent; |
|
177 |
|
178 }; |
|
179 |
|
180 #endif // __C_CS_CONVERSATION_EVENT_H__ |