ncdengine/engine/inc/catalogsinterfaceidentifier.h
changeset 4 32704c33136d
equal deleted inserted replaced
-1:000000000000 4:32704c33136d
       
     1 /*
       
     2 * Copyright (c) 2006 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:   Contains CCatalogsInterfaceIdentifier class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CATALOGS_INTERFACE_IDENTIFIER_H
       
    20 #define CATALOGS_INTERFACE_IDENTIFIER_H
       
    21 
       
    22 
       
    23 #include <e32base.h>
       
    24 
       
    25 
       
    26 class MCatalogsBase;
       
    27 class CCatalogsInterfaceBase;
       
    28 
       
    29 
       
    30 class CCatalogsInterfaceIdentifier: public CBase
       
    31     {
       
    32 
       
    33 public:
       
    34 
       
    35     /**
       
    36      * @param aInterfaceObject Ownership is not transferred.
       
    37      */
       
    38     static CCatalogsInterfaceIdentifier* NewL( TAny* aInterfaceObject,
       
    39                                                CCatalogsInterfaceBase* aInterfaceBaseObject,
       
    40                                                TInt aInterfaceId );
       
    41     /**
       
    42      * @param aInterfaceObject Ownership is not transferred.
       
    43      */
       
    44     static CCatalogsInterfaceIdentifier* NewLC( TAny* aInterfaceObject,
       
    45                                                 CCatalogsInterfaceBase* aInterfaceBaseObject,
       
    46                                                 TInt aInterfaceId );
       
    47 
       
    48     ~CCatalogsInterfaceIdentifier();
       
    49 
       
    50     
       
    51     /**
       
    52      * This object does not own the returned object. So,
       
    53      * ownership is not transferred directly. 
       
    54      * But, Release may be called
       
    55      * to decrease the ref counter of the object.
       
    56      */
       
    57     const TAny* InterfaceObject() const;
       
    58     
       
    59     /**
       
    60      * This object does not own the returned object. So,
       
    61      * ownership is not transferred directly. 
       
    62      * But, Release may be called
       
    63      * to decrease the ref counter of the object.
       
    64      */
       
    65     const CCatalogsInterfaceBase* InterfaceBaseObject() const;   
       
    66     
       
    67     TInt InterfaceId() const;
       
    68 
       
    69 
       
    70 protected:
       
    71 
       
    72     CCatalogsInterfaceIdentifier( TAny* aInterfaceObject,
       
    73                                   CCatalogsInterfaceBase* aInterfaceBaseObject,  
       
    74                                   TInt aInterfaceId );
       
    75     
       
    76     void ConstructL();
       
    77 
       
    78 
       
    79 private:
       
    80     // Prevent
       
    81     CCatalogsInterfaceIdentifier( const CCatalogsInterfaceIdentifier& aObject );
       
    82     CCatalogsInterfaceIdentifier& operator =( const CCatalogsInterfaceIdentifier& aObject );
       
    83 
       
    84 
       
    85 private: // data
       
    86 
       
    87     // Does not own the object
       
    88     TAny* iInterfaceObject;
       
    89     CCatalogsInterfaceBase* iInterfaceBaseObject;
       
    90     TInt iInterfaceId;
       
    91     
       
    92     };
       
    93 
       
    94 #endif // CATALOGS_INTERFACE_BASE_H