iaupdate/IAD/engine/inc/iaupdatebasenode.h
changeset 0 ba25891c3a9e
child 18 3ba40be8e484
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     1 /*
       
     2 * Copyright (c) 2007-2008 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:   This file contains the header file of MIAUpdateBaseNode class 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef IA_UPDATE_BASE_NODE_H
       
    21 #define IA_UPDATE_BASE_NODE_H
       
    22 
       
    23 
       
    24 #include <e32cmn.h>
       
    25 
       
    26 class TIAUpdateVersion;
       
    27 
       
    28 
       
    29 /**
       
    30  *
       
    31  */
       
    32 class MIAUpdateBaseNode
       
    33     {    
       
    34     
       
    35 public:
       
    36 
       
    37     /**
       
    38      * Enumerates the importance of this node
       
    39      **/
       
    40     enum TImportance
       
    41         {
       
    42         ENormal,
       
    43         ERecommended,
       
    44         ECritical,
       
    45         EMandatory,
       
    46         EHidden
       
    47         };
       
    48 
       
    49 
       
    50     /**
       
    51      * Together with Id, uniquely identifies the node metadata.
       
    52      * @return const TDesC& Namespace
       
    53      */ 
       
    54     virtual const TDesC& MetaNamespace() const = 0;
       
    55 
       
    56     /**
       
    57      * Together with Namespace, uniquely identifies the node metadata.
       
    58      * @return const TDesC& Id
       
    59      */ 
       
    60     virtual const TDesC& MetaId() const = 0;
       
    61 
       
    62     /**
       
    63      * @return const TUid& Uid of this node
       
    64      **/
       
    65     virtual const TUid& Uid() const = 0;
       
    66         
       
    67     /**
       
    68      * @return const TDesC& The name of this node
       
    69      **/
       
    70     virtual const TDesC& Name() const = 0;
       
    71     
       
    72     /**
       
    73      * @return const TDesC& The description for this node.
       
    74      */
       
    75     virtual const TDesC& Description() const = 0;
       
    76 
       
    77     /** 
       
    78      * @return TInt The size of the content in bytes.
       
    79      * @exception Leaves with system wide error code if 
       
    80      * the content size could not be calculated.
       
    81      */
       
    82     virtual TInt ContentSizeL() const = 0;
       
    83 
       
    84     /**
       
    85      * @return const TIAUpdateVersion& Specific version information 
       
    86      * of this node.
       
    87      **/
       
    88     virtual const TIAUpdateVersion& Version() const = 0;
       
    89     
       
    90     /**
       
    91      * @return TImportance the importance of this node
       
    92      **/
       
    93     virtual TImportance Importance() const = 0;
       
    94     
       
    95     virtual void SetImportance( TImportance aImportance ) = 0;
       
    96     
       
    97     /**
       
    98      * @return const TDesC& the search criteria of the node content.
       
    99      * This is mainly used for plug-ins to recognize if the
       
   100      * content corresponds the search of some user application.
       
   101      **/
       
   102     virtual const TDesC& SearchCriteria() const = 0;
       
   103     
       
   104     /**
       
   105      * @return TBool ETrue if reboot is needed after install 
       
   106      */
       
   107     virtual TBool RebootAfterInstall() const = 0;
       
   108 
       
   109     /**
       
   110      * @return TBool ETrue if the node should be hidden in the UI. 
       
   111      * EFalse if the node can be shown.
       
   112      */
       
   113     virtual TBool Hidden() const = 0;
       
   114 
       
   115     /**
       
   116      * @param aSelected ETrue if the node is selected. Else EFalse.
       
   117      **/
       
   118     virtual void SetSelected( TBool aSelected ) = 0;
       
   119 
       
   120     /**
       
   121      * @return TBool ETrue if the node is selected. Else EFalse.
       
   122      **/
       
   123     virtual TBool IsSelected() const = 0;
       
   124 
       
   125     /**
       
   126      * @return TInt Error code of the last operation whose information 
       
   127      * has been set into the purchase history.
       
   128      * @exception Leaves with system wide error code
       
   129      */
       
   130     virtual TInt LastUpdateErrorCodeL() const = 0;
       
   131 
       
   132     /**
       
   133      * Sets the cancel information into NCD Purchase history.
       
   134      * Usually this function can be used when the update flow has been finished 
       
   135      * before this node has started its update operation. Also, notice that 
       
   136      * the node may have some old history, for example fail or success. But after this
       
   137      * operation, the information will be the latest purchase history information.
       
   138      *
       
   139      * @param aForceVisibleInHistory ETrue means that even if node would be at the moment
       
   140      * hidden, it will be forced as visible in purchase history. EFalse means that
       
   141      * items are saved normally in history.
       
   142      * @exception Leaves with system wide error code
       
   143      */
       
   144     virtual void SetIdleCancelToPurchaseHistoryL( 
       
   145         TBool aForceVisibleInHistory ) = 0;
       
   146     
       
   147     /**
       
   148      * Updates the puchase history from the given info.
       
   149      * This function can be used to update the purchase history after self
       
   150      * updater has been used.
       
   151      *
       
   152      * @notice For normal nodes this function should not be used because purchase history
       
   153      * is updated automatically. Mainly this can be used for self update nodes and
       
   154      * service packs.
       
   155      *
       
   156      * @param aErrorCode The error code of the install operation of this node.
       
   157      * @param aForceVisibleInHistory ETrue means that even if node would be at the moment
       
   158      * hidden, it will be forced as visible in purchase history. EFalse means that
       
   159      * items are saved normally in history.
       
   160      * @exception Leaves with system wide error code
       
   161      */
       
   162     virtual void SetInstallStatusToPurchaseHistoryL( 
       
   163         TInt aErrorCode, TBool aForceVisibleInHistory ) = 0;
       
   164 
       
   165     
       
   166 protected:
       
   167 
       
   168     virtual ~MIAUpdateBaseNode() { }
       
   169         
       
   170     };
       
   171 
       
   172 #endif  //  IA_UPDATE_BASE_NODE_H