phonebookui/Phonebook/inc/CPbkDeleteContactQuery.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 11 May 2010 16:00:21 +0300
branchRCL_3
changeset 11 2828b4d142c0
parent 0 e686773b3f54
permissions -rw-r--r--
Revision: 201017 Kit: 201019

/*
* 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 contact deletion query.
*
*/


#ifndef __CPbkDeleteContactQuery_H__
#define __CPbkDeleteContactQuery_H__

//  INCLUDES
#include <AknQueryDialog.h> // CAknQueryDialog
#include <cntdef.h>         // TContactItemId

// FORWARD DECLARATIONS
class CPbkContactItem;
class CPbkContactEngine;


// CLASS DECLARATION

/**
 * Phonebook contact deletion query.
 */
class CPbkDeleteContactQuery : public CAknQueryDialog
    {
    public:  // Constructors and destructor
        /**
         * Creates a new instance of this class.
         */
        IMPORT_C static CPbkDeleteContactQuery* NewLC();
        
        /**
         * Destructor.
         */
        ~CPbkDeleteContactQuery();

    public: // New functions
        /**
         * Executes this dialog to confirm deletion of a single contact.
         *
         * @param   aContact    contact to delete.
         * @return  !=0 if the user responded that the contact should be 
         *          deleted.
         */
        IMPORT_C TInt RunLD(const CPbkContactItem& aContact);

        /**
         * Executes this dialog to confirm deletion of a single contact.
         *
         * @param   aEngine     Phonebook database.
         * @param   aContactId  id of the contact to delete.
         * @return  !=0 if the user responded that the contact should be 
         *          deleted.
         */
        IMPORT_C TInt RunLD(CPbkContactEngine& aEngine, TContactItemId aContactId);

        /**
         * Executes this dialog to confirm deletion of a multiple contacts.
         *
         * @param   aEngine     Phonebook database.
         * @param   aContactIds ids of the contacts to delete.
         * @return  !=0 if the user responded that the contacts should be 
         *          deleted.
         */
        IMPORT_C TInt RunLD
            (CPbkContactEngine& aEngine, const CContactIdArray& aContactIds);

    private:  // Implementation
        CPbkDeleteContactQuery();
        void CreatePromptL(const CPbkContactItem& aContact);
        void CreatePromptL(const CContactIdArray& aContactIds);
    };

#endif // __CPbkDeleteContactQuery_H__
            
// End of File