|
1 /* |
|
2 * Copyright (c) 2002-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: Plugin declaration of global message query. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __AKNSYSTEMMSGPOPUP_H__ |
|
19 #define __AKNSYSTEMMSGPOPUP_H__ |
|
20 |
|
21 #include <e32std.h> |
|
22 #include <e32base.h> |
|
23 #include <eiknotapi.h> |
|
24 #include <eikcmobs.h> |
|
25 #include <aknmessagequerydialog.h> |
|
26 |
|
27 class CApaMaskedBitmap; |
|
28 |
|
29 class MAknQueryNotificationCallback |
|
30 { |
|
31 public: |
|
32 virtual void QueryDismissedL(TInt aResult) = 0; |
|
33 }; |
|
34 |
|
35 NONSHARABLE_CLASS(CAknMsgQueryNotificationDialog) : public CAknMessageQueryDialog |
|
36 { |
|
37 public: |
|
38 CAknMsgQueryNotificationDialog( |
|
39 MAknQueryNotificationCallback* aCallBack, |
|
40 CAknMsgQueryNotificationDialog** aSelfPtr, |
|
41 HBufC* aMessage, |
|
42 TInt aSoftkeys, |
|
43 HBufC* aHeader, |
|
44 CEikImage* aHeaderImage = NULL, |
|
45 const TTone aTone = ENoTone); |
|
46 |
|
47 ~CAknMsgQueryNotificationDialog(); |
|
48 |
|
49 TKeyResponse OfferKeyEventL( |
|
50 const TKeyEvent& aKeyEvent, |
|
51 TEventCode aType); |
|
52 |
|
53 protected: |
|
54 TBool OkToExitL(TInt aButtonId); |
|
55 void PreLayoutDynInitL(); |
|
56 void PostLayoutDynInitL(); |
|
57 |
|
58 private: |
|
59 virtual void CEikDialog_Reserved_1(); |
|
60 virtual void CEikDialog_Reserved_2(); |
|
61 virtual void CAknDialog_Reserved(); |
|
62 virtual void CAknQueryDialog_Reserved(); |
|
63 |
|
64 private: |
|
65 TInt iSoftkeys; |
|
66 MAknQueryNotificationCallback* iCallBack; |
|
67 CAknMsgQueryNotificationDialog** iSelfPtr; |
|
68 CPeriodic* iTimer; |
|
69 TInt iDelay; |
|
70 |
|
71 // These are needed because of awkward APIs and member handling in base class. |
|
72 HBufC* iMessage; |
|
73 HBufC* iHeader; |
|
74 CEikImage* iHeaderImage; |
|
75 |
|
76 static TInt DeleteMe(TAny* aThis); |
|
77 |
|
78 public: |
|
79 void SetExitDelay(TInt aDelay) {iDelay = aDelay;}; |
|
80 }; |
|
81 |
|
82 NONSHARABLE_CLASS(CAknGlobalMsgQuerySubject): |
|
83 public CBase, |
|
84 public MEikSrvNotifierBase2, |
|
85 public MAknQueryNotificationCallback |
|
86 { |
|
87 public: |
|
88 static CAknGlobalMsgQuerySubject* NewL(); |
|
89 virtual ~CAknGlobalMsgQuerySubject(); |
|
90 |
|
91 // From MEikSrvNotifierBase. |
|
92 void Release(); |
|
93 TNotifierInfo RegisterL(); |
|
94 TNotifierInfo Info() const; |
|
95 TPtrC8 StartL(const TDesC8& aBuffer); |
|
96 void StartL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage); |
|
97 TPtrC8 UpdateL(const TDesC8& aBuffer); |
|
98 void Cancel(); |
|
99 |
|
100 // From MAknListQueryNotificationCallback. |
|
101 void QueryDismissedL(TInt aResult); |
|
102 |
|
103 private: |
|
104 CAknGlobalMsgQuerySubject(); |
|
105 void ConstructL(); |
|
106 |
|
107 private: |
|
108 RMessagePtr2 iMessage; |
|
109 const TAny* iReturnVal; |
|
110 TBool iPending; |
|
111 TNotifierInfo iInfo; |
|
112 CAknMsgQueryNotificationDialog* iDlg; |
|
113 TBool iAppsKeySuppressed; |
|
114 CApaMaskedBitmap* iBitmap; |
|
115 |
|
116 CEikonEnv* iStoredEikonEnv; |
|
117 }; |
|
118 |
|
119 #endif // __AKNSYSTEMMSGPOPUP_H__ |
|
120 |
|
121 // End of file |