|
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 "musuilivesharingobserveradapter.h" |
|
19 |
|
20 |
|
21 CMusUiLiveSharingObserverAdapter::CMusUiLiveSharingObserverAdapter() |
|
22 { |
|
23 iAddress = NULL; |
|
24 iErrorCode = KErrNone; |
|
25 iShowErrorDialogErrorCode = KErrNone; |
|
26 } |
|
27 |
|
28 CMusUiLiveSharingObserverAdapter::~CMusUiLiveSharingObserverAdapter() |
|
29 { |
|
30 delete iAddress; |
|
31 } |
|
32 |
|
33 |
|
34 TBool CMusUiLiveSharingObserverAdapter::SelectAddressDialogL( CDesCArray* aAddressArray, |
|
35 TDes& aSelectedAddress ) |
|
36 { |
|
37 |
|
38 |
|
39 TInt selectedIndex( 0 ); |
|
40 aSelectedAddress = (*aAddressArray)[ selectedIndex ]; |
|
41 delete aAddressArray; |
|
42 aAddressArray = NULL; |
|
43 |
|
44 iCalledObserver = ESelectAddressDialogL; |
|
45 User::LeaveIfError( iErrorCode ); |
|
46 return ETrue; |
|
47 } |
|
48 |
|
49 |
|
50 void CMusUiLiveSharingObserverAdapter::ManualAddressEntryL( const TDesC& aAddress ) |
|
51 { |
|
52 delete iAddress; |
|
53 iAddress = aAddress.AllocL(); |
|
54 iCalledObserver = EManualAddressEntryL; |
|
55 User::LeaveIfError( iErrorCode ); |
|
56 } |
|
57 |
|
58 |
|
59 |
|
60 void CMusUiLiveSharingObserverAdapter::ShowWaitDialogL( const TDesC& aPrompt ) |
|
61 { |
|
62 iCalledObserver = EShowWaitDialogL; |
|
63 User::LeaveIfError( iErrorCode ); |
|
64 } |
|
65 |
|
66 |
|
67 |
|
68 void CMusUiLiveSharingObserverAdapter::DismissWaitDialogL( ) |
|
69 { |
|
70 iCalledObserver = EDismissWaitDialogL; |
|
71 User::LeaveIfError( iErrorCode ); |
|
72 } |
|
73 |
|
74 |
|
75 |
|
76 void CMusUiLiveSharingObserverAdapter::ShowErrorDialogL( const TDesC& aMessage ) |
|
77 { |
|
78 iCalledObserver = EShowErrorDialogL; |
|
79 User::LeaveIfError( iShowErrorDialogErrorCode ); |
|
80 } |
|
81 |
|
82 |
|
83 |
|
84 void CMusUiLiveSharingObserverAdapter::ShowInformationDialogL( TInt aResourceId ) |
|
85 { |
|
86 iCalledObserver = EShowInformationDialogL; |
|
87 User::LeaveIfError( iErrorCode ); |
|
88 } |
|
89 |
|
90 |
|
91 |
|
92 void CMusUiLiveSharingObserverAdapter::ShowLiveSharingPanesL() |
|
93 { |
|
94 iCalledObserver = EShowLiveSharingPanesL; |
|
95 User::LeaveIfError( iErrorCode ); |
|
96 } |
|
97 |
|
98 |
|
99 |
|
100 void CMusUiLiveSharingObserverAdapter::ChangeOrientationL( |
|
101 CAknAppUiBase::TAppUiOrientation aOrientation ) |
|
102 { |
|
103 iOrientation = aOrientation; |
|
104 iCalledObserver = EChangeOrientationL; |
|
105 User::LeaveIfError( iErrorCode ); |
|
106 } |
|
107 |
|
108 |
|
109 |
|
110 void CMusUiLiveSharingObserverAdapter::ShowNaviPaneIconL( |
|
111 TMusUiNaviMediaDecorator aIcon, |
|
112 TBool aVisible ) |
|
113 { |
|
114 iIcon = aIcon; |
|
115 iCalledObserver = EShowNaviPaneIconL; |
|
116 User::LeaveIfError( iErrorCode ); |
|
117 } |
|
118 |
|
119 |
|
120 |
|
121 void CMusUiLiveSharingObserverAdapter::UpdateSessionTime( const TDesC& aSessionTime ) |
|
122 { |
|
123 iCalledObserver = EUpdateSessionTime; |
|
124 User::LeaveIfError( iErrorCode ); |
|
125 } |
|
126 |
|
127 |
|
128 |
|
129 void CMusUiLiveSharingObserverAdapter::SetVolume( TBool aUp ) |
|
130 { |
|
131 iCalledObserver = ESetVolume; |
|
132 User::LeaveIfError( iErrorCode ); |
|
133 } |
|
134 |
|
135 |
|
136 |
|
137 void CMusUiLiveSharingObserverAdapter::SetZoom( TBool aIn ) |
|
138 { |
|
139 iCalledObserver = ESetZoom; |
|
140 User::LeaveIfError( iErrorCode ); |
|
141 } |
|
142 |
|
143 |
|
144 |
|
145 void CMusUiLiveSharingObserverAdapter::HandleError( TInt aError ) |
|
146 { |
|
147 iError = aError; |
|
148 iCalledObserver = EHandleError; |
|
149 //User::LeaveIfError( iErrorCode ); |
|
150 } |
|
151 |
|
152 |
|
153 |
|
154 void CMusUiLiveSharingObserverAdapter::HandleExitL() |
|
155 { |
|
156 iCalledObserver = EHandleExitL; |
|
157 User::LeaveIfError( iErrorCode ); |
|
158 } |
|
159 |
|
160 |
|
161 |
|
162 void CMusUiLiveSharingObserverAdapter::CancelInvitationTimer() |
|
163 { |
|
164 iCalledObserver = ECancelInvitationTimer; |
|
165 User::LeaveIfError( iErrorCode ); |
|
166 } |
|
167 |
|
168 |