idlehomescreen/xmluicontroller/inc/databuffertransactionelement.h
changeset 0 f72a12da539e
child 54 1b758917cafc
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:  Data buffer transaction
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_DATABUFFERTRANSACTIONELEMENT_H
       
    20 #define C_DATABUFFERTRANSACTIONELEMENT_H
       
    21 
       
    22 #include "transactionelement.h"
       
    23 
       
    24 namespace AiUtility
       
    25     {
       
    26     class CContentPriorityMap;
       
    27     }
       
    28 
       
    29 class CXnNodeAppIf;
       
    30 
       
    31 namespace AiXmlUiController
       
    32 {
       
    33 
       
    34 /**
       
    35  *  @ingroup group_xmluicontroller
       
    36  * 
       
    37  * CDataBufferTransactionElement corresponds one text content publishing operation.
       
    38  *
       
    39  *  @lib AiXmlUiMain
       
    40  */
       
    41 class CDataBufferTransactionElement : public CTransactionElement
       
    42     {
       
    43 public:  // Constructors and destructor
       
    44     
       
    45     static CDataBufferTransactionElement*
       
    46         NewL( AiUtility::CContentPriorityMap& aContentPriorityMap );
       
    47     
       
    48     virtual ~CDataBufferTransactionElement();
       
    49 
       
    50 // New functions
       
    51     
       
    52     /**
       
    53     * Initializes this transaction element to publish content aData
       
    54     * to node aTarget.
       
    55     *
       
    56     * @param aTarget - the target of publishing.
       
    57     * @param aData - the content. 
       
    58     */
       
    59     void InitializeL(CXnNodeAppIf& aTarget, const TDesC8& aData);
       
    60     
       
    61     /**
       
    62      * Checks if given content type is supported by target ui element.
       
    63      *
       
    64      * @param aTarget target ui element.
       
    65      * @param aContentType content type
       
    66      * @return ETrue if content type is supported
       
    67      */
       
    68     static TBool IsSupported( CXnNodeAppIf& aTarget,
       
    69                               const TDesC8& aContentType );
       
    70     
       
    71 // Functions from CTransactionElement
       
    72 
       
    73     void Reset();
       
    74 
       
    75     void UpdateDataL();
       
    76     
       
    77 private:
       
    78 
       
    79     CDataBufferTransactionElement(
       
    80         AiUtility::CContentPriorityMap& aContentPriorityMap );
       
    81 
       
    82     void CheckTypeL( CXnNodeAppIf& aTarget );
       
    83     
       
    84     void SetDataL();
       
    85     
       
    86 private:    // Data
       
    87 
       
    88     /**
       
    89      * New content.
       
    90      */
       
    91     TPtrC8 iNewData;
       
    92         
       
    93     };
       
    94 
       
    95 }   // namespace AiXmlUiController
       
    96 
       
    97 #endif      // C_TEXTTRANSACTIONELEMENT_H  
       
    98            
       
    99 //  End of File