|
1 // Copyright (c) 2006-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 // Implements the factory class which is used to instantiate the RAW IP NIF. |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 */ |
|
21 |
|
22 #include "RawIPFlowFactory.h" |
|
23 #include "RawIPFlow.h" |
|
24 #include "bttlog.h" |
|
25 |
|
26 using namespace ESock; |
|
27 |
|
28 // ===================================================================================== |
|
29 // |
|
30 // RawIP Flow Factory |
|
31 // |
|
32 |
|
33 CRawIPFlowFactory* CRawIPFlowFactory::NewL(TAny* aConstructionParameters) |
|
34 /** |
|
35 Constructs a Default SubConnection Flow Factory |
|
36 |
|
37 @param aConstructionParameters construction data passed by ECOM |
|
38 |
|
39 @returns pointer to a constructed factory |
|
40 */ |
|
41 { |
|
42 CRawIPFlowFactory* ptr = new (ELeave) CRawIPFlowFactory(TUid::Uid(KRawIpFlowImplUid), *(reinterpret_cast<CSubConnectionFlowFactoryContainer*>(aConstructionParameters))); |
|
43 return ptr; |
|
44 } |
|
45 |
|
46 |
|
47 CRawIPFlowFactory::CRawIPFlowFactory(TUid aFactoryId, CSubConnectionFlowFactoryContainer& aParentContainer) |
|
48 : CSubConnectionFlowFactoryBase(aFactoryId, aParentContainer) |
|
49 /** |
|
50 Default SubConnection Flow Factory Constructor |
|
51 |
|
52 @param aFactoryId ECOM Implementation Id |
|
53 @param aParentContainer Object Owner |
|
54 */ |
|
55 { |
|
56 } |
|
57 |
|
58 |
|
59 CSubConnectionFlowBase* CRawIPFlowFactory::DoCreateFlowL(ESock::CProtocolIntfBase* aProtocol, ESock::TFactoryQueryBase& aQuery) |
|
60 { |
|
61 #ifdef __BTT_LOGGING__ |
|
62 iTheLogger = CBttLogger::NewL(KNifSubDir, KRefFile, User::FastCounter()); |
|
63 #endif // __BTT_LOGGING__ |
|
64 |
|
65 _LOG_L1C1(_L8("Raw IP logging started.")); |
|
66 |
|
67 const TDefaultFlowFactoryQuery& query = static_cast<const TDefaultFlowFactoryQuery&>(aQuery); |
|
68 CRawIPFlow* s = new (ELeave) CRawIPFlow(*this, query.iSCprId, aProtocol, iTheLogger); |
|
69 CleanupStack::PushL(s); |
|
70 s->ConstructL(); |
|
71 CleanupStack::Pop(s); |
|
72 |
|
73 return s; |
|
74 } |
|
75 |