|
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: Text transaction element |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_TEXTTRANSACTIONELEMENT_H |
|
20 #define C_TEXTTRANSACTIONELEMENT_H |
|
21 |
|
22 #include "transactionelement.h" |
|
23 |
|
24 |
|
25 namespace AiUtility |
|
26 { |
|
27 class CContentPriorityMap; |
|
28 } |
|
29 |
|
30 class CXnNodeAppIf; |
|
31 |
|
32 namespace AiXmlUiController |
|
33 { |
|
34 |
|
35 /** |
|
36 * @ingroup group_xmluicontroller |
|
37 * |
|
38 * CTextTransactionElement corresponds one text content publishing operation. |
|
39 * |
|
40 * @lib AiXmlUiMain |
|
41 */ |
|
42 class CTextTransactionElement : public CTransactionElement |
|
43 { |
|
44 public: // Constructors and destructor |
|
45 |
|
46 static CTextTransactionElement* |
|
47 NewL( AiUtility::CContentPriorityMap& aContentPriorityMap ); |
|
48 |
|
49 virtual ~CTextTransactionElement(); |
|
50 |
|
51 // New functions |
|
52 |
|
53 /** |
|
54 * Initializes this transaction element to publish text content aText |
|
55 * to text interface of node aTarget. |
|
56 * |
|
57 * @param aTarget - the target of publishing. |
|
58 * @param aText - the text content. |
|
59 */ |
|
60 void InitializeL(CXnNodeAppIf& aTarget, const TDesC& aText); |
|
61 |
|
62 static TBool IsSupported( CXnNodeAppIf& aTarget ); |
|
63 |
|
64 // Functions from CTransactionElement |
|
65 |
|
66 void Reset(); |
|
67 |
|
68 void UpdateDataL(); |
|
69 |
|
70 private: // New methods |
|
71 |
|
72 CTextTransactionElement( AiUtility::CContentPriorityMap& aContentPriorityMap ); |
|
73 |
|
74 void CheckTypeL( CXnNodeAppIf& aTarget ); |
|
75 |
|
76 void SetTextL(); |
|
77 |
|
78 private: // Data |
|
79 |
|
80 /** |
|
81 * New text content. |
|
82 */ |
|
83 |
|
84 HBufC* iNewText; |
|
85 |
|
86 }; |
|
87 |
|
88 } // namespace AiXmlUiController |
|
89 |
|
90 #endif // C_TEXTTRANSACTIONELEMENT_H |
|
91 |
|
92 // End of File |