|
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. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 // INCLUDES |
|
22 |
|
23 #include "TMCETestUIEngineCmdRejectSession.h" |
|
24 #include "CMCETestUIEngineInSession.h" |
|
25 #include "CMCETestUIQuestionSingleSelection.h" |
|
26 #include <MCEInSession.h> |
|
27 |
|
28 // ----------------------------------------------------------------------------- |
|
29 // TMCETestUIEngineCmdRejectSession::TMCETestUIEngineCmdRejectSession |
|
30 // ----------------------------------------------------------------------------- |
|
31 // |
|
32 TMCETestUIEngineCmdRejectSession::TMCETestUIEngineCmdRejectSession( |
|
33 CMCETestUIEngine& aEngine, |
|
34 CMCETestUIEngineInSession& aInSession ) |
|
35 : TMCETestUIEngineCmdBase( aEngine ), |
|
36 iInSession( aInSession ) |
|
37 { |
|
38 } |
|
39 |
|
40 // ----------------------------------------------------------------------------- |
|
41 // TMCETestUIEngineCmdRejectSession::ExecuteL |
|
42 // ----------------------------------------------------------------------------- |
|
43 // |
|
44 EXPORT_C void TMCETestUIEngineCmdRejectSession::ExecuteL() |
|
45 { |
|
46 |
|
47 iInSession.InSession().RejectL(); |
|
48 iEngine.EngineStateChangedL(); |
|
49 |
|
50 /* CMCETestUIQuestionSingleSelection* question = |
|
51 CMCETestUIQuestionSingleSelection::NewLC(); |
|
52 |
|
53 question->SetCaptionL( KMiscIncomingSession ); |
|
54 |
|
55 question->AddChoiceL( KUserQuestionOptionReject ); |
|
56 question->AddChoiceL( KUserQuestionOptionRejectWithCustomReason ); |
|
57 |
|
58 TInt index = iEngine.AskQuestionL( *question ); |
|
59 |
|
60 CleanupStack::PopAndDestroy( question ); |
|
61 |
|
62 if ( index == 0 ) // Reject now |
|
63 { |
|
64 iInSession.InSession().RejectL(); |
|
65 } |
|
66 else if ( index == 1 ) |
|
67 { |
|
68 User::Leave( KErrNotSupported ); // yet... |
|
69 } |
|
70 */ } |
|
71 |
|
72 // ----------------------------------------------------------------------------- |
|
73 // TMCETestUIEngineCmdRejectSession::Caption |
|
74 // ----------------------------------------------------------------------------- |
|
75 // |
|
76 EXPORT_C const TDesC& TMCETestUIEngineCmdRejectSession::Caption() const |
|
77 { |
|
78 return KCommandCaptionRejectSession; |
|
79 } |
|
80 |
|
81 |
|
82 |
|
83 |
|
84 // End of File |