|
1 /* |
|
2 * Copyright (c) 2009 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 #include "musuireceiveobserveradapter.h" |
|
19 |
|
20 |
|
21 CMusUiReceiveObserverAdapter::CMusUiReceiveObserverAdapter() |
|
22 { |
|
23 iAddress = NULL; |
|
24 iErrorCode = KErrNone; |
|
25 iShowErrorDialogErrorCode = KErrNone; |
|
26 } |
|
27 |
|
28 CMusUiReceiveObserverAdapter::~CMusUiReceiveObserverAdapter() |
|
29 { |
|
30 delete iAddress; |
|
31 } |
|
32 |
|
33 |
|
34 |
|
35 void CMusUiReceiveObserverAdapter::ShowErrorDialog( const TDesC& aPrompt ) |
|
36 { |
|
37 iCalledObserver = EShowErrorDialog; |
|
38 } |
|
39 |
|
40 |
|
41 |
|
42 void CMusUiReceiveObserverAdapter::ShowErrorDialogL( const TDesC& aMessage ) |
|
43 { |
|
44 iCalledObserver = EShowErrorDialogL; |
|
45 User::LeaveIfError( iShowErrorDialogErrorCode ); |
|
46 } |
|
47 |
|
48 |
|
49 void CMusUiReceiveObserverAdapter::ShowInvitationQueryL( const TDesC& aQuery ) |
|
50 { |
|
51 iCalledObserver = EShowInvitationQueryL; |
|
52 User::LeaveIfError( iErrorCode ); |
|
53 } |
|
54 |
|
55 |
|
56 void CMusUiReceiveObserverAdapter::DismissInvitationQuery( TBool aDelete ) |
|
57 { |
|
58 iCalledObserver = EDismissInvitationQuery; |
|
59 } |
|
60 |
|
61 |
|
62 |
|
63 void CMusUiReceiveObserverAdapter::ShowWaitDialogL( const TDesC& aPrompt ) |
|
64 { |
|
65 iCalledObserver = EShowWaitDialogL; |
|
66 User::LeaveIfError( iErrorCode ); |
|
67 } |
|
68 |
|
69 |
|
70 void CMusUiReceiveObserverAdapter::DismissWaitDialogL( ) |
|
71 { |
|
72 iCalledObserver = EDismissWaitDialogL; |
|
73 User::LeaveIfError( iErrorCode ); |
|
74 } |
|
75 |
|
76 |
|
77 void CMusUiReceiveObserverAdapter::ShowInformationDialogL( TInt aResourceId ) |
|
78 { |
|
79 iResourceId = aResourceId; |
|
80 iCalledObserver = EShowInformationDialogL; |
|
81 User::LeaveIfError( iErrorCode ); |
|
82 } |
|
83 |
|
84 |
|
85 void CMusUiReceiveObserverAdapter::ShowNaviPaneIconL( |
|
86 TMusUiNaviMediaDecorator aIcon, |
|
87 TBool aVisible ) |
|
88 { |
|
89 iIcon = aIcon; |
|
90 iVisible = aVisible; |
|
91 iCalledObserver = EShowNaviPaneIconL; |
|
92 User::LeaveIfError( iErrorCode ); |
|
93 } |
|
94 |
|
95 |
|
96 void CMusUiReceiveObserverAdapter::ShowStatusPaneL( TBool aVisible ) |
|
97 { |
|
98 iCalledObserver = EShowStatusPaneL; |
|
99 User::LeaveIfError( iErrorCode ); |
|
100 } |
|
101 |
|
102 |
|
103 void CMusUiReceiveObserverAdapter::ChangeOrientationL( |
|
104 CAknAppUiBase::TAppUiOrientation aOrientation ) |
|
105 { |
|
106 iOrientation = aOrientation; |
|
107 iCalledObserver = EChangeOrientationL; |
|
108 User::LeaveIfError( iErrorCode ); |
|
109 } |
|
110 |
|
111 |
|
112 void CMusUiReceiveObserverAdapter::UpdateSessionTime( const TDesC& aSessionTime ) |
|
113 { |
|
114 iCalledObserver = EUpdateSessionTime; |
|
115 User::LeaveIfError( iErrorCode ); |
|
116 } |
|
117 |
|
118 |
|
119 void CMusUiReceiveObserverAdapter::SetVolume( TBool aUp ) |
|
120 { |
|
121 iCalledObserver = ESetVolume; |
|
122 User::LeaveIfError( iErrorCode ); |
|
123 } |
|
124 |
|
125 |
|
126 void CMusUiReceiveObserverAdapter::HandleError( TInt aError ) |
|
127 { |
|
128 iError = aError; |
|
129 iCalledObserver = EHandleError; |
|
130 //User::LeaveIfError( iErrorCode ); |
|
131 } |
|
132 |
|
133 |
|
134 void CMusUiReceiveObserverAdapter::HandleExitL() |
|
135 { |
|
136 iCalledObserver = EHandleExitL; |
|
137 User::LeaveIfError( iErrorCode ); |
|
138 } |