|
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: News ticker transaction element |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_NEWSTICKERTRANSACTIONELEMENT_H |
|
20 #define C_NEWSTICKERTRANSACTIONELEMENT_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 * CNewTickerTransactionElement corresponds news ticker content publishing operation. |
|
39 * |
|
40 * @lib AiXmlUiMain |
|
41 */ |
|
42 class CNewsTickerTransactionElement : public CTransactionElement |
|
43 { |
|
44 public: // Constructors and destructor |
|
45 |
|
46 static CNewsTickerTransactionElement* |
|
47 NewL( AiUtility::CContentPriorityMap& aContentPriorityMap ); |
|
48 |
|
49 virtual ~CNewsTickerTransactionElement(); |
|
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 * @param aIndex - index of the news ticker element to be updated |
|
60 */ |
|
61 void InitializeL(CXnNodeAppIf& aTarget, const TDesC& aText, TInt aIndex); |
|
62 |
|
63 /** |
|
64 * @return ETrue if aTarget node is supported |
|
65 */ |
|
66 static TBool IsSupported( CXnNodeAppIf& aTarget ); |
|
67 |
|
68 /** |
|
69 * from CTransactionElement |
|
70 */ |
|
71 void Reset(); |
|
72 |
|
73 /** |
|
74 * from CTransactionElement |
|
75 */ |
|
76 void UpdateDataL(); |
|
77 |
|
78 private: // New methods |
|
79 |
|
80 /** |
|
81 * constructor |
|
82 */ |
|
83 CNewsTickerTransactionElement( AiUtility::CContentPriorityMap& aContentPriorityMap ); |
|
84 |
|
85 /** |
|
86 * |
|
87 */ |
|
88 void CheckTypeL( CXnNodeAppIf& aTarget ); |
|
89 /** |
|
90 * |
|
91 */ |
|
92 void SetTextL(); |
|
93 |
|
94 private: // Data |
|
95 |
|
96 /** |
|
97 * New text content. |
|
98 */ |
|
99 TPtrC iNewText; |
|
100 |
|
101 /** |
|
102 * Index of the news ticker element to be updated |
|
103 */ |
|
104 TInt iIndex; |
|
105 |
|
106 }; |
|
107 |
|
108 } // namespace AiXmlUiController |
|
109 |
|
110 #endif // C_NEWSTICKERTRANSACTIONELEMENT_H |
|
111 |
|
112 // End of File |