20
|
1 |
/*
|
|
2 |
* Copyright (c) 2005-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: Phonebook 2 contact view builder.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef CPBK2CONTACTVIEWBUILDER_H
|
|
20 |
#define CPBK2CONTACTVIEWBUILDER_H
|
|
21 |
|
|
22 |
// INCLUDE FILES
|
|
23 |
#include <e32base.h>
|
|
24 |
#include <Pbk2ContactView.hrh>
|
|
25 |
|
|
26 |
// FORWARD DECLARATIONS
|
|
27 |
class CVPbkContactManager;
|
|
28 |
class CVPbkContactViewDefinition;
|
|
29 |
class MVPbkContactViewBase;
|
|
30 |
class CPbk2StorePropertyArray;
|
|
31 |
class CVPbkContactStoreUriArray;
|
|
32 |
class MVPbkContactViewObserver;
|
|
33 |
class MVPbkFieldTypeList;
|
|
34 |
class CVPbkFieldTypeSelector;
|
|
35 |
class MVPbkContactSelector;
|
|
36 |
|
|
37 |
// CLASS DECLARATION
|
|
38 |
|
|
39 |
/**
|
|
40 |
* Phonebook 2 contact view builder.
|
|
41 |
*/
|
|
42 |
class CPbk2ContactViewBuilder : public CBase
|
|
43 |
{
|
|
44 |
public: // Construction and destruction
|
|
45 |
|
|
46 |
/**
|
|
47 |
* Creates a new instance of this class.
|
|
48 |
*
|
|
49 |
* @param aContactManager Virtual Phonebook contact manager.
|
|
50 |
* @param aStoreProperties Store property array.
|
|
51 |
* @return A new instance of this class.
|
|
52 |
*/
|
|
53 |
IMPORT_C static CPbk2ContactViewBuilder* NewLC(
|
|
54 |
CVPbkContactManager& aContactManager,
|
|
55 |
CPbk2StorePropertyArray& aStoreProperties );
|
|
56 |
|
|
57 |
/**
|
|
58 |
* Destructor.
|
|
59 |
*/
|
|
60 |
~CPbk2ContactViewBuilder();
|
|
61 |
|
|
62 |
public: // Interface
|
|
63 |
|
|
64 |
/**
|
|
65 |
* Creates a contact view for the stores specified in the
|
|
66 |
* given array.
|
|
67 |
*
|
|
68 |
* @param aUriArray Array of URIs of stores to include
|
|
69 |
* in the view.
|
|
70 |
* @param aObserver Observer for the view.
|
|
71 |
* @param aSortOrder Sort order for the view.
|
|
72 |
* @param aFilter Field type selector used to filter the view.
|
|
73 |
* @param aFlags TVPbkContactViewFlag flags for view modifying
|
|
74 |
* @return The contact view.
|
|
75 |
*/
|
|
76 |
IMPORT_C MVPbkContactViewBase* CreateContactViewForStoresLC(
|
|
77 |
const CVPbkContactStoreUriArray& aUriArray,
|
|
78 |
MVPbkContactViewObserver& aObserver,
|
|
79 |
const MVPbkFieldTypeList& aSortOrder,
|
|
80 |
CVPbkFieldTypeSelector* aFilter,
|
|
81 |
TUint32 aFlags ) const;
|
|
82 |
|
|
83 |
/**
|
|
84 |
* Creates a contact view for the stores specified in the
|
|
85 |
* given array.
|
|
86 |
*
|
|
87 |
* @param aUriArray Array of URIs of stores to include
|
|
88 |
* in the view.
|
|
89 |
* @param aObserver Observer for the view.
|
|
90 |
* @param aSortOrder Sort order for the view.
|
|
91 |
* @param aFilter Field type selector used to filter the view.
|
|
92 |
* @param aFlags TVPbkContactViewFlag flags for view modifying
|
|
93 |
* @param aContactSelector Filter for contacts
|
|
94 |
* @return The contact view.
|
|
95 |
*/
|
|
96 |
IMPORT_C MVPbkContactViewBase* CreateContactViewForStoresLC(
|
|
97 |
const CVPbkContactStoreUriArray& aUriArray,
|
|
98 |
MVPbkContactViewObserver& aObserver,
|
|
99 |
const MVPbkFieldTypeList& aSortOrder,
|
|
100 |
CVPbkFieldTypeSelector* aFilter,
|
|
101 |
TUint32 aFlags,
|
|
102 |
MVPbkContactSelector* aContactSelector ) const;
|
|
103 |
|
|
104 |
/**
|
|
105 |
* Creates a TOP-NON-TOP contact view for the stores specified in the
|
|
106 |
* given array.
|
|
107 |
*
|
|
108 |
* @param aUriArray Array of URIs of stores to include
|
|
109 |
* in the view.
|
|
110 |
* @param aObserver Observer for the view.
|
|
111 |
* @param aSortOrder Sort order for the view.
|
|
112 |
* @param aFilter Field type selector used to filter the view.
|
|
113 |
* @param aContactSelector A contact selector.
|
|
114 |
* @return The contact view.
|
|
115 |
*/
|
|
116 |
IMPORT_C MVPbkContactViewBase* CreateTopNonTopContactViewForStoresLC(
|
|
117 |
const CVPbkContactStoreUriArray& aUriArray,
|
|
118 |
MVPbkContactViewObserver& aObserver,
|
|
119 |
const MVPbkFieldTypeList& aSortOrder,
|
|
120 |
CVPbkFieldTypeSelector* aFilter,
|
|
121 |
TUint32 aFlags,
|
|
122 |
MVPbkContactSelector& aContactSelector ) const;
|
|
123 |
|
|
124 |
/**
|
|
125 |
* Creates a group view for the stores specified in the
|
|
126 |
* given array.
|
|
127 |
*
|
|
128 |
* @param aUriArray Array of URIs of stores to include
|
|
129 |
* in the view.
|
|
130 |
* @param aObserver Observer for the view.
|
|
131 |
* @param aSortOrder Sort order for the view.
|
|
132 |
* @param aFilter Field type selector used to filter the view.
|
|
133 |
* @param aFlags TVPbkContactViewFlag flags for view modifying
|
|
134 |
* @return The contact view.
|
|
135 |
*/
|
|
136 |
IMPORT_C MVPbkContactViewBase* CreateGroupViewForStoresLC(
|
|
137 |
const CVPbkContactStoreUriArray& aUriArray,
|
|
138 |
MVPbkContactViewObserver& aObserver,
|
|
139 |
const MVPbkFieldTypeList& aSortOrder,
|
|
140 |
CVPbkFieldTypeSelector* aFilter,
|
|
141 |
TUint32 aFlags ) const;
|
|
142 |
|
|
143 |
private: // Implementation
|
|
144 |
CPbk2ContactViewBuilder(
|
|
145 |
CVPbkContactManager& aContactManager,
|
|
146 |
CPbk2StorePropertyArray& aStoreProperties );
|
|
147 |
CVPbkContactViewDefinition* BuildMainViewStructureLC(
|
|
148 |
CVPbkFieldTypeSelector* aFilter,
|
|
149 |
TUint32 aFlags ) const;
|
|
150 |
MVPbkContactViewBase* CreateViewForStoresLC(
|
|
151 |
TPbk2ContactViewType aViewType,
|
|
152 |
const CVPbkContactStoreUriArray& aUriArray,
|
|
153 |
MVPbkContactViewObserver& aObserver,
|
|
154 |
const MVPbkFieldTypeList& aSortOrder,
|
|
155 |
CVPbkFieldTypeSelector* aFilter,
|
|
156 |
TUint32 aFlags,
|
|
157 |
TBool aTopContacts = EFalse,
|
|
158 |
MVPbkContactSelector* aContactSelector = NULL) const;
|
|
159 |
static TBool IncludeThisViewInTopContactMode(
|
|
160 |
TPbk2ContactViewType aViewType );
|
|
161 |
void SetTopRelatedFilteringL(
|
|
162 |
CVPbkContactViewDefinition& aNewSubViewDef,
|
|
163 |
TPbk2ContactViewType aViewType,
|
|
164 |
CVPbkFieldTypeSelector* aFilter ) const;
|
|
165 |
|
|
166 |
private: // Data
|
|
167 |
/// Ref: Virtual Phonebook contact manager
|
|
168 |
CVPbkContactManager& iContactManager;
|
|
169 |
/// Ref: Store property array
|
|
170 |
CPbk2StorePropertyArray& iStoreProperties;
|
|
171 |
mutable MVPbkContactSelector* iContactSelector; // Does not own
|
|
172 |
};
|
|
173 |
|
|
174 |
#endif // CPBK2CONTACTVIEWBUILDER_H
|
|
175 |
|
|
176 |
// End of File
|