author | hgs |
Mon, 17 May 2010 11:03:15 +0300 | |
changeset 52 | 831068540b07 |
parent 46 | 0ffee699d6c7 |
permissions | -rw-r--r-- |
0
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1 |
/* |
52 | 2 |
* Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). |
0
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3 |
* All rights reserved. |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5 |
* under the terms of "Eclipse Public License v1.0" |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
8 |
* |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
11 |
* |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
12 |
* Contributors: |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
13 |
* |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
14 |
* Description: USB UI queries notifier class. |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
15 |
* |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
16 |
*/ |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
17 |
|
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
18 |
// INCLUDE FILES |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
19 |
|
52 | 20 |
#include <hb/hbwidgets/hbdevicemessageboxsymbian.h> |
21 |
#include <hb/hbcore/hbtextresolversymbian.h> |
|
0
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
22 |
#include <usbuinotif.h> // pck |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
23 |
#include "usbuinqueriesnotifiermdrv.h" // Own class definition |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
24 |
#include "usbuinotifdebug.h" // Debugging macros |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
25 |
|
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
26 |
// ================= MEMBER FUNCTIONS ========================================= |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
27 |
|
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
28 |
// ---------------------------------------------------------------------------- |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
29 |
// CUSBUIQueriesNotifier::NewL |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
30 |
// Two-phased constructor. |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
31 |
// ---------------------------------------------------------------------------- |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
32 |
// |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
33 |
CUSBUIQueriesNotifier* CUSBUIQueriesNotifier::NewL() |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
34 |
{ |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
35 |
FLOG(_L("[USBUINOTIF]\t CUSBUIQueriesNotifier::NewL")); |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
36 |
CUSBUIQueriesNotifier* self = new (ELeave) CUSBUIQueriesNotifier(); |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
37 |
CleanupStack::PushL( self ); |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
38 |
self->ConstructL(); |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
39 |
CleanupStack::Pop( self ); |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
40 |
return self; |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
41 |
} |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
42 |
|
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
43 |
// ---------------------------------------------------------------------------- |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
44 |
// CUSBUIQueriesNotifier::CUSBUIQueriesNotifier |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
45 |
// C++ default constructor can NOT contain any code, that |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
46 |
// might leave. |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
47 |
// ---------------------------------------------------------------------------- |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
48 |
// |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
49 |
CUSBUIQueriesNotifier::CUSBUIQueriesNotifier() |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
50 |
{ |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
51 |
} |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
52 |
|
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
53 |
// ---------------------------------------------------------------------------- |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
54 |
// Destructor |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
55 |
// ---------------------------------------------------------------------------- |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
56 |
// |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
57 |
CUSBUIQueriesNotifier::~CUSBUIQueriesNotifier() |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
58 |
{ |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
59 |
//Make sure that the request is completed. Note that inside the destructor, |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
60 |
//this virtual function call is to local CUSBUIQueriesNotifier::Cancel, |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
61 |
//not to any possibly derived class implementation. |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
62 |
Cancel(); |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
63 |
} |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
64 |
|
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
65 |
// ---------------------------------------------------------------------------- |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
66 |
// CUSBUIQueriesNotifier::RegisterL |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
67 |
// Register notifier. |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
68 |
// ---------------------------------------------------------------------------- |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
69 |
// |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
70 |
CUSBUIQueriesNotifier::TNotifierInfo CUSBUIQueriesNotifier::RegisterL() |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
71 |
{ |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
72 |
FLOG(_L("[USBUINOTIF]\t CUSBUIQueriesNotifier::RegisterL")); |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
73 |
iInfo.iUid = KQueriesNotifier; |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
74 |
iInfo.iChannel = KQueriesNotifier; |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
75 |
iInfo.iPriority = ENotifierPriorityVHigh; // must be higher than the one |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
76 |
// in cableconnected notifier |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
77 |
FLOG(_L("[USBUINOTIF]\t CUSBUIQueriesNotifier::RegisterL completed")); |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
78 |
return iInfo; |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
79 |
} |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
80 |
|
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
81 |
|
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
82 |
// ---------------------------------------------------------------------------- |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
83 |
// CUSBUIQueriesNotifier::GetParamsL |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
84 |
// ---------------------------------------------------------------------------- |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
85 |
// |
52 | 86 |
void CUSBUIQueriesNotifier::StartDialogL(const TDesC8& aBuffer, |
0
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
87 |
TInt aReplySlot, const RMessagePtr2& aMessage) |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
88 |
{ |
52 | 89 |
FLOG(_L("[USBUINOTIF]\t CUSBUIQueriesNotifier::StartDialogL")); |
90 |
if ( iReplySlot != 0 || iNeedToCompleteMessage) |
|
0
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
91 |
{ |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
92 |
User::Leave( KErrInUse ); |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
93 |
} |
52 | 94 |
|
95 |
InitializeTextResolver(); |
|
0
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
96 |
|
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
97 |
iMessage = aMessage; |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
98 |
iNeedToCompleteMessage = ETrue; |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
99 |
iReplySlot = aReplySlot; |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
100 |
|
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
101 |
// Get parameters |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
102 |
// |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
103 |
TUSBQueriesNotiferParams params; //stores parameters from aBuffer |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
104 |
TPckgC<TUSBQueriesNotiferParams> pckg( params ); |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
105 |
pckg.Set( aBuffer ); |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
106 |
// Save the type of the query for later use (dialog selection) |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
107 |
// |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
108 |
iQueryType = pckg().iQuery; |
52 | 109 |
|
110 |
if (iUSBQueryDlg) |
|
0
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
111 |
{ |
52 | 112 |
delete iUSBQueryDlg; |
113 |
iUSBQueryDlg = NULL; |
|
0
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
114 |
} |
52 | 115 |
iUSBQueryDlg = CHbDeviceMessageBoxSymbian::NewL( |
116 |
CHbDeviceMessageBoxSymbian::EWarning, this); |
|
117 |
iUSBQueryDlg->SetTimeout(0); |
|
118 |
HBufC* stringHolder = NULL; |
|
119 |
switch (iQueryType) |
|
120 |
{ |
|
121 |
case EUSBStorageMediaFailure: |
|
122 |
{ |
|
123 |
_LIT(KMassStorageFail, "txt_usb_info_unable_to_show_a_memory_to_other_devi"); |
|
124 |
stringHolder = HbTextResolverSymbian::LoadLC( KMassStorageFail ); |
|
125 |
break; |
|
126 |
} |
|
127 |
case EUSBDiskFull: |
|
128 |
{ |
|
129 |
_LIT(KDiskFull, "txt_usb_info_disk_full_remove_some_files_and_try"); |
|
130 |
stringHolder = HbTextResolverSymbian::LoadLC( KDiskFull ); |
|
131 |
break; |
|
132 |
} |
|
133 |
case EUSBNotEnoughRam: |
|
134 |
{ |
|
135 |
_LIT(KNotEnoughMemory, "txt_usb_info_memory_full_close_some_applications"); |
|
136 |
stringHolder = HbTextResolverSymbian::LoadLC( KNotEnoughMemory ); |
|
137 |
break; |
|
138 |
} |
|
139 |
default: |
|
140 |
{ |
|
141 |
FTRACE( FPrint( _L( "[USBUINOTIF]\t CUSBUIQueriesNotifier::ERROR! Unknown query type: %d" ),iQueryType ) ); |
|
142 |
} |
|
143 |
} |
|
144 |
||
145 |
if (stringHolder) |
|
0
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
146 |
{ |
52 | 147 |
iUSBQueryDlg->SetTextL(*stringHolder); |
0
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
148 |
} |
52 | 149 |
|
150 |
iUSBQueryDlg->ShowL(); |
|
151 |
FLOG(_L("[USBUINOTIF]\t CUSBUIQueriesNotifier::StartDialogL() ShowL returned")); |
|
152 |
||
153 |
CleanupStack::PopAndDestroy( stringHolder ); |
|
154 |
||
155 |
||
156 |
FLOG(_L("[USBUINOTIF]\t CUSBUIQueriesNotifier::StartDialogL completed")); |
|
0
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
157 |
} |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
158 |
|
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
159 |
// ---------------------------------------------------------------------------- |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
160 |
// CUSBUIQueriesNotifier::Cancel |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
161 |
// Release all own resources (member variables) |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
162 |
// ---------------------------------------------------------------------------- |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
163 |
// |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
164 |
void CUSBUIQueriesNotifier::Cancel() |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
165 |
{ |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
166 |
FLOG(_L("[USBUINOTIF]\t CUSBUIQueriesNotifier::Cancel")); |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
167 |
if (iUSBQueryDlg) |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
168 |
{ |
52 | 169 |
iUSBQueryDlg->Close(); |
0
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
170 |
delete iUSBQueryDlg; |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
171 |
iUSBQueryDlg = NULL; |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
172 |
} |
52 | 173 |
|
0
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
174 |
CUSBUINotifierBase::Cancel(); |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
175 |
FLOG(_L("[USBUINOTIF]\t CUSBUIQueriesNotifier::Cancel() completed")); |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
176 |
} |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
177 |
|
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
178 |
|
52 | 179 |
void CUSBUIQueriesNotifier::MessageBoxClosed( |
180 |
const CHbDeviceMessageBoxSymbian* /*aMessageBox*/, |
|
181 |
CHbDeviceMessageBoxSymbian::TButtonId aButton) |
|
182 |
{ |
|
183 |
FLOG(_L("[USBUINOTIF]\t CUsbUiNotifMSMMError::MessageBoxClosed")); |
|
184 |
int returnValue = KErrNone; |
|
185 |
||
186 |
//iQuery will be deleted in Cancel. If Cancel is not called, it will be |
|
187 |
//deleted next time the query is shown. |
|
188 |
||
189 |
if (aButton == CHbDeviceMessageBoxSymbian::EAcceptButton) |
|
46 | 190 |
{ |
52 | 191 |
returnValue = KErrNone; |
192 |
} |
|
193 |
else |
|
0
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
194 |
{ |
52 | 195 |
returnValue = KErrCancel; |
0
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
196 |
} |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
197 |
|
52 | 198 |
CompleteMessage( returnValue ); |
199 |
||
200 |
FLOG(_L("[USBUINOTIF]\t CUsbUiNotifMSMMError::MessageBoxClosed completed")); |
|
0
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
201 |
} |
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
202 |
|
52 | 203 |
|
0
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
204 |
|
1e05558e2206
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
205 |
// End of File |