|
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. This class wraps contactlink and |
|
15 * view index to one item. This is used in compositecontactview |
|
16 * to store view events |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 #include "CVPbkEventArrayItem.h" |
|
22 |
|
23 // From Vpbk |
|
24 #include <MVPbkContactLink.h> |
|
25 |
|
26 // -------------------------------------------------------------------------- |
|
27 // CVPbkEventArrayItem::CVPbkEventArrayItem |
|
28 // -------------------------------------------------------------------------- |
|
29 // |
|
30 inline CVPbkEventArrayItem::CVPbkEventArrayItem( |
|
31 TInt aContactIndex, |
|
32 TViewEventType aEvent ): |
|
33 iContactIndex ( aContactIndex ), |
|
34 iEvent( aEvent ) |
|
35 { |
|
36 // do nothing |
|
37 } |
|
38 |
|
39 // -------------------------------------------------------------------------- |
|
40 // CVPbkEventArrayItem::ConstructL |
|
41 // -------------------------------------------------------------------------- |
|
42 // |
|
43 inline void CVPbkEventArrayItem::ConstructL( |
|
44 const MVPbkContactLink& aLink ) |
|
45 { |
|
46 iLink = aLink.CloneLC(); |
|
47 CleanupStack::Pop(); // iContactLink |
|
48 } |
|
49 |
|
50 // -------------------------------------------------------------------------- |
|
51 // CVPbkEventArrayItem::~CVPbkEventArrayItem |
|
52 // -------------------------------------------------------------------------- |
|
53 // |
|
54 CVPbkEventArrayItem::~CVPbkEventArrayItem() |
|
55 { |
|
56 delete iLink; |
|
57 } |
|
58 |
|
59 // -------------------------------------------------------------------------- |
|
60 // CVPbkEventArrayItem::NewLC |
|
61 // -------------------------------------------------------------------------- |
|
62 // |
|
63 CVPbkEventArrayItem* CVPbkEventArrayItem::NewLC( |
|
64 TInt aContactLink, |
|
65 const MVPbkContactLink& aLink, |
|
66 TViewEventType aEvent ) |
|
67 { |
|
68 CVPbkEventArrayItem* self = |
|
69 new(ELeave) CVPbkEventArrayItem( aContactLink, aEvent ); |
|
70 CleanupStack::PushL( self ); |
|
71 self->ConstructL( aLink ); |
|
72 return self; |
|
73 } |
|
74 |
|
75 // -------------------------------------------------------------------------- |
|
76 // CVPbkEventArrayItem::Link |
|
77 // -------------------------------------------------------------------------- |
|
78 // |
|
79 MVPbkContactLink* CVPbkEventArrayItem::Link() |
|
80 { |
|
81 return iLink; |
|
82 } |
|
83 |
|
84 // -------------------------------------------------------------------------- |
|
85 // CVPbkEventArrayItem::Index |
|
86 // -------------------------------------------------------------------------- |
|
87 // |
|
88 TInt CVPbkEventArrayItem::Index() |
|
89 { |
|
90 return iContactIndex; |
|
91 } |
|
92 |
|
93 // -------------------------------------------------------------------------- |
|
94 // CVPbkEventArrayItem::Event |
|
95 // -------------------------------------------------------------------------- |
|
96 // |
|
97 TInt CVPbkEventArrayItem::Event() |
|
98 { |
|
99 return iEvent; |
|
100 } |
|
101 // End of file |