1 // Copyright (c) 2008-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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
21 #if !defined(__SS_FACT_INTERNAL_H__)
22 #define __SS_FACT_INTERNAL_H__
24 #include <elements/factory.h>
25 #include <elements/sd_objectbroker.h>
30 class CCommsFactoryBase;
31 class ACommsFactoryNodeId;
33 // We need to redeclare this for the CMetaConnectionProviderBase x86gcc cast operators to work.
34 #ifndef __CCOMMSFACTORYCONTAINER_DECLARED
35 #define __CCOMMSFACTORYCONTAINER_DECLARED
36 NONSHARABLE_CLASS(CCommsFactoryContainer) : public Factories::CFactoryContainerNode
37 /** Comms Factory Factory Container class is used to store comms factorys of a
38 specific type. e.g. sub-connection provider factories. It provides basic
39 functionality to find, add and remove factories. It has basic functionality to
40 create a factory object. If a container wants to do more than just creating a
41 factory object it should specialise the CCommsFactoryContainer
44 @released Since 9.0 */
46 friend class CPitBoss; // CPitBoss enumerates factories without needing (or wanting) derived types
49 // gcc-mingw does not support declaring friends from different namespaces so we define proxy
50 // functions to do the cast.
51 friend CCommsFactoryContainer* __x86gcc_comms_factory_container_cast(Messages::ANode* aNode);
52 friend CCommsFactoryContainer& __x86gcc_comms_factory_container_cast(Messages::ANode& aNode);
53 #elif !defined(__GCCXML__)
54 friend CCommsFactoryContainer* Messages::mnode_cast<CCommsFactoryContainer>(Messages::ANode* aNode);
58 IMPORT_C Factories::CFactoryBase* FindOrCreateFactoryL(TUid aUid);
59 IMPORT_C ACommsFactoryNodeId* Find (Factories::MFactoryQuery& aQuery);
61 Factories::CFactoryBase* CreateFactoryL(TUid aUid);
62 ACommsFactoryNodeId* CreateFactoryObjectNodeL(Messages::TSignatureBase& aMessage);
63 virtual void ReceivedL(const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage);
66 //Type information for the planes.
70 ETierManagerFactoryContainer,
71 EMetaConnectionFactoryContainer,
72 EConnectionFactoryContainer,
73 ESubConnectionFactoryContainer,
74 ESubConnectionFlowFactoryContainer,
75 EProtocolIntfFactoryContainer,
76 EProtocolFamilyFactoryContainer,
78 CCommsFactoryContainer(TContaineeType aId = EUnknown);
80 const TContaineeType iId;
83 static CCommsFactoryContainer* NewL (TContaineeType aId);
85 #endif // __CCOMMSFACTORYCONTAINER_DECLARED
88 class CCFFactoryContainerBroker : public Den::CCommonObjectBroker
90 This object broker is intended to be a per technology singleton that forwards
91 factory requests to a specified factory container.
93 Factory containers are added to its client list during the handshaking at worker thread
100 static CCFFactoryContainerBroker* NewL();
103 void ReceivedL(const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage);
104 CCFFactoryContainerBroker();
108 // gcc-mingw does not support declaring friends from different namespaces so we define proxy
109 // functions to do the cast...
111 inline CCommsFactoryContainer* __x86gcc_comms_factory_container_cast(Messages::ANode* aNode)
113 return static_cast<CCommsFactoryContainer*>(aNode);
116 inline CCommsFactoryContainer& __x86gcc_comms_factory_container_cast(Messages::ANode& aNode)
118 return static_cast<CCommsFactoryContainer&>(aNode);
127 // gcc-mingw does not support declaring friends from different namespaces so we define proxy
128 // functions to do the cast...
131 inline ESock::CCommsFactoryContainer* mnode_cast<ESock::CCommsFactoryContainer>(Messages::ANode* aNode)
133 return ESock::__x86gcc_comms_factory_container_cast(aNode);
137 inline ESock::CCommsFactoryContainer& mnode_cast<ESock::CCommsFactoryContainer>(Messages::ANode& aNode)
139 return ESock::__x86gcc_comms_factory_container_cast(aNode);
145 // __SS_FACT_INTERNAL_H__