ncdengine/provider/client/inc/ncdnodesupplierproxy.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 CNcdNodeSupplierProxy class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef NCDNODESUPPLIERPROXY_H
       
    20 #define NCDNODESUPPLIERPROXY_H
       
    21 
       
    22 #include "ncdnodeproxy.h"
       
    23 
       
    24 class CNcdNodeSupplierProxy : public CNcdNodeProxy 
       
    25 {
       
    26 public:
       
    27     /**
       
    28      * NewLC
       
    29      *
       
    30      * @param aSession The session between the client proxy and the
       
    31      * corresponding server object.
       
    32      * @param aHandle The handle which identifies the server object
       
    33      * that this proxy uses.
       
    34      * @param aNodeManager The manager that creates the nodes and keeps
       
    35      * track of the existing nodes.
       
    36      * @param aOperationManager This manager is used to create operations
       
    37      * for the node.     
       
    38      * @param aFavoriteManager This manager is used to add or remove favorite nodes.
       
    39      */
       
    40     static CNcdNodeSupplierProxy* NewLC(
       
    41         MCatalogsClientServer& aSession,
       
    42         TInt aHandle, 
       
    43         CNcdNodeManagerProxy& aNodeManager,
       
    44         CNcdOperationManagerProxy& aOperationManager,
       
    45         CNcdFavoriteManagerProxy& aFavoriteManager );
       
    46 
       
    47     /**
       
    48      * Destructor
       
    49      *
       
    50      * @note Usually Release function should be used instead of
       
    51      * directly calling delete for this class object.
       
    52      *
       
    53      */    
       
    54     virtual ~CNcdNodeSupplierProxy();
       
    55     
       
    56         
       
    57 public: // MNcdNode
       
    58 
       
    59     /**
       
    60      * @see MNcdNode::State
       
    61      */
       
    62     virtual TState State() const;
       
    63     
       
    64 
       
    65     /**
       
    66      * @see MNcdNode::CatalogSourceName
       
    67      */
       
    68     virtual const TDesC& CatalogSourceName() const;
       
    69 
       
    70 
       
    71     /**
       
    72      * @see MNcdNode::ParentL
       
    73      */
       
    74     virtual MNcdNodeContainer* ParentL() const;
       
    75     
       
    76 
       
    77     /**
       
    78      * @see MNcdNode::LoadL
       
    79      */
       
    80     virtual MNcdLoadNodeOperation* LoadL( MNcdLoadNodeOperationObserver& aObserver );
       
    81 
       
    82 
       
    83     /**
       
    84      * @see MNcdNode::OperationsL
       
    85      */
       
    86     virtual RCatalogsArray< MNcdOperation > OperationsL() const;
       
    87 
       
    88     
       
    89 public: // MNcdLoadNodeOperationObserver
       
    90 
       
    91     /**
       
    92      * @see MNcdLoadNodeOperationObserver::OperationComplete     
       
    93      */
       
    94     virtual void OperationComplete( MNcdLoadNodeOperation& aOperation,
       
    95                                     TInt aError );
       
    96     
       
    97     
       
    98 protected:
       
    99 
       
   100     /**
       
   101      * Constructor
       
   102      *
       
   103      * @param aSession The session between the client proxy and the
       
   104      * corresponding server object.
       
   105      * @param aHandle The handle which identifies the server object
       
   106      * that this proxy uses.
       
   107      * @param aNodeManager The manager that creates the nodes and keeps
       
   108      * track of the existing nodes.
       
   109      * @param aOperationManager This manager is used to create operations
       
   110      * for the node.     
       
   111      * @param aFavoriteManager This manager is used to add or remove favorite nodes.
       
   112      */
       
   113     CNcdNodeSupplierProxy(
       
   114         MCatalogsClientServer& aSession,
       
   115         TInt aHandle, 
       
   116         CNcdNodeManagerProxy& aNodeManager,
       
   117         CNcdOperationManagerProxy& aOperationManager,
       
   118         CNcdFavoriteManagerProxy& aFavoriteManager );
       
   119 
       
   120     
       
   121 private: // data
       
   122 
       
   123     // This node class will be set as a interface parent for iActualNode. So,
       
   124     // this class object will contain also the reference counts of the actual node.
       
   125     // So, when total reference count reaches zero and this class object will be deleted,
       
   126     // it can also delete iActualNode, because its reference count is also zero then.    
       
   127     CNcdNodeProxy* iActualNode;
       
   128 };
       
   129 
       
   130 #endif // NCDNODESUPPLIERPROXY_H