|
1 // Copyright (c) 2010 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 // The factory class which is used to instantiate the MbufGobbler flow. |
|
15 // (data plane) |
|
16 // |
|
17 // |
|
18 // This is a 3-plane comms layer implementation example, which has been customised to be a test layer which gobbles and releases ESOCK MBUFs. |
|
19 // The MBuf gobbling functionality can be disabled by undefining the macro SYMBIAN_COMMSFW_MBUF_GOBBLER which is specified in mbufgobblerproviders.mmp. |
|
20 // When SYMBIAN_COMMSFW_MBUF_GOBBLER is undefined, the source code specified by mbufgobblerproviders.mmp becomes a pass through layer i.e. it passes the data |
|
21 // through to the layer above or below without altering it. This makes it useful as a starting point for implementing your own layers / providers; |
|
22 // useful documentation on how to customise your own passthrough layer can be found in ..\docs\MbufGobblerLayer.doc |
|
23 // |
|
24 /** |
|
25 @file |
|
26 @internalComponent |
|
27 */ |
|
28 |
|
29 #include "mbufgobblerflowfactory.h" |
|
30 #include "mbufgobblerflow.h" |
|
31 #include "mbufgobblerlog.h" |
|
32 |
|
33 // ===================================================================================== |
|
34 // |
|
35 // MbufGobbler Flow Factory |
|
36 // |
|
37 |
|
38 CMbufGobblerFlowFactory* CMbufGobblerFlowFactory::NewL(TAny* aConstructionParameters) |
|
39 /** |
|
40 Constructs a Default SubConnection Flow Factory |
|
41 |
|
42 @param aConstructionParameters construction data passed by ECOM |
|
43 |
|
44 @returns pointer to a constructed factory |
|
45 */ |
|
46 { |
|
47 CMbufGobblerFlowFactory* ptr = new (ELeave) CMbufGobblerFlowFactory(TUid::Uid(CMbufGobblerFlowFactory::EUid), *(reinterpret_cast<ESock::CSubConnectionFlowFactoryContainer*>(aConstructionParameters))); |
|
48 |
|
49 return ptr; |
|
50 } |
|
51 |
|
52 |
|
53 CMbufGobblerFlowFactory::CMbufGobblerFlowFactory(TUid aFactoryId, ESock::CSubConnectionFlowFactoryContainer& aParentContainer) |
|
54 : CSubConnectionFlowFactoryBase(aFactoryId, aParentContainer) |
|
55 /** |
|
56 Default SubConnection Flow Factory Constructor |
|
57 |
|
58 @param aFactoryId ECOM Implementation Id |
|
59 @param aParentContainer Object Owner |
|
60 */ |
|
61 { |
|
62 } |
|
63 |
|
64 |
|
65 ESock::CSubConnectionFlowBase* CMbufGobblerFlowFactory::DoCreateFlowL(ESock::CProtocolIntfBase* aProtocol, ESock::TFactoryQueryBase& aQuery) |
|
66 { |
|
67 const ESock::TDefaultFlowFactoryQuery& query = static_cast<const ESock::TDefaultFlowFactoryQuery&>(aQuery); |
|
68 ESock::CSubConnectionFlowBase *temp = CMbufGobblerFlow::NewL(*this, query.iSCprId, aProtocol); |
|
69 return temp; |
|
70 } |
|
71 |