1.1 --- a/epoc32/include/hsdataobserver.h Wed Mar 31 12:27:01 2010 +0100
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,99 +0,0 @@
1.4 -/*
1.5 -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
1.6 -* All rights reserved.
1.7 -* This component and the accompanying materials are made available
1.8 -* 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
1.9 -* which accompanies this distribution, and is available
1.10 -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 -*
1.12 -* Initial Contributors:
1.13 -* Nokia Corporation - initial contribution.
1.14 -*
1.15 -* Contributors:
1.16 -*
1.17 -* Description: Updates applications and icons in Operator Tile.
1.18 -*
1.19 -*/
1.20 -
1.21 -
1.22 -#ifndef __HSDATAOBSERVER_H__
1.23 -#define __HSDATAOBSERVER_H__
1.24 -
1.25 -#include <string>
1.26 -
1.27 -namespace Hs {
1.28 -/**
1.29 - * An observer interface.
1.30 - * Client must implement it to be able to get information
1.31 - * about occuring Execute actions from the Homescreen Publishing API.
1.32 - *
1.33 - * @code
1.34 - * class ObserverClass : public IHsDataObserver
1.35 - * {
1.36 - * void handleEvent( std::string aWidgetName,
1.37 - * IHsDataObserver::EEvent aEvent)
1.38 - * {
1.39 - * }
1.40 - *
1.41 - * void handleItemEvent( std::string aWidgetName,
1.42 - * std::string aWidgetItemName,
1.43 - * IHsDataObserver::EItemEvent aEvent)
1.44 - * {
1.45 - * }
1.46 - * }
1.47 - * ObserverClass* dataObserver = new ObserverClass();
1.48 - * HsWidgetPublisher* hsPublisher = new HsWidgetPublisher( dataObserver );
1.49 - * @endcode
1.50 - */
1.51 -class IHsDataObserver
1.52 - {
1.53 -public:
1.54 -
1.55 - /**
1.56 - * Defines the events that may take place for a homescreen widget.
1.57 - */
1.58 - enum EEvent
1.59 - {
1.60 - EUnknown = 0, ///< Unknown event: Means that event has not been defined.
1.61 - EActivate = 1, ///< Activation event: Means that widget has been added to HS as content.
1.62 - EDeactivate = 2, ///< Deactivation event: Means that widget has been removed frm.
1.63 - ESuspend = 3, ///< Suspension event: Means that HS reading widget data is suspended.
1.64 - EResume = 4 ///< Resume event. Means that HS reading widget data is resumed.
1.65 - };
1.66 -
1.67 - /**
1.68 - * Defines the events that may take place for a homescreen widget item.
1.69 - */
1.70 - enum EItemEvent
1.71 - {
1.72 - EUnknownItemEvent = 0, ///< Unknown event: Means that event has note been defined.
1.73 - ESelect = 1 ///< Selection event: Means that the widget item has been selected.
1.74 - };
1.75 -
1.76 -public:
1.77 -
1.78 - /**
1.79 - * Intended to handle an event that occured on a widget.
1.80 - * This would include EActivate, EDeactivate, ESuspend, EReusume.
1.81 - *
1.82 - * @param aWidgetName Name of the widget that event is envoked for.
1.83 - * @param aEvent Event type that has taken place.
1.84 - */
1.85 - virtual void handleEvent( std::string aWidgetName,
1.86 - IHsDataObserver::EEvent aEvent) = 0;
1.87 -
1.88 - /**
1.89 - * Intended to handle an event that occured on a widget's item.
1.90 - * This would include ESelection.
1.91 - *
1.92 - * @param aWidgetName Name of the widget that event is envoked for.
1.93 - * @param awidgetItemName Name of the item that event is envoked for.
1.94 - * @param aAEvent Event type that has taken place
1.95 - */
1.96 - virtual void handleItemEvent( std::string aWidgetName,
1.97 - std::string aWidgetItemName,
1.98 - IHsDataObserver::EItemEvent aEvent) = 0;
1.99 - };
1.100 -}
1.101 -
1.102 -#endif /*__HSDATAOBSERVER_H__*/