|
1 // Copyright (c) 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 Packet Gen Flow. |
|
15 // |
|
16 |
|
17 #include "packetgenfactory.h" |
|
18 #include "packetgenflow.h" |
|
19 using namespace ESock; |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 using namespace ESock; |
|
25 |
|
26 |
|
27 // ===================================================================================== |
|
28 // |
|
29 // PacketGen Flow Factory |
|
30 // |
|
31 |
|
32 CPacketGenFlowFactory* CPacketGenFlowFactory::NewL(TAny* aConstructionParameters) |
|
33 /** |
|
34 Constructs a Default SubConnection Flow Factory |
|
35 |
|
36 @param aConstructionParameters construction data passed by ECOM |
|
37 |
|
38 @returns pointer to a constructed factory |
|
39 */ |
|
40 { |
|
41 CPacketGenFlowFactory* ptr = new (ELeave) CPacketGenFlowFactory(TUid::Uid(CPacketGenFlowFactory::EUid), *(reinterpret_cast<CSubConnectionFlowFactoryContainer*>(aConstructionParameters))); |
|
42 |
|
43 return ptr; |
|
44 } |
|
45 |
|
46 |
|
47 CPacketGenFlowFactory::CPacketGenFlowFactory(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* CPacketGenFlowFactory::DoCreateFlowL(CProtocolIntfBase* aProtocol, ESock::TFactoryQueryBase& aQuery) |
|
60 { |
|
61 const TDefaultFlowFactoryQuery& query = static_cast<const TDefaultFlowFactoryQuery&>(aQuery); |
|
62 CSubConnectionFlowBase *temp = new(ELeave)CPacketGenFlow(*this, query.iSCprId, aProtocol); |
|
63 return temp; |
|
64 } |
|
65 |