idlehomescreen/xmluicontroller/inc/imagetransactionelement.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:  Image transaction element
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_IMAGETRANSACTIONELEMENT_H
       
    20 #define C_IMAGETRANSACTIONELEMENT_H
       
    21 
       
    22 #include "transactionelement.h"
       
    23 
       
    24 class CGulIcon;
       
    25 class CXnNodeAppIf;
       
    26 class RFile;
       
    27 
       
    28 namespace AiUtility
       
    29     {
       
    30     class CContentPriorityMap;
       
    31     }
       
    32 
       
    33 namespace AiXmlUiController
       
    34 {
       
    35 class CKamikazeImageDecoder;    
       
    36     
       
    37 /**
       
    38  *  @ingroup group_xmluicontroller
       
    39  * 
       
    40  *  CImageTransactionElement is a transaction element for publishing images.
       
    41  *
       
    42  *  @lib AiXmlUiMain
       
    43  */
       
    44 class CImageTransactionElement : public CTransactionElement
       
    45     {
       
    46 
       
    47 public:
       
    48 
       
    49     static CImageTransactionElement*
       
    50         NewL( AiUtility::CContentPriorityMap& aContentPriorityMap );
       
    51 
       
    52     virtual ~CImageTransactionElement();
       
    53 
       
    54     /**
       
    55      * Initializes this transaction element.
       
    56      *
       
    57      * @param aTarget the node to publish bitmap and mask.
       
    58      * @param aIcon the icon to publish. Ownership is transferred.
       
    59      */
       
    60     void InitializeL(CXnNodeAppIf& aTarget, CGulIcon* aIcon );
       
    61     
       
    62     /**
       
    63      * Initializes this transaction element from file.
       
    64      *
       
    65      * @param aTarget the node to publish bitmap.
       
    66      * @param aFile the open file handle to read bitmap data.
       
    67      */
       
    68     void InitializeL(CXnNodeAppIf& aTarget,
       
    69                      RFile& aFile);
       
    70     
       
    71     static TBool IsSupported( CXnNodeAppIf& aTarget );
       
    72     
       
    73     void Reset();
       
    74 
       
    75     void UpdateDataL();
       
    76 
       
    77             
       
    78 private:
       
    79 
       
    80     CImageTransactionElement( AiUtility::CContentPriorityMap& aContentPriorityMap );
       
    81     
       
    82     void CheckTypeL( CXnNodeAppIf& aTarget );
       
    83     
       
    84 private: // data
       
    85 
       
    86 
       
    87     /**
       
    88      * Icon to be published.
       
    89      * Own.
       
    90      */
       
    91     CGulIcon* iNewIcon;
       
    92 
       
    93     /**
       
    94      * Asynchronous image decoder. Executed and 
       
    95      * self destroyed when decoding is ready. Not own.
       
    96      */
       
    97     CKamikazeImageDecoder* iImageDecoder;
       
    98     
       
    99     };
       
   100     
       
   101 } // namespace AiXmlUiController
       
   102 
       
   103 #endif // C_IMAGETRANSACTIONELEMENT_H