|
1 /* |
|
2 * Copyright (c) 2008 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 #include "MCEConstants.h" |
|
21 #include "TCmdRemoveStream.h" |
|
22 #include "CTcMCEContext.h" |
|
23 |
|
24 #include <badesca.h> |
|
25 #include <MCESession.h> |
|
26 #include <MCEVideoStream.h> |
|
27 #include <MCEMediaStream.h> |
|
28 |
|
29 void TCmdRemoveStream::ExecuteL() |
|
30 { |
|
31 |
|
32 // ---------- Setup -------------------------------------------------------- |
|
33 |
|
34 // Get session |
|
35 // CMceSession* session = reinterpret_cast<CMceSession*> |
|
36 // (GetObjectForIdL(KSessionId, ETrue)); |
|
37 |
|
38 // Get existing stream |
|
39 CMceMediaStream* mainStream = reinterpret_cast<CMceMediaStream*> |
|
40 (GetObjectForIdL(KStreamId, EFalse)); |
|
41 |
|
42 // ---------- Execution ---------------------------------------------------- |
|
43 |
|
44 mainStream->Session()->RemoveStreamL( *mainStream ); |
|
45 |
|
46 AddIdResponseL(KStreamId, *mainStream); |
|
47 |
|
48 } |
|
49 |
|
50 TBool TCmdRemoveStream::Match( const TTcIdentifier& aId ) |
|
51 { |
|
52 return TTcMceCommandBase::Match( aId, _L8("RemoveStream") ); |
|
53 } |
|
54 |
|
55 TTcCommandBase* TCmdRemoveStream::CreateL( MTcTestContext& aContext ) |
|
56 { |
|
57 return new( ELeave ) TCmdRemoveStream( aContext ); |
|
58 } |