diff -r 000000000000 -r e686773b3f54 phonebookui/Phonebook/View/inc/CPbkNamesListFetchDlgPage.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/phonebookui/Phonebook/View/inc/CPbkNamesListFetchDlgPage.h Tue Feb 02 10:12:17 2010 +0200 @@ -0,0 +1,104 @@ +/* +* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Phonebook fetch dialog page: Names List. +* +*/ + + +#ifndef __CPbkNamesListFetchDlgPage_H__ +#define __CPbkNamesListFetchDlgPage_H__ + + +// INCLUDES +#include // CBase +#include "MPbkFetchDlgPage.h" +#include +#include "MPbkFetchDlgSelection.h" +#include // MContactViewObserver + +// FORWARD DECLARATIONS +class CPbkContactViewListControl; + +// CLASS DECLARATION + +/** + * Phonebook fetch dialog page: Names List. + */ +NONSHARABLE_CLASS(CPbkNamesListFetchDlgPage) : + public CBase, + public MPbkFetchDlgPage, + public MPbkFetchDlgSelection, + private MPbkContactViewListControlObserver, + private MContactViewObserver + { + public: // Constructors and destructor + /** + * Creates a new instance of this class. + * @param aParentDlg parent dialog + */ + static CPbkNamesListFetchDlgPage* NewL(MPbkFetchDlg& aParentDlg); + + /** + * Destructor + */ + ~CPbkNamesListFetchDlgPage(); + + public: // from MPbkFetchDlgPage + TInt FetchDlgPageId() const; + TBool DlgPageReady() const; + void ActivateFetchDlgPageL(); + void DeactivateFetchDlgPage(); + TContactItemId FocusedContactIdL() const; + TBool IsFetchDlgPageEmpty() const; + void SetMPbkFetchDlgSelection(MPbkFetchDlgSelection* aAccepter); + TBool ItemsMarked() const; + void LayoutContents(); + const CContactIdArray& MarkedItemsL() const; + TBool ProcessSoftkeyMarkCommandL(TInt aCommandId); + CPbkContactViewListControl& Control(); + + public: // from MPbkFetchDlgSelection + TBool ContactSelectionAcceptedL + (TContactItemId aGroupId, TInt aCurrentSelectedCount) const; + + private: // from MPbkContactViewListControlObserver + void HandleContactViewListControlEventL + (CPbkContactViewListControl& aControl, + const TPbkContactViewListControlEvent& aEvent); + + private: // from MContactViewObserver + void HandleContactViewEvent + (const CContactViewBase& aView,const TContactViewEvent& aEvent); + + private: // Implementation + CPbkNamesListFetchDlgPage(MPbkFetchDlg& aFetchDlg); + void ConstructL(); + void HandleContactSelectionL + (TContactItemId aContactId, TBool aSelected); + + private: // Data + /// Ref: Owner dialog of this page + MPbkFetchDlg& iParentDlg; + /// Ref: names list control owned by iParentDlg + CPbkContactViewListControl* iControl; + /// Ref: names list contact view + CContactViewBase& iContactView; + /// Ref: selection accepter + MPbkFetchDlgSelection* iFetchSelection; + }; + +#endif // __CPbkNamesListFetchDlgPage_H__ + +// End of File