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