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: Sleeping note with timeout |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include <aknnotedialog.h> |
|
20 |
|
21 #ifndef __LOCKAPPSLEEPINGNOTE_H__ |
|
22 #define __LOCKAPPSLEEPINGNOTE_H__ |
|
23 |
|
24 /** |
|
25 * CLockAppSleepingNote class implement notes that are not destroyed between use. |
|
26 * Note is shown with timeout and internal changes are reported to parent |
|
27 * trough command observer interface. |
|
28 * |
|
29 * @lib lockapp |
|
30 * @since 5.0 |
|
31 * @author Joona Petrell |
|
32 * @author Tamas Koteles |
|
33 */ |
|
34 class CLockAppSleepingNote : public CAknNoteDialog |
|
35 { |
|
36 public: |
|
37 |
|
38 /** |
|
39 * C++ default constructor. |
|
40 * |
|
41 * @param aCommandObserver pointer to parent |
|
42 * implementing observer interface |
|
43 */ |
|
44 CLockAppSleepingNote( MEikCommandObserver* aCommandObserver = NULL ); |
|
45 |
|
46 /** |
|
47 * Sleeping note is constructed from a resource |
|
48 */ |
|
49 void ConstructSleepingNoteL( TInt aResourceId ); |
|
50 |
|
51 /** |
|
52 * Destructor. |
|
53 */ |
|
54 ~CLockAppSleepingNote( ); |
|
55 |
|
56 /** |
|
57 * Show sleeping note with given timeout. |
|
58 * @param aTimeout how long note will be displayed. |
|
59 * @param aTone tone to be played. |
|
60 */ |
|
61 TInt ShowNote( const TInt aTimeout, const TTone aTone ); |
|
62 |
|
63 /** |
|
64 * Always called when note is dismissed |
|
65 * |
|
66 * @param aCommand reason for exit. |
|
67 */ |
|
68 TBool OkToExitL( TInt aCommand ); |
|
69 |
|
70 /** |
|
71 * Handles key events (from CoeControl) |
|
72 */ |
|
73 TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ); |
|
74 |
|
75 protected: |
|
76 |
|
77 void HandleResourceChange( TInt aType ); |
|
78 |
|
79 // pointer to keyguard UI |
|
80 MEikCommandObserver* iCommandObserver; |
|
81 |
|
82 // resource id is reserved for animation skin change |
|
83 TInt iResourceId; |
|
84 |
|
85 }; |
|
86 |
|
87 #endif // __LOCKAPPSLEEPINGNOTE_H__ |
|