ncdengine/provider/client/inc/ncdrootnodeproxy.h
changeset 0 ba25891c3a9e
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     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 CNcdRootNodeProxy class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_NCD_ROOT_NODE_PROXY
       
    20 #define C_NCD_ROOT_NODE_PROXY
       
    21 
       
    22 
       
    23 #include <e32base.h>
       
    24 
       
    25 #include "ncdparentoftransparentnodeproxy.h"
       
    26 
       
    27 
       
    28 class MNcdLoadNodeOperationObserver;
       
    29 class CNcdNodeIdentifier;
       
    30 
       
    31 
       
    32 /**
       
    33  *  Node folder contains other nodes that may also be containers.
       
    34  *  Root may also contain children of the transparent child folder.
       
    35  *
       
    36  *  @lib ?library
       
    37  *  @since S60 ?S60_version *** for example, S60 v3.0
       
    38  */
       
    39 class CNcdRootNodeProxy: public CNcdParentOfTransparentNodeProxy 
       
    40     {
       
    41 
       
    42 public:
       
    43 
       
    44     /**
       
    45      * NewL
       
    46      *
       
    47      * @param aSession The session between the client proxy and the
       
    48      * corresponding server object.
       
    49      * @param aHandle The handle which identifies the server object
       
    50      * that this proxy uses.
       
    51      * @param aNodeManager The manager that creates the nodes and keeps
       
    52      * track of the existing nodes.
       
    53      * @param aOperationManager This manager is used to create operations
       
    54      * for the node.
       
    55      * @param aFavoriteManager This manager is used to add or remove favorite nodes.
       
    56      * @return CNcdRootNodeProxy* Pointer to the created object 
       
    57      * of this class.
       
    58      */
       
    59     static CNcdRootNodeProxy* NewL( MCatalogsClientServer& aSession, 
       
    60                                     TInt aHandle,
       
    61                                     CNcdNodeManagerProxy& aNodeManager,
       
    62                                     CNcdOperationManagerProxy& aOperationManager,
       
    63                                     CNcdFavoriteManagerProxy& aFavoriteManager );
       
    64 
       
    65     /**
       
    66      * NewL
       
    67      *
       
    68      * @param aSession The session between the client proxy and the
       
    69      * corresponding server object.
       
    70      * @param aHandle The handle which identifies the server object
       
    71      * that this proxy uses.
       
    72      * @param aNodeManager The manager that creates the nodes and keeps
       
    73      * track of the existing nodes.
       
    74      * @param aOperationManager This manager is used to create operations
       
    75      * for the node.
       
    76      * @param aFavoriteManager This manager is used to add or remove favorite nodes.
       
    77      * @return CNcdRootNodeProxy* Pointer to the created object 
       
    78      * of this class.
       
    79      */
       
    80     static CNcdRootNodeProxy* NewLC( MCatalogsClientServer& aSession, 
       
    81                                      TInt aHandle,
       
    82                                      CNcdNodeManagerProxy& aNodeManager,
       
    83                                      CNcdOperationManagerProxy& aOperationManager,
       
    84                                      CNcdFavoriteManagerProxy& aFavoriteManager );        
       
    85 
       
    86 
       
    87     /**
       
    88      * Destructor
       
    89      *
       
    90      * @note Usually Release function should be used instead of
       
    91      * directly calling delete for this class object.
       
    92      *
       
    93      */
       
    94     virtual ~CNcdRootNodeProxy();
       
    95 
       
    96 
       
    97 public: // MNcdNodeContainer
       
    98 
       
    99     /**
       
   100      * @see MNcdNodeContainer::ChildCount
       
   101      */
       
   102     virtual TInt ChildCount() const;
       
   103 
       
   104     /**
       
   105      * @see MNcdNodeContainer:: ChildL
       
   106      */
       
   107     virtual MNcdNode* ChildL( TInt aIndex );
       
   108 
       
   109     /**
       
   110      * @see MNcdNodeContainer::LoadChildrenL
       
   111      */
       
   112     virtual MNcdLoadNodeOperation* LoadChildrenL( TInt aIndex, 
       
   113                                                   TInt aSize,
       
   114                                                   TNcdChildLoadMode aMode,
       
   115                                                   MNcdLoadNodeOperationObserver& aObserver );
       
   116 
       
   117 
       
   118 public: // CNcdNodeProxy
       
   119 
       
   120     /**
       
   121      * @see CNcdNodeProxy::State
       
   122      */
       
   123     virtual TState State() const;
       
   124 
       
   125     /**
       
   126      * @see CNcdNodeProxy::LoadL
       
   127      */
       
   128     virtual MNcdLoadNodeOperation* LoadL( MNcdLoadNodeOperationObserver& aObserver );
       
   129 
       
   130     /**
       
   131      * @see CNcdNodeProxy::OperationsL
       
   132      */
       
   133     virtual RCatalogsArray< MNcdOperation > OperationsL() const;
       
   134 
       
   135 
       
   136 public:// MNcdLoadNodeOperationObserver
       
   137 
       
   138     /**
       
   139      * @see MNcdLoadNodeOperationObserver::OperationComplete
       
   140      * Calls the internalize function to update the node data.
       
   141      */
       
   142     virtual void OperationComplete( MNcdLoadNodeOperation& aOperation,
       
   143                                     TInt aError );
       
   144             
       
   145 protected:
       
   146 
       
   147     /**
       
   148      * Constructor
       
   149      *
       
   150      * @param aSession The session between the client proxy and the
       
   151      * corresponding server object.
       
   152      * @param aHandle The handle which identifies the server object
       
   153      * that this proxy uses.
       
   154      * @param aNodeManager The manager that creates the nodes and keeps
       
   155      * track of the existing nodes.
       
   156      * @param aOperationManager This manager is used to create operations
       
   157      * for the node.
       
   158      * @param aFavoriteManager This manager is used to add or remove favorite nodes.
       
   159      */
       
   160     CNcdRootNodeProxy( MCatalogsClientServer& aSession,
       
   161                        TInt aHandle,
       
   162                        CNcdNodeManagerProxy& aNodeManager,
       
   163                        CNcdOperationManagerProxy& aOperationManager,
       
   164                        CNcdFavoriteManagerProxy& aFavoriteManager );
       
   165 
       
   166     /**
       
   167      * ConstructL
       
   168      */
       
   169     virtual void ConstructL();
       
   170 
       
   171 
       
   172 private:
       
   173     // Prevent if not implemented
       
   174     CNcdRootNodeProxy( const CNcdRootNodeProxy& aObject );
       
   175     CNcdRootNodeProxy& operator =( const CNcdRootNodeProxy& aObject );
       
   176 
       
   177 
       
   178 private: // data
       
   179 
       
   180     };
       
   181 
       
   182 
       
   183 #endif // C_NCD_ROOT_NODE_PROXY