|
1 /* |
|
2 * Copyright (c) 2008-2009 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: Definition of class CESMRContactLinkIterator. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CESMRCONTACTLINKITERATOR_H |
|
20 #define CESMRCONTACTLINKITERATOR_H |
|
21 |
|
22 #include <e32base.h> |
|
23 //<cmail> |
|
24 #include "mfsccontactlinkiterator.h" |
|
25 //</cmail> |
|
26 |
|
27 class MVPbkContactLinkArray; |
|
28 |
|
29 /** |
|
30 * Vitual phonebooks's MVPbkContactLink implementation. |
|
31 */ |
|
32 NONSHARABLE_CLASS( CESMRContactLinkIterator ) : public CBase, |
|
33 public MFscContactLinkIterator |
|
34 { |
|
35 public: |
|
36 |
|
37 /** |
|
38 * Two-phase constructor. |
|
39 * |
|
40 * @return new instance of th class |
|
41 */ |
|
42 static CESMRContactLinkIterator* NewL( ); |
|
43 |
|
44 /** |
|
45 * Destructor. |
|
46 */ |
|
47 ~CESMRContactLinkIterator( ); |
|
48 |
|
49 /** |
|
50 * Sets link array for iterating. Ownership is transferred. |
|
51 * |
|
52 * @param aContactLinkArray contact link array |
|
53 */ |
|
54 void SetContactLinkArray( MVPbkContactLinkArray* aContactLinkArray ); |
|
55 |
|
56 public: // from MFscContactLinkIteratator |
|
57 TInt ContactCount( ) const; |
|
58 TBool HasNextContact( ) const; |
|
59 MVPbkContactLink* NextContactL( ); |
|
60 void SetToFirstContact( ); |
|
61 TInt GroupCount( ) const; |
|
62 TBool HasNextGroup( ) const; |
|
63 MVPbkContactLink* NextGroupL( ); |
|
64 void SetToFirstGroup( ); |
|
65 |
|
66 private: |
|
67 /** |
|
68 * Private constructor. |
|
69 */ |
|
70 CESMRContactLinkIterator( ); |
|
71 |
|
72 private: //Data |
|
73 /// Own: Current link index. |
|
74 TInt iContactLinkArrayIndex; |
|
75 /// Own: Contact link array. |
|
76 MVPbkContactLinkArray* iContactLinkArray; |
|
77 }; |
|
78 |
|
79 #endif |