equal
deleted
inserted
replaced
92 // Second phase constructor |
92 // Second phase constructor |
93 // -------------------------------------------------------------------------- |
93 // -------------------------------------------------------------------------- |
94 // |
94 // |
95 void CUpnpShowCommand::ConstructL() |
95 void CUpnpShowCommand::ConstructL() |
96 { |
96 { |
|
97 |
97 iCommand = UpnpCommandMain::LoadL( UpnpCommand::ECommandShow ); |
98 iCommand = UpnpCommandMain::LoadL( UpnpCommand::ECommandShow ); |
98 |
99 |
99 // Register to observer |
100 // Register to observer |
100 if( iObserver ) |
101 if( iObserver ) |
101 { |
102 { |
109 // Starts showing. Allocates Upnp Framework resources. |
110 // Starts showing. Allocates Upnp Framework resources. |
110 // -------------------------------------------------------------------------- |
111 // -------------------------------------------------------------------------- |
111 // |
112 // |
112 EXPORT_C void CUpnpShowCommand::StartShowingL() |
113 EXPORT_C void CUpnpShowCommand::StartShowingL() |
113 { |
114 { |
|
115 |
114 // Allocate Upnp Fw resources |
116 // Allocate Upnp Fw resources |
115 iCommand->AllocateResourcesL(); |
117 iCommand->AllocateResourcesL(); |
116 } |
118 } |
117 |
119 |
118 // -------------------------------------------------------------------------- |
120 // -------------------------------------------------------------------------- |
120 // Stops showing. Releases all Upnp Framework resources. |
122 // Stops showing. Releases all Upnp Framework resources. |
121 // -------------------------------------------------------------------------- |
123 // -------------------------------------------------------------------------- |
122 // |
124 // |
123 EXPORT_C void CUpnpShowCommand::StopShowingL() |
125 EXPORT_C void CUpnpShowCommand::StopShowingL() |
124 { |
126 { |
|
127 |
125 // Release Upnp Fw resources |
128 // Release Upnp Fw resources |
126 iCommand->ReleaseResources(); |
129 iCommand->ReleaseResources(); |
127 |
130 |
128 // Reset the file pipe |
131 // Reset the file pipe |
129 iCommand->ResetFiles(); |
132 iCommand->ResetFiles(); |
134 // Shows the given images on a remote Upnp Media Rendering device. |
137 // Shows the given images on a remote Upnp Media Rendering device. |
135 // -------------------------------------------------------------------------- |
138 // -------------------------------------------------------------------------- |
136 // |
139 // |
137 EXPORT_C void CUpnpShowCommand::ShowImageL( const TDesC& aFilename ) |
140 EXPORT_C void CUpnpShowCommand::ShowImageL( const TDesC& aFilename ) |
138 { |
141 { |
|
142 |
139 // Check param |
143 // Check param |
140 if( aFilename == KNullDesC ) |
144 if( aFilename == KNullDesC ) |
141 { |
145 { |
142 User::Leave( KErrArgument ); |
146 User::Leave( KErrArgument ); |
143 } |
147 } |
155 // Shows the given video on a remote Upnp Media Rendering device. |
159 // Shows the given video on a remote Upnp Media Rendering device. |
156 // -------------------------------------------------------------------------- |
160 // -------------------------------------------------------------------------- |
157 // |
161 // |
158 EXPORT_C void CUpnpShowCommand::ShowVideoL( const TDesC& aFilename ) |
162 EXPORT_C void CUpnpShowCommand::ShowVideoL( const TDesC& aFilename ) |
159 { |
163 { |
|
164 |
160 // Check param |
165 // Check param |
161 if( aFilename == KNullDesC ) |
166 if( aFilename == KNullDesC ) |
162 { |
167 { |
163 User::Leave( KErrArgument ); |
168 User::Leave( KErrArgument ); |
164 } |
169 } |
180 { |
185 { |
181 // create a temporary plugin instance |
186 // create a temporary plugin instance |
182 // then query command availability. |
187 // then query command availability. |
183 TBool available = EFalse; |
188 TBool available = EFalse; |
184 TRAP_IGNORE( |
189 TRAP_IGNORE( |
185 CUpnpCommand* temp = UpnpCommandMain::LoadL( UpnpCommand::ECommandShow ); |
190 CUpnpCommand* temp = UpnpCommandMain::LoadL( |
|
191 UpnpCommand::ECommandShow ); |
186 CleanupStack::PushL( temp ); |
192 CleanupStack::PushL( temp ); |
187 available = temp->IsAvailableL(); |
193 available = temp->IsAvailableL(); |
188 CleanupStack::PopAndDestroy( temp ); |
194 CleanupStack::PopAndDestroy( temp ); |
189 ); |
195 ); |
190 return available; |
196 return available; |