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