|
1 /* |
|
2 * Copyright (c) 2002-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: Event array item class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CVPBKEVENTARRAYITEM_H |
|
20 #define CVPBKEVENTARRAYITEM_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class MVPbkContactLink; |
|
27 |
|
28 /** |
|
29 * Virtual phonebook event array item class |
|
30 */ |
|
31 NONSHARABLE_CLASS( CVPbkEventArrayItem ) : public CBase |
|
32 { |
|
33 public: |
|
34 /// Event types |
|
35 enum TViewEventType |
|
36 { |
|
37 ERemoved = 1, |
|
38 EAdded |
|
39 }; |
|
40 |
|
41 public: |
|
42 /** |
|
43 * Creates new instance of this class |
|
44 * @param aContactIndex Contact index |
|
45 * @param aLink Link to contact |
|
46 * @param aEvent Item's event type |
|
47 * @return A new instance of this class |
|
48 */ |
|
49 static CVPbkEventArrayItem* NewLC |
|
50 ( TInt aContactIndex, |
|
51 const MVPbkContactLink& aLink, |
|
52 TViewEventType aEvent ); |
|
53 |
|
54 ~CVPbkEventArrayItem(); |
|
55 |
|
56 public: // interface |
|
57 /** |
|
58 * Getter for contact link |
|
59 * @return a link to the contact |
|
60 */ |
|
61 MVPbkContactLink* Link(); |
|
62 |
|
63 /** |
|
64 * Getter for contact index |
|
65 * @return a index of the contact |
|
66 */ |
|
67 TInt Index(); |
|
68 |
|
69 /** |
|
70 * Return item's event type |
|
71 * |
|
72 * return event type |
|
73 */ |
|
74 TInt Event(); |
|
75 |
|
76 private: |
|
77 CVPbkEventArrayItem( |
|
78 TInt aContactIndex, |
|
79 TViewEventType aEvent ); |
|
80 void ConstructL( const MVPbkContactLink& aLink ); |
|
81 |
|
82 private: |
|
83 /// Own: contact index |
|
84 TInt iContactIndex; |
|
85 /// Own: link to contact |
|
86 MVPbkContactLink* iLink; |
|
87 /// Own: View event type |
|
88 TViewEventType iEvent; |
|
89 |
|
90 }; |
|
91 |
|
92 #endif // CVPBKEVENTARRAYITEM_H |
|
93 |
|
94 // End of file |