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 fetch dialog page.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef CPBK2FETCHDLGPAGE_H
|
|
20 |
#define CPBK2FETCHDLGPAGE_H
|
|
21 |
|
|
22 |
// INCLUDES
|
|
23 |
#include <e32base.h>
|
|
24 |
#include "MPbk2FetchDlgPage.h"
|
|
25 |
#include "MPbk2ControlObserver.h"
|
|
26 |
|
|
27 |
// FORWARD DECLARATIONS
|
|
28 |
class CPbk2NamesListControl;
|
|
29 |
class MPbk2FetchDlg;
|
|
30 |
class MVPbkContactViewBase;
|
|
31 |
class CPbk2StoreConfiguration;
|
|
32 |
|
|
33 |
// CLASS DECLARATION
|
|
34 |
|
|
35 |
/**
|
|
36 |
* Phonebook 2 fetch dialog page.
|
|
37 |
* Responsible for presenting and managing a single fetch page.
|
|
38 |
*/
|
|
39 |
NONSHARABLE_CLASS(CPbk2FetchDlgPage) : public CBase,
|
|
40 |
public MPbk2FetchDlgPage,
|
|
41 |
private MPbk2ControlObserver
|
|
42 |
{
|
|
43 |
public: // Constructors and destructor
|
|
44 |
|
|
45 |
/**
|
|
46 |
* Creates a new instance of this class.
|
|
47 |
*
|
|
48 |
* @param aParentDlg Parent dialog.
|
|
49 |
* @param aControlId Id of the control.
|
|
50 |
* @return A new instance of this class.
|
|
51 |
*/
|
|
52 |
static CPbk2FetchDlgPage* NewL(
|
|
53 |
MPbk2FetchDlg& aParentDlg,
|
|
54 |
TInt aControlId );
|
|
55 |
|
|
56 |
/**
|
|
57 |
* Destructor
|
|
58 |
*/
|
|
59 |
~CPbk2FetchDlgPage();
|
|
60 |
|
|
61 |
public: // From MPbk2FetchDlgPage
|
|
62 |
TInt FetchDlgPageId() const;
|
|
63 |
void ActivateFetchDlgPageL();
|
|
64 |
void DeactivateFetchDlgPage();
|
|
65 |
const MVPbkBaseContact* FocusedContactL() const;
|
|
66 |
MPbk2ContactUiControl& Control() const;
|
|
67 |
MVPbkContactViewBase& View() const;
|
|
68 |
void SetViewL(
|
|
69 |
MVPbkContactViewBase& aView );
|
|
70 |
TBool DlgPageReady() const;
|
|
71 |
TBool DlgPageEmpty() const;
|
|
72 |
void SelectContactL(
|
|
73 |
const MVPbkContactLink& aLink,
|
|
74 |
TBool aSelected );
|
|
75 |
void HandleResourceChange(
|
|
76 |
TInt aType );
|
|
77 |
|
|
78 |
private: // From MPbk2ControlObserver
|
|
79 |
void HandleControlEventL(
|
|
80 |
MPbk2ContactUiControl& aControl,
|
|
81 |
const TPbk2ControlEvent& aEvent );
|
|
82 |
|
|
83 |
private: // Implementation
|
|
84 |
CPbk2FetchDlgPage(
|
|
85 |
MPbk2FetchDlg& aFetchDlg,
|
|
86 |
TInt aControlId );
|
|
87 |
void ConstructL();
|
|
88 |
void HandleContactSelectionL(
|
|
89 |
const MVPbkBaseContact* aContact,
|
|
90 |
TInt aIndex,
|
|
91 |
TBool aSelected );
|
|
92 |
void SetPagesReadyStateL(
|
|
93 |
TBool aReadyState );
|
|
94 |
void UpdateListEmptyTextL(
|
|
95 |
TInt aListState );
|
|
96 |
HBufC* ListEmptyTextLC(
|
|
97 |
TInt aListState );
|
|
98 |
|
|
99 |
protected: // Data
|
|
100 |
/// Ref: Parent dialog of this page
|
|
101 |
MPbk2FetchDlg& iParentDlg;
|
|
102 |
/// Ref: Names list control
|
|
103 |
CPbk2NamesListControl* iControl;
|
|
104 |
/// Ref: Contact view
|
|
105 |
MVPbkContactViewBase* iContactView;
|
|
106 |
/// Own: Control id
|
|
107 |
TInt iControlId;
|
|
108 |
/// Own: Flag indicating is the control ready
|
|
109 |
TBool iIsReady;
|
|
110 |
};
|
|
111 |
|
|
112 |
#endif // CPBK2FETCHDLGPAGE_H
|
|
113 |
|
|
114 |
// End of File
|