|
1 /* |
|
2 * Copyright (c) 2005 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: Implementation of CWLANNetworkUnavailableNoteNotif. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include "WLANNetworkUnavailableNoteNotif.h" |
|
21 #include "ActiveWLANNetworkUnavailableNote.h" |
|
22 #include "ConnUiUtilsNotif.h" |
|
23 |
|
24 |
|
25 // ================= MEMBER FUNCTIONS ======================= |
|
26 |
|
27 // --------------------------------------------------------- |
|
28 // CWLANNetworkUnavailableNoteNotif::TNotifierInfo |
|
29 // CWLANNetworkUnavailableNoteNotif::RegisterL() |
|
30 // --------------------------------------------------------- |
|
31 // |
|
32 CWLANNetworkUnavailableNoteNotif::TNotifierInfo |
|
33 CWLANNetworkUnavailableNoteNotif::RegisterL() |
|
34 { |
|
35 iInfo.iUid = KUidWLANNetworkUnavailableNoteDlg; |
|
36 iInfo.iPriority = ENotifierPriorityVHigh; |
|
37 iInfo.iChannel = KUidWLANNetworkUnavailableNoteDlg; |
|
38 |
|
39 return iInfo; |
|
40 } |
|
41 |
|
42 |
|
43 // --------------------------------------------------------- |
|
44 // void CWLANNetworkUnavailableNoteNotif::StartL() |
|
45 // --------------------------------------------------------- |
|
46 // |
|
47 void CWLANNetworkUnavailableNoteNotif::StartL( const TDesC8& /*aBuffer*/, |
|
48 TInt aReplySlot, |
|
49 const RMessagePtr2& aMessage ) |
|
50 { |
|
51 iReplySlot = aReplySlot; |
|
52 iMessage = aMessage; |
|
53 iCancelled = EFalse; |
|
54 |
|
55 iActiveNote = new( ELeave ) CActiveWLANNetworkUnavailableNote( this ); |
|
56 |
|
57 iActiveNote->LaunchWLANNetworkUnavailable( |
|
58 CActiveWLANNetworkUnavailableNote::EWlanNote1 ); |
|
59 } |
|
60 |
|
61 // --------------------------------------------------------- |
|
62 // void CWLANNetworkUnavailableNoteNotif::CompleteL( TInt aStatus ) |
|
63 // --------------------------------------------------------- |
|
64 // |
|
65 void CWLANNetworkUnavailableNoteNotif::CompleteL( TInt aStatus ) |
|
66 { |
|
67 delete iActiveNote; |
|
68 iActiveNote = NULL; |
|
69 |
|
70 iCancelled = ETrue; |
|
71 if ( !iMessage.IsNull() ) |
|
72 { |
|
73 iMessage.Complete( aStatus ); |
|
74 } |
|
75 Cancel(); |
|
76 } |
|
77 |
|
78 // --------------------------------------------------------- |
|
79 // CWLANNetworkUnavailableNoteNotif* CWLANNetworkUnavailableNoteNotif::NewL() |
|
80 // --------------------------------------------------------- |
|
81 // |
|
82 CWLANNetworkUnavailableNoteNotif* CWLANNetworkUnavailableNoteNotif::NewL( |
|
83 const TBool aResourceFileResponsible ) |
|
84 { |
|
85 CWLANNetworkUnavailableNoteNotif* self = |
|
86 new( ELeave ) CWLANNetworkUnavailableNoteNotif(); |
|
87 CleanupStack::PushL( self ); |
|
88 self->ConstructL( KResourceFileName, aResourceFileResponsible ); |
|
89 CleanupStack::Pop(); |
|
90 |
|
91 return self; |
|
92 } |
|
93 |
|
94 |
|
95 // --------------------------------------------------------- |
|
96 // CWLANNetworkUnavailableNoteNotif::CWLANNetworkUnavailableNoteNotif() |
|
97 // --------------------------------------------------------- |
|
98 // |
|
99 CWLANNetworkUnavailableNoteNotif::CWLANNetworkUnavailableNoteNotif() |
|
100 : CConnectionDialogsNotifBase(), |
|
101 iActiveNote( NULL ) |
|
102 { |
|
103 } |
|
104 |
|
105 // --------------------------------------------------------- |
|
106 // void CWLANNetworkUnavailableNoteNotif::Cancel() |
|
107 // --------------------------------------------------------- |
|
108 // |
|
109 void CWLANNetworkUnavailableNoteNotif::Cancel() |
|
110 { |
|
111 if ( !iCancelled ) |
|
112 { |
|
113 iCancelled = ETrue; |
|
114 if ( !iMessage.IsNull() ) |
|
115 { |
|
116 iMessage.Complete( KErrCancel ); |
|
117 } |
|
118 |
|
119 delete iActiveNote; |
|
120 iActiveNote = NULL; |
|
121 } |
|
122 } |
|
123 |
|
124 // End of File |