menufw/hierarchynavigator/hnengine/inc/hninterface.h
changeset 0 f72a12da539e
equal deleted inserted replaced
-1:000000000000 0:f72a12da539e
       
     1 /*
       
     2 * Copyright (c) 2007 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:   Interface for Hierarchy Navigator
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef C_HNINTERFACE_H
       
    21 #define C_HNINTERFACE_H
       
    22 
       
    23 #include "hneventgenerator.h"
       
    24 
       
    25 class CHnSuiteModel;
       
    26 class CLiwGenericParamList;
       
    27 
       
    28 /**
       
    29  * @ingroup group_hnengine
       
    30  * An interface for edit mode. Used by hierarchy navigator to track edit mode state status change.
       
    31  *
       
    32  * @lib hnengine
       
    33  * @since S60 v5.0
       
    34  */
       
    35 class MHnEditModeInterface
       
    36     {
       
    37 public:
       
    38     /**
       
    39      * Sets edit mode.
       
    40      * 
       
    41      * @since S60 v5.0
       
    42      * @param aEditMode Parametr sets edit mode to EFlase/Etrue.
       
    43      */
       
    44     virtual void SetEditModeL( TBool aEditMode ) = 0;
       
    45     };
       
    46 
       
    47 /**
       
    48  * @ingroup group_hnengine
       
    49  * Interface for Multimedia Menu to use Hierarchy Navigator engine. The functionality of this interface are
       
    50  * suite model event issues like loading a model, counting the models currently loaded or loading the root
       
    51  * suite.
       
    52  *
       
    53  * @lib hnengine
       
    54  * @since S60 v5.0
       
    55  */
       
    56 NONSHARABLE_CLASS( CHnInterface ) : public CBase, 
       
    57                                     public MHnEditModeInterface,
       
    58                                     public MHnEventGenerator
       
    59     {
       
    60 public:
       
    61 
       
    62     /**
       
    63      * Fetches and constructs data structres, needed by Multimedia
       
    64      * Menu to display suites.
       
    65      *
       
    66      * @since S60 v5.0
       
    67      * @return Return last loaded suite model on the stack.
       
    68      */
       
    69     virtual CHnSuiteModel* GetLastSuiteModelL() = 0;
       
    70     
       
    71     /**
       
    72      * Fetches and constructs data structres, needed by Multimedia
       
    73      * Menu to display suites.
       
    74      *
       
    75      * @since S60 v5.0
       
    76      * @return Return last loaded suite model on the stack.
       
    77      */
       
    78     virtual CHnSuiteModel* GetParentSuiteModelL() = 0;
       
    79 
       
    80     /**
       
    81      * Get count of suite models on the stack.
       
    82      * 
       
    83      * @since S60 v5.0
       
    84      * @return Count of suite models on the stack.
       
    85      */
       
    86     virtual TInt GetSuiteModelsCountL() = 0;
       
    87     
       
    88     /**
       
    89      * Checks if suite model is loaded.
       
    90      * 
       
    91      * @since S60 v5.0
       
    92      * @return ETrue if suite model is loaded, otherwise EFalse.
       
    93      */
       
    94     virtual TBool SuiteModelLoadedL( TInt aId ) = 0;
       
    95       
       
    96     /**
       
    97      * Handles back event coming from the UI.
       
    98      *
       
    99      * @since S60 v5.0
       
   100      * @param aGenre Suite's name given by genre name on
       
   101      *               which perform back event.
       
   102      * @param aIterations Number of iterations.
       
   103      * @return Status code.
       
   104      */
       
   105     virtual TInt HandleBackEventL( const TDesC& aGenre,
       
   106             TInt aIterations = KModelCountForRoot ) = 0;
       
   107     
       
   108     /**
       
   109      * Loads suite hierarchy specified in URI.
       
   110      *
       
   111      * @since S60 v5.0
       
   112      * @param aUri The URI path consist of suite's name(s) to load to the stack.
       
   113      */
       
   114     virtual void LoadSuitesFromUriL( const TDesC8& aUri ) = 0;
       
   115     
       
   116     /**
       
   117      * Resets MD Model and Suite Container.
       
   118      *
       
   119      * @since S60 v5.0
       
   120      */
       
   121     virtual void ResetModelsL() = 0;
       
   122     
       
   123     /**
       
   124      * Loads default root suite
       
   125      * 
       
   126      * @since S60 v5.0
       
   127      * @param aSuiteParams Suite parameters.
       
   128      * @return Status error code.
       
   129      */
       
   130     virtual TInt InitializeL( CLiwGenericParamList& aSuiteParams ) = 0;
       
   131     
       
   132     /**
       
   133      * Enables to issue a request to Hn engine.
       
   134      * 
       
   135      * @since S60 v5.0
       
   136      * @param aParam Input Parameters.
       
   137      * @param aOutput Target list for output.  
       
   138      */
       
   139     virtual void HandleRequestL( const CLiwGenericParamList& aParam, 
       
   140                          CLiwGenericParamList* aOutput = NULL ) = 0; 
       
   141     
       
   142     };
       
   143 
       
   144 #endif  // C_HNINTERFACE_H
       
   145 
       
   146