1 /* |
|
2 * Copyright (c) 2002 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: CSysApMsgSimMemLowQuery implementation. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDES |
|
20 #include <AknGlobalConfirmationQuery.h> |
|
21 #include "SysApMsgSimMemLowQuery.h" |
|
22 #include "SysAp.hrh" |
|
23 #include <SecondaryDisplay/SecondaryDisplaySysApAPI.h> |
|
24 #include <aknSDData.h> |
|
25 |
|
26 // ============================ MEMBER FUNCTIONS ============================== |
|
27 |
|
28 // ---------------------------------------------------------------------------- |
|
29 // CSysApMsgSimMemLowQuery::CSysApMsgSimMemLowQuery() |
|
30 // ---------------------------------------------------------------------------- |
|
31 |
|
32 CSysApMsgSimMemLowQuery::CSysApMsgSimMemLowQuery(TBool aCoverDisplaySupported) |
|
33 : CActive( EPriorityStandard ), iCoverDisplaySupported(aCoverDisplaySupported) |
|
34 { |
|
35 CActiveScheduler::Add(this); |
|
36 } |
|
37 |
|
38 // ---------------------------------------------------------------------------- |
|
39 // CSysApMsgSimMemLowQuery::~CSysApMsgSimMemLowQuery() |
|
40 // ---------------------------------------------------------------------------- |
|
41 |
|
42 CSysApMsgSimMemLowQuery::~CSysApMsgSimMemLowQuery() |
|
43 { |
|
44 Cancel(); |
|
45 delete iSimMemoryLowQuery; |
|
46 } |
|
47 |
|
48 |
|
49 // ---------------------------------------------------------------------------- |
|
50 // CSysApMsgSimMemLowQuery::DoCancel() |
|
51 // ---------------------------------------------------------------------------- |
|
52 |
|
53 void CSysApMsgSimMemLowQuery::DoCancel() |
|
54 { |
|
55 } |
|
56 |
|
57 // ---------------------------------------------------------------------------- |
|
58 // CSysApMsgSimMemLowQuery::StartL() |
|
59 // ---------------------------------------------------------------------------- |
|
60 |
|
61 void CSysApMsgSimMemLowQuery::StartL( const TDesC& aPrompt ) |
|
62 { |
|
63 if( !IsActive() ) |
|
64 { |
|
65 iSimMemoryLowQuery = CAknGlobalConfirmationQuery::NewL(); |
|
66 |
|
67 // Set secondary display data if necessary |
|
68 if ( iCoverDisplaySupported ) |
|
69 { |
|
70 CAknSDData* sd = CAknSDData::NewL(SecondaryDisplay::KCatSysAp, SecondaryDisplay::ECmdShowSimMemoryLowQuery, KNullDesC8); |
|
71 iSimMemoryLowQuery->SetSecondaryDisplayData(sd); // ownership to notifier client |
|
72 } |
|
73 |
|
74 iSimMemoryLowQuery->ShowConfirmationQueryL( |
|
75 iStatus, |
|
76 aPrompt, |
|
77 R_AVKON_SOFTKEYS_OK_EMPTY, |
|
78 R_QGN_NOTE_ERROR_ANIM, |
|
79 KNullDesC, |
|
80 0, |
|
81 0, |
|
82 CAknQueryDialog::EErrorTone, |
|
83 EFalse |
|
84 ); |
|
85 SetActive(); |
|
86 } |
|
87 } |
|
88 |
|
89 // ---------------------------------------------------------------------------- |
|
90 // CSysApMsgSimMemLowQuery::RunL() |
|
91 // ---------------------------------------------------------------------------- |
|
92 |
|
93 void CSysApMsgSimMemLowQuery::RunL() |
|
94 { |
|
95 TRACES( RDebug::Print( _L( "CSysApMsgSimMemLowQuery::RunL: started, %d selected" ), iStatus.Int() ) ); |
|
96 delete iSimMemoryLowQuery; |
|
97 iSimMemoryLowQuery = NULL; |
|
98 TRACES( RDebug::Print( _L( "CSysApMsgSimMemLowQuery::RunL: completed" ) ) ); |
|
99 } |
|
100 |
|
101 // ---------------------------------------------------------------------------- |
|
102 // CSysApMsgSimMemLowQuery::RunError( TInt aError ) |
|
103 // ---------------------------------------------------------------------------- |
|
104 |
|
105 #ifdef _DEBUG |
|
106 TInt CSysApMsgSimMemLowQuery::RunError( TInt aError ) |
|
107 #else |
|
108 TInt CSysApMsgSimMemLowQuery::RunError( TInt /* aError */ ) |
|
109 #endif |
|
110 { |
|
111 TRACES( RDebug::Print( _L( "CSysApMsgSimMemLowQuery::RunError: %d started" ), aError ) ); |
|
112 delete iSimMemoryLowQuery; |
|
113 iSimMemoryLowQuery = NULL; |
|
114 TRACES( RDebug::Print( _L( "CSysApMsgSimMemLowQuery::RunError: completed" ) ) ); |
|
115 return KErrNone; |
|
116 } |
|
117 |
|
118 // End of File |
|