ncdengine/engine/inc/catalogsinterfaceidentifier.h
author hgs
Wed, 20 Oct 2010 14:52:56 +0300
changeset 80 9dcba1ee99f7
parent 0 ba25891c3a9e
permissions -rw-r--r--
201041

/*
* Copyright (c) 2006 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:   Contains CCatalogsInterfaceIdentifier class
*
*/


#ifndef CATALOGS_INTERFACE_IDENTIFIER_H
#define CATALOGS_INTERFACE_IDENTIFIER_H


#include <e32base.h>


class MCatalogsBase;
class CCatalogsInterfaceBase;


class CCatalogsInterfaceIdentifier: public CBase
    {

public:

    /**
     * @param aInterfaceObject Ownership is not transferred.
     */
    static CCatalogsInterfaceIdentifier* NewL( TAny* aInterfaceObject,
                                               CCatalogsInterfaceBase* aInterfaceBaseObject,
                                               TInt aInterfaceId );
    /**
     * @param aInterfaceObject Ownership is not transferred.
     */
    static CCatalogsInterfaceIdentifier* NewLC( TAny* aInterfaceObject,
                                                CCatalogsInterfaceBase* aInterfaceBaseObject,
                                                TInt aInterfaceId );

    ~CCatalogsInterfaceIdentifier();

    
    /**
     * This object does not own the returned object. So,
     * ownership is not transferred directly. 
     * But, Release may be called
     * to decrease the ref counter of the object.
     */
    const TAny* InterfaceObject() const;
    
    /**
     * This object does not own the returned object. So,
     * ownership is not transferred directly. 
     * But, Release may be called
     * to decrease the ref counter of the object.
     */
    const CCatalogsInterfaceBase* InterfaceBaseObject() const;   
    
    TInt InterfaceId() const;


protected:

    CCatalogsInterfaceIdentifier( TAny* aInterfaceObject,
                                  CCatalogsInterfaceBase* aInterfaceBaseObject,  
                                  TInt aInterfaceId );
    
    void ConstructL();


private:
    // Prevent
    CCatalogsInterfaceIdentifier( const CCatalogsInterfaceIdentifier& aObject );
    CCatalogsInterfaceIdentifier& operator =( const CCatalogsInterfaceIdentifier& aObject );


private: // data

    // Does not own the object
    TAny* iInterfaceObject;
    CCatalogsInterfaceBase* iInterfaceBaseObject;
    TInt iInterfaceId;
    
    };

#endif // CATALOGS_INTERFACE_BASE_H