contacts_plat/contacts_ui_extensions_api/inc/cntviewsupplier.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 17 Sep 2010 08:27:32 +0300
changeset 71 7cc7d74059f9
parent 27 de1630741fbe
permissions -rw-r--r--
Revision: 201035 Kit: 201037

/*
 * Copyright (c) 2009 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:
 *
 */

#ifndef CNTVIEWSUPPLIER_H
#define CNTVIEWSUPPLIER_H

class CntAbstractView;

/**
 * UI extension class that supplies views to phonebook UI.
 */
class CntViewSupplier
{
public:

    /**
     * Returns number of views provided by the extension.
     *
     * @return int, view count
     */
    virtual int viewCount() const = 0;

    /**
     * Returns the view ID of a specific view.
     *
     * @param int, view index 
     * @return int, viewId
     */
    virtual int viewIdAt( int aIndex ) const = 0;

    /**
     * Returns a specific view. Ownership is given.
     *
     * @param int, view index 
     * @return CntAbstractView*, view
     */
    virtual CntAbstractView* viewAt( int aIndex ) = 0;

    /**
     * Sets the view id base value for supplier. 
     * The supplier method viewIdAt should return view ids in range
     * from aViewIdBase to aViewIdBase + viewCount.
     *
     * @param int, action index 
     * @return QString, process name
     */
    virtual void setViewIdBase( int aViewIdBase ) = 0;

protected:
    // prevent deleting by client
    virtual ~CntViewSupplier() {}
};

#endif //CNTVIEWSUPPLIER_H