|
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of the License "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Implements the Test 'Single Process' Stream Agent Factory |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 @test |
|
21 */ |
|
22 |
|
23 #include "testsingleprocessagentfactory.h" |
|
24 #include "srautils.h" |
|
25 |
|
26 using namespace StreamAccess; |
|
27 |
|
28 |
|
29 static const TImplementationProxy ImplementationTable[] = |
|
30 { |
|
31 IMPLEMENTATION_PROXY_ENTRY(KTestStreamAgentFactoryImpId, CTestSingleProcessAgentFactory::CreateTestAgentL) |
|
32 }; |
|
33 |
|
34 |
|
35 EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount) |
|
36 /** |
|
37 Standard ECOM factory |
|
38 */ |
|
39 { |
|
40 aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy); |
|
41 return ImplementationTable; |
|
42 } |
|
43 |
|
44 |
|
45 // CTestSingleProcessAgentFactory |
|
46 |
|
47 |
|
48 CTestSingleProcessAgentFactory::CTestSingleProcessAgentFactory() |
|
49 /** |
|
50 Constructor. |
|
51 */ |
|
52 : CStreamAgentFactory() |
|
53 { |
|
54 //empty |
|
55 } |
|
56 |
|
57 |
|
58 CTestSingleProcessAgentFactory::~CTestSingleProcessAgentFactory() |
|
59 /** |
|
60 Destructor |
|
61 */ |
|
62 { |
|
63 //empty |
|
64 } |
|
65 |
|
66 |
|
67 CStreamAgentFactory* CTestSingleProcessAgentFactory::CreateTestAgentL() |
|
68 /** |
|
69 Factory method that instantiates a new test stream agent factory ECOM plug-in. |
|
70 |
|
71 @return A pointer to the new test stream agent factory object. |
|
72 */ |
|
73 { |
|
74 CTestSingleProcessAgentFactory *self = new(ELeave) CTestSingleProcessAgentFactory(); |
|
75 return self; |
|
76 } |
|
77 |
|
78 CAgentKeyStreamDecoder* CTestSingleProcessAgentFactory::GetKeyStreamDecoderL(const CKeyStreamSink& aKeyStreamSink, |
|
79 const CSdpMediaField& aSdpKeyStream, |
|
80 const CSdpDocument& aSdpDoc) |
|
81 /** |
|
82 @see CStreamAgentFactory::GetKeyStreamDecoderL |
|
83 */ |
|
84 { |
|
85 return CTestSingleProcessKeyStreamDecoder::NewL(aKeyStreamSink, aSdpKeyStream, aSdpDoc); |
|
86 } |
|
87 |
|
88 TBool CTestSingleProcessAgentFactory::IsKeyStreamSupportedL(const CSdpMediaField& aSdpKeyStream) |
|
89 /** |
|
90 Function to determine whether the test stream agent supports the key management scheme |
|
91 specified in the SDP key stream definition |
|
92 @param aSdpKeyStream Contains the metadata for the SDP key management scheme of the stream |
|
93 @return ETrue if the test stream agent recognises the SDP format and is able to decode the key stream |
|
94 @return EFalse if the test stream agent fails to recofnise the SDP format or is unable to decode the key stream |
|
95 */ |
|
96 { |
|
97 return CheckKeyStreamSupportedL(aSdpKeyStream, KSupportedKmsIds()); |
|
98 } |