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: Stored contact data interface (getters/setters) |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef MVIMPSTSTORAGECONTACT_H |
|
21 #define MVIMPSTSTORAGECONTACT_H |
|
22 |
|
23 #include <e32base.h> |
|
24 #include "tvimpstenums.h" |
|
25 // CLASS DECLARATION |
|
26 class MVPbkContactLink; |
|
27 class MVIMPSTStorageVPbkContactStore; |
|
28 |
|
29 /** |
|
30 * Getter/Setter interface for contacts. |
|
31 * |
|
32 * @lib vimpststorage.dll |
|
33 * @since 5.0 |
|
34 */ |
|
35 class MVIMPSTStorageContact |
|
36 { |
|
37 public: // Definitions |
|
38 |
|
39 /** |
|
40 * An Enum |
|
41 * to define which sorting algorithm need to be used to sort contacts. |
|
42 */ |
|
43 |
|
44 enum TSortAlgorithm |
|
45 { |
|
46 ECompareAlphabetically, /* sort alphabetically */ |
|
47 ECompareByPresence /* sort based on presence */ |
|
48 }; |
|
49 |
|
50 public: // Interface |
|
51 /** |
|
52 * Avatar data |
|
53 * this returns the avatar data of available else Knulldec8 |
|
54 * |
|
55 * @return TDesC8& avatar content of this contact or knulldec8 |
|
56 */ |
|
57 virtual const TDesC8& AvatarContent() const = 0; |
|
58 |
|
59 /** |
|
60 * User id |
|
61 * @return TDesC& User ID of this contact |
|
62 */ |
|
63 virtual const TDesC& UserId() const = 0; |
|
64 |
|
65 /** |
|
66 * User id |
|
67 * @return TDesC& User ID of this contact |
|
68 */ |
|
69 virtual const TDesC& Name() const = 0; |
|
70 |
|
71 /** |
|
72 * Online status |
|
73 * @return TOnlineStatus On-line status of this contact |
|
74 */ |
|
75 virtual TVIMPSTEnums::TOnlineStatus OnlineStatus() const = 0; |
|
76 |
|
77 /** |
|
78 * Set online status |
|
79 * @param aOnlineStatus, online status to be set. |
|
80 */ |
|
81 virtual void SetOnlineStatus( TVIMPSTEnums::TOnlineStatus aOnlineStatus ) = 0; |
|
82 |
|
83 /** |
|
84 * Set User ID |
|
85 * @param aUserId, user id to be set. |
|
86 */ |
|
87 virtual void SetUserIdL( const TDesC& aUserId ) = 0; |
|
88 |
|
89 |
|
90 virtual void SetAvatarContentL( const TDesC8& aAvatarContent , |
|
91 MVIMPSTStorageVPbkContactStore& aVPPkStoreHandler) = 0 ; |
|
92 |
|
93 /** |
|
94 * Set User ID |
|
95 * @param aUserId, user id to be set. |
|
96 */ |
|
97 virtual void SetNameL( const TDesC& aName ) = 0; |
|
98 |
|
99 /** |
|
100 * Get the status text for the contact |
|
101 * @return TDesC& reference to the status text. |
|
102 */ |
|
103 virtual const TDesC& StatusText() const = 0; |
|
104 |
|
105 /** |
|
106 * Set Status Text |
|
107 * @param aStatusText, status text to be set. |
|
108 */ |
|
109 virtual void SetStatusTextL( const TDesC& aStatusText ) = 0; |
|
110 |
|
111 /** |
|
112 * Returns virtual phonebook contact link of this contact |
|
113 * |
|
114 * @since S60 5.0 |
|
115 * @return MVPbkContactLink*, virtual phonebook contact link. Can be NULL |
|
116 */ |
|
117 virtual MVPbkContactLink* ContactLink() const = 0; |
|
118 |
|
119 |
|
120 virtual void SetAvatarIndex(TInt aIndex ) = 0 ; |
|
121 |
|
122 |
|
123 virtual TInt AvatarIndex() const = 0; |
|
124 |
|
125 /** |
|
126 * Destruction. |
|
127 */ |
|
128 virtual ~MVIMPSTStorageContact(){}; |
|
129 }; |
|
130 |
|
131 #endif // MVIMPSTSTORAGECONTACT_H |
|
132 |
|
133 // End of File |
|