|
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: Callback handler of newsticker component callbacks |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_NEWSTICKERCALLBACKHANDLER_H |
|
20 #define C_NEWSTICKERCALLBACKHANDLER_H |
|
21 |
|
22 |
|
23 #include <e32base.h> |
|
24 |
|
25 class MAiFwEventHandler; |
|
26 |
|
27 namespace AiXmlUiController |
|
28 { |
|
29 |
|
30 /** |
|
31 * @ingroup group_xmluicontroller |
|
32 * |
|
33 * Helper class to handle newsticker component callbacks. |
|
34 * |
|
35 * @lib AiXmlUiMain |
|
36 */ |
|
37 class CNewstickerCallbackHandler : public CBase |
|
38 { |
|
39 |
|
40 public: |
|
41 |
|
42 static CNewstickerCallbackHandler* NewLC( MAiFwEventHandler& aFwEventHandler ); |
|
43 |
|
44 virtual ~CNewstickerCallbackHandler(); |
|
45 |
|
46 /** |
|
47 * Sends TitleScrolled event to newsticker plugin |
|
48 * |
|
49 * @param aPublisherName Plugin name |
|
50 * @param aPublishingClass content selector |
|
51 * @param aIndex Index of the scrolled title |
|
52 */ |
|
53 void TitleScrolledL( const TDesC& aPublisherName, |
|
54 const TDesC& aPublishingClass, |
|
55 TInt aIndex ); |
|
56 |
|
57 /** |
|
58 * Sends TitleToScroll event to newsticker plugin |
|
59 * |
|
60 * @param aPublisherName Plugin name |
|
61 * @param aPublishingClass content selector |
|
62 * @param aIndex Index of the scrolled title |
|
63 */ |
|
64 void TitleToScrollL( const TDesC& aPublisherName, |
|
65 const TDesC& aPublishingClass, |
|
66 TInt aIndex ); |
|
67 |
|
68 private: |
|
69 |
|
70 CNewstickerCallbackHandler( MAiFwEventHandler& aFwEventHandler ); |
|
71 |
|
72 void SendEventToNewstickerPluginL( const TDesC& aEvent, |
|
73 const TDesC& aPublisherName, |
|
74 const TDesC& aPublishingClass, |
|
75 TInt aIndex); |
|
76 |
|
77 private: // data |
|
78 |
|
79 /** |
|
80 * Event handler for events |
|
81 */ |
|
82 MAiFwEventHandler& iFwEventHandler; |
|
83 |
|
84 /** |
|
85 * Event buffer. |
|
86 * Own. |
|
87 */ |
|
88 HBufC* iEventBuffer; |
|
89 |
|
90 }; |
|
91 |
|
92 } // namespace AiXmlUiController |
|
93 |
|
94 #endif // C_NEWSTICKERCALLBACKHANDLER_H |