author | Simon Howkins <simonh@symbian.org> |
Mon, 22 Nov 2010 12:04:39 +0000 | |
branch | RCL_3 |
changeset 84 | e6c5e34cd9b9 |
parent 66 | 8b7f4e561641 |
permissions | -rw-r--r-- |
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1 |
/* |
66 | 2 |
* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). |
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3 |
* All rights reserved. |
ba25891c3a9e
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 |
ba25891c3a9e
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" |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
ba25891c3a9e
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". |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
8 |
* |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
11 |
* |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
12 |
* Contributors: |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
13 |
* |
66 | 14 |
* Description: |
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
15 |
* |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
16 |
*/ |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
17 |
|
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
18 |
|
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
19 |
|
66 | 20 |
// INCLUDE FILES |
21 |
||
22 |
#include "iaupdatedialogutil.h" |
|
23 |
#include "iaupdatedebug.h" |
|
24 |
#include <iaupdate.rsg> |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
25 |
|
66 | 26 |
#include <aknmessagequerydialog.h> // CAknMessageQueryDialog |
27 |
#include <aknnotewrappers.h> // CAknInformationNote |
|
28 |
#include <StringLoader.h> |
|
29 |
||
30 |
||
31 |
/******************************************************************************* |
|
32 |
* class TIAUpdateDialogParam |
|
33 |
*******************************************************************************/ |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
34 |
|
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
35 |
|
66 | 36 |
// ------------------------------------------------------------------------------- |
37 |
// TIAUpdateDialogParam::TIAUpdateDialogParam |
|
38 |
// |
|
39 |
// ------------------------------------------------------------------------------- |
|
40 |
// |
|
41 |
TIAUpdateDialogParam::TIAUpdateDialogParam() |
|
42 |
: iCountSuccessfull( KErrNotFound ), iCountCancelled( KErrNotFound ), |
|
43 |
iCountFailed( KErrNotFound ), iResourceId( KErrNotFound ), iNode( NULL ), |
|
44 |
iLinkObserver( NULL ) |
|
45 |
{ |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
46 |
} |
66 | 47 |
|
48 |
||
49 |
/******************************************************************************* |
|
50 |
* class IAUpdateDialogUtil |
|
51 |
*******************************************************************************/ |
|
52 |
||
53 |
||
54 |
//------------------------------------------------------------------------------ |
|
55 |
// IAUpdateDialogUtil::ShowMessageQueryL |
|
56 |
// |
|
57 |
//------------------------------------------------------------------------------ |
|
58 |
// |
|
59 |
void IAUpdateDialogUtil::ShowMessageQueryL(const TDesC& aTitle, const TDesC& aText) |
|
60 |
{ |
|
61 |
TPtrC ptr = aText; |
|
62 |
CAknMessageQueryDialog* query = CAknMessageQueryDialog::NewL( ptr ); |
|
63 |
query->PrepareLC( R_IAUPDATE_MESSAGE_QUERY ); |
|
64 |
||
65 |
if ( aTitle.Length() != 0 ) |
|
66 |
{ |
|
67 |
CAknPopupHeadingPane* headingPane = query->Heading(); |
|
68 |
headingPane->SetTextL( aTitle ); |
|
69 |
} |
|
70 |
query->RunLD(); |
|
71 |
} |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
72 |
|
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
73 |
|
66 | 74 |
//------------------------------------------------------------------------------ |
75 |
// IAUpdateDialogUtil::ShowMessageQueryL |
|
76 |
// |
|
77 |
//------------------------------------------------------------------------------ |
|
78 |
// |
|
79 |
void IAUpdateDialogUtil::ShowMessageQueryL( const TDesC& aTitle, TInt aResource ) |
|
80 |
{ |
|
81 |
HBufC* hBuf = StringLoader::LoadLC( aResource ); |
|
82 |
ShowMessageQueryL( aTitle, hBuf->Des() ); |
|
83 |
CleanupStack::PopAndDestroy( hBuf ); |
|
84 |
} |
|
85 |
||
86 |
||
87 |
//------------------------------------------------------------------------------ |
|
88 |
// IAUpdateDialogUtil::ShowInformationQueryL |
|
89 |
// |
|
90 |
//------------------------------------------------------------------------------ |
|
91 |
// |
|
92 |
void IAUpdateDialogUtil::ShowInformationQueryL(const TDesC& aText) |
|
93 |
{ |
|
94 |
CAknQueryDialog* queryDialog = new (ELeave) CAknQueryDialog; |
|
95 |
queryDialog->ExecuteLD(R_IAUPDATE_INFORMATION_QUERY, aText); |
|
96 |
} |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
97 |
|
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
98 |
|
66 | 99 |
//------------------------------------------------------------------------------ |
100 |
// IAUpdateDialogUtil::ShowInformationQueryL |
|
101 |
// |
|
102 |
//------------------------------------------------------------------------------ |
|
103 |
// |
|
104 |
void IAUpdateDialogUtil::ShowInformationQueryL(TInt aResource) |
|
105 |
{ |
|
106 |
HBufC* hBuf = StringLoader::LoadLC(aResource); |
|
107 |
ShowInformationQueryL( hBuf->Des() ); |
|
108 |
CleanupStack::PopAndDestroy( hBuf ); |
|
109 |
} |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
110 |
|
66 | 111 |
//------------------------------------------------------------------------------ |
112 |
// IAUpdateDialogUtil::ShowConfirmationQueryL |
|
113 |
// |
|
114 |
//------------------------------------------------------------------------------ |
|
115 |
// |
|
116 |
TInt IAUpdateDialogUtil::ShowConfirmationQueryL( const TDesC& aText, |
|
117 |
TInt aSoftkeyResourceId ) |
|
118 |
{ |
|
119 |
CAknQueryDialog* queryDialog = CAknQueryDialog::NewL( |
|
120 |
CAknQueryDialog::EConfirmationTone ); |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
121 |
|
66 | 122 |
queryDialog->PrepareLC( R_IAUPDATE_CONFIRMATION_QUERY ); |
123 |
queryDialog->SetPromptL( aText ); |
|
124 |
queryDialog->ButtonGroupContainer().SetCommandSetL( aSoftkeyResourceId ); |
|
125 |
return ( queryDialog->RunLD() ); |
|
126 |
} |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
127 |
|
66 | 128 |
//------------------------------------------------------------------------------ |
129 |
// IAUpdateDialogUtil::ShowConfirmationQueryL |
|
130 |
// |
|
131 |
//------------------------------------------------------------------------------ |
|
132 |
// |
|
133 |
TInt IAUpdateDialogUtil::ShowConfirmationQueryL( TInt aResource, |
|
134 |
TInt aSoftkeyResourceId ) |
|
135 |
{ |
|
136 |
HBufC* hBuf = StringLoader::LoadLC( aResource) ; |
|
137 |
TInt ret = ShowConfirmationQueryL( *hBuf, aSoftkeyResourceId ); |
|
138 |
CleanupStack::PopAndDestroy( hBuf ); |
|
139 |
return ret; |
|
140 |
} |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
141 |
|
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
142 |
|
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
143 |
|
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
144 |
|
66 | 145 |
// ----------------------------------------------------------------------------- |
146 |
// IAUpdateDialogUtil::Panic |
|
147 |
// |
|
148 |
// ----------------------------------------------------------------------------- |
|
149 |
// |
|
150 |
void IAUpdateDialogUtil::Panic( TInt aReason ) |
|
151 |
{ |
|
152 |
_LIT(KPanicCategory, "IAUpdateDialogUtil"); |
|
153 |
||
154 |
User::Panic(KPanicCategory, aReason); |
|
155 |
} |
|
156 |
||
157 |
// End of File |