2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: Updates applications and icons in Operator Tile.
19 #ifndef __HSDATAOBSERVER_H__
20 #define __HSDATAOBSERVER_H__
26 * An observer interface.
27 * Client must implement it to be able to get information
28 * about occuring Execute actions from the Homescreen Publishing API.
31 * class ObserverClass : public IHsDataObserver
33 * void handleEvent( std::string aWidgetName,
34 * IHsDataObserver::EEvent aEvent)
38 * void handleItemEvent( std::string aWidgetName,
39 * std::string aWidgetItemName,
40 * IHsDataObserver::EItemEvent aEvent)
44 * ObserverClass* dataObserver = new ObserverClass();
45 * HsWidgetPublisher* hsPublisher = new HsWidgetPublisher( dataObserver );
53 * Defines the events that may take place for a homescreen widget.
57 EUnknown = 0, ///< Unknown event: Means that event has not been defined.
58 EActivate = 1, ///< Activation event: Means that widget has been added to HS as content.
59 EDeactivate = 2, ///< Deactivation event: Means that widget has been removed frm.
60 ESuspend = 3, ///< Suspension event: Means that HS reading widget data is suspended.
61 EResume = 4 ///< Resume event. Means that HS reading widget data is resumed.
65 * Defines the events that may take place for a homescreen widget item.
69 EUnknownItemEvent = 0, ///< Unknown event: Means that event has note been defined.
70 ESelect = 1 ///< Selection event: Means that the widget item has been selected.
76 * Intended to handle an event that occured on a widget.
77 * This would include EActivate, EDeactivate, ESuspend, EReusume.
79 * @param aWidgetName Name of the widget that event is envoked for.
80 * @param aEvent Event type that has taken place.
82 virtual void handleEvent( std::string aWidgetName,
83 IHsDataObserver::EEvent aEvent) = 0;
86 * Intended to handle an event that occured on a widget's item.
87 * This would include ESelection.
89 * @param aWidgetName Name of the widget that event is envoked for.
90 * @param awidgetItemName Name of the item that event is envoked for.
91 * @param aAEvent Event type that has taken place
93 virtual void handleItemEvent( std::string aWidgetName,
94 std::string aWidgetItemName,
95 IHsDataObserver::EItemEvent aEvent) = 0;
99 #endif /*__HSDATAOBSERVER_H__*/