|
1 /* |
|
2 * Copyright (c) 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: Unit tests |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef ___T_GLXNOTIFICATION_H__ |
|
22 #define ___T_GLXNOTIFICATION_H__ |
|
23 |
|
24 // EXTERNAL INCLUDES |
|
25 #include <e32std.h> |
|
26 |
|
27 // INTERNAL INCLUDES |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 |
|
31 /** |
|
32 * Notification of change |
|
33 */ |
|
34 class TNotification |
|
35 { |
|
36 public: |
|
37 enum TNotificationType |
|
38 { |
|
39 ERemove, |
|
40 EAdd, |
|
41 EFocus, |
|
42 ESelection, |
|
43 EEndMarker // Last notification |
|
44 }; |
|
45 |
|
46 // Data needs to be a simple struct with no member functions, to allow |
|
47 // arrays to be easily declared |
|
48 struct TData |
|
49 { |
|
50 TNotificationType iType; |
|
51 TInt iAtIndex; // Old focus index for EFocus |
|
52 TInt iData; // count for ERemove and EAdd, NGlxListDefs::TFocusChangeType for EFocus, TBool for ESelection |
|
53 }; |
|
54 public: |
|
55 TNotification( TData aData ); |
|
56 TBool operator==( const TNotification::TData& aNotification ) const; |
|
57 TBool operator!=( const TNotification::TData& aNotification ) const; |
|
58 |
|
59 private: |
|
60 TData iData; |
|
61 }; |
|
62 |
|
63 // Marker to signal the end of notifications list |
|
64 #define END_MARKER TNotification::EEndMarker, 0, 0 // { EEndMarker, 0, 0 }; |
|
65 const TNotification::TData KEndMarkerData = { END_MARKER }; |
|
66 const TNotification KEndMarker = KEndMarkerData; |
|
67 |
|
68 #endif // ___T_GLXNOTIFICATION_H__ |