|
1 /* |
|
2 * Copyright (c) 2007-2008 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: suite observer interface |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef HNSUITEOBSERVER_H |
|
21 #define HNSUITEOBSERVER_H |
|
22 |
|
23 #include <e32def.h> |
|
24 |
|
25 /** |
|
26 * Definition of events that are associated |
|
27 * with the lifecycle of a suite |
|
28 */ |
|
29 enum THnCustomSuiteEvent |
|
30 { |
|
31 ESuitePushedToStack, |
|
32 ESuitePoppedFromStack, |
|
33 ESuiteModelInitialized, |
|
34 ESuiteModelDestroyed, |
|
35 ESuiteItemsAdded, |
|
36 ESuiteItemsRemoved, |
|
37 ESuiteItemsUpdated, |
|
38 ESuiteHighlightChanged |
|
39 }; |
|
40 |
|
41 class CHnSuiteModel; |
|
42 |
|
43 /** |
|
44 * Suite observer interface class. |
|
45 * |
|
46 * Interface, for observers of suite events. Suite |
|
47 * May inform its observers about different situation it encoutners. |
|
48 * e.g. suite informs all about its initialization, its deletion, |
|
49 * about updates of items. |
|
50 * This interface is also used by the suite container stack to inform |
|
51 * all interested classes of new suite being pushed or popped from the stack. |
|
52 * |
|
53 * @lib hnpresentationmodel |
|
54 * @since S60 5.0 |
|
55 * @ingroup group_hnpresentationmodel |
|
56 */ |
|
57 class MHnSuiteObserver |
|
58 { |
|
59 |
|
60 public: |
|
61 |
|
62 /** |
|
63 * Whenever an event occurs, and suite wants to notify observers, |
|
64 * it invokes this method on all of its own observers, passing the information |
|
65 * about the particular event as a parameter. |
|
66 * |
|
67 * @param aCustomSuiteEvent Type of evetn |
|
68 * @param aModel Suite presentation model that is notifying. |
|
69 */ |
|
70 virtual void HandleSuiteEventL ( THnCustomSuiteEvent aCustomSuiteEvent, |
|
71 CHnSuiteModel *aModel ) = 0; |
|
72 |
|
73 }; |
|
74 |
|
75 |
|
76 #endif // HNSUITEOBSERVER_H |
|
77 |