|
1 /* |
|
2 * Copyright (c) 2008 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: base class declaration for accessing the cache |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __MIMCACHEACCESSOR_H |
|
21 #define __MIMCACHEACCESSOR_H |
|
22 |
|
23 #include "imcachedefs.h" |
|
24 |
|
25 class MIMCacheEventHandler; |
|
26 /** |
|
27 * An interface for updating conversation information |
|
28 * |
|
29 * @since 5.0 |
|
30 */ |
|
31 class MIMCacheAccessor |
|
32 { |
|
33 public: |
|
34 |
|
35 /** |
|
36 * Register to observer conversation data updates |
|
37 * @param aObserver the observer interface |
|
38 */ |
|
39 virtual void RegisterObserverL( MIMCacheEventHandler& aObserver ) = 0; |
|
40 |
|
41 /** |
|
42 * Unregister a conversation data update observer |
|
43 * @param aObserver the observer interface |
|
44 */ |
|
45 virtual void UnRegisterObserver( MIMCacheEventHandler& aObserver ) = 0; |
|
46 |
|
47 /** |
|
48 * to get the unread message count from server |
|
49 * @param aOwnUserId , logged in user id |
|
50 * @return number of unread msg count |
|
51 */ |
|
52 virtual TInt GetUnreadMessageCountL( const TDesC& aBuddyId ) = 0; |
|
53 |
|
54 /** |
|
55 * to get the all unread message count from server |
|
56 * @param , aOwnUserId logged in user id |
|
57 * @return number of all unread msg count |
|
58 */ |
|
59 virtual TInt GetAllUnreadMessageCountL() = 0 ; |
|
60 |
|
61 /** |
|
62 * check if already conversation opened |
|
63 * @param aServiceId, serviceid to use |
|
64 * @param aOwnUserId, own user id |
|
65 * @param aRecipientId, the selected user id with whom conversation is started |
|
66 * @return ETrue if already exist else EFlase. |
|
67 */ |
|
68 virtual TBool IsConversationExistL( const TDesC& aBuddyId ) = 0 ; |
|
69 |
|
70 /** |
|
71 * closes conversation and commit operation |
|
72 * @param aServiceId service id. |
|
73 * @param aOwnId own user id. |
|
74 * @param aRecipientId recipient's user id. |
|
75 */ |
|
76 virtual void CloseConversationL( const TDesC& aBuddyId ) = 0; |
|
77 |
|
78 |
|
79 /** |
|
80 * get the chat list corresponding to service |
|
81 * @param aServiceId service id |
|
82 * @return Array of chats |
|
83 */ |
|
84 virtual RArray<SIMCacheChatItem> GetChatListL( const TInt aServiceId ) = 0 ; |
|
85 |
|
86 |
|
87 |
|
88 protected: |
|
89 /** |
|
90 * Destructor |
|
91 */ |
|
92 virtual ~MIMCacheAccessor() {}; |
|
93 }; |
|
94 |
|
95 #endif //__MIMCACHEUPDATER_H |