63
|
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 store view definition.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef CPBK2STOREVIEWDEFINITION_H
|
|
20 |
#define CPBK2STOREVIEWDEFINITION_H
|
|
21 |
|
|
22 |
// INCLUDE FILES
|
|
23 |
#include <e32base.h>
|
|
24 |
#include <Pbk2ContactView.hrh>
|
|
25 |
#include <TPbk2IconId.h>
|
|
26 |
|
|
27 |
// FORWARD DECLARATIONS
|
|
28 |
class TResourceReader;
|
|
29 |
class CVPbkContactViewDefinition;
|
|
30 |
|
|
31 |
// CLASS DECLARATION
|
|
32 |
|
|
33 |
/**
|
|
34 |
* Phonebook 2 store view definition.
|
|
35 |
*/
|
|
36 |
class CPbk2StoreViewDefinition : public CBase
|
|
37 |
{
|
|
38 |
public: // Construction and destruction
|
|
39 |
|
|
40 |
/**
|
|
41 |
* Creates a new instance of this class.
|
|
42 |
*
|
|
43 |
* @return A new instance of this class.
|
|
44 |
*/
|
|
45 |
IMPORT_C static CPbk2StoreViewDefinition* NewL();
|
|
46 |
|
|
47 |
/**
|
|
48 |
* Creates a new instance of this class.
|
|
49 |
*
|
|
50 |
* @param aReader Resource reader pointed to
|
|
51 |
* a PHONEBOOK2_STORE_VIEW resource.
|
|
52 |
* @return A new instance of this class.
|
|
53 |
*/
|
|
54 |
IMPORT_C static CPbk2StoreViewDefinition* NewLC(
|
|
55 |
TResourceReader& aReader );
|
|
56 |
|
|
57 |
/**
|
|
58 |
* Creates a new instance of this class.
|
|
59 |
*
|
|
60 |
* @param aViewDef Store view definition to copy.
|
|
61 |
* @return A new instance of this class.
|
|
62 |
*/
|
|
63 |
IMPORT_C static CPbk2StoreViewDefinition* NewLC(
|
|
64 |
const CPbk2StoreViewDefinition& aViewDef );
|
|
65 |
|
|
66 |
/**
|
|
67 |
* Destructor.
|
|
68 |
*/
|
|
69 |
~CPbk2StoreViewDefinition();
|
|
70 |
|
|
71 |
public: // Interface
|
|
72 |
|
|
73 |
/**
|
|
74 |
* Returns the type of the view.
|
|
75 |
*
|
|
76 |
* @return Type of the view.
|
|
77 |
*/
|
|
78 |
IMPORT_C TPbk2ContactViewType ViewType() const;
|
|
79 |
|
|
80 |
/**
|
|
81 |
* Returns the view location.
|
|
82 |
*
|
|
83 |
* @return Contact view location.
|
|
84 |
*/
|
|
85 |
IMPORT_C TPbk2ContactViewLocation ViewLocation() const;
|
|
86 |
|
|
87 |
/**
|
|
88 |
* Returns the Virtual Phonebook view definition.
|
|
89 |
*
|
|
90 |
* @return Virtual Phonebook view definition.
|
|
91 |
*/
|
|
92 |
IMPORT_C const CVPbkContactViewDefinition& ViewDefinition() const;
|
|
93 |
|
|
94 |
/**
|
|
95 |
* Returns view icon id that is displayed at the front of the
|
|
96 |
* contacts of the view.
|
|
97 |
*
|
|
98 |
* @return View icon id.
|
|
99 |
*/
|
|
100 |
IMPORT_C const TPbk2IconId& ViewItemIconId() const;
|
|
101 |
|
|
102 |
/**
|
|
103 |
* Sets the type of the view.
|
|
104 |
*
|
|
105 |
* @param aType Type of the view.
|
|
106 |
*/
|
|
107 |
IMPORT_C void SetViewType(
|
|
108 |
TPbk2ContactViewType aType );
|
|
109 |
|
|
110 |
/**
|
|
111 |
* Sets the view location.
|
|
112 |
*
|
|
113 |
* @param aLocation View location.
|
|
114 |
*/
|
|
115 |
IMPORT_C void SetViewLocation(
|
|
116 |
TPbk2ContactViewLocation aLocation );
|
|
117 |
|
|
118 |
/**
|
|
119 |
* Sets the Virtual Phonebook view definition.
|
|
120 |
*
|
|
121 |
* @param aViewDefinition Virtual Phonebook view definition.
|
|
122 |
* Ownership is taken.
|
|
123 |
*/
|
|
124 |
IMPORT_C void SetViewDefinition(
|
|
125 |
CVPbkContactViewDefinition* aViewDefinition );
|
|
126 |
|
|
127 |
/**
|
|
128 |
* Sets the id of the icon that is displayed at the front of
|
|
129 |
* the contacts. The id is one of TPbk2IconIds or an id from
|
|
130 |
* an UI extension.
|
|
131 |
*
|
|
132 |
* @param aIconId Icon id.
|
|
133 |
*/
|
|
134 |
IMPORT_C void SetViewItemIcon(
|
|
135 |
const TPbk2IconId& aIconId );
|
|
136 |
|
|
137 |
private: // Implementation
|
|
138 |
CPbk2StoreViewDefinition();
|
|
139 |
void ConstructL(
|
|
140 |
TResourceReader& aReader );
|
|
141 |
void ConstructL(
|
|
142 |
const CPbk2StoreViewDefinition& aViewDef );
|
|
143 |
|
|
144 |
private: // Data
|
|
145 |
/// Own: View type
|
|
146 |
TPbk2ContactViewType iViewType;
|
|
147 |
/// Own: View location
|
|
148 |
TPbk2ContactViewLocation iViewLocation;
|
|
149 |
/// Own: Virtual Phonebook contact view definition
|
|
150 |
CVPbkContactViewDefinition* iViewDefinition;
|
|
151 |
/// Own: View icon id
|
|
152 |
TPbk2IconId iViewItemIconId;
|
|
153 |
};
|
|
154 |
|
|
155 |
#endif // CPBK2STOREVIEWDEFINITION_H
|
|
156 |
|
|
157 |
// End of File
|