|
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 "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 // SIP SubConnection Provider factory class definition. |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 @internalComponent |
|
21 */ |
|
22 |
|
23 //#include <ecom/implementationproxy.h> |
|
24 #include <comms-infras/ss_msgintercept.h> |
|
25 #include "sipscprfactory.h" |
|
26 #include "sipscpr.h" |
|
27 #include "sipdeftscpr.h" |
|
28 |
|
29 using namespace ESock; |
|
30 |
|
31 |
|
32 //-========================================================= |
|
33 // |
|
34 // CSipSubConnectionProviderFactory methods |
|
35 // |
|
36 //-========================================================= |
|
37 CSipSubConnectionProviderFactory* CSipSubConnectionProviderFactory::NewL(TAny* aParentContainer) |
|
38 { |
|
39 return new (ELeave) CSipSubConnectionProviderFactory(TUid::Uid(CSipSubConnectionProviderFactory::iUid), |
|
40 *reinterpret_cast<ESock::CSubConnectionFactoryContainer*>(aParentContainer)); |
|
41 } |
|
42 |
|
43 CSipSubConnectionProviderFactory::CSipSubConnectionProviderFactory(TUid aFactoryId, ESock::CSubConnectionFactoryContainer& aParentContainer) |
|
44 : CSubConnectionProviderFactoryBase(aFactoryId, aParentContainer) |
|
45 { |
|
46 // LOG_NODE_CREATE(KSipSCprTag, CSipSubConnectionProviderFactory); |
|
47 } |
|
48 |
|
49 ACommsFactoryNodeId* CSipSubConnectionProviderFactory::DoCreateObjectL(TFactoryQueryBase& aQuery) |
|
50 { |
|
51 const TDefaultSCPRFactoryQuery& query = static_cast<const TDefaultSCPRFactoryQuery&>(aQuery); |
|
52 CSubConnectionProviderBase* provider = NULL; |
|
53 if (query.iSCPRType == RSubConnection::EAttachToDefault) |
|
54 { |
|
55 provider = CSipDefaultSubConnectionProvider::NewL(*this); |
|
56 } |
|
57 else |
|
58 { |
|
59 provider = CSipSubConnectionProvider::NewL(*this, query.iSCPRType); |
|
60 } |
|
61 ESOCK_DEBUG_REGISTER_GENERAL_NODE(iUid, provider); |
|
62 return provider; |
|
63 } |
|
64 |
|
65 |
|
66 |