|
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 // |
|
15 |
|
16 /** |
|
17 @file |
|
18 @internalTechnology |
|
19 */ |
|
20 |
|
21 |
|
22 #ifndef SYMBIAN_MMCOMMSPROV_H |
|
23 #define SYMBIAN_MMCOMMSPROV_H |
|
24 |
|
25 #include <comms-infras/ss_mmnode.h> |
|
26 #include <ss_fact.h> |
|
27 #include <comms-infras/ss_parameterfamilybundle.h> |
|
28 |
|
29 namespace PRStates |
|
30 { |
|
31 class TStoreParams; |
|
32 class TRespondWithCurrentParams; |
|
33 class TSendParamsToServiceProvider; |
|
34 class TRespondWithRetrievedParams; |
|
35 } |
|
36 namespace IpCprStates |
|
37 { |
|
38 class TInitialiseParams; |
|
39 class TSendParamsToSelf; |
|
40 class TUpdateNetMCPR; |
|
41 } |
|
42 |
|
43 namespace ESock |
|
44 { |
|
45 |
|
46 //base class for mesh-machine based providers |
|
47 class CMMCommsProviderBase : public CCommsProviderBase, |
|
48 public ACommsFactoryNodeId, |
|
49 public ACFMMNodeBase, |
|
50 private MAccessPointConfigApi, |
|
51 public ITFHIERARCHY_LINK_1(CMMCommsProviderBase, MeshMachine::AMMNodeBase, MAccessPointConfigApi) |
|
52 |
|
53 { |
|
54 #ifdef __X86GCC__ |
|
55 // gcc-mingw does not support declaring friends from different namespaces so we define proxy |
|
56 // functions to do the cast. |
|
57 friend CMMCommsProviderBase* __x86gcc_mm_comms_provider_base_cast(Messages::ANode* aNode); |
|
58 friend CMMCommsProviderBase& __x86gcc_mm_comms_provider_base_cast(Messages::ANode& aNode); |
|
59 #elif !defined(__GCCXML__) |
|
60 friend CMMCommsProviderBase* Messages::mnode_cast<CMMCommsProviderBase>(Messages::ANode* aNode); |
|
61 #endif |
|
62 friend class CSubConnectionFactoryContainer; |
|
63 friend class CMetaConnectionFactoryContainer; |
|
64 friend class CConnectionFactoryContainer; |
|
65 friend class PRStates::TStoreProvision; |
|
66 |
|
67 friend class PRStates::TStoreParams; |
|
68 friend class PRStates::TRespondWithCurrentParams; |
|
69 friend class PRStates::TSendParamsToServiceProvider; |
|
70 friend class IpCprStates::TInitialiseParams; |
|
71 friend class IpCprStates::TSendParamsToSelf; |
|
72 friend class IpCprStates::TUpdateNetMCPR; |
|
73 friend class PRStates::TRespondWithRetrievedParams; |
|
74 |
|
75 public: |
|
76 typedef ITFHIERARCHY_LINK_1(CMMCommsProviderBase, MeshMachine::AMMNodeBase, MAccessPointConfigApi) TIfStaticFetcherNearestInHierarchy; |
|
77 IMPORT_C void ReturnInterfacePtrL(MAccessPointConfigApi*& aInterface); |
|
78 void DestroyOrphanedDataClients(); |
|
79 |
|
80 IMPORT_C void SetParametersL(const RCFParameterFamilyBundleC& aParameterBundle); |
|
81 |
|
82 inline RCFParameterFamilyBundleC& GetParameterBundle() |
|
83 { |
|
84 return iParameterBundle; |
|
85 } |
|
86 |
|
87 IMPORT_C RCFParameterFamilyBundleC& GetOrCreateParameterBundleL(); |
|
88 IMPORT_C RCFParameterFamilyBundleC& CreateParameterBundleL(); |
|
89 const Messages::TNodeId& Id () const |
|
90 { |
|
91 return NodeId (); |
|
92 } |
|
93 |
|
94 |
|
95 |
|
96 protected: |
|
97 CMMCommsProviderBase(CCommsFactoryBase& aFactory, const MeshMachine::TNodeActivityMap& aActivityMap); |
|
98 virtual ~CMMCommsProviderBase(); |
|
99 IMPORT_C virtual NetInterfaces::TInterfaceControl* FetchNodeInterfaceControlL(TInt aInterfaceId); |
|
100 |
|
101 private: |
|
102 // From ESock::MAccessPointConfigApi |
|
103 IMPORT_C virtual const ESock::RMetaExtensionContainerC& GetAccessPointConfig() const; |
|
104 |
|
105 protected: |
|
106 RCFParameterFamilyBundleC iParameterBundle; |
|
107 }; |
|
108 |
|
109 #ifdef __X86GCC__ |
|
110 // gcc-mingw does not support declaring friends from different namespaces so we define proxy |
|
111 // functions to do the cast. |
|
112 inline CMMCommsProviderBase* __x86gcc_mm_comms_provider_base_cast(Messages::ANode* aNode) |
|
113 { |
|
114 return static_cast<CMMCommsProviderBase*>(aNode); |
|
115 } |
|
116 |
|
117 inline CMMCommsProviderBase& __x86gcc_mm_comms_provider_base_cast(Messages::ANode& aNode) |
|
118 { |
|
119 return static_cast<CMMCommsProviderBase&>(aNode); |
|
120 } |
|
121 #endif |
|
122 } //namespace ESock |
|
123 |
|
124 |
|
125 #ifdef __X86GCC__ |
|
126 namespace Messages |
|
127 { |
|
128 // gcc-mingw does not support declaring friends from different namespaces so we define proxy |
|
129 // functions to do the cast. |
|
130 template <> |
|
131 inline ESock::CMMCommsProviderBase* mnode_cast<ESock::CMMCommsProviderBase>(Messages::ANode* aNode) |
|
132 { |
|
133 return ESock::__x86gcc_mm_comms_provider_base_cast(aNode); |
|
134 } |
|
135 |
|
136 template <> |
|
137 inline ESock::CMMCommsProviderBase& mnode_cast<ESock::CMMCommsProviderBase>(Messages::ANode& aNode) |
|
138 { |
|
139 return ESock::__x86gcc_mm_comms_provider_base_cast(aNode); |
|
140 } |
|
141 } |
|
142 #endif |
|
143 |
|
144 #endif //SYMBIAN_MMCOMMSPROV_H |
|
145 |