idlehomescreen/xmluicontroller/inc/mtransactionelement.h
changeset 0 f72a12da539e
child 88 3321d3e205b6
equal deleted inserted replaced
-1:000000000000 0:f72a12da539e
       
     1 /*
       
     2 * Copyright (c) 2005-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:  Transaction element base class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef M_TRANSACTIONELEMENT_H
       
    20 #define M_TRANSACTIONELEMENT_H
       
    21 
       
    22 #include <e32def.h>
       
    23 #include "aipolicyelement.h"
       
    24 #include "transaction.h"
       
    25 
       
    26 
       
    27 namespace AiXmlUiController
       
    28 {
       
    29 
       
    30 /**
       
    31  * MTransactionElement declatres the public interface for transaction elements.
       
    32  * MTransactionElement corresponds one publish operation within a
       
    33  * transaction scope.
       
    34  *
       
    35  * @lib AiXmlUiMain
       
    36  */
       
    37 class MTransactionElement
       
    38     {
       
    39 public: // New functions
       
    40     
       
    41     /**
       
    42      * Commits the publish operation and actually updates the UI control/element.
       
    43      *
       
    44      * @param [out] aLayoutChanged true if UI layout changes 
       
    45      * @see UpdateDataL()
       
    46      * @see ApplyPublishingPolicy()
       
    47      */
       
    48     void CommitL( TBool& aLayoutChanged, RPropertyHashMap& aPropertyHashMap );
       
    49 
       
    50     /**
       
    51      * Resets the transaction element and clears the references to content
       
    52      * and UI control/element.
       
    53      *
       
    54      */
       
    55     virtual void Reset() = 0;
       
    56     
       
    57     /**
       
    58      * Returns the array of associated content policy elements.
       
    59      *
       
    60      */
       
    61     virtual RAiPolicyElementArray& PolicyArray() = 0;
       
    62     
       
    63     /**
       
    64      * Return the target UI element for this transaction element
       
    65      */
       
    66     virtual CXnNodeAppIf& Target() const = 0 ;
       
    67     
       
    68 protected:  // New functions
       
    69 
       
    70     /**
       
    71      * Updates UI control / element data.
       
    72      *
       
    73      * @since S60 3.2
       
    74      */
       
    75     virtual void UpdateDataL() = 0;
       
    76     
       
    77     /**
       
    78      * Applies current publishing policy to UI control / element.
       
    79      *
       
    80      * @param [out] aLayoutChanged true if UI layout changes
       
    81      */
       
    82     virtual void ApplyPublishingPolicy( TBool& aLayoutChanged,
       
    83                                         RPropertyHashMap& aPropertyHashMap ) = 0;
       
    84     
       
    85 protected:  // Constructors and destructor
       
    86     
       
    87     ~MTransactionElement() {};
       
    88     
       
    89     };
       
    90 
       
    91 }   // namespace AiXmlUiController
       
    92 
       
    93 #endif      // M_TRANSACTIONELEMENT_H  
       
    94            
       
    95 //  End of File