equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2005 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 "CTcMCEFactory.h" |
|
21 #include "CTcMCEContext.h" |
|
22 #include "MTcTestContext.h" |
|
23 |
|
24 // MCE context identifier |
|
25 _LIT8( KTcMCENameTag, "SSC:" ); |
|
26 |
|
27 CTcMCEFactory* CTcMCEFactory::NewL() |
|
28 { |
|
29 return new ( ELeave ) CTcMCEFactory; |
|
30 } |
|
31 |
|
32 CTcMCEFactory::CTcMCEFactory() |
|
33 { |
|
34 } |
|
35 |
|
36 CTcMCEFactory::~CTcMCEFactory() |
|
37 { |
|
38 } |
|
39 |
|
40 MTcTestContext* CTcMCEFactory::CreateLC( const TDesC8& aTestCaseName, |
|
41 CTcCTRLCodec& aCodec, |
|
42 TInt aIAPId ) const |
|
43 { |
|
44 // Check if the test case name starts with our tag. |
|
45 // (complete name might be e.g. "SSC:INV_01") |
|
46 if( aTestCaseName.FindF( KTcMCENameTag ) == 0 ) |
|
47 { |
|
48 return CTcMCEContext::NewLC( aCodec, aIAPId ); |
|
49 } |
|
50 // No, the test case wasn't for us. |
|
51 else |
|
52 { |
|
53 return NULL; |
|
54 } |
|
55 } |