author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Wed, 23 Jun 2010 19:20:39 +0300 | |
changeset 56 | f45583a69686 |
parent 38 | 218231f2b3b3 |
child 63 | ef2686f7597e |
permissions | -rw-r--r-- |
35 | 1 |
/* |
56
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
2 |
* Copyright (c) 2007 - 2010 Nokia Corporation and/or its subsidiary(-ies). |
35 | 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 |
* |
|
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
14 |
* Description: USB UI MSMM Error notifier class. |
35 | 15 |
* |
16 |
*/ |
|
17 |
||
18 |
||
19 |
// INCLUDE FILES |
|
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
20 |
#include <hb/hbwidgets/hbdevicemessageboxsymbian.h> // dialog |
56
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
21 |
#include <hb/hbwidgets/hbdevicenotificationdialogsymbian.h> //discreet |
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
22 |
#include <hb/hbcore/hbtextresolversymbian.h> |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
23 |
#include <usb/hostms/srverr.h> |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
24 |
#include <usbuinotif.h> // pck |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
25 |
#include "usbuinotifmsmmerror.h" // Own class definition |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
26 |
#include "usbuinotifdebug.h" // Debugging macros |
35 | 27 |
|
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
28 |
|
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
29 |
// CONSTANTS |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
30 |
/** granularity for allocating error strings */ |
56
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
31 |
const TInt KUsbMsmmErrorGranularity = 5; |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
32 |
_LIT(KUSBUIconFileName, "qtg_large_usb"); |
35 | 33 |
// ================= MEMBER FUNCTIONS ========================================= |
34 |
||
35 |
// ---------------------------------------------------------------------------- |
|
36 |
// CUsbUiNotifOtgError::NewL |
|
37 |
// Two-phased constructor. |
|
38 |
// ---------------------------------------------------------------------------- |
|
39 |
// |
|
40 |
CUsbUiNotifMSMMError* CUsbUiNotifMSMMError::NewL() |
|
41 |
{ |
|
42 |
CUsbUiNotifMSMMError* self = new (ELeave) CUsbUiNotifMSMMError(); |
|
43 |
CleanupStack::PushL( self ); |
|
44 |
self->ConstructL(); |
|
45 |
CleanupStack::Pop( self ); |
|
46 |
return self; |
|
47 |
} |
|
48 |
||
49 |
// ---------------------------------------------------------------------------- |
|
50 |
// CUsbUiNotifMSMMError::CUsbUiNotifMSMMError |
|
51 |
// C++ default constructor can NOT contain any code, that |
|
52 |
// might leave. |
|
53 |
// ---------------------------------------------------------------------------- |
|
54 |
// |
|
55 |
CUsbUiNotifMSMMError::CUsbUiNotifMSMMError() : |
|
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
56 |
iStringIds(NULL) |
35 | 57 |
{ |
58 |
} |
|
59 |
||
60 |
// ---------------------------------------------------------------------------- |
|
61 |
// Destructor |
|
62 |
// ---------------------------------------------------------------------------- |
|
63 |
// |
|
64 |
CUsbUiNotifMSMMError::~CUsbUiNotifMSMMError() |
|
65 |
{ |
|
66 |
//Make sure that the request is completed. Note that inside the destructor, |
|
67 |
//this virtual function call is to local CUsbUiNotifMSMMError::Cancel, |
|
68 |
//not to any possibly derived class implementation. |
|
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
69 |
delete iStringIds; |
35 | 70 |
Cancel(); |
71 |
} |
|
72 |
||
73 |
void CUsbUiNotifMSMMError::ConstructL() |
|
74 |
{ |
|
75 |
CUSBUINotifierBase::ConstructL(); |
|
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
76 |
iStringIds = new (ELeave) CDesCArrayFlat(KUsbMsmmErrorGranularity); |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
77 |
_LIT(KGeneralError,"txt_usb_info_error_in_usb_connection_disconnect_d"); |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
78 |
_LIT(KUnknownFileSys, "txt_usb_info_unknown_file_system_disconnect_devic"); |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
79 |
_LIT(KOutOfMemory, "txt_usb_info_disk_full_remove_some_files_and_try"); |
56
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
80 |
_LIT(KSafeToRemove, "txt_usb_dpinfo_safe_to_remove"); |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
81 |
_LIT(KUnableToEject,"txt_usb_info_unable_to_eject_the_usb_device_some" ); |
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
82 |
|
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
83 |
iStringIds->AppendL(KGeneralError); |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
84 |
iStringIds->AppendL(KUnknownFileSys); |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
85 |
iStringIds->AppendL(KOutOfMemory); |
56
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
86 |
iStringIds->AppendL(KSafeToRemove); |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
87 |
iStringIds->AppendL(KUnableToEject); |
35 | 88 |
} |
89 |
||
90 |
// ---------------------------------------------------------------------------- |
|
91 |
// CUsbUiNotifMSMMError::RegisterL |
|
92 |
// Register notifier. |
|
93 |
// ---------------------------------------------------------------------------- |
|
94 |
// |
|
95 |
CUsbUiNotifMSMMError::TNotifierInfo CUsbUiNotifMSMMError::RegisterL() |
|
96 |
{ |
|
97 |
iInfo.iUid = KUsbUiNotifMsmmError; |
|
98 |
iInfo.iChannel = KUsbUiNotifMsmmError; |
|
99 |
iInfo.iPriority = ENotifierPriorityVHigh; |
|
100 |
return iInfo; |
|
101 |
} |
|
102 |
||
103 |
// ---------------------------------------------------------------------------- |
|
104 |
// CUsbUiNotifMSMMError::GetParamsL |
|
105 |
// Jump to RunL as soon as possible. |
|
106 |
// ---------------------------------------------------------------------------- |
|
107 |
// |
|
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
108 |
void CUsbUiNotifMSMMError::StartDialogL(const TDesC8& aBuffer, TInt aReplySlot, |
35 | 109 |
const RMessagePtr2& aMessage) |
110 |
{ |
|
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
111 |
FLOG(_L("[USBUINOTIF]\t CUsbUiNotifMSMMError::StartDialogL")); |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
112 |
if (iReplySlot != 0 || iNeedToCompleteMessage) |
35 | 113 |
{ |
114 |
User::Leave( KErrInUse ); |
|
115 |
} |
|
116 |
||
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
117 |
InitializeTextResolver(); |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
118 |
|
35 | 119 |
iMessage = aMessage; |
120 |
iNeedToCompleteMessage = ETrue; |
|
121 |
iReplySlot = aReplySlot; |
|
56
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
122 |
_LIT(KUsbDisconnected, "txt_usb_dpophead_usb_disconnected"); |
35 | 123 |
// Get parameters |
124 |
// |
|
125 |
THostMsErrData error; |
|
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
126 |
TPckgC<THostMsErrData> pckg( error ); |
35 | 127 |
pckg.Set( aBuffer ); |
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
128 |
int errorId = EUsbMSMMGeneralError; |
35 | 129 |
switch (pckg().iError) |
130 |
{ |
|
131 |
case EHostMsErrUnknownFileSystem: |
|
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
132 |
errorId = EUsbMSMMUnknownFileSystem; |
35 | 133 |
break; |
134 |
case EHostMsErrOutOfMemory: |
|
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
135 |
errorId = EUsbMSMMOutOfMemory; |
56
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
136 |
break; |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
137 |
case EHostMsErrNone: |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
138 |
errorId = EUsbMSMMSafeToRemove; |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
139 |
break; |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
140 |
case EHostMsErrInUse: |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
141 |
errorId = EUsbMSMMUnableToEject; |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
142 |
break; |
35 | 143 |
default: |
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
144 |
errorId = EUsbMSMMGeneralError; |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
145 |
} |
56
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
146 |
HBufC* stringHolder = HbTextResolverSymbian::LoadLC(iStringIds->MdcaPoint(errorId)); |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
147 |
|
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
148 |
|
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
149 |
if ( errorId == EUsbMSMMSafeToRemove) |
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
150 |
{ |
56
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
151 |
// "safe to remove" discreet popup |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
152 |
HBufC* header = HbTextResolverSymbian::LoadLC(KUsbDisconnected); |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
153 |
if (iDiscreet) |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
154 |
{ |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
155 |
FLOG(_L("[USBUINOTIF]\t CUsbUiNotifMSMMError::StartDialogL() deleting previous dialog")); |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
156 |
delete iDiscreet; |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
157 |
iDiscreet = NULL; |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
158 |
} |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
159 |
iDiscreet = CHbDeviceNotificationDialogSymbian::NewL(this); |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
160 |
iDiscreet->SetTitleL(*header); |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
161 |
iDiscreet->SetTextL(*stringHolder); |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
162 |
iDiscreet->SetIconNameL(KUSBUIconFileName ); |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
163 |
iDiscreet->ShowL(); |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
164 |
CleanupStack::PopAndDestroy( header ); |
35 | 165 |
} |
56
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
166 |
else |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
167 |
{ |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
168 |
//Delete the query in case the client didn't cancel the notifier |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
169 |
//or close the session after the previous query. |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
170 |
|
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
171 |
if (iQuery) |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
172 |
{ |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
173 |
FLOG(_L("[USBUINOTIF]\t CUsbUiNotifMSMMError::StartDialogL() deleting previous dialog")); |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
174 |
delete iQuery; |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
175 |
iQuery = NULL; |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
176 |
} |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
177 |
|
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
178 |
iQuery = CHbDeviceMessageBoxSymbian::NewL( |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
179 |
CHbDeviceMessageBoxSymbian::EWarning, this); |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
180 |
iQuery->SetTimeout(0); |
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
181 |
|
56
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
182 |
|
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
183 |
iQuery->SetTextL(*stringHolder); |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
184 |
iQuery->ShowL(); |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
185 |
} |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
186 |
|
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
187 |
CleanupStack::PopAndDestroy( stringHolder ); |
56
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
188 |
|
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
189 |
|
56
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
190 |
FLOG(_L("[USBUINOTIF]\t CUsbUiNotifMSMMError::StartDialogL() completed")); |
35 | 191 |
} |
192 |
||
193 |
// ---------------------------------------------------------------------------- |
|
194 |
// CUsbUiNotifMSMMError::Cancel |
|
195 |
// Release all own resources (member variables) |
|
196 |
// ---------------------------------------------------------------------------- |
|
197 |
// |
|
198 |
void CUsbUiNotifMSMMError::Cancel() |
|
199 |
{ |
|
200 |
FLOG(_L("[USBUINOTIF]\t CUsbUiNotifMSMMError::Cancel")); |
|
201 |
if (iQuery) |
|
202 |
{ |
|
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
203 |
FLOG(_L("[USBUINOTIF]\t CUsbUiNotifMSMMError::Cancel closing iQuery")); |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
204 |
iQuery->Close(); |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
205 |
FLOG(_L("[USBUINOTIF]\t CUsbUiNotifMSMMError::Cancel iQuery closed")); |
35 | 206 |
delete iQuery; |
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
207 |
FLOG(_L("[USBUINOTIF]\t CUsbUiNotifMSMMError::Cancel iQuery deleted")); |
35 | 208 |
iQuery = NULL; |
209 |
} |
|
56
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
210 |
if (iDiscreet) |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
211 |
{ |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
212 |
iDiscreet->Close(); |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
213 |
delete iDiscreet; |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
214 |
iDiscreet = NULL; |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
215 |
} |
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
216 |
CUSBUINotifierBase::Cancel(); |
35 | 217 |
FLOG(_L("[USBUINOTIF]\t CUsbUiNotifMSMMError::Cancel() completed")); |
218 |
} |
|
219 |
||
220 |
// ---------------------------------------------------------------------------- |
|
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
221 |
// Call back function to observe device message box closing. |
35 | 222 |
// ---------------------------------------------------------------------------- |
223 |
// |
|
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
224 |
void CUsbUiNotifMSMMError::MessageBoxClosed( |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
225 |
const CHbDeviceMessageBoxSymbian* /*aMessageBox*/, |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
226 |
CHbDeviceMessageBoxSymbian::TButtonId aButton) |
35 | 227 |
{ |
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
228 |
FLOG(_L("[USBUINOTIF]\t CUsbUiNotifMSMMError::MessageBoxClosed")); |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
229 |
int returnValue = KErrNone; |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
230 |
|
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
231 |
//iQuery will be deleted in Cancel. If Cancel is not called, it will be |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
232 |
//deleted next time the query is shown. |
35 | 233 |
|
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
234 |
if (aButton == CHbDeviceMessageBoxSymbian::EAcceptButton) |
35 | 235 |
{ |
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
236 |
returnValue = KErrNone; |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
237 |
} |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
238 |
else |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
239 |
{ |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
240 |
returnValue = KErrCancel; |
35 | 241 |
} |
242 |
||
38
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
243 |
CompleteMessage( returnValue ); |
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
244 |
|
218231f2b3b3
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
35
diff
changeset
|
245 |
FLOG(_L("[USBUINOTIF]\t CUsbUiNotifMSMMError::MessageBoxClosed completed")); |
35 | 246 |
} |
247 |
||
56
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
248 |
void CUsbUiNotifMSMMError::NotificationDialogActivated( |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
249 |
const CHbDeviceNotificationDialogSymbian* /*aDialog*/) |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
250 |
{ |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
251 |
|
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
252 |
} |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
253 |
|
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
254 |
void CUsbUiNotifMSMMError::NotificationDialogClosed( |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
255 |
const CHbDeviceNotificationDialogSymbian* /*aDialog*/, TInt /*aCompletionCode*/) |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
256 |
{ |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
257 |
FLOG(_L("[USBUINOTIF]\t CUsbUiNotifMSMMError::NotificationDialogClosed()")); |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
258 |
CompleteMessage( KErrCancel ); |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
259 |
FLOG(_L("[USBUINOTIF]\t CUsbUiNotifMSMMError::NotificationDialogClosed() complete")); |
f45583a69686
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
38
diff
changeset
|
260 |
} |
35 | 261 |
// End of File |