# HG changeset patch
# User hgs
# Date 1277819422 -19800
# Node ID 052078dda06114a55b160ebaf8d2ade5077b4c6d
# Parent 39bb7c3571e909dc598fd2de19ad9e4891de18af
201025_01
diff -r 39bb7c3571e9 -r 052078dda061 build.config.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/build.config.xml Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,109 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 39bb7c3571e9 -r 052078dda061 esockapiextensions/internetsockets/group/sockerr.ra
--- a/esockapiextensions/internetsockets/group/sockerr.ra Mon May 03 13:58:16 2010 +0300
+++ b/esockapiextensions/internetsockets/group/sockerr.ra Tue Jun 29 19:20:22 2010 +0530
@@ -1,43 +1,43 @@
-// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-#include
-
-RESOURCE ARRAY r_error_res_socket_errors
- {
- items=
- {
- SINGLE_ERROR
- {
- text=r_error_res_socket_net_unreach; // -190
- },
- SINGLE_ERROR
- {
- text=r_error_res_socket_host_unreach; // -191
- },
- SINGLE_ERROR
- {
- text=r_error_res_socket_wrong_protocol; // -192
- },
- SINGLE_ERROR
- {
- flags=EErrorResPanicErrorFlag; // -193
- }
- };
- }
-
-RESOURCE TBUF r_error_res_socket_net_unreach { buf=STRING_r_error_res_socket_net_unreach ; }
-RESOURCE TBUF r_error_res_socket_host_unreach { buf=STRING_r_error_res_socket_host_unreach ; }
-RESOURCE TBUF r_error_res_socket_wrong_protocol { buf=STRING_r_error_res_socket_wrong_protocol ; }
+// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#include
+
+RESOURCE ARRAY r_error_res_socket_errors
+ {
+ items=
+ {
+ SINGLE_ERROR
+ {
+ text=r_error_res_socket_net_unreach; // -190
+ },
+ SINGLE_ERROR
+ {
+ text=r_error_res_socket_host_unreach; // -191
+ },
+ SINGLE_ERROR
+ {
+ text=r_error_res_socket_wrong_protocol; // -192
+ },
+ SINGLE_ERROR
+ {
+ flags=EErrorResPanicErrorFlag; // -193
+ }
+ };
+ }
+
+RESOURCE TBUF r_error_res_socket_net_unreach { buf=STRING_r_error_res_socket_net_unreach ; }
+RESOURCE TBUF r_error_res_socket_host_unreach { buf=STRING_r_error_res_socket_host_unreach ; }
+RESOURCE TBUF r_error_res_socket_wrong_protocol { buf=STRING_r_error_res_socket_wrong_protocol ; }
diff -r 39bb7c3571e9 -r 052078dda061 esockapiextensions/internetsockets/group/tcperr.ra
--- a/esockapiextensions/internetsockets/group/tcperr.ra Mon May 03 13:58:16 2010 +0300
+++ b/esockapiextensions/internetsockets/group/tcperr.ra Tue Jun 29 19:20:22 2010 +0530
@@ -1,81 +1,81 @@
-// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-#include
-
-RESOURCE ARRAY r_error_res_tcpip_errors
- {
- items=
- {
- SINGLE_ERROR
- {
- text=r_error_res_tcp_authentication_fail; // -3050
- },
- SINGLE_ERROR
- {
- text=r_error_res_tcp_authentication_not_secure; // -3051
- },
- SINGLE_ERROR
- {
- text=r_error_res_tcp_disabled_account; // -3052
- },
- SINGLE_ERROR
- {
- text=r_error_res_tcp_logon_hours; // -3053
- },
- SINGLE_ERROR
- {
- text=r_error_res_tcp_password_expired; // -3054
- },
- SINGLE_ERROR
- {
- text=r_error_res_tcp_dial_in_permission; // -3055
- },
- SINGLE_ERROR
- {
- flags=EErrorResPanicErrorFlag; // -3056
- },
- SINGLE_ERROR
- {
- text=r_error_res_tcp_no_call_back; // -3057
- },
- SINGLE_ERROR
- {
- text=r_error_res_tcp_no_server; // -3058
- },
- SINGLE_ERROR
- {
- text=r_error_res_tcp_bad_line; // -3059
- },
- SINGLE_ERROR
- {
- flags=EErrorResPanicErrorFlag; // -3060
- },
- SINGLE_ERROR
- {
- flags=EErrorResPanicErrorFlag; // -3061
- }
- };
- }
-
-RESOURCE TBUF r_error_res_tcp_authentication_fail { buf=STRING_r_error_res_tcp_authentication_fail ; }
-RESOURCE TBUF r_error_res_tcp_authentication_not_secure { buf=STRING_r_error_res_tcp_authentication_not_secure ; }
-RESOURCE TBUF r_error_res_tcp_disabled_account { buf=STRING_r_error_res_tcp_disabled_account ; }
-RESOURCE TBUF r_error_res_tcp_logon_hours { buf=STRING_r_error_res_tcp_logon_hours ; }
-RESOURCE TBUF r_error_res_tcp_password_expired { buf=STRING_r_error_res_tcp_password_expired ; }
-RESOURCE TBUF r_error_res_tcp_dial_in_permission { buf=STRING_r_error_res_tcp_dial_in_permission ; }
-RESOURCE TBUF r_error_res_tcp_no_call_back { buf=STRING_r_error_res_tcp_no_call_back ; }
-RESOURCE TBUF r_error_res_tcp_no_server { buf=STRING_r_error_res_tcp_no_server ; }
-RESOURCE TBUF r_error_res_tcp_bad_line { buf=STRING_r_error_res_tcp_bad_line ; }
+// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#include
+
+RESOURCE ARRAY r_error_res_tcpip_errors
+ {
+ items=
+ {
+ SINGLE_ERROR
+ {
+ text=r_error_res_tcp_authentication_fail; // -3050
+ },
+ SINGLE_ERROR
+ {
+ text=r_error_res_tcp_authentication_not_secure; // -3051
+ },
+ SINGLE_ERROR
+ {
+ text=r_error_res_tcp_disabled_account; // -3052
+ },
+ SINGLE_ERROR
+ {
+ text=r_error_res_tcp_logon_hours; // -3053
+ },
+ SINGLE_ERROR
+ {
+ text=r_error_res_tcp_password_expired; // -3054
+ },
+ SINGLE_ERROR
+ {
+ text=r_error_res_tcp_dial_in_permission; // -3055
+ },
+ SINGLE_ERROR
+ {
+ flags=EErrorResPanicErrorFlag; // -3056
+ },
+ SINGLE_ERROR
+ {
+ text=r_error_res_tcp_no_call_back; // -3057
+ },
+ SINGLE_ERROR
+ {
+ text=r_error_res_tcp_no_server; // -3058
+ },
+ SINGLE_ERROR
+ {
+ text=r_error_res_tcp_bad_line; // -3059
+ },
+ SINGLE_ERROR
+ {
+ flags=EErrorResPanicErrorFlag; // -3060
+ },
+ SINGLE_ERROR
+ {
+ flags=EErrorResPanicErrorFlag; // -3061
+ }
+ };
+ }
+
+RESOURCE TBUF r_error_res_tcp_authentication_fail { buf=STRING_r_error_res_tcp_authentication_fail ; }
+RESOURCE TBUF r_error_res_tcp_authentication_not_secure { buf=STRING_r_error_res_tcp_authentication_not_secure ; }
+RESOURCE TBUF r_error_res_tcp_disabled_account { buf=STRING_r_error_res_tcp_disabled_account ; }
+RESOURCE TBUF r_error_res_tcp_logon_hours { buf=STRING_r_error_res_tcp_logon_hours ; }
+RESOURCE TBUF r_error_res_tcp_password_expired { buf=STRING_r_error_res_tcp_password_expired ; }
+RESOURCE TBUF r_error_res_tcp_dial_in_permission { buf=STRING_r_error_res_tcp_dial_in_permission ; }
+RESOURCE TBUF r_error_res_tcp_no_call_back { buf=STRING_r_error_res_tcp_no_call_back ; }
+RESOURCE TBUF r_error_res_tcp_no_server { buf=STRING_r_error_res_tcp_no_server ; }
+RESOURCE TBUF r_error_res_tcp_bad_line { buf=STRING_r_error_res_tcp_bad_line ; }
diff -r 39bb7c3571e9 -r 052078dda061 linklayercontrol/networkinterfacemgr/agentprcore/inc/tunnelagentcpr.h
--- a/linklayercontrol/networkinterfacemgr/agentprcore/inc/tunnelagentcpr.h Mon May 03 13:58:16 2010 +0300
+++ b/linklayercontrol/networkinterfacemgr/agentprcore/inc/tunnelagentcpr.h Tue Jun 29 19:20:22 2010 +0530
@@ -42,17 +42,30 @@
}
-class CTunnelAgentConnectionProvider : public CAgentConnectionProvider
+class CTunnelAgentConnectionProvider : public CAgentConnectionProvider,
+ public ESock::MPlatsecApiExt,
+ public ITFHIERARCHY_LINK_1(CTunnelAgentConnectionProvider, CAgentConnectionProvider, ESock::MPlatsecApiExt)
+
{
friend class TunnelAgentCprStates::TJoinRealIAP;
public:
+ typedef ITFHIERARCHY_LINK_1(CTunnelAgentConnectionProvider, CAgentConnectionProvider, ESock::MPlatsecApiExt) TIfStaticFetcherNearestInHierarchy;
+
+public:
IMPORT_C static CTunnelAgentConnectionProvider* NewL(ESock::CConnectionProviderFactoryBase& aFactory);
IMPORT_C ~CTunnelAgentConnectionProvider();
+ using CAgentConnectionProvider::ReturnInterfacePtrL;
+ void ReturnInterfacePtrL(ESock::MPlatsecApiExt*& aInterface);
protected:
CTunnelAgentConnectionProvider(ESock::CConnectionProviderFactoryBase& aFactory);
CTunnelAgentConnectionProvider(ESock::CConnectionProviderFactoryBase& aFactory, const MeshMachine::TNodeActivityMap& aActivityMap);
+ // MPlatSecApiExt
+ TInt SecureId(TSecureId& aResult) const;
+ TInt VendorId(TVendorId& aResult) const;
+ TBool HasCapability(const TCapability aCapability) const;
+ TInt CheckPolicy(const TSecurityPolicy& aPolicy) const;
};
diff -r 39bb7c3571e9 -r 052078dda061 linklayercontrol/networkinterfacemgr/agentprcore/src/agentscpractivities.cpp
--- a/linklayercontrol/networkinterfacemgr/agentprcore/src/agentscpractivities.cpp Mon May 03 13:58:16 2010 +0300
+++ b/linklayercontrol/networkinterfacemgr/agentprcore/src/agentscpractivities.cpp Tue Jun 29 19:20:22 2010 +0530
@@ -95,6 +95,18 @@
NODEACTIVITY_END()
}
+#ifdef SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
+namespace AgentSCprParamRequestActivity
+{
+DECLARE_DEFINE_NODEACTIVITY(ECFActivityParamRequest, AgentSCprParamRequest, TCFScpr::TSetParamsRequest)
+ FIRST_NODEACTIVITY_ENTRY(PRStates::TAwaitingParamRequest, CoreNetStates::TNoTagOrBearerPresent)
+ NODEACTIVITY_ENTRY(CoreNetStates::KBearerPresent, PRStates::TPassToServiceProvider, CoreNetStates::TAwaitingParamResponse, MeshMachine::TTag)
+ LAST_NODEACTIVITY_ENTRY(CoreNetStates::KBearerPresent, PRStates::TStoreParamsAndPostToOriginators)
+ LAST_NODEACTIVITY_ENTRY(KNoTag, PRStates::TRespondWithCurrentParams)
+NODEACTIVITY_END()
+}
+#endif //#ifdef SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
+
namespace AgentSCprDestroyActivity
{
//Overridden destroy for cleaning up the agent if its still about
@@ -125,6 +137,9 @@
ACTIVITY_MAP_ENTRY(AgentSCprStartActivity, AgentSCprStart)
ACTIVITY_MAP_ENTRY(AgentSCprStopActivity, AgentSCprStop)
ACTIVITY_MAP_ENTRY(AgentSCprDataClientStoppedActivity, AgentSCprDataClientStopped)
+#ifdef SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
+ ACTIVITY_MAP_ENTRY(AgentSCprParamRequestActivity, AgentSCprParamRequest)
+#endif //#ifdef SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
ACTIVITY_MAP_END_BASE(SCprActivities, coreSCprActivities)
}
diff -r 39bb7c3571e9 -r 052078dda061 linklayercontrol/networkinterfacemgr/agentprcore/src/tunnelagentcpr.cpp
--- a/linklayercontrol/networkinterfacemgr/agentprcore/src/tunnelagentcpr.cpp Mon May 03 13:58:16 2010 +0300
+++ b/linklayercontrol/networkinterfacemgr/agentprcore/src/tunnelagentcpr.cpp Tue Jun 29 19:20:22 2010 +0530
@@ -66,6 +66,15 @@
NODEACTIVITY_END()
}
+namespace TunnelGoneDownActivity
+{
+DECLARE_DEFINE_NODEACTIVITY(ECFActivityGoneDown, TunnelGoneDown, TCFControlClient::TGoneDown)
+ // Our Service Provider has gone down unexpectedly (we haven't issued a TStop)
+ FIRST_NODEACTIVITY_ENTRY(CoreNetStates::TAwaitingGoneDown, MeshMachine::TNoTag)
+ LAST_NODEACTIVITY_ENTRY(KNoTag, MeshMachine::TDoNothing)
+NODEACTIVITY_END()
+}
+
#ifdef SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
namespace TunnelAgentCprNotificationActivity
{
@@ -78,6 +87,7 @@
{
DECLARE_DEFINE_ACTIVITY_MAP(TunnelAgentCprActivities)
ACTIVITY_MAP_ENTRY(TunnelAgentCprStartActivity, TunnelCprStart)
+ ACTIVITY_MAP_ENTRY(TunnelGoneDownActivity, TunnelGoneDown)
#ifdef SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
ACTIVITY_MAP_ENTRY(TunnelAgentCprNotificationActivity, TunnelAgentCprNotification)
#endif // SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
@@ -101,7 +111,8 @@
CTunnelAgentConnectionProvider::CTunnelAgentConnectionProvider(CConnectionProviderFactoryBase& aFactory)
- : CAgentConnectionProvider(aFactory, TunnelAgentCprStates::TunnelAgentCprActivities::Self())
+ : CAgentConnectionProvider(aFactory, TunnelAgentCprStates::TunnelAgentCprActivities::Self()),
+ TIfStaticFetcherNearestInHierarchy(this)
{
LOG_NODE_CREATE(KTunnelAgentCprTag, CTunnelAgentConnectionProvider);
}
@@ -115,5 +126,35 @@
LOG_NODE_DESTROY(KTunnelAgentCprTag, CTunnelAgentConnectionProvider);
}
+//
+// MPlatSecApiExt
+//
+void CTunnelAgentConnectionProvider::ReturnInterfacePtrL(MPlatsecApiExt*& aInterface)
+ {
+ aInterface = this;
+ }
+TInt CTunnelAgentConnectionProvider::SecureId(TSecureId& /*aResult*/) const
+ {
+ return KErrNotSupported;
+ }
+
+TInt CTunnelAgentConnectionProvider::VendorId(TVendorId& /*aResult*/) const
+ {
+ return KErrNotSupported;
+ }
+
+TBool CTunnelAgentConnectionProvider::HasCapability(const TCapability /*aCapability*/) const
+ {
+ return KErrNotSupported;
+ }
+
+TInt CTunnelAgentConnectionProvider::CheckPolicy(const TSecurityPolicy& /*aPolicy*/) const
+ {
+ // This is the whole reason that we need to implement MPlatSecApiExt in this node at all. When TunnelAgentCpr issues
+ // a TStop towards IpCpr, IpCpr requires the sending node (normally ESockSvr but TunnelAgentCpr in this case)
+ // to implement MPlatSecApiExt through which IpCpr can check platsec capabilities (IpCprStates::TCheckStopCapabilities).
+ // If TunnelAgentCpr does not impement MPlatSecApiExt, then IpCpr will error the stop request with KErrInterfaceNotSupported.
+ return KErrNone;
+ }
diff -r 39bb7c3571e9 -r 052078dda061 linklayercontrol/networkinterfacemgr/agentprcore/src/tunnelagentcprstates.cpp
--- a/linklayercontrol/networkinterfacemgr/agentprcore/src/tunnelagentcprstates.cpp Mon May 03 13:58:16 2010 +0300
+++ b/linklayercontrol/networkinterfacemgr/agentprcore/src/tunnelagentcprstates.cpp Tue Jun 29 19:20:22 2010 +0530
@@ -101,7 +101,9 @@
TNodeId thisNodeId = iContext.Node().NodeId();
- RNodeInterface* sp = iContext.Node().AddClientL(realIapNodeId, TClientType(TCFClientType::EServProvider));
+ //SP are peers added with TClientType ((TCFClientType::EServProvider, CFClientType::EActive))
+ RNodeInterface* sp = iContext.Node().AddClientL(realIapNodeId, TClientType(TCFClientType::EServProvider, TCFClientType::EActive));
+
__ASSERT_DEBUG(sp != NULL, User::Panic(KTunnelAgentCPRPanic, ETunnelAgentCprNoServiceProvider));
iContext.iNodeActivity->PostRequestTo(
realIapNodeId,
diff -r 39bb7c3571e9 -r 052078dda061 linklayercontrol/networkinterfacemgr/eabi/agentprcoreU.def
--- a/linklayercontrol/networkinterfacemgr/eabi/agentprcoreU.def Mon May 03 13:58:16 2010 +0300
+++ b/linklayercontrol/networkinterfacemgr/eabi/agentprcoreU.def Tue Jun 29 19:20:22 2010 +0530
@@ -190,10 +190,9 @@
_ZN28CAgentMetaConnectionProvider15GetDes8SettingLERK7TDesC16R5TDes8PN5ESock14MPlatsecApiExtE @ 189 NONAME
_ZN28CAgentMetaConnectionProvider16GetDes16SettingLERK7TDesC16R6TDes16PN5ESock14MPlatsecApiExtE @ 190 NONAME
_ZN28CAgentMetaConnectionProvider18GetLongDesSettingLERK7TDesC16RP7HBufC16PN5ESock14MPlatsecApiExtE @ 191 NONAME
- _ZThn176_N28CAgentMetaConnectionProvider14GetIntSettingLERK7TDesC16RmPN5ESock14MPlatsecApiExtE @ 192 NONAME
- _ZThn176_N28CAgentMetaConnectionProvider15GetBoolSettingLERK7TDesC16RiPN5ESock14MPlatsecApiExtE @ 193 NONAME
- _ZThn176_N28CAgentMetaConnectionProvider15GetDes8SettingLERK7TDesC16R5TDes8PN5ESock14MPlatsecApiExtE @ 194 NONAME
- _ZThn176_N28CAgentMetaConnectionProvider16GetDes16SettingLERK7TDesC16R6TDes16PN5ESock14MPlatsecApiExtE @ 195 NONAME
- _ZThn176_N28CAgentMetaConnectionProvider18GetLongDesSettingLERK7TDesC16RP7HBufC16PN5ESock14MPlatsecApiExtE @ 196 NONAME
+ _ZThn180_N28CAgentMetaConnectionProvider14GetIntSettingLERK7TDesC16RmPN5ESock14MPlatsecApiExtE @ 192 NONAME
+ _ZThn180_N28CAgentMetaConnectionProvider15GetBoolSettingLERK7TDesC16RiPN5ESock14MPlatsecApiExtE @ 193 NONAME
+ _ZThn180_N28CAgentMetaConnectionProvider15GetDes8SettingLERK7TDesC16R5TDes8PN5ESock14MPlatsecApiExtE @ 194 NONAME
+ _ZThn180_N28CAgentMetaConnectionProvider16GetDes16SettingLERK7TDesC16R6TDes16PN5ESock14MPlatsecApiExtE @ 195 NONAME
+ _ZThn180_N28CAgentMetaConnectionProvider18GetLongDesSettingLERK7TDesC16RP7HBufC16PN5ESock14MPlatsecApiExtE @ 196 NONAME
-
diff -r 39bb7c3571e9 -r 052078dda061 linklayercontrol/networkinterfacemgr/group/BLD.INF
--- a/linklayercontrol/networkinterfacemgr/group/BLD.INF Mon May 03 13:58:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,104 +0,0 @@
-// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Network interface manager
-//
-//
-
-/**
- @file
-*/
-
-PRJ_PLATFORMS
-
-DEFAULT
-
-PRJ_EXPORTS
-
-../inc/NIFVAR.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(nifvar.h)
-../inc/nifvar_internal.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(nifvar_internal.h)
-../inc/NIFUTL.H SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(nifutl.h)
-../inc/NIFMAN.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(nifman.h)
-../inc/nifman_internal.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(nifman_internal.h)
-../inc/AgentErrors.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(agenterrors.h)
-../inc/NetConError.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(netconerror.h)
-
-../inc/NIFAGT.H SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/nifagt.h)
-../inc/nifagt_internal.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/nifagt_internal.h)
-../inc/NIFIF.H SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/nifif.h)
-../inc/nifif_internal.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/nifif_internal.h)
-../inc/NIFPRVAR.H SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/nifprvar.h)
-../inc/nifprvar_internal.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/nifprvar_internal.h)
-
-../inc/NIF_VER.H SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/nif_ver.h)
-../inc/NifmanIPC.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/nifmanipc.h)
-
-../inc/EventLogger.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/eventlogger.h)
-../inc/ConnectionSettings.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/connectionsettings.h)
-../inc/CAgentBase.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/cagentbase.h)
-../inc/CStateMachineAgentBase.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/cstatemachineagentbase.h)
-../inc/CAgentSMBase.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/cagentsmbase.h)
-../inc/CAgentSMBase.inl SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/cagentsmbase.inl)
-../inc/Ni_Log.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/ni_log.h)
-
-../inc/CNetworkControllerBase.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/cnetworkcontrollerbase.h)
-
-../inc/DbAccess.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/dbaccess.h)
-../inc/MDbAccess.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/mdbaccess.h)
-../inc/dialogprocessor.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/dialogprocessor.h)
-
-NIFMAN.IBY /epoc32/rom/include/nifman.iby
-
-../bwins/Agentu.def /epoc32/release/wins/agentu.def
-../bmarm/Agentu.def /epoc32/release/marm/agentu.def
-../eabi/AGENTU.DEF /epoc32/include/def/eabi/agentu.def
-
-
-// ---------------- Agent PR Core exports ----------------
-
-agentpr.iby /epoc32/rom/include/agentpr.iby
-agentprcore.iby /epoc32/rom/include/agentprcore.iby
-
-../agentprcore/inc/agentprconst.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/agentprconst.h)
-../agentprcore/inc/agentmessages.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/agentmessages.h)
-../agentprcore/inc/agentmessages.inl SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/agentmessages.inl)
-
-../agentprcore/inc/agentmcpr.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/agentmcpr.h)
-../agentprcore/inc/agentmcpractivities.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/agentmcpractivities.h)
-
-../agentprcore/inc/agentscpr.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/agentscpr.h)
-../agentprcore/inc/agentscprstates.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/agentscprstates.h)
-../agentprcore/inc/agentscpractivities.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/agentscpractivities.h)
-../agentprcore/inc/CAgentAdapter.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/cagentadapter.h)
-
-../agentprcore/inc/LinkProvision.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/linkprovision.h)
-../agentprcore/inc/LinkProvision.inl SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/linkprovision.inl)
-
-../agentprcore/inc/agentcpr.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/agentcpr.h)
-../agentprcore/inc/agentcprstates.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/agentcprstates.h)
-
-../agentprcore/inc/tunnelagentcpr.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/tunnelagentcpr.h)
-../agentprcore/inc/tunnelagentcprstates.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/tunnelagentcprstates.h)
-
-#ifdef SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
-../inc/cfbearers.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/cfbearers.h)
-#endif // SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
-
-PRJ_MMPFILES
-
-NIFMAN.MMP
-agentpr.mmp
-agentprcore.mmp
-
-#include "../netcfgext/group/bld.inf"
-
diff -r 39bb7c3571e9 -r 052078dda061 linklayercontrol/networkinterfacemgr/group/agentpr.mmp
--- a/linklayercontrol/networkinterfacemgr/group/agentpr.mmp Mon May 03 13:58:16 2010 +0300
+++ b/linklayercontrol/networkinterfacemgr/group/agentpr.mmp Tue Jun 29 19:20:22 2010 +0530
@@ -44,7 +44,6 @@
USERINCLUDE ../agentpr/inc
USERINCLUDE ../agentprcore/inc
-USERINCLUDE ../../../../commsfw/datacommsserver/esockserver/inc
OS_LAYER_SYSTEMINCLUDE_SYMBIAN
diff -r 39bb7c3571e9 -r 052078dda061 linklayercontrol/networkinterfacemgr/group/agentprcore.mmp
--- a/linklayercontrol/networkinterfacemgr/group/agentprcore.mmp Mon May 03 13:58:16 2010 +0300
+++ b/linklayercontrol/networkinterfacemgr/group/agentprcore.mmp Tue Jun 29 19:20:22 2010 +0530
@@ -47,8 +47,6 @@
USERINCLUDE ../inc
USERINCLUDE ../agentprcore/inc
-USERINCLUDE ../../../../commsfw/datacommsserver/esockserver/inc
-
OS_LAYER_SYSTEMINCLUDE_SYMBIAN
diff -r 39bb7c3571e9 -r 052078dda061 linklayercontrol/networkinterfacemgr/group/bld.inf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/linklayercontrol/networkinterfacemgr/group/bld.inf Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,104 @@
+// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// Network interface manager
+//
+//
+
+/**
+ @file
+*/
+
+PRJ_PLATFORMS
+
+DEFAULT
+
+PRJ_EXPORTS
+
+../inc/NIFVAR.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(nifvar.h)
+../inc/nifvar_internal.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(nifvar_internal.h)
+../inc/NIFUTL.H SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(nifutl.h)
+../inc/NIFMAN.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(nifman.h)
+../inc/nifman_internal.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(nifman_internal.h)
+../inc/AgentErrors.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(agenterrors.h)
+../inc/NetConError.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(netconerror.h)
+
+../inc/NIFAGT.H SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/nifagt.h)
+../inc/nifagt_internal.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/nifagt_internal.h)
+../inc/NIFIF.H SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/nifif.h)
+../inc/nifif_internal.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/nifif_internal.h)
+../inc/NIFPRVAR.H SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/nifprvar.h)
+../inc/nifprvar_internal.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/nifprvar_internal.h)
+
+../inc/NIF_VER.H SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/nif_ver.h)
+../inc/NifmanIPC.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/nifmanipc.h)
+
+../inc/EventLogger.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/eventlogger.h)
+../inc/ConnectionSettings.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/connectionsettings.h)
+../inc/CAgentBase.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/cagentbase.h)
+../inc/CStateMachineAgentBase.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/cstatemachineagentbase.h)
+../inc/CAgentSMBase.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/cagentsmbase.h)
+../inc/CAgentSMBase.inl SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/cagentsmbase.inl)
+../inc/Ni_Log.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/ni_log.h)
+
+../inc/CNetworkControllerBase.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/cnetworkcontrollerbase.h)
+
+../inc/DbAccess.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/dbaccess.h)
+../inc/MDbAccess.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/mdbaccess.h)
+../inc/dialogprocessor.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/dialogprocessor.h)
+
+NIFMAN.IBY /epoc32/rom/include/nifman.iby
+
+../bwins/Agentu.def /epoc32/release/wins/agentu.def
+../bmarm/Agentu.def /epoc32/release/marm/agentu.def
+../eabi/AGENTU.DEF /epoc32/include/def/eabi/agentu.def
+
+
+// ---------------- Agent PR Core exports ----------------
+
+agentpr.iby /epoc32/rom/include/agentpr.iby
+agentprcore.iby /epoc32/rom/include/agentprcore.iby
+
+../agentprcore/inc/agentprconst.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/agentprconst.h)
+../agentprcore/inc/agentmessages.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/agentmessages.h)
+../agentprcore/inc/agentmessages.inl SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/agentmessages.inl)
+
+../agentprcore/inc/agentmcpr.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/agentmcpr.h)
+../agentprcore/inc/agentmcpractivities.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/agentmcpractivities.h)
+
+../agentprcore/inc/agentscpr.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/agentscpr.h)
+../agentprcore/inc/agentscprstates.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/agentscprstates.h)
+../agentprcore/inc/agentscpractivities.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/agentscpractivities.h)
+../agentprcore/inc/CAgentAdapter.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/cagentadapter.h)
+
+../agentprcore/inc/LinkProvision.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/linkprovision.h)
+../agentprcore/inc/LinkProvision.inl SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/linkprovision.inl)
+
+../agentprcore/inc/agentcpr.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/agentcpr.h)
+../agentprcore/inc/agentcprstates.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/agentcprstates.h)
+
+../agentprcore/inc/tunnelagentcpr.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/tunnelagentcpr.h)
+../agentprcore/inc/tunnelagentcprstates.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(comms-infras/tunnelagentcprstates.h)
+
+#ifdef SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
+../inc/cfbearers.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/cfbearers.h)
+#endif // SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
+
+PRJ_MMPFILES
+
+NIFMAN.MMP
+agentpr.mmp
+agentprcore.mmp
+
+#include "../netcfgext/group/bld.inf"
+
diff -r 39bb7c3571e9 -r 052078dda061 linklayercontrol/nullagt/src/NullAgent.cpp
--- a/linklayercontrol/nullagt/src/NullAgent.cpp Mon May 03 13:58:16 2010 +0300
+++ b/linklayercontrol/nullagt/src/NullAgent.cpp Tue Jun 29 19:20:22 2010 +0530
@@ -22,7 +22,7 @@
#include // CommDB access
#ifdef SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
-#include
+#include
#endif //SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
/**
diff -r 39bb7c3571e9 -r 052078dda061 linklayerprotocols/ethernetnif/EthInt/Ethbase.cpp
--- a/linklayerprotocols/ethernetnif/EthInt/Ethbase.cpp Mon May 03 13:58:16 2010 +0300
+++ b/linklayerprotocols/ethernetnif/EthInt/Ethbase.cpp Tue Jun 29 19:20:22 2010 +0530
@@ -1084,7 +1084,8 @@
void CLANLinkCommon::Destroy()
{
- ASSERT(iMMState==EStopped);
+ // PDEF143631: RNDIS driver doesn't override CLANLinkCommon::Destroy()
+ ASSERT(iMMState==EStarting || iMMState==EStopped);
DeleteThisFlow();
}
diff -r 39bb7c3571e9 -r 052078dda061 linklayerprotocols/ethernetnif/eabi/ethprotou.def
--- a/linklayerprotocols/ethernetnif/eabi/ethprotou.def Mon May 03 13:58:16 2010 +0300
+++ b/linklayerprotocols/ethernetnif/eabi/ethprotou.def Tue Jun 29 19:20:22 2010 +0530
@@ -89,7 +89,7 @@
_ZThn80_N14CLANLinkCommon11GetControlLERK6TDesC8 @ 88 NONAME ABSENT
_ZThn80_N14CLANLinkCommon5BindLERK6TDesC8PN5ESock18MUpperDataReceiverEPNS3_13MUpperControlE @ 89 NONAME ABSENT
_ZThn80_N14CLANLinkCommon6UnbindEPN5ESock18MUpperDataReceiverEPNS0_13MUpperControlE @ 90 NONAME ABSENT
- _ZThn96_N14CLANLinkCommon11GetControlLERK6TDesC8 @ 91 NONAME
- _ZThn96_N14CLANLinkCommon5BindLERK6TDesC8PN5ESock18MUpperDataReceiverEPNS3_13MUpperControlE @ 92 NONAME
- _ZThn96_N14CLANLinkCommon6UnbindEPN5ESock18MUpperDataReceiverEPNS0_13MUpperControlE @ 93 NONAME
+ _ZThn100_N14CLANLinkCommon11GetControlLERK6TDesC8 @ 91 NONAME
+ _ZThn100_N14CLANLinkCommon5BindLERK6TDesC8PN5ESock18MUpperDataReceiverEPNS3_13MUpperControlE @ 92 NONAME
+ _ZThn100_N14CLANLinkCommon6UnbindEPN5ESock18MUpperDataReceiverEPNS0_13MUpperControlE @ 93 NONAME
diff -r 39bb7c3571e9 -r 052078dda061 linklayerprotocols/ethernetnif/group/BLD.INF
--- a/linklayerprotocols/ethernetnif/group/BLD.INF Mon May 03 13:58:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// Historical Note: networking/ether802/inc/EthProto.h is originally a copy of
-// networking/ether802/version1/inc/ethinter.h to prevent both Ethernet drivers exporting the same named header.
-// IEEE 802.3 (Ethernet(tm)) support
-//
-//
-
-/**
- @file
-*/
-
-#ifndef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
-
-#include "../version1/group/BLD.INF"
-
-#else
-
-PRJ_PLATFORMS
-
-DEFAULT
-
-PRJ_EXPORTS
-
-../INC/ETHINTER.H SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/ethinter.h)
-../INC/EthProto.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/ethproto.h)
-../INC/PKTDRV.H SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/pktdrv.h)
-../INC/pktdrv_internal.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/pktdrv_internal.h)
-../INC/ethmcpr.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/ethmcpr.h)
-../group/ether802.iby /epoc32/rom/include/ether802.iby
-
-../data/ether802.ini /epoc32/data/z/private/101f7989/esock/ether802.ini
-../data/ether802.ini /epoc32/wins/c/private/101f7989/esock/ether802.ini
-../data/ether802.ini /epoc32/winscw/c/private/101f7989/esock/ether802.ini
-../data/configchange.pl /epoc32/tools/configchange.pl
-
-../data/ethernetCed_eka2_platsec_emulator.xml /epoc32/winscw/c/ethernetced.xml
-../data/ethernetCed_eka2_platsec_emulator.xml /epoc32/wins/c/ethernetced.xml
-
-
-PRJ_MMPFILES
-
-../group/ethproto.mmp
-../group/ether802.mmp
-../group/EtherPkt.mmp
-../group/IRLAN.MMP
-
-#endif // SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
diff -r 39bb7c3571e9 -r 052078dda061 linklayerprotocols/ethernetnif/group/bld.inf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/linklayerprotocols/ethernetnif/group/bld.inf Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,59 @@
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// Historical Note: networking/ether802/inc/EthProto.h is originally a copy of
+// networking/ether802/version1/inc/ethinter.h to prevent both Ethernet drivers exporting the same named header.
+// IEEE 802.3 (Ethernet(tm)) support
+//
+//
+
+/**
+ @file
+*/
+
+#ifndef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
+
+#include "../version1/group/BLD.INF"
+
+#else
+
+PRJ_PLATFORMS
+
+DEFAULT
+
+PRJ_EXPORTS
+
+../INC/ETHINTER.H SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/ethinter.h)
+../INC/EthProto.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/ethproto.h)
+../INC/PKTDRV.H SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/pktdrv.h)
+../INC/pktdrv_internal.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/pktdrv_internal.h)
+../INC/ethmcpr.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/ethmcpr.h)
+../group/ether802.iby /epoc32/rom/include/ether802.iby
+
+../data/ether802.ini /epoc32/data/z/private/101f7989/esock/ether802.ini
+../data/ether802.ini /epoc32/wins/c/private/101f7989/esock/ether802.ini
+../data/ether802.ini /epoc32/winscw/c/private/101f7989/esock/ether802.ini
+../data/configchange.pl /epoc32/tools/configchange.pl
+
+../data/ethernetCed_eka2_platsec_emulator.xml /epoc32/winscw/c/ethernetced.xml
+../data/ethernetCed_eka2_platsec_emulator.xml /epoc32/wins/c/ethernetced.xml
+
+
+PRJ_MMPFILES
+
+../group/ethproto.mmp
+../group/ether802.mmp
+../group/EtherPkt.mmp
+../group/IRLAN.MMP
+
+#endif // SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
diff -r 39bb7c3571e9 -r 052078dda061 linklayerprotocols/ethernetpacketdriver/group/Bld.inf
--- a/linklayerprotocols/ethernetpacketdriver/group/Bld.inf Mon May 03 13:58:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +0,0 @@
-// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// IEEE 802.3 (Ethernet(tm)) device driver
-//
-//
-
-/**
- @file
-*/
-
-
-PRJ_PLATFORMS
-TOOLS WINS WINSCW
-
-PRJ_EXPORTS
-#ifdef SYMBIAN_OLD_EXPORT_LOCATION
-..\inc\EtherCardIoc.h
-#endif
-#ifdef SYMBIAN_OLD_EXPORT_LOCATION
-..\inc\EtherCardApi.h
-#endif
-#ifdef SYMBIAN_OLD_EXPORT_LOCATION
-..\inc\EtherCardApi.inl
-#endif
-
-..\group\etherdrv.iby \epoc32\rom\include\etherdrv.iby
-
-
-PRJ_MMPFILES
-#if !defined(TOOLS)
-
-..\group\EtherCard.mmp
-#if defined(MISA) || defined(MCOT)
-..\group\EtherSMC.mmp
-#endif
-
-#if defined(WINS)
-#if defined(WINSCW)
-..\group\EtherWinscw.mmp
-#else
-..\group\EtherWins.mmp
-#endif
-#endif
-
-#else
-..\netcards\netcards.mmp
-#endif
-
-
-PRJ_TESTMMPFILES
-#if !defined(TOOLS)
-
-EtherDevTest.mmp
-..\demoserv\DemoServ.mmp
-..\pump\EtherPump.mmp
-
-#if defined(MISA) || defined(MCOT)
-..\macset\MacSet.mmp
-#endif
-
-#endif
diff -r 39bb7c3571e9 -r 052078dda061 linklayerprotocols/ethernetpacketdriver/group/bld.inf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/linklayerprotocols/ethernetpacketdriver/group/bld.inf Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,72 @@
+// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// IEEE 802.3 (Ethernet(tm)) device driver
+//
+//
+
+/**
+ @file
+*/
+
+
+PRJ_PLATFORMS
+TOOLS WINS WINSCW
+
+PRJ_EXPORTS
+#ifdef SYMBIAN_OLD_EXPORT_LOCATION
+..\inc\EtherCardIoc.h
+#endif
+#ifdef SYMBIAN_OLD_EXPORT_LOCATION
+..\inc\EtherCardApi.h
+#endif
+#ifdef SYMBIAN_OLD_EXPORT_LOCATION
+..\inc\EtherCardApi.inl
+#endif
+
+..\group\etherdrv.iby \epoc32\rom\include\etherdrv.iby
+
+
+PRJ_MMPFILES
+#if !defined(TOOLS)
+
+..\group\EtherCard.mmp
+#if defined(MISA) || defined(MCOT)
+..\group\EtherSMC.mmp
+#endif
+
+#if defined(WINS)
+#if defined(WINSCW)
+..\group\EtherWinscw.mmp
+#else
+..\group\EtherWins.mmp
+#endif
+#endif
+
+#else
+..\netcards\netcards.mmp
+#endif
+
+
+PRJ_TESTMMPFILES
+#if !defined(TOOLS)
+
+EtherDevTest.mmp
+..\demoserv\DemoServ.mmp
+..\pump\EtherPump.mmp
+
+#if defined(MISA) || defined(MCOT)
+..\macset\MacSet.mmp
+#endif
+
+#endif
diff -r 39bb7c3571e9 -r 052078dda061 linklayerprotocols/pppnif/eabi/pppmainU.DEF
--- a/linklayerprotocols/pppnif/eabi/pppmainU.DEF Mon May 03 13:58:16 2010 +0300
+++ b/linklayerprotocols/pppnif/eabi/pppmainU.DEF Tue Jun 29 19:20:22 2010 +0530
@@ -118,52 +118,28 @@
_ZN7CPppLcpC1ERN5ESock29CSubConnectionFlowFactoryBaseERKN8Messages7TNodeIdEPNS0_17CProtocolIntfBaseE @ 117 NONAME
_ZN7CPppLcpC2ERN5ESock29CSubConnectionFlowFactoryBaseERKN8Messages7TNodeIdEPNS0_17CProtocolIntfBaseE @ 118 NONAME
_ZThn20_N7CPppLcp9ReceivedLERKN8Messages13TRuntimeCtxIdERKNS0_7TNodeIdERNS0_14TSignatureBaseE @ 119 NONAME
- _ZThn80_N7CPppLcp11GetControlLERK6TDesC8 @ 120 NONAME ABSENT
- _ZThn80_N7CPppLcp4FlowEv @ 121 NONAME ABSENT
- _ZThn80_N7CPppLcp5BindLERK6TDesC8PN5ESock18MUpperDataReceiverEPNS3_13MUpperControlE @ 122 NONAME ABSENT
- _ZThn80_N7CPppLcp6UnbindEPN5ESock18MUpperDataReceiverEPNS0_13MUpperControlE @ 123 NONAME ABSENT
- _ZThn84_N7CPppLcp7ProcessER10RMBufChain @ 124 NONAME ABSENT
- _ZThn88_N7CPppLcp12StartSendingEv @ 125 NONAME ABSENT
- _ZThn88_N7CPppLcp5ErrorEi @ 126 NONAME ABSENT
- _ZThn92_N7CPppLcp10FsmLayerUpEv @ 127 NONAME ABSENT
- _ZThn92_N7CPppLcp12FsmLayerDownEi @ 128 NONAME ABSENT
- _ZThn92_N7CPppLcp15FsmLayerStartedEv @ 129 NONAME ABSENT
- _ZThn92_N7CPppLcp16FsmLayerFinishedEi @ 130 NONAME ABSENT
- _ZThn92_N7CPppLcp16FsmRecvConfigAckER14RPppOptionList @ 131 NONAME ABSENT
- _ZThn92_N7CPppLcp16FsmRecvConfigNakER14RPppOptionListS1_ @ 132 NONAME ABSENT
- _ZThn92_N7CPppLcp18FsmAckOptionsValidER14RPppOptionListS1_ @ 133 NONAME ABSENT
- _ZThn92_N7CPppLcp18FsmRecvUnknownCodeEhhiR10RMBufChain @ 134 NONAME ABSENT
- _ZThn92_N7CPppLcp19FsmRecvConfigRejectER14RPppOptionListS1_ @ 135 NONAME ABSENT
- _ZThn92_N7CPppLcp21FsmApplyConfigRequestER14RPppOptionList @ 136 NONAME ABSENT
- _ZThn92_N7CPppLcp21FsmCheckConfigRequestER14RPppOptionListS1_S1_S1_ @ 137 NONAME ABSENT
- _ZThn92_N7CPppLcp21FsmRejectOptionsValidER14RPppOptionListS1_ @ 138 NONAME ABSENT
- _ZThn92_N7CPppLcp23FsmFillinConfigRequestLER14RPppOptionList @ 139 NONAME ABSENT
- _ZThn92_N7CPppLcp27FsmTerminationPhaseCompleteEv @ 140 NONAME ABSENT
- _ZThn92_N7CPppLcp28FsmConfigRequestOptionsValidER14RPppOptionList @ 141 NONAME ABSENT
- _ZThn92_N7CPppLcpD0Ev @ 142 NONAME ABSENT
- _ZThn92_N7CPppLcpD1Ev @ 143 NONAME ABSENT
- _ZThn100_N7CPppLcp7ProcessER10RMBufChain @ 144 NONAME
- _ZThn104_N7CPppLcp12StartSendingEv @ 145 NONAME
- _ZThn104_N7CPppLcp5ErrorEi @ 146 NONAME
- _ZThn108_N7CPppLcp10FsmLayerUpEv @ 147 NONAME
- _ZThn108_N7CPppLcp12FsmLayerDownEi @ 148 NONAME
- _ZThn108_N7CPppLcp15FsmLayerStartedEv @ 149 NONAME
- _ZThn108_N7CPppLcp16FsmLayerFinishedEi @ 150 NONAME
- _ZThn108_N7CPppLcp16FsmRecvConfigAckER14RPppOptionList @ 151 NONAME
- _ZThn108_N7CPppLcp16FsmRecvConfigNakER14RPppOptionListS1_ @ 152 NONAME
- _ZThn108_N7CPppLcp18FsmAckOptionsValidER14RPppOptionListS1_ @ 153 NONAME
- _ZThn108_N7CPppLcp18FsmRecvUnknownCodeEhhiR10RMBufChain @ 154 NONAME
- _ZThn108_N7CPppLcp19FsmRecvConfigRejectER14RPppOptionListS1_ @ 155 NONAME
- _ZThn108_N7CPppLcp21FsmApplyConfigRequestER14RPppOptionList @ 156 NONAME
- _ZThn108_N7CPppLcp21FsmCheckConfigRequestER14RPppOptionListS1_S1_S1_ @ 157 NONAME
- _ZThn108_N7CPppLcp21FsmRejectOptionsValidER14RPppOptionListS1_ @ 158 NONAME
- _ZThn108_N7CPppLcp23FsmFillinConfigRequestLER14RPppOptionList @ 159 NONAME
- _ZThn108_N7CPppLcp27FsmTerminationPhaseCompleteEv @ 160 NONAME
- _ZThn108_N7CPppLcp28FsmConfigRequestOptionsValidER14RPppOptionList @ 161 NONAME
- _ZThn108_N7CPppLcpD0Ev @ 162 NONAME
- _ZThn108_N7CPppLcpD1Ev @ 163 NONAME
- _ZThn96_N7CPppLcp11GetControlLERK6TDesC8 @ 164 NONAME
- _ZThn96_N7CPppLcp4FlowEv @ 165 NONAME
- _ZThn96_N7CPppLcp5BindLERK6TDesC8PN5ESock18MUpperDataReceiverEPNS3_13MUpperControlE @ 166 NONAME
- _ZThn96_N7CPppLcp6UnbindEPN5ESock18MUpperDataReceiverEPNS0_13MUpperControlE @ 167 NONAME
+ _ZThn100_N7CPppLcp11GetControlLERK6TDesC8 @ 120 NONAME
+ _ZThn100_N7CPppLcp4FlowEv @ 121 NONAME
+ _ZThn100_N7CPppLcp5BindLERK6TDesC8PN5ESock18MUpperDataReceiverEPNS3_13MUpperControlE @ 122 NONAME
+ _ZThn100_N7CPppLcp6UnbindEPN5ESock18MUpperDataReceiverEPNS0_13MUpperControlE @ 123 NONAME
+ _ZThn104_N7CPppLcp7ProcessER10RMBufChain @ 124 NONAME
+ _ZThn108_N7CPppLcp12StartSendingEv @ 125 NONAME
+ _ZThn108_N7CPppLcp5ErrorEi @ 126 NONAME
+ _ZThn112_N7CPppLcp10FsmLayerUpEv @ 127 NONAME
+ _ZThn112_N7CPppLcp12FsmLayerDownEi @ 128 NONAME
+ _ZThn112_N7CPppLcp15FsmLayerStartedEv @ 129 NONAME
+ _ZThn112_N7CPppLcp16FsmLayerFinishedEi @ 130 NONAME
+ _ZThn112_N7CPppLcp16FsmRecvConfigAckER14RPppOptionList @ 131 NONAME
+ _ZThn112_N7CPppLcp16FsmRecvConfigNakER14RPppOptionListS1_ @ 132 NONAME
+ _ZThn112_N7CPppLcp18FsmAckOptionsValidER14RPppOptionListS1_ @ 133 NONAME
+ _ZThn112_N7CPppLcp18FsmRecvUnknownCodeEhhiR10RMBufChain @ 134 NONAME
+ _ZThn112_N7CPppLcp19FsmRecvConfigRejectER14RPppOptionListS1_ @ 135 NONAME
+ _ZThn112_N7CPppLcp21FsmApplyConfigRequestER14RPppOptionList @ 136 NONAME
+ _ZThn112_N7CPppLcp21FsmCheckConfigRequestER14RPppOptionListS1_S1_S1_ @ 137 NONAME
+ _ZThn112_N7CPppLcp21FsmRejectOptionsValidER14RPppOptionListS1_ @ 138 NONAME
+ _ZThn112_N7CPppLcp23FsmFillinConfigRequestLER14RPppOptionList @ 139 NONAME
+ _ZThn112_N7CPppLcp27FsmTerminationPhaseCompleteEv @ 140 NONAME
+ _ZThn112_N7CPppLcp28FsmConfigRequestOptionsValidER14RPppOptionList @ 141 NONAME
+ _ZThn112_N7CPppLcpD0Ev @ 142 NONAME
+ _ZThn112_N7CPppLcpD1Ev @ 143 NONAME
diff -r 39bb7c3571e9 -r 052078dda061 linklayerprotocols/pppnif/group/BLD.INF
--- a/linklayerprotocols/pppnif/group/BLD.INF Mon May 03 13:58:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,106 +0,0 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// PPP networking protocol
-//
-//
-
-/**
- @file
-*/
-
-#ifndef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
-
-#include "../version1/group/BLD.INF"
-
-#else
-
-PRJ_PLATFORMS
-
-DEFAULT
-
-PRJ_EXPORTS
-
-../group/ppp.iby /epoc32/rom/include/ppp.iby
-
-../INC/PPPConfig.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/pppconfig.h)
-../INC/PPPConfig.inl SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/pppconfig.inl)
-../INC/csdavailabilitylistener.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/csdavailabilitylistener.h)
-../INC/PPPBASE.H SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/pppbase.h)
-../INC/PPPBASE.INL SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/pppbase.inl)
-../INC/PPPCCP.H SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/pppccp.h)
-../INC/PPPCFG.H SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/pppcfg.h)
-../INC/PPPCOMP.H SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/pppcomp.h)
-../INC/PPPDEF.H SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/pppdef.h)
-../INC/PPPLCP.H SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/ppplcp.h)
-../INC/PPPLCP.INL SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/ppplcp.inl)
-../INC/PPPSOCK.H SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/pppsock.h)
-../INC/PPPSOCK.INL SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/pppsock.inl)
-../INC/VJ.H SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/vj.h)
-../INC/vj.inl SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/vj.inl)
-../INC/vjcomp.inl SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/vjcomp.inl)
-../INC/VJDECOMP.INL SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/vjdecomp.inl)
-../INC/VJIF.H SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/vjif.h)
-../INC/PppProg.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/pppprog.h)
-
-../INC/in_tcp.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/in_tcp.h)
-../INC/in_tcp.inl SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/in_tcp.inl)
-../INC/in_ip.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/in_ip.h)
-../INC/in_ip.inl SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/in_ip.inl)
-../INC/in_std.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/in_std.h)
-
-../INC/PPPDEBUG.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/pppdebug.h)
-
-#include "../data/bld.inf"
-
-PRJ_MMPFILES
-
-../group/PPPMainDll.mmp
-../group/PPP.MMP
-../group/VJCOMP.MMP
-
-
-PRJ_TESTEXPORTS
-
-// testexecute te_ppp
-../te_ppp/group/te_ppp.iby /epoc32/rom/include/te_ppp.iby
-../te_ppp/scripts/te_ppp.script /epoc32/data/z/testdata/scripts/te_ppp.script
-
-../te_ppp/group/te_ppp.cfg /epoc32/data/z/private/101f7989/esock/te_ppp.cfg
-../te_ppp/group/te_ppp.cfg /epoc32/winscw/c/private/101f7989/esock/te_ppp.cfg
-
-// scheduletest ts_dummyoveralltest
-../te_ppp/dummyppp/group/dummyppp.iby /epoc32/rom/include/dummyppp.iby
-
-// TE_PPPSize IBY
-../te_pppsize/group/te_pppsize.iby /epoc32/rom/include/te_pppsize.iby
-
-// TE_PPPSize
-../te_pppsize/scripts/te_pppsize.script z:/testdata/scripts/te_pppsize.script
-../te_pppsize/scripts/te_pppsize.ini z:/testdata/configs/te_pppsize.ini
-../te_pppsize/scripts/te_pppsize.xml z:/testdata/configs/te_pppsize.xml
-
-#include "../te_ppp/te_pppcomp/group/bld.inf"
-#include "../te_ppp/te_vjcomp/group/bld.inf"
-#include "../te_ppp/te_incoming_ppp/group/bld.inf"
-#include "../te_ppp/TS_dummyppp/group/bld.inf"
-
-
-PRJ_TESTMMPFILES
-
-../te_ppp/dummyppp/group/dummyppp.mmp
-../te_pppsize/group/te_pppsize.mmp
-
-
-#endif // SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
-
diff -r 39bb7c3571e9 -r 052078dda061 linklayerprotocols/pppnif/group/bld.inf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/linklayerprotocols/pppnif/group/bld.inf Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,106 @@
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// PPP networking protocol
+//
+//
+
+/**
+ @file
+*/
+
+#ifndef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
+
+#include "../version1/group/BLD.INF"
+
+#else
+
+PRJ_PLATFORMS
+
+DEFAULT
+
+PRJ_EXPORTS
+
+../group/ppp.iby /epoc32/rom/include/ppp.iby
+
+../INC/PPPConfig.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/pppconfig.h)
+../INC/PPPConfig.inl SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/pppconfig.inl)
+../INC/csdavailabilitylistener.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/csdavailabilitylistener.h)
+../INC/PPPBASE.H SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/pppbase.h)
+../INC/PPPBASE.INL SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/pppbase.inl)
+../INC/PPPCCP.H SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/pppccp.h)
+../INC/PPPCFG.H SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/pppcfg.h)
+../INC/PPPCOMP.H SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/pppcomp.h)
+../INC/PPPDEF.H SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/pppdef.h)
+../INC/PPPLCP.H SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/ppplcp.h)
+../INC/PPPLCP.INL SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/ppplcp.inl)
+../INC/PPPSOCK.H SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/pppsock.h)
+../INC/PPPSOCK.INL SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/pppsock.inl)
+../INC/VJ.H SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/vj.h)
+../INC/vj.inl SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/vj.inl)
+../INC/vjcomp.inl SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/vjcomp.inl)
+../INC/VJDECOMP.INL SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/vjdecomp.inl)
+../INC/VJIF.H SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/vjif.h)
+../INC/PppProg.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/pppprog.h)
+
+../INC/in_tcp.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/in_tcp.h)
+../INC/in_tcp.inl SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/in_tcp.inl)
+../INC/in_ip.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/in_ip.h)
+../INC/in_ip.inl SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/in_ip.inl)
+../INC/in_std.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/in_std.h)
+
+../INC/PPPDEBUG.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(networking/pppdebug.h)
+
+#include "../data/bld.inf"
+
+PRJ_MMPFILES
+
+../group/PPPMainDll.mmp
+../group/PPP.MMP
+../group/VJCOMP.MMP
+
+
+PRJ_TESTEXPORTS
+
+// testexecute te_ppp
+../te_ppp/group/te_ppp.iby /epoc32/rom/include/te_ppp.iby
+../te_ppp/scripts/te_ppp.script /epoc32/data/z/testdata/scripts/te_ppp.script
+
+../te_ppp/group/te_ppp.cfg /epoc32/data/z/private/101f7989/esock/te_ppp.cfg
+../te_ppp/group/te_ppp.cfg /epoc32/winscw/c/private/101f7989/esock/te_ppp.cfg
+
+// scheduletest ts_dummyoveralltest
+../te_ppp/dummyppp/group/dummyppp.iby /epoc32/rom/include/dummyppp.iby
+
+// TE_PPPSize IBY
+../te_pppsize/group/te_pppsize.iby /epoc32/rom/include/te_pppsize.iby
+
+// TE_PPPSize
+../te_pppsize/scripts/te_pppsize.script z:/testdata/scripts/te_pppsize.script
+../te_pppsize/scripts/te_pppsize.ini z:/testdata/configs/te_pppsize.ini
+../te_pppsize/scripts/te_pppsize.xml z:/testdata/configs/te_pppsize.xml
+
+#include "../te_ppp/te_pppcomp/group/bld.inf"
+#include "../te_ppp/te_vjcomp/group/bld.inf"
+#include "../te_ppp/te_incoming_ppp/group/bld.inf"
+#include "../te_ppp/TS_dummyppp/group/bld.inf"
+
+
+PRJ_TESTMMPFILES
+
+../te_ppp/dummyppp/group/dummyppp.mmp
+../te_pppsize/group/te_pppsize.mmp
+
+
+#endif // SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
+
diff -r 39bb7c3571e9 -r 052078dda061 linklayerprotocols/slipnif/group/BLD.INF
--- a/linklayerprotocols/slipnif/group/BLD.INF Mon May 03 13:58:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-// SLIP networking protocol
-//
-//
-
-/**
- @file
-*/
-
-
-
-PRJ_PLATFORMS
-
-DEFAULT
-
-PRJ_MMPFILES
-
-../group/SLIP.MMP
diff -r 39bb7c3571e9 -r 052078dda061 linklayerprotocols/slipnif/group/bld.inf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/linklayerprotocols/slipnif/group/bld.inf Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,30 @@
+// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// SLIP networking protocol
+//
+//
+
+/**
+ @file
+*/
+
+
+
+PRJ_PLATFORMS
+
+DEFAULT
+
+PRJ_MMPFILES
+
+../group/SLIP.MMP
diff -r 39bb7c3571e9 -r 052078dda061 linklayerprotocols/tunnelnif/group/BLD.INF
--- a/linklayerprotocols/tunnelnif/group/BLD.INF Mon May 03 13:58:16 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-#ifndef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
-
-#include "../version1/group/BLD.INF"
-
-#else
-
-PRJ_EXPORTS
-
-../include/tunnelnifvar.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(tunnelnifvar.h)
-
-
-PRJ_MMPFILES
-
-tunnelnif.mmp
-
-
-#endif // SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
-
-
diff -r 39bb7c3571e9 -r 052078dda061 linklayerprotocols/tunnelnif/group/bld.inf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/linklayerprotocols/tunnelnif/group/bld.inf Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,34 @@
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#ifndef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
+
+#include "../version1/group/BLD.INF"
+
+#else
+
+PRJ_EXPORTS
+
+../include/tunnelnifvar.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(tunnelnifvar.h)
+
+
+PRJ_MMPFILES
+
+tunnelnif.mmp
+
+
+#endif // SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
+
+
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/commsuserpromptmgr/state/src/netupsstatemachine.cpp
--- a/networkcontrol/commsuserpromptmgr/state/src/netupsstatemachine.cpp Mon May 03 13:58:16 2010 +0300
+++ b/networkcontrol/commsuserpromptmgr/state/src/netupsstatemachine.cpp Tue Jun 29 19:20:22 2010 +0530
@@ -71,27 +71,71 @@
// Note the order in which the states are instantiated must match the
// order in which they are defined in the enumeration TNetUpsState - or a panic will occur.
- iState.Append(CState::NewL(ENull, *this));
+ CState* state=CState::NewL(ENull, *this);
+
+ CleanupStack::PushL(state);
+ iState.AppendL(state);
+ CleanupStack::Pop(state);
+
switch(iNetUpsImpl.LifeTimeMode())
{
+
case CNetUpsImpl::EProcessLifeTimeMode:
{
- iState.Append(CState::NewL(EProcLife_NonSession, *this));
- iState.Append(CState::NewL(EProcLife_Transit_SessionYes, *this)); // a transient state is entered when the UPS Server responds with either SessionYes or SessionNo and there are 1 or more UPS requests outstanding to other subsessions which are associated with the same process.
- iState.Append(CState::NewL(EProcLife_SessionYes, *this));
- iState.Append(CState::NewL(EProcLife_Transit_SessionNo, *this));
- iState.Append(CState::NewL(EProcLife_SessionNo, *this));
+ CState* stateone= CState::NewL(EProcLife_NonSession, *this);
+ CleanupStack::PushL(stateone);
+ iState.AppendL(stateone);
+
+ CState* statetwo = CState::NewL(EProcLife_Transit_SessionYes, *this);
+ CleanupStack::PushL(statetwo);
+ iState.AppendL(statetwo); // a transient state is entered when the UPS Server responds with either SessionYes or SessionNo and there are 1 or more UPS requests outstanding to other subsessions which are associated with the same process.
+
+ CState* statethree = CState::NewL(EProcLife_SessionYes, *this);
+ CleanupStack::PushL(statethree);
+ iState.AppendL(statethree);
+
+ CState* statefour = CState::NewL(EProcLife_Transit_SessionNo, *this);
+ CleanupStack::PushL(statefour);
+ iState.AppendL(statefour);
+
+ CState* statefive = CState::NewL(EProcLife_SessionNo, *this);
+ CleanupStack::PushL(statefive);
+ iState.AppendL(statefive);
+
+ CleanupStack::Pop(5);
break;
}
case CNetUpsImpl::ENetworkLifeTimeMode:
{
- iState.Append(CState::NewL(ENetLife_NonSession, *this));
- iState.Append(CState::NewL(ENetLife_SessionNo_Transit_WithoutConnections, *this));
- iState.Append(CState::NewL(ENetLife_SessionNo_WithOutConnections, *this));
- iState.Append(CState::NewL(ENetLife_SessionNo_Transit_WithConnections, *this));
- iState.Append(CState::NewL(ENetLife_SessionNo_WithConnections, *this));
- iState.Append(CState::NewL(ENetLife_Transit_SessionYes, *this));
- iState.Append(CState::NewL(ENetLife_SessionYes, *this));
+ CState* stateone = CState::NewL(EProcLife_NonSession, *this);
+ CleanupStack::PushL(stateone);
+ iState.AppendL(stateone);
+
+ CState* statetwo = CState::NewL(ENetLife_SessionNo_Transit_WithoutConnections, *this);
+ CleanupStack::PushL(statetwo);
+ iState.AppendL(statetwo);
+
+ CState* statethree = CState::NewL(ENetLife_SessionNo_WithOutConnections, *this);
+ CleanupStack::PushL(statethree);
+ iState.AppendL(statethree);
+
+ CState* statefour = CState::NewL(ENetLife_SessionNo_Transit_WithConnections, *this);
+ CleanupStack::PushL(statefour);
+ iState.AppendL(statefour);
+
+ CState* statefive = CState::NewL(ENetLife_SessionNo_WithConnections, *this);
+ CleanupStack::PushL(statefive);
+ iState.AppendL(statefive);
+
+ CState* statesix = CState::NewL(ENetLife_Transit_SessionYes, *this);
+ CleanupStack::PushL(statesix);
+ iState.AppendL(statesix);
+
+ CState* stateseven = CState::NewL(ENetLife_SessionYes, *this);
+ CleanupStack::PushL(stateseven);
+ iState.AppendL(stateseven);
+
+ CleanupStack::Pop(7);
break;
}
default:
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipcpr/group/bld.inf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipcpr/group/bld.inf Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,26 @@
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#ifndef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
+
+PRJ_EXPORTS
+../group/ipcpr.iby /epoc32/rom/include/ipcpr.iby
+
+PRJ_MMPFILES
+ipcpr.mmp
+
+PRJ_TESTMMPFILES
+
+#endif // SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
\ No newline at end of file
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipcpr/group/ipcpr.iby
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipcpr/group/ipcpr.iby Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,25 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef __IPCPR_IBY__
+#define __IPCPR_IBY__
+
+REM IP Connection Provider
+
+ECOM_PLUGIN(ipcpr.dll,102070ED.rss)
+
+#endif
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipcpr/group/ipcpr.mmp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipcpr/group/ipcpr.mmp Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,52 @@
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// ipcpr.MMP New IP Connection Provider ECOM plugin with BM support
+//
+//
+
+/**
+ @file
+*/
+
+TARGET ipcpr.dll
+TARGETTYPE PLUGIN
+
+UID 0x10009D8D 0x102070ED
+VENDORID 0x70000001
+
+SOURCEPATH ../src
+SOURCE ipcprprovider.cpp ipcprfactory.cpp
+
+USERINCLUDE ../inc
+
+SYSTEMINCLUDE /epoc32/include
+SYSTEMINCLUDE /epoc32/include/ecom
+SYSTEMINCLUDE /epoc32/include/comms-infras
+
+START RESOURCE 102070ED.rss
+TARGET ipcpr.rsc
+END
+
+LIBRARY euser.lib esock.lib esocksvr.lib eintsock.lib insock.lib
+LIBRARY netmeta.lib
+LIBRARY agentdialog.lib
+LIBRARY commsdat.lib
+
+#include "comms-infras/commsdebugutility.mmh"
+
+CAPABILITY ALL -Tcb
+
+UNPAGED
+
+SMPSAFE
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipcpr/group/networking_ipcpr.history.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipcpr/group/networking_ipcpr.history.xml Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,12 @@
+
+
+
+
+ Enabling IAP commsdat records to be protected with the ECDPrivate attribute. This requires that the DHCP and DND components are assigned the ReadDeviceData privilege and that various changes are made to ensure hidden IAP records are visible to networking components which need to be able to read them.
+
+
+
+
+ Cause reconnect when RConnection::Start collides with Idle Timer Stop
+
+
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipcpr/group/networking_ipcpr.mrp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipcpr/group/networking_ipcpr.mrp Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,25 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+component networking_ipcpr
+source \sf\os\networkingsrv\networkcontrol\ipcpr
+binary \sf\os\networkingsrv\networkcontrol\ipcpr\group all
+exports \sf\os\networkingsrv\networkcontrol\ipcpr\group
+notes_source \component_defs\release.src
+
+
+ipr E
+
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipcpr/inc/MAppIdInfo.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipcpr/inc/MAppIdInfo.h Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,40 @@
+// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// MAppIdInfo definition file.
+//
+//
+
+/**
+ @file
+ @internalComponent
+*/
+
+#ifndef MAPPID_INFO_H
+#define MAPPID_INFO_H
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+const TUint32 KConnectionAppInfoInterfaceId = 0x102070EF;
+class MConnectionAppIdInfo
+/**
+ @internalComponent
+ @released Since 9.3
+ */
+{
+public:
+ // This function is used the get Secure ID of the application
+
+ virtual TUint32 GetAppSecureId() = 0;
+};
+#endif // SYMBIAN_NETWORKING_UMTSR5
+
+#endif // MAPPID_INFO_H
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipcpr/inc/ipcprfactory.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipcpr/inc/ipcprfactory.h Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,136 @@
+/**
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+
+/**
+ @file IPCPRFACTORY.H
+ @internalComponent
+*/
+
+#if !defined(__IPCPRFACTORY_H__)
+#define __IPCPRFACTORY_H__
+
+#include // CConnectionProviderFactoryBase, MCommsFactoryQuery
+#include // KAfInet
+#include // RGenConAgentDialogServer
+#include // __FLOG_DECLARATION_MEMBER
+
+const TUint KIPConnectionProviderFactoryId = KAfInet;
+
+class XConnectionIPFactoryQuery : public MCommsFactoryQuery
+ {
+public:
+ XConnectionIPFactoryQuery( CConnectionProviderBase* aConnectionProviderBase ) :
+ iConnectionProviderBase( aConnectionProviderBase )
+ {
+ }
+
+protected:
+ CConnectionProviderBase* iConnectionProviderBase;
+
+public:
+ virtual TMatchResult Match( TFactoryObjectInfo& aConnectionInfo );
+ };
+
+class CIPNetworkProviderFactory : public CConnectionProviderFactoryBase
+ {
+public:
+ static CIPNetworkProviderFactory* NewL(TAny* aParentContainer);
+
+protected:
+ CIPNetworkProviderFactory(TUint aFactoryId, CConnectionFactoryContainer& aParentContainer);
+ virtual CConnectionProviderBase* DoCreateProviderL();
+ virtual MProviderSelector* DoSelectProvider( Meta::SMetaData& aPreferences, ISelectionNotify& aSelectionNotify, const RMessagePtr2* aMessage );
+ virtual MProviderSelector* DoSelectNextLayerProvider( Meta::SMetaData& aPreferences, ISelectionNotify& aSelectionNotify, const RMessagePtr2* aMessage );
+ virtual void DoEnumerateConnectionsL(RPointerArray& aConnectionInfoPtrArray);
+ };
+
+class TCommIdList;
+namespace ESock
+ {
+ class CConnStart;
+ }
+namespace CommsDat
+ {
+ class CMDBSession;
+ class CCDGlobalSettingsRecord;
+ class CCDIAPPrioritySelectionPolicyRecord;
+ }
+
+class CIPConnectionSelector : public CActive, public MProviderSelector
+/** IP-layer connection selector. IP level factory creates
+these to intercept and complete the Shim layer selection
+it triggers.
+
+@internalComponent
+@released Since 9.1
+*/
+ {
+public:
+ TInt Select(Meta::SMetaData& aPreferences, const RMessagePtr2* aMessage);
+ void SelectComplete(CConnectionProviderBase* aConnProvider, TInt aError);
+ void ProgressNotification(TInt aStage, TInt aError);
+ void LayerUp(TInt aError);
+ void ServiceChangeNotification(TUint32 aId, const TDesC& aType);
+ void SubConnectionEvent(CSubConnectionProviderBase* aSubConnNextLayerProvider, const TSubConnectionEvent& aSubConnectionEvent);
+ void Detach();
+
+ virtual TInt Cancel();
+ virtual TInt Cancel(TInt aReason, const RMessage2* aMessage);
+
+ //Only my own factory can create me but the constructor may be public because noone can link against it anyway.
+ //My factory could be my friend and the constructor priate but then my factory could mistakenly delete me!
+ CIPConnectionSelector(ISelectionNotify& aNotify, CIPNetworkProviderFactory& aFactory);
+
+private:
+ virtual ~CIPConnectionSelector(); //Nobody should delete me! Only I can delete myself.
+
+ // From CActive
+ virtual void DoCancel();
+ virtual void RunL();
+ virtual TInt RunError(TInt aError);
+
+ // Helper functions
+ static TInt DestroyMyself(TAny* aSelf);
+ void SelectL(Meta::SMetaData& aPreferences);
+ void SelectLinkLayerL();
+ void FillListL(CommsDat::CCDIAPPrioritySelectionPolicyRecord& aPolicy);
+ CommsDat::CCDGlobalSettingsRecord* LoadGlobalSettingsRecordLC();
+ CommsDat::CCDIAPPrioritySelectionPolicyRecord* LoadPolicyRecordLC(TInt aAccessPoint);
+
+private:
+ //ISelectionNotify must be stored by value, cos' it's just a short-lived wrapper class.
+ //It doesn't exist as a someone that waits for the completion, but stores refereneces
+ //to the one that does.
+ ISelectionNotify iNotify;
+ CIPNetworkProviderFactory& iFactory;
+ MProviderSelector* iNextLayerSelector;
+ RGenConAgentDialogServer iDlgServ;
+ TUint32 iAPid;
+ RMessagePtr2 iSelectMessage;
+ CAsyncCallBack iAsyncDestructor;
+ CommsDat::CMDBSession* iDbs;
+ ESock::CConnStart* iConnStart;
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+ TSecureId iAppSecureId;
+#endif
+ __FLOG_DECLARATION_MEMBER;
+ TConnPref* iPrefs;
+ };
+
+#endif // __IPCPRFACTORY_H__
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipcpr/inc/ipcprprovider.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipcpr/inc/ipcprprovider.h Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,141 @@
+/**
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* This class is an example implementation of a bearer-mobile network session layer. It is intended as a guide only and does
+* not employ any advanced bearer selection algorithms.
+* This is part of an ECOM plug-in
+*
+*
+*/
+
+
+
+/**
+ @file IPCPRPROVIDER.H
+ @internalComponent
+*/
+
+#if !defined(__SS_IPCPRPROVIDER_H__)
+#define __SS_IPCPRPROVIDER_H__
+
+#include "ipcprfactory.h" // for CIPConnectionSelector
+#include
+#include
+#include // for CConnectionProviderBase and MConnectionControlClient
+#include // for KESockConnectionTag
+
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+
+#include "MAppIdInfo.h"
+
+#endif
+
+#define KIpcprTag KESockConnectionTag
+_LIT8(KIpcprSubTag, "ipcpr"); // logging tag
+
+
+
+
+class CConnectionSettings;
+/**
+ @internalComponent
+ @released Since 9.1
+ */
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+NONSHARABLE_CLASS(CIPNetworkConnectionProvider) : public CConnectionProviderBase, public MConnectionControlClient,
+ public MConnectionAppIdInfo
+ {
+#else // SYMBIAN_NETWORKING_UMTSR5
+
+NONSHARABLE_CLASS(CIPNetworkConnectionProvider) : public CConnectionProviderBase, public MConnectionControlClient
+ {
+
+#endif // SYMBIAN_NETWORKING_UMTSR5
+
+public:
+ static CIPNetworkConnectionProvider* NewL(CConnectionProviderFactoryBase& aFactory);
+
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+ // Interface from MConnectionAppIdInfo
+ virtual TUint32 GetAppSecureId();
+
+ void SetAppSecurId(TUint32 aSecureId);
+#endif // SYMBIAN_NETWORKING_UMTSR5
+
+protected:
+ CIPNetworkConnectionProvider(CConnectionProviderFactoryBase& aFactory) :
+ CConnectionProviderBase(aFactory)
+ {
+ __CFLOG_VAR((KIpcprTag, KIpcprSubTag, _L8("CIPNetworkConnectionProvider [this=%08x]:\tCIPNetworkConnectionProvider [MConnectionControlClient=%08x]"),
+ this, (MConnectionControlClient*)this));
+ }
+ ~CIPNetworkConnectionProvider();
+
+ /////////////////////////////////////////////////////////////////////////////
+ // from MConnectionControlClient
+ virtual void ConnectionGoingDown(CConnectionProviderBase& aConnProvider);
+ virtual void ProgressNotification(TInt aStage, TInt aError);
+ virtual void ConnectionError(TInt aStage, TInt aError);
+ virtual void ServiceChangeNotification(TUint32 aId, const TDesC& aType);
+ virtual void SubConnectionEvent(CSubConnectionProviderBase* aSubConnNextLayerProvider, const TSubConnectionEvent& aSubConnectionEvent);
+ virtual void LayerUp(TInt aError);
+ virtual TCtlType CtlType() const;
+
+ ////////////////////////////////////////////////////////////////////////////
+ // from CConnectionProviderBase
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+ virtual TAny* DoFetchInterfaceInstanceL( const STypeId& aTid );
+#endif
+
+ virtual void DoDataClientJoiningL(MConnectionDataClient& aDataClient);
+ virtual void DoDataClientLeaving(MConnectionDataClient& aDataClient);
+ virtual void DoControlClientJoiningL(MConnectionControlClient& aControlClient);
+ virtual void DoControlClientLeaving(MConnectionControlClient& aControlClient);
+
+ virtual void DoStartL(Meta::SMetaData& aParams, const RMessagePtr2* aMessage);
+ virtual TInt DoStop(TInt aError, const RMessagePtr2* aMessage);
+
+ virtual void DoProgressL(Meta::SMetaData& aBuffer) const;
+ virtual void DoLastProgressError(Meta::SMetaData& aBuffer);
+ virtual void DoRequestServiceChangeNotificationL();
+ virtual void DoCancelServiceChangeNotification();
+ virtual void DoControlL(TUint aOptionLevel, TUint aOptionName, Meta::SMetaData& aOption, const RMessagePtr2* aMessage);
+ virtual TInt DoAllSubConnectionNotificationEnable();
+ virtual TInt DoCancelAllSubConnectionNotification();
+ virtual void DoSendIoctlMessageL(const RMessage2& aMessage);
+ virtual void DoSendCancelIoctl();
+ virtual TInt DoEnumerateSubConnectionsL(TUint& aCount);
+ virtual TUint DoEnumerateClientsL(HBufC8*& aClientInfoBuffer, TEnumClients aClientType);
+ virtual void DoConnectionControlActivityL( TControlActivity aControlActivity, const Meta::SMetaData* aData, const RMessagePtr2* aMessage );
+
+ virtual CConnectionSettings& DoSettingsAccessL();
+
+ virtual TInt DoCanDoSubConnection(RSubConnection::TSubConnType aSubConnType) const;
+
+ virtual CConnectionProviderBase* DoNextLayer() const;
+ virtual void DoJoinNextLayerL(CConnectionProviderBase* aNextLayer);
+
+protected:
+ void UpdateUsageProfile(MConnectionControlClient* aControlClient);
+
+private:
+ CConnectionProviderBase* iShimCpr;
+ TMetaDes8* iMDes;
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+ // Added as per the requirements of PREQ 635 to block sockets
+ TUint32 iAppSecureId;
+#endif // SYMBIAN_NETWORKING_UMTSR5
+ };
+
+#endif // __SS_IPCPRPROVIDER_H__
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipcpr/src/102070ED.rss
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipcpr/src/102070ED.rss Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,60 @@
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// Registry info for IP Networking Connection Provider plug-in
+//
+//
+
+/**
+ @file 102070ED.RSS
+*/
+
+#include
+
+RESOURCE REGISTRY_INFO theInfo
+{
+dll_uid = 0x102070ED;
+interfaces =
+ {
+ INTERFACE_INFO
+ {
+ interface_uid = 0x102070EE;
+ implementations =
+ {
+ IMPLEMENTATION_INFO
+ {
+ implementation_uid = 0x102070EF;
+ version_no = 1;
+ display_name = "IP Networking Connection Provider Factory";
+ default_data = "IpConnectionProviderFactory";
+ opaque_data = "";
+ }
+ };
+ },
+ INTERFACE_INFO
+ {
+ interface_uid = 0x102070F0;
+ implementations =
+ {
+ IMPLEMENTATION_INFO
+ {
+ implementation_uid = 0x102070F1;
+ version_no = 1;
+ display_name = "IP Networking Connection Provider";
+ default_data = "IpConnectionProvider";
+ opaque_data = "";
+ }
+ };
+ }
+ };
+}
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipcpr/src/ipcprfactory.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipcpr/src/ipcprfactory.cpp Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,486 @@
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// This is part of an ECOM plug-in
+//
+//
+
+#include
+#include "ipcprfactory.h" // CIPNetworkProviderFactory
+#include "ipcprprovider.h"
+#include // KCommsNetworkLayerId
+#include
+#include
+#include
+#include // TConnPref
+#include // CommsDat
+#include
+#include //KAfInet
+
+using namespace CommsDat;
+using namespace ESock;
+
+const TInt KIPConnectionProviderImplementationUid=0x102070EF;
+
+/**
+Data required for instantiating ECOM Plugin
+*/
+const TImplementationProxy ImplementationTable[] =
+ {
+ IMPLEMENTATION_PROXY_ENTRY(KIPConnectionProviderImplementationUid, CIPNetworkProviderFactory::NewL)
+ };
+
+/**
+ECOM Implementation Factory
+*/
+EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
+ {
+ aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
+ return ImplementationTable;
+ }
+
+CIPNetworkProviderFactory* CIPNetworkProviderFactory::NewL(TAny* aParentContainer)
+ {
+ return new (ELeave) CIPNetworkProviderFactory(KIPConnectionProviderFactoryId, *(reinterpret_cast(aParentContainer)));
+ }
+
+CIPNetworkProviderFactory::CIPNetworkProviderFactory(TUint aFactoryId, CConnectionFactoryContainer& aParentContainer)
+ : CConnectionProviderFactoryBase(aFactoryId,aParentContainer)
+ {
+ }
+
+CConnectionProviderBase* CIPNetworkProviderFactory::DoCreateProviderL()
+ {
+ return CIPNetworkConnectionProvider::NewL(*this);
+ }
+
+MProviderSelector* CIPNetworkProviderFactory::DoSelectProvider( Meta::SMetaData& aPreferences, ISelectionNotify& aSelectionNotify, const RMessagePtr2* aMessage )
+ {
+ //create self destructing object to select a provider
+ CIPConnectionSelector* selector = new CIPConnectionSelector(aSelectionNotify,*this);
+ TInt error;
+ if (selector == 0)
+ {
+ error = KErrNoMemory;
+ }
+ else
+ {
+ error = selector->Select(aPreferences, aMessage);
+ }
+
+ if (error != KErrNone)
+ {
+ aSelectionNotify.SelectComplete(0, error);
+ selector = NULL; //The selector will delete itself.
+ }
+
+
+ return selector;
+ }
+
+MProviderSelector* CIPNetworkProviderFactory::DoSelectNextLayerProvider( Meta::SMetaData& aPreferences, ISelectionNotify& aSelectionNotify, const RMessagePtr2* /*aMessage*/ )
+ {//at the moment always uses the CConnectionProviderFactoryShim::SelectProviderL
+ (void)aPreferences;
+ (void)aSelectionNotify;
+ return NULL;
+ }
+
+void CIPNetworkProviderFactory::DoEnumerateConnectionsL(RPointerArray& aConnectionInfoPtrArray)
+ {
+ CConnectionFactoryContainer* connectionFactories = SockManGlobals::Get()->iConnectionFactories;
+ ASSERT(connectionFactories);
+ CConnectionProviderFactoryBase* factory = connectionFactories->FindFactory(KShimConnectionProviderFactoryId);
+ ASSERT(factory);
+ factory->EnumerateConnectionsL(aConnectionInfoPtrArray);
+ }
+
+
+//CIPConnectionSelector--
+TInt CIPConnectionSelector::Cancel()
+ {
+ return Cancel(KErrCancel,NULL);
+ }
+
+TInt CIPConnectionSelector::Cancel(TInt aReason, const RMessage2* aMessage)
+ {
+ CActive::Cancel(); // There may be an outstanding selection request.
+
+ //CIPConnectionSelector will be deleted from Detach().
+ //Detach will always be called as a result of Cancel() in the same call stack,
+ //but only after all progress notifications have been passed up towards the
+ //CConnection.
+ TInt ret = KErrNotReady;
+ if(iNextLayerSelector !=NULL)
+ {
+ ret = iNextLayerSelector->Cancel(aReason, aMessage);
+ }
+
+ iNotify.Detach(); //"PrevLayer"::Detach() will be called only once in the same call stack.
+ return ret;
+ }
+
+TInt CIPConnectionSelector::Select(Meta::SMetaData& aPreferences, const RMessagePtr2* aMessage)
+ {
+ __FLOG_OPEN(KIpcprTag, KIpcprSubTag);
+ __FLOG_1(_L8("CIPConnectionSelector::Select() %08x"), this);
+
+ STypeId tId = STypeId::CreateSTypeId(aPreferences.GetTypeId());
+ ASSERT(tId.iUid.iUid == KESockMessagesImplementationUid);
+ ASSERT(tId.iType == EESockMessageConnStart);
+
+ if (aMessage)
+ iSelectMessage = *aMessage; // aMessage will be passed on to shim
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+ //Here secure Id of application is stored and will be kept with
+ if(!iSelectMessage.IsNull())
+ {
+ iAppSecureId=iSelectMessage.SecureId();
+ }
+#endif // SYMBIAN_NETWORKING_UMTSR5
+
+ TRAPD(r, SelectL(aPreferences));
+
+ if (r!=KErrNone && iNextLayerSelector==NULL)
+ {
+ __FLOG_1(_L8("Error during selection of current - should detech now %08x"), this);
+ Detach();
+ return r;
+ }
+
+ TRAP(r,SelectLinkLayerL());
+ if (r != KErrNone)
+ {
+ __FLOG_1(_L8("Error during select of link layer - detach should be called by the link layer %08x"), this);
+ }
+
+ return r;
+ }
+
+void CIPConnectionSelector::SelectL(Meta::SMetaData& aPreferences)
+ {
+ ASSERT(iDbs==0);
+#ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
+ iDbs = CMDBSession::NewL(KCDVersion1_2);
+#else
+ iDbs = CMDBSession::NewL(KCDVersion1_1);
+#endif
+
+ // Reveal hidden or private IAP records if a licensee has chosen to protect a record
+ // using one of these flags - the API to do this is public so internal components
+ // have to support the use of such records.
+ iDbs->SetAttributeMask( ECDHidden | ECDPrivate );
+
+ ASSERT(iConnStart==0);
+ iConnStart = CConnStart::NewL();
+ iConnStart->Copy(aPreferences);
+
+ // Get "defaultSnap" and "promptForSnap" from CommsDat.
+ CCDGlobalSettingsRecord* gs = LoadGlobalSettingsRecordLC();
+ TBool promptForSnap = gs->iPromptForSnap;
+ iAPid = gs->iDefaultSnap; // Unless reassigned, iAPid becomes the default access point.
+ CleanupStack::PopAndDestroy(gs);
+
+ __FLOG_STMT(_LIT(K, "SelectL() Prompt%d Def%d"));
+ __FLOG_2(K, promptForSnap, iAPid);
+
+ if (iAPid != 0)
+ // System is access point aware.
+ {
+ TConnStartType selectType(iConnStart->StartType());
+ TConnPref* selectPrefs = iConnStart->ConnPrefs();
+
+ if (selectType == EConnStartImplicit ||
+ selectPrefs == 0 || selectPrefs->ExtensionId() == TConnPref::EConnPrefUnknown)
+ // Use default access point or dialogue if enabled.
+ {
+ __FLOG_STMT(_LIT(K, "SelectL() Default Type%d Prefs%d"));
+ __FLOG_2(K, selectType, selectPrefs);
+
+ // Use the default access point unless promptForSnap is ETrue in which case prompt
+ // for the access point.
+ if (promptForSnap)
+ {
+ User::LeaveIfError(iDlgServ.Connect());
+ iDlgServ.AccessPointConnection(iAPid,KAfInet,iStatus);
+ SetActive();
+ return; // Don't do selection until RunL() gets the dialogue results.
+ }
+
+ CCDIAPPrioritySelectionPolicyRecord* policy = LoadPolicyRecordLC(iAPid);
+ FillListL(*policy);
+ CleanupStack::PopAndDestroy(policy);
+ }
+ else if (selectPrefs && selectPrefs->ExtensionId() == TConnPref::EConnPrefSnap)
+ // Use access point id from preferences.
+ {
+ iAPid = static_cast(selectPrefs)->Snap();
+
+ __FLOG_STMT(_LIT(K, "SelectL() Type%d TConnPrefSnap AccessPoint%d "));
+ __FLOG_2(K, selectType, iAPid);
+
+ CCDIAPPrioritySelectionPolicyRecord* policy = LoadPolicyRecordLC(iAPid);
+ FillListL(*policy);
+ CleanupStack::PopAndDestroy(policy);
+ }
+ }
+ }
+
+void CIPConnectionSelector::FillListL(CCDIAPPrioritySelectionPolicyRecord& aPolicy)
+ {
+ __FLOG_0(_L("FillListL()"));
+
+ // Make sure we have the TCommIdList.
+
+ // Create the new Prefs on the heap so that they are always available
+ // even in the asynchronous promptForSnap Active Object callback
+ // The copy of the original Prefs are overwritten here
+ // The original Prefs are deleted in esock.
+ // The new Prefs are deleted on destruction of CIPConnectionSelector
+
+ iConnStart->SetConnPrefs(NULL);
+ iConnStart->SetConnPrefs(new (ELeave) TCommIdList);
+
+ // Store Prefs for deletion on destruction of CIPConnectionSelector
+ ASSERT(iPrefs==0);
+ iPrefs = iConnStart->ConnPrefs();
+
+ TCommIdList& list = *static_cast(iPrefs);
+
+ CMDBRecordLink* theIap = &aPolicy.iIap1;
+ CMDBField* theCount = &aPolicy.iIapCount;
+ TInt count = static_cast(*theCount);
+ if (count > CCDIAPPrioritySelectionPolicyRecord::EMaxNrOfIaps)
+ {
+ // The number of IAP's specified is more than allowed. Fix your table :-)
+ ASSERT(EFalse);
+ count = CCDIAPPrioritySelectionPolicyRecord::EMaxNrOfIaps;
+ }
+ for (TInt i = 0; i < count; i++, theIap++)
+ {
+ TInt theIapNumber = static_cast(*theIap);
+ ASSERT(theIapNumber>0);
+ __FLOG_STMT(_LIT(K, "aList[%d].Append(%d)"));
+ __FLOG_2(K, list.Count(), theIapNumber);
+ list.Append(theIapNumber);
+ }
+ }
+
+void CIPConnectionSelector::SelectLinkLayerL()
+ {
+ CConnectionFactoryContainer* connectionFactories = SockManGlobals::Get()->iConnectionFactories;
+ ASSERT(connectionFactories);
+ CConnectionProviderFactoryBase* factory = connectionFactories->FindFactory(KShimConnectionProviderFactoryId);
+ ASSERT(factory);
+ ISelectionNotify selectNotify( this, TSelectionNotify::SelectComplete,
+ TProgressNotify::ProgressNotification,
+ TServiceChangeNotify::ServiceChangeNotification,
+ TLayerUp::LayerUp,
+ TSubConnectionEventTmpl::SubConnectionEvent, NULL);
+ selectNotify.RegisterDetach(TDetachNotify::Detach);
+
+ if (iNextLayerSelector!=NULL)
+ iNextLayerSelector->Cancel();
+
+ // Select next (link) layer's provider.
+ ASSERT(iNextLayerSelector==NULL);
+ ASSERT(iConnStart!=NULL);
+
+ iNextLayerSelector = factory->SelectProvider(*iConnStart, selectNotify, iSelectMessage.IsNull()? NULL : &iSelectMessage);
+
+ if (iNextLayerSelector == NULL)
+ {
+ User::Leave(KErrGeneral);
+ }
+
+ }
+
+void CIPConnectionSelector::SelectComplete(CConnectionProviderBase* aConnProvider, TInt aError)
+ {
+ CIPNetworkConnectionProvider* connProvider = NULL;
+ if (aError == KErrNone)
+ {
+ ASSERT(aConnProvider);
+ XConnectionIPFactoryQuery query(aConnProvider);
+
+ TRAP( aError, connProvider = static_cast(iFactory.FindOrCreateProviderL(query)));
+ if (aError == KErrNone && connProvider->NextLayer() == NULL)
+ {
+
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+ // This piece of code is added to keep the information about the application secure ID in the
+ // IP Connection provider. So that when the information is required form the subconnection provider
+ // we can do a fetch interface and get the App Secure ID to decide on to the Socket Blocking
+
+ connProvider->SetAppSecurId(iAppSecureId.iId);
+
+
+#endif // SYMBIAN_NETWORKING_UMTSR5
+
+ // The factory returned a new instance - must set the lower layer.
+ TRAP(aError,connProvider->JoinNextLayerL(aConnProvider));
+ }
+ }
+ iNotify.SelectComplete(connProvider, aError);
+ }
+
+void CIPConnectionSelector::ProgressNotification(TInt aStage, TInt aError)
+ {
+ //The original ISelectionNotifier (iNotify) might be interested in the
+ //progress, but we aren't.
+ iNotify.ProgressNotification(aStage, aError);
+ }
+
+void CIPConnectionSelector::LayerUp(TInt aError)
+ {
+ iNotify.LayerUp(aError);
+ }
+
+void CIPConnectionSelector::SubConnectionEvent(CSubConnectionProviderBase* aSubConnNextLayerProvider, const TSubConnectionEvent& aSubConnectionEvent)
+ {
+ iNotify.SubConnectionEvent(aSubConnNextLayerProvider, aSubConnectionEvent);
+ }
+
+void CIPConnectionSelector::ServiceChangeNotification(TUint32 aId, const TDesC& aType)
+ {
+ //The original ISelectionNotifier (iNotify) might be interested in the
+ //notification, but we aren't.
+ iNotify.ServiceChangeNotification(aId, aType);
+ }
+
+void CIPConnectionSelector::Detach()
+ {
+ iNextLayerSelector = NULL;
+ //Ensure the asynch destructor is ready to use.
+ //If its not, then we have probably been already deleted which should never happen.
+ //Detach is the only place we should be deleted from.
+ ASSERT(!iAsyncDestructor.IsActive());
+ __FLOG_1(_L8("CIPConnectionSelector %08x::Detach()"), this);
+ iAsyncDestructor.Call();
+ }
+
+CIPConnectionSelector::CIPConnectionSelector(ISelectionNotify& aNotify, CIPNetworkProviderFactory& aFactory)
+: CActive(CActive::EPriorityUserInput),
+ iNotify(aNotify),
+ iFactory(aFactory),
+ iAsyncDestructor(CActive::EPriorityLow)
+ {
+ __FLOG_1(_L8("CIPConnectionSelector %08x::CIPConnectionSelector()"), this);
+ CActiveScheduler::Add(this);
+ iAsyncDestructor.Set(TCallBack(CIPConnectionSelector::DestroyMyself, this));
+
+ }
+
+TInt CIPConnectionSelector::DestroyMyself(TAny* aSelf)
+ {
+ delete static_cast(aSelf);
+ return KErrNone;
+ }
+
+CIPConnectionSelector::~CIPConnectionSelector()
+ {
+ __FLOG_CLOSE;
+ CActive::Cancel(); // There may be an outstanding selection request.
+
+ // This destructor is private and is meant to be called asynchronously via Detach() or Cancel() only.
+ // If is was called from anywhere else, the iNextLayerSelector would not be deleted!
+ // Please note that deleting iNextLayerSelector here needs revision on the link layer selectors,
+ // and specifically of the shim selector which - in such case - must not call Detach from its
+ // synchronous destructor!
+ ASSERT(iNextLayerSelector==NULL); // If still a valid pointer - probably not called via Detach() or Cancel().
+
+ delete iDbs;
+
+ // Tidy up iConnStart and related objects
+ delete iPrefs;
+ delete iConnStart;
+
+ iDlgServ.Close();
+
+ // Notify detach.
+ iNotify.Detach();
+ }
+
+void CIPConnectionSelector::RunL()
+ // The dialogue has been presented.
+ // Normally completes with KErrNone or KErrCancel
+ // Could, however, complete with another system error e.g. KErrOutOfMemory
+ {
+ __FLOG_STMT(_LIT(K, "RunL() Err%d Snap%d"));
+ __FLOG_2(K, iStatus.Int(), iAPid);
+
+ User::LeaveIfError(iStatus.Int());
+ ASSERT(iAPid); //Should not be 0 now.
+ CCDIAPPrioritySelectionPolicyRecord* policy = LoadPolicyRecordLC(iAPid);
+ FillListL(*policy);
+ CleanupStack::PopAndDestroy(policy);
+ SelectLinkLayerL();
+ }
+
+TInt CIPConnectionSelector::RunError(TInt aError)
+ // Either the dialogue, the FillListL() or the SelectLinkLayerL() failed.
+ // In each case the selection request is completed with the apropriate result code.
+ {
+ iNotify.SelectComplete(0, aError);
+
+ //If we have failed before the call to iNextLayerSelector->Select() or it wasn't successful
+ //we need to initiate the detach sequence by calling Detach().
+ if (iNextLayerSelector==NULL)
+ {
+ Detach(); //It will result in self deletion.
+ }
+ return KErrNone;
+ }
+
+void CIPConnectionSelector::DoCancel()
+ {
+ iDlgServ.CancelAccessPointConnection();
+ }
+
+CCDGlobalSettingsRecord* CIPConnectionSelector::LoadGlobalSettingsRecordLC()
+ {
+ CCDGlobalSettingsRecord* gs = static_cast(CCDConnectionPrefsRecord::RecordFactoryL(KCDTIdGlobalSettingsRecord));
+ CleanupStack::PushL(gs);
+ gs->SetRecordId(1);
+ gs->LoadL(*iDbs);
+ ASSERT(gs->iDefaultSnap.TypeId() == KCDTIdDefaultSnap); // Panics if built against incorrect CommsDat.
+ return gs;
+ }
+
+CCDIAPPrioritySelectionPolicyRecord* CIPConnectionSelector::LoadPolicyRecordLC(TInt aAccessPoint)
+ {
+ // Get access point from CommsDat.
+ CCDAccessPointRecord* apRecord = static_cast
+ (CCDConnectionPrefsRecord::RecordFactoryL(KCDTIdAccessPointRecord));
+ CleanupStack::PushL(apRecord);
+ apRecord->SetRecordId(aAccessPoint);
+ apRecord->LoadL(*iDbs);
+ TUint32 policyNumber = apRecord->iSelectionPolicy;
+ CleanupStack::PopAndDestroy(apRecord);
+
+ ASSERT((policyNumber & KCDMaskShowRecordType) == KCDTIdIapPrioritySelectionPolicyRecord);
+
+ CCDIAPPrioritySelectionPolicyRecord* policy = static_cast
+ (CCDConnectionPrefsRecord::RecordFactoryL(KCDTIdIapPrioritySelectionPolicyRecord));
+ CleanupStack::PushL(policy);
+ policy->SetElementId(policyNumber);
+ policy->LoadL(*iDbs);
+ return policy;
+ }
+
+MCommsFactoryQuery::TMatchResult XConnectionIPFactoryQuery::Match( TFactoryObjectInfo& aProviderInfo )
+ {
+ CConnectionProviderBase* prov = static_cast(aProviderInfo.iInfo.iFactoryObject);
+ //if the next layer is the same as the one returned by the shim selection we have a match
+ return prov->NextLayer() == iConnectionProviderBase ? EMatch : EContinue;
+ }
+
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipcpr/src/ipcprprovider.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipcpr/src/ipcprprovider.cpp Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,411 @@
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// This class is an example implementation of a bearer-mobile network session. It is intended as a guide only and does
+// not employ any advanced bearer selection algorithms. It is envisaged that users of these classes will want to derive their own
+// implementations from CIPNetworkSession.
+// This is part of an ECOM plug-in
+//
+//
+
+#include "ipcprprovider.h" // for CIPNetworkConnectionProvider
+#include
+
+CIPNetworkConnectionProvider* CIPNetworkConnectionProvider::NewL(CConnectionProviderFactoryBase& aFactory)
+ {
+ CIPNetworkConnectionProvider* p = new (ELeave) CIPNetworkConnectionProvider(aFactory);
+ CleanupStack::PushL(p);
+ p->iMDes = TMetaDes8::NewL(NULL);
+ CleanupStack::Pop(p);
+ __CFLOG_VAR((KIpcprTag, KIpcprSubTag, _L8("CIPNetworkConnectionProvider::NewL() %08x"), p));
+ return p;
+ }
+
+CIPNetworkConnectionProvider::~CIPNetworkConnectionProvider()
+ {
+ __CFLOG_VAR((KIpcprTag, KIpcprSubTag, _L8("CIPNetworkConnectionProvider %08x:\t~CIPNetworkConnectionProvider"), this));
+ delete iMDes;
+ if (iShimCpr)
+ {
+ iShimCpr->Leave(*this);
+ }
+ }
+
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+
+TUint32 CIPNetworkConnectionProvider::GetAppSecureId()
+ {
+ return iAppSecureId;
+ }
+
+void CIPNetworkConnectionProvider::SetAppSecurId(TUint32 aSecureId)
+ {
+ iAppSecureId = aSecureId;
+ }
+
+TAny* CIPNetworkConnectionProvider::DoFetchInterfaceInstanceL( const STypeId& aTid )
+ {
+ STypeId typeId = STypeId::CreateSTypeId(KConnectionAppInfoInterfaceId,0);
+ if (typeId == aTid)
+ {
+ MConnectionAppIdInfo* ipcpr = static_cast(this);
+ return ipcpr;
+ }
+ return NULL;
+ }
+
+#endif // SYMBIAN_NETWORKING_UMTSR5
+//
+// from MConnectionControlClient
+void CIPNetworkConnectionProvider::ConnectionGoingDown(CConnectionProviderBase& aConnProvider)
+ {
+ __CFLOG_VAR((KIpcprTag, KIpcprSubTag, _L8("CIPNetworkConnectionProvider %08x:\tConnectionGoingDown(aConnProvider %08x)"), this, &aConnProvider));
+ if (&aConnProvider == iShimCpr)
+ {
+ iShimCpr = NULL;
+ DeleteMeNow();
+ }
+ }
+
+void CIPNetworkConnectionProvider::ProgressNotification(TInt aStage, TInt aError)
+ {
+ __CFLOG_VAR((KIpcprTag, KIpcprSubTag, _L8("CIPNetworkConnectionProvider %08x:\tProgressNotification(aStage %d aError %d)"), this, aStage, aError));
+ TInt max = iControlClients.Count();
+ for (TInt i = max - 1 ; i >= 0 ; i--)
+ {
+ iControlClients[i]->ProgressNotification(aStage, aError);
+ }
+ }
+
+void CIPNetworkConnectionProvider::ConnectionError(TInt aStage, TInt aError)
+ {
+ __CFLOG_VAR((KIpcprTag, KIpcprSubTag, _L8("CIPNetworkConnectionProvider %08x:\tConnectionError(aStage %d aError %d)"), this, aStage, aError));
+ TInt max = iControlClients.Count();
+ for (TInt i = max - 1 ; i >= 0 ; i--)
+ {
+ iControlClients[i]->ConnectionError(aStage, aError);
+ }
+ max = iDataClients.Count();
+ for (TInt i = max - 1 ; i >= 0 ; i--)
+ {
+ iDataClients[i]->ConnectionError(aStage, aError);
+ }
+ }
+
+void CIPNetworkConnectionProvider::ServiceChangeNotification(TUint32 aId, const TDesC& aType)
+ {
+ __CFLOG_VAR((KIpcprTag, KIpcprSubTag, _L8("CIPNetworkConnectionProvider %08x:\tServiceChangeNotification(aId %u aType %s)"), this, aId, &aType));
+ TInt max = iControlClients.Count();
+ for (TInt i = max - 1 ; i >= 0 ; i--)
+ {
+ iControlClients[i]->ServiceChangeNotification(aId, aType);
+ }
+ }
+
+void CIPNetworkConnectionProvider::SubConnectionEvent(CSubConnectionProviderBase* aSubConnNextLayerProvider, const TSubConnectionEvent& aSubConnectionEvent)
+ {
+ TInt max = iControlClients.Count();
+ for (TInt i = max - 1 ; i >= 0 ; i--)
+ {
+ iControlClients[i]->SubConnectionEvent(aSubConnNextLayerProvider, aSubConnectionEvent);
+ }
+ }
+
+void CIPNetworkConnectionProvider::LayerUp(TInt aError)
+ {
+ TInt max = iControlClients.Count();
+ for (TInt i = max - 1 ; i >= 0 ; --i)
+ {
+ iControlClients[i]->LayerUp(aError);
+ }
+
+ // broadcast the event to the data clients also, sideways
+ max = iDataClients.Count();
+ for (TInt j = max - 1; j >= 0 ; --j)
+ {
+ iDataClients[j]->Notify(MConnectionDataClient::ENotifyLayerUp, this, aError, NULL);
+ }
+ }
+
+MConnectionControlClient::TCtlType CIPNetworkConnectionProvider::CtlType() const
+ {
+ return MConnectionControlClient::ENormal;
+ }
+
+//
+// from CConnectionProviderBase
+void CIPNetworkConnectionProvider::DoDataClientJoiningL(MConnectionDataClient& aDataClient)
+ {
+ (void)(aDataClient);
+ UpdateUsageProfile(NULL);
+ __CFLOG_VAR((KIpcprTag, KIpcprSubTag, _L8("CIPNetworkConnectionProvider [this=%08x]:\tDoDataClientJoiningL [iDataClients.Count=%d] [aDataClient=%08x]"), this, iDataClients.Count(), &aDataClient));
+ }
+
+void CIPNetworkConnectionProvider::DoDataClientLeaving(MConnectionDataClient& aDataClient)
+ {
+ (void)(aDataClient);
+ UpdateUsageProfile(NULL);
+ __CFLOG_VAR((KIpcprTag, KIpcprSubTag, _L8("CIPNetworkConnectionProvider [this=%08x]:\tDoDataClientLeaving [iDataClients.Count=%d] [aDataClient=%08x]"), this, iDataClients.Count(), &aDataClient));
+ }
+
+void CIPNetworkConnectionProvider::DoControlClientJoiningL(MConnectionControlClient& aControlClient)
+ {
+ (void)(aControlClient);
+ UpdateUsageProfile(NULL);
+ __CFLOG_VAR((KIpcprTag, KIpcprSubTag, _L8("CIPNetworkConnectionProvider [this=%08x]:\tDoControlClientJoiningL [iControlClients.Count=%d] [aControlClient=%08x]"), this, iControlClients.Count(), &aControlClient));
+ }
+
+void CIPNetworkConnectionProvider::DoControlClientLeaving(MConnectionControlClient& aControlClient)
+ {
+ UpdateUsageProfile(&aControlClient);
+ __CFLOG_VAR((KIpcprTag, KIpcprSubTag, _L8("CIPNetworkConnectionProvider [this=%08x]:\tDoControlClientLeaving [iControlClients.Count=%d] [aControlClient=%08x]"), this, iControlClients.Count(), &aControlClient));
+ }
+
+void CIPNetworkConnectionProvider::UpdateUsageProfile(MConnectionControlClient* aControlClient)
+/**
+Update the Usage Profile if there has been a change in the RConnection's or Sessions associated
+with this provider.
+@param aControlClient A control client that should be ignored when calculating the usage profile.
+*/
+ {
+ TUint usageProfile = 0;
+ TInt ignoredClient = 0;
+
+ TInt max = iControlClients.Count();
+ TInt nConnectionMonitorCount = 0;
+ TInt nSessionCount = 0;
+ for (TInt n = 0; n < max; n++)
+ {
+ MConnectionControlClient* client = iControlClients[n];
+
+ // Ignore the control client passed as argument (it is the one about to leave).
+ if (!aControlClient || aControlClient != client)
+ {
+ MConnectionControlClient::TCtlType type = client->CtlType();
+ switch (type)
+ {
+ case MConnectionControlClient::EMonitor:
+ nConnectionMonitorCount++;
+ break;
+ case MConnectionControlClient::ESession:
+ nSessionCount++;
+ break;
+ }
+ }
+ else
+ {
+ ASSERT(ignoredClient == 0);
+ ignoredClient = 1;
+ }
+ }
+
+ // Assert that aControlClient, if specified, is in iControlClients[]
+ ASSERT(aControlClient == NULL || ignoredClient == 1);
+
+ if (max - ignoredClient > nConnectionMonitorCount)
+ usageProfile |= KConnProfileMedium;
+
+ if (nSessionCount > 0)
+ usageProfile |= KConnProfileLong;
+
+ if (iShimCpr)
+ {
+ TBuf8 buf;
+ buf.AppendNum(usageProfile);
+
+ //Meta derived buffer (iMDes) is only used here to pass
+ //the usageProfile down to the shimcpr
+ iMDes->iDes = &buf;
+
+ //ESetUsageProfile operation cannot leave in fact=>
+ //=>the trap here just to make leavescan happy
+ TRAP_IGNORE(iShimCpr->ConnectionControlActivityL(ESetUsageProfile, iMDes, NULL));
+
+ //iMDes->iDes will not be used ever again but we clean it so that it is clear
+ iMDes->iDes = NULL;
+ }
+ }
+
+void CIPNetworkConnectionProvider::DoStartL(Meta::SMetaData& aParams, const RMessagePtr2* aMessage)
+ {
+ if (iShimCpr)
+ {
+ iShimCpr->StartL(aParams, aMessage);
+ }
+ else
+ {
+ User::Leave(KErrNotReady);
+ }
+ }
+
+TInt CIPNetworkConnectionProvider::DoStop(TInt aError, const RMessagePtr2* aMessage)
+ {
+ return iShimCpr ? iShimCpr->Stop(aError, aMessage) : KErrNotReady;
+ }
+
+void CIPNetworkConnectionProvider::DoProgressL(Meta::SMetaData& aBuffer) const
+ {
+ if (iShimCpr)
+ {
+ iShimCpr->ProgressL(aBuffer);
+ }
+ }
+
+void CIPNetworkConnectionProvider::DoLastProgressError(Meta::SMetaData& aBuffer)
+ {
+ if (iShimCpr)
+ {
+ iShimCpr->LastProgressError(aBuffer);
+ }
+ }
+
+void CIPNetworkConnectionProvider::DoRequestServiceChangeNotificationL()
+ {
+ if (iShimCpr)
+ {
+ iShimCpr->RequestServiceChangeNotificationL();
+ }
+ }
+
+void CIPNetworkConnectionProvider::DoCancelServiceChangeNotification()
+ {
+ if (iShimCpr)
+ {
+ iShimCpr->CancelServiceChangeNotification();
+ }
+ }
+
+void CIPNetworkConnectionProvider::DoControlL(TUint aOptionLevel, TUint aOptionName, Meta::SMetaData& aOption, const RMessagePtr2* aMessage)
+ {
+ if (iShimCpr)
+ {
+ iShimCpr->ControlL(aOptionLevel, aOptionName, aOption, aMessage);
+ }
+ else
+ {
+ User::Leave(KErrNotReady);
+ }
+ }
+
+TInt CIPNetworkConnectionProvider::DoEnumerateSubConnectionsL(TUint& aCount)
+ {
+ return iShimCpr ? iShimCpr->EnumerateSubConnectionsL(aCount) : KErrNotReady;
+ }
+
+TUint CIPNetworkConnectionProvider::DoEnumerateClientsL(HBufC8*& aClientInfoBuffer, TEnumClients aClientType)
+/**
+Returns information about the clients of this Interface
+
+@param aCount on return contains the number of clients using this Interface
+@param aClientInfoBuffer on return contains a TPckg<> containing information about each client
+@exception leaves with KErrNoMemory if memory allocation fails
+*/
+ {
+ const TInt KInfoBufMaxLength = 1024; //is this large enough?
+ TBuf8 infoBuf;
+
+ TUint count = 0;
+ STypeId tid = STypeId::CreateSTypeId(KConnectionClientExtUid,EConnectionClientDesc);
+ TInt max = iControlClients.Count();
+ for ( TInt n = 0; n < max; n++ )
+ {
+ MConnectionClientDesc* intf = reinterpret_cast(iControlClients[n]->FetchInterfaceInstanceL(*this,tid));
+ if ( intf )
+ {
+ TConnectionProcessInfo cinfo;
+ cinfo.GetInfoL(aClientType, count, *intf, infoBuf);
+ }
+ }
+ STypeId tid2 = STypeId::CreateSTypeId(KConnectionClientExtUid,EConnectionEnumerateClients);
+ max = iDataClients.Count();
+ for ( TInt n = 0; n < max; n++ )
+ {
+ MConnectionEnumerateClients* intf = reinterpret_cast(iDataClients[n]->FetchInterfaceInstanceL(*this,tid2));
+ if ( intf )
+ {
+ intf->EnumerateClientsL(count, infoBuf, aClientType);
+ }
+ }
+
+ aClientInfoBuffer = infoBuf.AllocL();
+ return count;
+ }
+
+void CIPNetworkConnectionProvider::DoConnectionControlActivityL( CConnectionProviderBase::TControlActivity aControlActivity, const Meta::SMetaData* aData, const RMessagePtr2* aMessage )
+ {
+ if (iShimCpr)
+ {
+ iShimCpr->ConnectionControlActivityL(aControlActivity, aData, aMessage);
+ }
+ }
+
+CConnectionSettings& CIPNetworkConnectionProvider::DoSettingsAccessL()
+ {
+ if (iShimCpr == NULL)
+ {
+ User::Leave(KErrNotReady);
+ }
+ return iShimCpr->SettingsAccessL();
+ }
+
+TInt CIPNetworkConnectionProvider::DoAllSubConnectionNotificationEnable()
+ {
+ return !iShimCpr ? KErrNotReady : iShimCpr->AllSubConnectionNotificationEnable();
+ }
+
+TInt CIPNetworkConnectionProvider::DoCancelAllSubConnectionNotification()
+ {
+ return !iShimCpr ? KErrNotReady : iShimCpr->CancelAllSubConnectionNotification();
+ }
+
+void CIPNetworkConnectionProvider::DoSendIoctlMessageL(const RMessage2& aMessage)
+ {
+ if (iShimCpr)
+ {
+ iShimCpr->SendIoctlMessageL(aMessage);
+ }
+ else
+ {
+ User::Leave(KErrNotReady);
+ }
+ }
+
+void CIPNetworkConnectionProvider::DoSendCancelIoctl()
+ {
+ if (iShimCpr)
+ {
+ iShimCpr->SendCancelIoctl();
+ }
+ }
+
+TInt CIPNetworkConnectionProvider::DoCanDoSubConnection(RSubConnection::TSubConnType /*aSubConnType*/) const
+ {
+ return ETrue;
+ }
+
+void CIPNetworkConnectionProvider::DoJoinNextLayerL(CConnectionProviderBase* aNextLayer)
+ {
+ ASSERT( !iShimCpr );
+ ASSERT( aNextLayer );
+ iShimCpr = aNextLayer;
+ SetConnectionInfo(iShimCpr->ConnectionInfo());
+ // join ourselves as a connection control client to the lower provider
+ iShimCpr->JoinL(*this);
+ }
+
+CConnectionProviderBase* CIPNetworkConnectionProvider::DoNextLayer() const
+ {
+ return iShimCpr;
+ }
+
+
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipcprshim/group/bld.inf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipcprshim/group/bld.inf Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,36 @@
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#ifndef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
+
+PRJ_EXPORTS
+#ifdef SYMBIAN_OLD_EXPORT_LOCATION
+../inc/shimcpr.h
+#endif
+#ifdef SYMBIAN_OLD_EXPORT_LOCATION
+../inc/shimcprfactory.h
+#endif
+#ifdef SYMBIAN_OLD_EXPORT_LOCATION
+../inc/shimclient.h /epoc32/include/comms-infras/shimclient.h
+#endif
+
+../group/shimcpr.iby /epoc32/rom/include/shimcpr.iby
+
+PRJ_MMPFILES
+shimcpr.mmp
+
+PRJ_TESTMMPFILES
+
+#endif // SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipcprshim/group/networking_shimcpr.history.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipcprshim/group/networking_shimcpr.history.xml Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+ Correct case whereby data monitoring thresholds did not work with multiple RConnection objects referring to the same underlying object.
+
+
+
+ E_ESock_OOM tests aborting and causing panic in Esock_IP, OOM Testing
+
+
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipcprshim/group/networking_shimcpr.mrp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipcprshim/group/networking_shimcpr.mrp Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,25 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+component networking_shimcpr
+source \sf\os\networkingsrv\networkcontrol\ipcprshim
+binary \sf\os\networkingsrv\networkcontrol\ipcprshim\group all
+exports \sf\os\networkingsrv\networkcontrol\ipcprshim\group
+notes_source \component_defs\release.src
+
+
+ipr E
+
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipcprshim/group/shimcpr.iby
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipcprshim/group/shimcpr.iby Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,25 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef __SHIMCPR_IBY__
+#define __SHIMCPR_IBY__
+
+REM IP Connection Provider Shim
+
+ECOM_PLUGIN(shimcpr.dll,102070FD.rss)
+
+#endif
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipcprshim/group/shimcpr.mmp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipcprshim/group/shimcpr.mmp Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,57 @@
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// shimcpr.MMP New IP Connection Provider Shim ECOM plugin with BM support
+//
+//
+
+/**
+ @file
+*/
+
+#include
+
+TARGET shimcpr.dll
+TARGETTYPE PLUGIN
+
+UID 0x10009D8D 0x102070FD
+VENDORID 0x70000001
+
+SOURCEPATH ../src
+SOURCE shimcpr.cpp shimcprfactory.cpp shimconnsettings.cpp connectionSelectorShim.cpp
+SOURCE shimdatatransfer.cpp shimclient.cpp shimnifmansconn.cpp
+
+USERINCLUDE ../inc
+
+SYSTEMINCLUDE /epoc32/include
+SYSTEMINCLUDE /epoc32/include/ecom
+SYSTEMINCLUDE /epoc32/include/comms-infras
+
+START RESOURCE 102070FD.rss
+TARGET shimcpr.rsc
+END
+LIBRARY euser.lib esock.lib esocksvr.lib eintsock.lib insock.lib netmeta.lib nifman.lib commsfw.lib
+
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+
+LIBRARY commdb.lib commsdat.lib
+#endif //SYMBIAN_NETWORKING_UMTSR5
+
+
+#include "comms-infras/commsdebugutility.mmh"
+
+CAPABILITY ALL -Tcb
+
+UNPAGED
+
+SMPSAFE
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipcprshim/inc/shimclient.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipcprshim/inc/shimclient.h Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,62 @@
+/**
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+
+/**
+ @file SHIMCLIENT.H
+ @internalComponent
+*/
+
+#if !defined(__SHIMCLIENT_H__)
+#define __SHIMCLIENT_H__
+
+#include
+#include
+#include
+
+class TNifProgress;
+class MShimControlClient
+/**
+ the former CSubConnection down-calls (interface seen by ESOCK and used to comunicate sub-connection
+ related calls made via RConnection using either id or index.
+
+ @internalComponent
+ */
+ {
+public:
+ //former CConnection::StopSubConnectionL(const RMessage2& aMessage);
+ virtual TBool StopL(const RMessage2& aMessage) = 0;
+ // Former calls from CConnection::GetSubConnectionInfo
+ virtual TInt GetSubConnectionInfo(const RMessage2& aMessage) = 0;
+ // Former Calls from RConnection via CSubConnection
+ virtual TInt GetCurrentProgress(TNifProgress& aProgress) = 0;
+ virtual TBool DataTransferredL(const RMessage2& aMessage) = 0;
+ virtual TBool DataTransferredCancel(const RMessage2& aMessage) = 0;
+ virtual TBool RequestSubConnectionProgressNotificationL(const RMessage2& aMessage) = 0;
+ virtual TBool CancelSubConnectionProgressNotification(const RMessage2& aMessage) = 0;
+ virtual TBool DataSentNotificationRequestL(const RMessage2& aMessage) = 0;
+ virtual TBool DataSentNotificationCancel(const RMessage2& aMessage) = 0;
+ virtual TBool DataReceivedNotificationRequestL(const RMessage2& aMessage) = 0;
+ virtual TBool DataReceivedNotificationCancel(const RMessage2& aMessage) = 0;
+ virtual TBool IsSubConnectionActiveRequestL(const RMessage2& aMessage) = 0;
+ virtual TBool IsSubConnectionActiveCancel(const RMessage2& aMessage) = 0;
+
+ virtual TInt ReturnCode() const = 0;
+ };
+
+#endif // __SHIMCLIENT_H__
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipcprshim/inc/shimconnsettings.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipcprshim/inc/shimconnsettings.h Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,51 @@
+/**
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+
+/**
+ @file SS_SHIMCONNSETTINGS.H
+ @internalComponent
+*/
+
+#if !defined(__SS_SHIMCONNSETTINGS_H__)
+#define __SS_SHIMCONNSETTINGS_H__
+
+#include "ss_connsettings.h"
+
+class CConnectionProvdBase;
+class CConnectionSettingsShim : public CConnectionSettings
+ {
+
+public:
+ CConnectionSettingsShim( CConnectionProvdBase& aConnectionProvdBase ) :
+ iConnectionProvdBase( aConnectionProvdBase )
+ {
+ }
+
+protected:
+ virtual void DoGetBoolSettingL(const TDesC& aSettingName, TBool& aValue, const RMessagePtr2* aMessage );
+ virtual void DoGetDes16SettingL(const TDesC& aSettingName, TDes16& aValue, const RMessagePtr2* aMessage );
+ virtual void DoGetDes8SettingL(const TDesC& aSettingName, TDes8& aValue, const RMessagePtr2* aMessage );
+ virtual void DoGetIntSettingL(const TDesC& aSettingName, TUint32& aValue, const RMessagePtr2* aMessage );
+ virtual HBufC* DoGetLongDesSettingLC(const TDesC& aSettingName, const RMessagePtr2* aMessage );
+
+private:
+ CConnectionProvdBase& iConnectionProvdBase;
+ };
+
+#endif // __SS_CONNSETTINGS_H__
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipcprshim/inc/shimcpr.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipcprshim/inc/shimcpr.h Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,174 @@
+/**
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* This temporary shim layer contanis the interfaces defined by MConnectionNotify, CConnectionProvdBase and CInterface.
+* However only the connection-related part of CInterface appears here, the rest is in CNifManSubConnectionShim.
+*
+*
+*/
+
+
+
+/**
+ @file SHIMCPR.H
+ @internalComponent
+*/
+
+#if !defined(__SS_SHIMCPR_H__)
+#define __SS_SHIMCPR_H__
+
+#include // for CConnectionProviderFactoryBase
+#include
+#include // for MConnectionNotify and CConnectionProvdBase
+#include // for KESockConnectionTag
+
+#define KShimCprTag KESockConnectionTag
+_LIT8(KShimCprSubTag, "shimcpr"); // logging tag
+
+
+class CConnectionProvdBase;
+class CNifManSubConnectionShim;
+class CConnectionProviderFactoryShim;
+class CConnectionSettingsShim;
+class CConnection;
+class MProviderSelector;
+class CSubConnectionLinkShimClient;
+class CConnectionSelectorShim;
+NONSHARABLE_CLASS(CConnectionProviderShim) : public CConnectionProviderBase, MConnectionNotify
+ {
+ friend class CConnectionProviderFactoryShim;
+ friend class CConnectionSelectorShim; //to get/set the aggregarted CConnectionProvdBase
+
+
+public:
+ CConnectionProvdBase& Provider()
+ {
+ ASSERT(iProvider);
+ return *iProvider;
+ }
+ CSubConnectionLinkShimClient* QuerySubSessions(TInt32 aTypeId, const CConnection* aConnection);
+
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+ // The public function which will set the pointer to the factiory
+ void SetFactoryIfactory(CConnectionProviderFactoryShim *aFactoryShim);
+#endif // SYMBIAN_NETWORKING_UMTSR5
+
+protected:
+ virtual ~CConnectionProviderShim();
+
+
+#ifdef SYMBIAN_NETWORKING_3GPPDEFAULTQOS
+ CConnectionProviderShim(CConnectionProviderFactoryBase& aFactory)
+ : CConnectionProviderBase(aFactory), iSubConnectionType(KInvalidFactoryId)
+ {
+ __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionProviderShim %08x:\tCConnectionProviderShim()"),
+ this));
+ }
+#else
+ CConnectionProviderShim(CConnectionProviderFactoryBase& aFactory)
+ : CConnectionProviderBase(aFactory)
+ {
+ __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionProviderShim %08x:\tCConnectionProviderShim()"),
+ this));
+ }
+#endif
+// SYMBIAN_NETWORKING_3GPPDEFAULTQOS
+
+
+ void ConstructL();
+ static CConnectionProviderShim* NewL(CConnectionProviderFactoryBase& aFactory);
+
+ void ConnectionJoiningL( const CConnection& aConnection );
+ void ConnectionLeaving( const CConnection& aConnection );
+
+
+
+protected:
+ // Define methods from the interface specified by MConnectionNotify
+ virtual void SelectionComplete(TInt aError, const TDesC8& aSelectionInfo);
+ virtual void ConnectionError(TInt aError);
+ virtual void LinkLayerOpen(TInt aError);
+ virtual void LinkLayerClosed(TInt aError);
+ virtual void ProgressNotification(TInt aStage, TInt aError);
+ virtual void ProgressNotification(TSubConnectionUniqueId aSubConnectionUniqueId, TInt aStage, TInt aError);
+ virtual void ServiceChangeNotification(TUint32 aId, const TDesC& aType);
+ virtual void InterfaceStateChangeNotification(TDesC8& aInfo);
+ virtual void NotifyDataSent(TSubConnectionUniqueId aSubConnectionUniqueId, TUint aUplinkVolume);
+ virtual void NotifyDataReceived(TSubConnectionUniqueId aSubConnectionUniqueId, TUint aDownlinkVolume);
+ virtual void SubConnectionEvent(const TSubConnectionEvent& aSubConnectionEvent);
+
+ virtual TBool ShouldIDeleteNow();
+
+protected:
+ //CConnectionProviderBase virtuals
+ virtual void DoDataClientJoiningL(MConnectionDataClient& aDataClient);
+ virtual void DoDataClientLeaving(MConnectionDataClient& aDataClient);
+ virtual void DoControlClientJoiningL(MConnectionControlClient& aControlClient);
+ virtual void DoControlClientLeaving(MConnectionControlClient& aControlClient);
+
+ virtual void DoStartL(Meta::SMetaData& aParams, const RMessagePtr2* aMessage);
+ virtual TInt DoStop(TInt aError, const RMessagePtr2* aMessage);
+
+ virtual TInt DoCanDoSubConnection(RSubConnection::TSubConnType aSubConnType) const;
+
+ virtual CConnectionProviderBase* DoNextLayer() const ;
+ virtual void DoJoinNextLayerL(CConnectionProviderBase* aNextLayer);
+
+ virtual void DoProgressL(Meta::SMetaData& aBuffer) const;
+ virtual void DoLastProgressError(Meta::SMetaData& aBuffer);
+ virtual void DoRequestServiceChangeNotificationL();
+ virtual void DoCancelServiceChangeNotification();
+ virtual void DoControlL(TUint aOptionLevel, TUint aOptionName, Meta::SMetaData& aOption, const RMessagePtr2* aMessage);
+ virtual TInt DoAllSubConnectionNotificationEnable();
+ virtual TInt DoCancelAllSubConnectionNotification();
+ virtual void DoSendIoctlMessageL(const RMessage2& aMessage);
+ virtual void DoSendCancelIoctl();
+ virtual TInt DoEnumerateSubConnectionsL(TUint& aCount);
+ virtual TUint DoEnumerateClientsL(HBufC8*& aClientInfoBuffer, TEnumClients aClientType);
+ virtual void DoConnectionControlActivityL( TControlActivity aControlActivity, const Meta::SMetaData* aData, const RMessagePtr2* aMessage );
+ virtual CConnectionSettings& DoSettingsAccessL();
+
+ CConnectionProvdBase* GetNifSession();
+ void InitialiseL(CConnectionProvdBase* aStarterSession);
+ void SetBlockProgressesL(CConnectionProvdBase* aStarterSession);
+ void AddRefL(CConnectionSelectorShim* aSelector);
+ void ReleaseRef(CConnectionSelectorShim* aSelector);
+
+private:
+ CNifManSubConnectionShim* FindSubConnection(TSubConnectionUniqueId aId);
+ void ReleaseRef();
+
+private:
+ CConnectionProvdBase *iProvider; // Enable access to 'old' NIFMAN layer
+ CConnectionSettingsShim* iConnectionSettings;
+ TUint iUsageProfile;
+ RPointerArray iConnections;
+ // TInt iRefCount; //to keep a connection up while selection is going on
+ RPointerArray iNifManSubConnections;
+#ifdef SYMBIAN_NETWORKING_3GPPDEFAULTQOS
+ TInt iSubConnectionType;
+#endif // SYMBIAN_NETWORKING_3GPPDEFAULTQOS
+ RPointerArray iSelectors;
+ TBool iHasAnyControlClientJoined:1;
+ TBool iIsAlreadyUninitialised:1;
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+ // The handle to the factory object that creates the CConnectionProviderShim
+ CConnectionProviderFactoryShim *iFactoryShim;
+#endif // #ifdef SYMBIAN_NETWORKING_UMTSR5
+
+
+};
+
+#endif
+// __SS_SHIMCPR_H__
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipcprshim/inc/shimcprfactory.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipcprshim/inc/shimcprfactory.h Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,113 @@
+/**
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+
+/**
+ @file SHIMCPRFACTORY.H
+ @internalComponent
+*/
+
+#if !defined(__SHIMCPRFACTORY_H__)
+#define __SHIMCPRFACTORY_H__
+
+#include // for CConnectionProviderFactoryBase
+#include
+
+__CFLOG_STMT(_LIT8(KLogSubSysESOCK, "ESOCK");) // subsystem name
+
+
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+
+// The class CConnectionProviderFactoryShim implements this interface as part of the 635 IAP locking mechanism. Since
+// each RConn::Start(), will instantiate its own selector, its then become the resposiblity of the factory to store the
+// status related to the IAP locking. This interface has the functions called by the selectors with the status of IAP lockied
+// and the IAP number to be locked
+
+class MIAPLockInfo
+{
+public:
+ virtual void SetIAPLockStatus(TBool aLockStatus, TInt aLockedIAP)=0;
+ virtual void GetIAPLockStatus(TBool &aLockStatus, TInt &aLockedIAP)=0;
+};
+
+#endif // #ifdef SYMBIAN_NETWORKING_UMTSR5
+
+class CSubConnectioProviderLinkShim;
+
+const TUint KShimConnectionProviderFactoryId = 0x10207104; //the same as CSubConnectionProviderFactoryShim
+
+class CSubConnectionFactoryContainer;
+NONSHARABLE_CLASS(CConnectionProviderFactoryShim) : public CConnectionProviderFactoryBase, public MConnectionNotify
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+ , public MIAPLockInfo
+#endif // #ifdef SYMBIAN_NETWORKING_UMTSR5
+ {
+public:
+ static CConnectionProviderFactoryShim* NewL(TAny* aConstructionParameters);
+ ~CConnectionProviderFactoryShim();
+
+
+protected:
+ void ConstructL();
+ CConnectionProviderFactoryShim(TUint aFactoryId, CConnectionFactoryContainer& aParentContainer);
+
+ virtual CConnectionProviderBase* DoCreateProviderL();
+ virtual MProviderSelector* DoSelectProvider( Meta::SMetaData& aPreferences, ISelectionNotify& aSelectionNotify, const RMessagePtr2* aMessage );
+ virtual MProviderSelector* DoSelectNextLayerProvider( Meta::SMetaData& aPreferences, ISelectionNotify& aSelectionNotify, const RMessagePtr2* aMessage );
+
+ virtual void DoEnumerateConnectionsL(RPointerArray& aConnectionInfoPtrArray);
+
+ //CCommsFactoryBase
+ virtual TInt DoReceiveMessage( NetMessages::CMessage& aNetMessage );
+
+ //MConnectionNotify interface to catch the global events
+ virtual void SelectionComplete(TInt aError, const TDesC8& aSelectionInfo);
+ virtual void ConnectionError(TInt aError);
+ virtual void LinkLayerOpen(TInt aError);
+ virtual void LinkLayerClosed(TInt aError);
+ virtual void ProgressNotification(TInt aStage, TInt aError);
+ virtual void ProgressNotification(TSubConnectionUniqueId aSubConnectionUniqueId, TInt aStage, TInt aError);
+ virtual void ServiceChangeNotification(TUint32 aId, const TDesC& aType);
+ virtual void InterfaceStateChangeNotification(TDesC8& aInfo);
+ virtual void NotifyDataSent(TSubConnectionUniqueId aSubConnectionUniqueId, TUint aUplinkVolume);
+ virtual void NotifyDataReceived(TSubConnectionUniqueId aSubConnectionUniqueId, TUint aDownlinkVolume);
+
+ virtual void SubConnectionEvent(const TSubConnectionEvent& aSubConnectionEvent);
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+public:
+
+ // Interface MIAPLockInfo functions to store the status of IAP locking
+ virtual void SetIAPLockStatus(TBool aLockStatus, TInt aLockedIAP);
+ virtual void GetIAPLockStatus (TBool &aLockStatus, TInt &aLockedIAP);
+
+#endif // #ifdef SYMBIAN_NETWORKING_UMTSR5
+
+
+protected:
+ CConnectionProvdBase* iNifmanSession;
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+
+ // This variable will tell the status whether the IAP is locked or not
+ TBool iIsIAPLocked;
+ // This variable will store the IAP number that is being locked.
+ TInt iLockedIAP;
+
+#endif // #ifdef SYMBIAN_NETWORKING_UMTSR5
+ };
+
+#endif // __SHIMCPRFACTORY_H__
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipcprshim/inc/shimdatatransfer.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipcprshim/inc/shimdatatransfer.h Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,78 @@
+/**
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+
+/**
+ @file SHIMDATATRANSFER.H
+ @internalComponent
+*/
+
+#if !defined(__SHIMDATATRANSFER_H__)
+#define __SHIMDATATRANSFER_H__
+
+#include
+#include
+#include "ss_datatransfer.h"
+
+class CConnectionProvdBase;
+class CNifManSubConnectionShim;
+class CConnDataTransferShim : public CConnDataTransfer
+ {
+public:
+ CConnDataTransferShim(CNifManSubConnectionShim& aSubConnectionProviderShim);
+ ~CConnDataTransferShim();
+
+public:
+ //up-calls from the CNifManSubConnectionShim
+ TInt NotifyDataTransferred(TUint aUplinkVolume, TUint aDownlinkVolume);
+ TInt NotifyDataSent(TUint aUplinkVolume);
+ TInt NotifyDataReceived(TUint aDownlinkVolume);
+
+protected:
+ //down-calls clients requests
+ virtual TInt DoDataTransferred(TUint& aUplinkVolume, TUint& aDownlinkVolume);
+ virtual TInt DoDataTransferredCancel();
+ virtual TInt DoDataSentNotificationRequest(TUint aRequestedGranularity, TUint aRequestedNotificationVolume);
+ virtual TInt DoDataSentNotificationCancel();
+ virtual TInt DoDataReceivedNotificationRequest(TUint aRequestedGranularity, TUint aRequestedNotificationVolume);
+ virtual TInt DoDataReceivedNotificationCancel();
+
+protected:
+ TInt CalculateNewUplinkGranularity(TUint aRequestedGranularity);
+ TInt CalculateNewDownlinkGranularity(TUint aRequestedGranularity);
+
+ TInt SetNextUplinkGranularity();
+ TInt SetNextDownlinkGranularity();
+
+ TInt SetUplinkGranularity(TUint aRequestedGranularity);
+ TInt SetDownlinkGranularity(TUint aRequestedGranularity);
+
+protected:
+ static TInt CalculateNewGranularity(TInt aRequestedGranularity, TUint aCurrentGranularity, RArray& aGranularities, TUint& aNewGranularity);
+
+private:
+ CNifManSubConnectionShim& iSubConnectionProviderShim;
+
+ RArray iUplinkGranularities; // ordered lists of deltas for the granularities
+ RArray iDownlinkGranularities;
+
+ TUint iCurrentUplinkGranularity; // the aggregate notification granularity calculated from all the CConnection requests
+ TUint iCurrentDownlinkGranularity;
+ };
+
+#endif // __SHIMDATATRANSFER_H__
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipcprshim/inc/shimnifmansconn.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipcprshim/inc/shimnifmansconn.h Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,219 @@
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+/**
+ @file
+ @internalComponent
+*/
+
+
+#if !defined(__SHIMNIFMANSCONN_H__)
+#define __SHIMNIFMANSCONN_H__
+
+#include
+#include "shimdatatransfer.h"
+#include "shimclient.h"
+#include "shimcpr.h" //access to the CConnectionProviderShim::Provider() fn
+
+//const TInt KSubConnectionProviderShimImplementationUid = 0x10207106;
+
+#define KShimScprTag KESockSubConnectionTag
+_LIT8(KShimScprSubTag, "shimscpr");
+_LIT8(KShimScprDataTag, "shimscprData");
+_LIT8(KShimScprClientTag, "shimscprClient");
+
+//Former CInterface CSubConnection related up-calls so that CConnectionProviderShim
+//doesn't have to link against the sub-connection shim
+class CConnection;
+class MSubInterfaceShim : public MConnDataTransferNotify
+ {
+public:
+ virtual TInt ProgressNotification(TInt aStage, TInt aError, const TDesC8& aInfo) = 0;
+ virtual TSubConnectionUniqueId Id() = 0;
+ virtual void SetSubConnectionUniqueId( TSubConnectionUniqueId aSubConnectionUniqueId ) = 0;
+ virtual void ConnectionJoiningL(const CConnection& aConnection) = 0;
+ virtual void ConnectionLeaving(const CConnection& aConnection) = 0;
+ };
+
+//class CSubConnectionProviderFactoryShim;
+class CSubConnectionLinkShimClient;
+
+NONSHARABLE_CLASS(CNifManSubConnectionShim) : public CBase, public MConnectionDataClient, public MSubInterfaceShim
+/**
+ @internalComponent
+ */
+ {
+
+public:
+ CNifManSubConnectionShim(CConnectionProviderShim& aProviderShim);
+ ~CNifManSubConnectionShim();
+
+ // MSubInterfaceShim impl
+ virtual TInt ProgressNotification(TInt aStage, TInt aError, const TDesC8& aInfo);
+ virtual TInt NotifyDataTransferred(TUint aUplinkVolume, TUint aDownlinkVolume);
+ virtual TInt NotifyDataSent(TUint aUplinkVolume, TUint aCurrentGranularity);
+ virtual TInt NotifyDataReceived(TUint aDownlinkVolume, TUint aCurrentGranularity);
+ virtual TSubConnectionUniqueId Id();
+ virtual void SetSubConnectionUniqueId( TSubConnectionUniqueId aSubConnectionUniqueId );
+ virtual void ConnectionJoiningL(const CConnection& aConnection);
+ virtual void ConnectionLeaving(const CConnection& aConnection);
+
+ CConnectionProvdBase& Provider()
+ {
+ return static_cast(iConnectionProvider)->Provider();
+ }
+ CConnDataTransferShim* DataTransferShim()
+ {
+ return iConnDataTransferShim;
+ }
+ CSubConnectionLinkShimClient* ShimClient( TInt aIndex )
+ {
+ return aIndex < iShimClients.Count() ? iShimClients[aIndex] : NULL;
+ }
+ void DeleteAsync();
+protected:
+ //MConnectionDataClient
+ virtual void ConnectionGoingDown(CConnectionProviderBase& aConnProvider);
+ virtual void ConnectionError(TInt aStage, TInt aError);
+ virtual void Notify(TNotify aNotifyType, CConnectionProviderBase* aConnProvider, TInt aError, const CConNotificationEvent* aConNotificationEvent);
+ virtual void AttachToNext(CSubConnectionProviderBase* aSubConnProvider);
+
+
+ TInt FindClient(const CConnection& aConnection);
+ CConnDataTransfer& CreateDataTransferL();
+
+protected:
+ RPointerArray iShimClients;
+ TSubConnectionUniqueId iSubConnectionsUniqueId;
+ CConnDataTransferShim* iConnDataTransferShim;
+ CConnectionProviderBase* iConnectionProvider;
+ CAsyncCallBack iAsyncDestructor;
+private:
+ static TInt AsyncDestructorCb(TAny* aInstance);
+ };
+
+NONSHARABLE_CLASS(CSubConnectionLinkShimClient) : public CBase, public MConnDataTransferNotify, public MShimControlClient
+/**
+ Handle subconnection-related asynchronous client requests that may not complete immediately, it effectively
+ represents the old CSubConnection
+ @internalComponent
+ */
+ {
+public:
+ CSubConnectionLinkShimClient(const CConnection& aConnection, CNifManSubConnectionShim& aSubConnectionShim);
+ ~CSubConnectionLinkShimClient();
+
+ //MConnDataTransferNotify interface towards CConnDataTransfer
+ virtual TInt NotifyDataTransferred(const TUint aUplinkVolume, const TUint aDownlinkVolume);
+ virtual TInt NotifyDataSent(TUint aUplinkVolume, TUint aCurrentGranularity);
+ virtual TInt NotifyDataReceived(TUint aDownlinkVolume, TUint aCurrentGranularity);
+
+ void ProgressNotification(TInt aStage, TInt aError, const TDesC8& aInfo);
+
+ //MShimControlClient interface towards ESOCK
+ //former CConnection::StopSubConnectionL(const RMessage2& aMessage);
+ virtual TBool StopL(const RMessage2& aMessage);
+ // Former calls from CConnection::GetSubConnectionInfo
+ virtual TInt GetSubConnectionInfo(const RMessage2& aMessage);
+ // Former Calls from RConnection via CSubConnection
+ virtual TInt GetCurrentProgress(TNifProgress& aProgress);
+ virtual TBool DataTransferredL(const RMessage2& aMessage);
+ virtual TBool DataTransferredCancel(const RMessage2& aMessage);
+ virtual TBool RequestSubConnectionProgressNotificationL(const RMessage2& aMessage);
+ virtual TBool CancelSubConnectionProgressNotification(const RMessage2& aMessage);
+ virtual TBool DataSentNotificationRequestL(const RMessage2& aMessage);
+ virtual TBool DataSentNotificationCancel(const RMessage2& aMessage);
+ virtual TBool DataReceivedNotificationRequestL(const RMessage2& aMessage);
+ virtual TBool DataReceivedNotificationCancel(const RMessage2& aMessage);
+ virtual TBool IsSubConnectionActiveRequestL(const RMessage2& aMessage);
+ virtual TBool IsSubConnectionActiveCancel(const RMessage2& aMessage);
+ TBool Match(const CConnection& aConnection) const;
+ TSubConnectionUniqueId Id();
+ virtual TInt ReturnCode() const;
+
+ void SetReturnCode(TInt aErr)
+ {
+ iReturnCode = aErr;
+ }
+
+ /**
+ Callback from activity timer
+ */
+ void CheckSubConnectionActivity();
+
+ NONSHARABLE_CLASS(CActivityTimer) : public CTimer
+ /**
+ @internalComponent
+ */
+ {
+ public:
+ static CActivityTimer* NewL(CSubConnectionLinkShimClient* aOwner, TInt aPriority);
+ virtual inline ~CActivityTimer() {};
+ void RunL();
+ private:
+ inline CActivityTimer(CSubConnectionLinkShimClient* aOwner, TInt aPriority);
+ private:
+ CSubConnectionLinkShimClient* iOwner;
+ };
+
+
+private:
+ const CConnection& iConnection;
+ CNifManSubConnectionShim& iSubConnectionShim;
+
+ TUint iUplinkDataVolume;
+ TUint iDownlinkDataVolume;
+ TUint iUplinkDataNotificationVolume;
+ TUint iDownlinkDataNotificationVolume;
+ TInt iRemainingUplinkGranularity;
+ TInt iRemainingDownlinkGranularity;
+
+ TBool iDataSentNotificationsInAbsoluteMode;
+ TBool iDataReceivedNotificationsInAbsoluteMode;
+
+ TNifProgress iCurrentProgress;
+ TInt iLastProgressToClient;
+ TInt iClientRequestedProgress;
+ CActivityTimer* iActivityTimer;
+ TInt iRequestedClientTimerPeriod;
+ TBool iClientBelievesSubConnectionActive;
+ TUint iPreviousUplinkDataVolume;
+ TUint iPreviousDownlinkDataVolume;
+
+ TBool iOutstandingProgressNotification:1;
+ TBool iOutstandingDataSentNotification:1;
+ TBool iOutstandingDataReceivedNotification:1;
+ TBool iOutstandingSubConnectionActivity:1;
+
+ RMessage2 iOutstandingProgressNotificationMessage;
+ RMessage2 iOutstandingDataSentNotificationMessage;
+ RMessage2 iOutstandingDataReceivedNotificationMessage;
+ RMessage2 iOutstandingSubConnectionActivityMessage;
+
+ TInt iReturnCode;
+ };
+
+inline CSubConnectionLinkShimClient::CActivityTimer::CActivityTimer(CSubConnectionLinkShimClient* aOwner, TInt aPriority)
+: CTimer(aPriority), iOwner(aOwner)
+/**
+Set up the activity timer for subconnection activity
+
+@param aOwner, The owing subconnection
+@param aPriority, The priority of the active object
+*/
+ { CActiveScheduler::Add(this); };
+
+#endif
+// __SHIMNIFMANSCONN_H__
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipcprshim/src/102070FD.rss
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipcprshim/src/102070FD.rss Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,60 @@
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// Registry info for IP Networking Connection Provider plug-in
+//
+//
+
+/**
+ @file 102070FD.RSS
+*/
+
+#include
+
+RESOURCE REGISTRY_INFO theInfo
+{
+dll_uid = 0x102070FD;
+interfaces =
+ {
+ INTERFACE_INFO
+ {
+ interface_uid = 0x102070EE;
+ implementations =
+ {
+ IMPLEMENTATION_INFO
+ {
+ implementation_uid = 0x102070FF;
+ version_no = 1;
+ display_name = "IP Connection Provider Factory Shim";
+ default_data = "IpConnectionFactoryShim";
+ opaque_data = "";
+ }
+ };
+ },
+ INTERFACE_INFO
+ {
+ interface_uid = 0x102070F0;
+ implementations =
+ {
+ IMPLEMENTATION_INFO
+ {
+ implementation_uid = 0x10207101;
+ version_no = 1;
+ display_name = "IP Connection Provider Shim";
+ default_data = "IpConnectionShim";
+ opaque_data = "";
+ }
+ };
+ }
+ };
+}
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipcprshim/src/connectionSelectorShim.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipcprshim/src/connectionSelectorShim.cpp Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,557 @@
+
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// Implementation file for the CConnectionSelectorShim
+//
+//
+
+/**
+ @file
+ @internalComponent
+*/
+
+
+#include
+#include
+#ifndef SYMBIAN_NETWORKING_UMTSR5
+#include
+#endif //SYMBIAN_NETWORKING_UMTSR5
+#include
+#include
+#include
+#include "shimcprfactory.h"
+#include "connectionSelectorShim.h"
+#include "shimcpr.h"
+
+using namespace ESock;
+
+//PREQ399_REMOVE
+#ifdef SYMBIAN_NETWORKING_3GPPDEFAULTQOS
+#include
+#endif
+//SYMBIAN_NETWORKING_3GPPDEFAULTQOS //PREQ399_REMOVE
+
+TInt CConnectionSelectorShim::AsyncDestructorCb(TAny* aInstance)
+ {
+ CConnectionSelectorShim* selector = reinterpret_cast(aInstance);
+ delete selector;
+ return KErrNone;
+ }
+
+CConnectionSelectorShim::CConnectionSelectorShim(ISelectionNotify& aNotify) :
+ iNotify(aNotify),
+ iAsyncDestructor(CActive::EPriorityStandard + 1),
+ iConnProvider(NULL)
+/**
+C'tor.
+
+The priority of the async destructor is specifically set one higher than normal
+to cater for the case whereby an RConnection is started asynchronously and
+immediately closed. This ensures that the async destructor is called before
+NetCon begins the selection procedure, and hence can cancel the NetCon request
+before it starts. This causes immediate cancellation of the connection start
+procedure. Otherwise, NetCon gets in first, the connection comes all the way
+and then times out in the short timer.
+
+@param aNotify the ISelectionNotify that should be notified about the
+selection progress.
+*/
+ {
+ __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionSelectorShim %08x:\tCConnectionSelectorShim"), this));
+ iAsyncDestructor.Set(TCallBack(AsyncDestructorCb, this));
+ }
+
+CConnectionSelectorShim::~CConnectionSelectorShim()
+ {
+ __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionSelectorShim %08x:\t~CConnectionSelectorShim"), this));
+
+ iNotify.Detach(); //"PrevLayer"::Detach() will be called only once.
+
+ delete iSelectorSession;
+
+ iSelectionInfo.Close();
+ }
+
+
+void CConnectionSelectorShim::DeleteAsync()
+ {
+ if (!iAsyncDestructor.IsActive())
+ {
+ if (iConnProvider)
+ {
+ __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionSelectorShim %08x:\tDeleteAsync() RelaseRef(this)"), this));
+ iConnProvider->ReleaseRef(this);
+ }
+ iAsyncDestructor.CallBack();
+ }
+ }
+
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+void CConnectionSelectorShim::SetFactoryIface(MIAPLockInfo * aFactoryIface)
+ {
+ iFactoryIface = aFactoryIface;
+ }
+
+#endif // #ifdef SYMBIAN_NETWORKING_UMTSR5
+
+TInt CConnectionSelectorShim::Cancel()
+ {
+ return Cancel(KErrCancel,NULL);
+ }
+
+TInt CConnectionSelectorShim::Cancel(TInt aReason, const RMessage2* aMessage)
+ {
+ __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionSelectorShim %08x:\tCancel(aReason %d)"), this, aReason));
+ TInt error = KErrNone;
+ if (iSelectorSession)
+ {
+ error = iSelectorSession->Stop(aReason, aMessage);
+ delete iSelectorSession;
+ iSelectorSession = NULL;
+ }
+
+ //"PrevLayer"::Detach() will be called only once.
+ //It is important to call iNotify.Detach() after all progress notifications
+ //resulting from NifSession::Stop() have been passed up towards the CConnection.
+ iNotify.Detach();
+ DeleteAsync();
+ return error;
+ }
+
+TInt CConnectionSelectorShim::Select(Meta::SMetaData& aPreferences, const RMessagePtr2* aMessage)
+/** Implements CConnectorSelector::Select (async). The shim layer (this layer)
+delegates the selection to NIFMAN. NIFMAN cannot be asked just to perform the
+selection, as the selection is tighly coupled with starting connection provider.
+
+@param aPreferences connection preferences.
+*/
+ {
+ //Assume this is a TConnStart (as defined in ss_connprov.h)
+ STypeId type = aPreferences.GetTypeId();
+ ASSERT(type.iUid.iUid == KESockMessagesImplementationUid);
+ ASSERT(type.iType == EESockMessageConnStart);
+
+ const TConnPref* connPrefs = NULL;
+ TConnStartType stype = EConnStartImplicit;
+
+ if (type.iType == EESockMessageConnStart)
+ {
+ connPrefs = reinterpret_cast(aPreferences).ConnPrefs();
+ stype = reinterpret_cast(aPreferences).StartType();
+ if (connPrefs && connPrefs->ExtensionId() == TConnPref::EConnPrefSnap)
+ {
+ __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionSelectorShim %08x:\tSelect() with not supported preferences EConnPrefSnap"), this));
+ iNotify.SelectComplete(NULL, KErrNotSupported);
+ DeleteAsync();
+ return KErrNotSupported;
+ }
+ }
+
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+
+ // The code here will check the secure ID of the application which is expected with the aMessage Ptr.
+ // The logic used here is that if a General purpose application locks an IAP then no other application
+ // should be allowed to start the connection ans should return with KErrAccessDenied.
+ if(aMessage!=NULL)
+ {
+ iAppSecureId = aMessage->SecureId();
+ }
+ #endif //SYMBIAN_NETWORKING_UMTSR5
+
+ TRAPD(ret,
+ iSelectorSession = Nif::NewConnectionL(this, 0);
+ if (connPrefs)
+ {
+ __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionSelectorShim %08x:\tSelect() with preferences, iSelectorSession %x"), this, iSelectorSession));
+ iSelectorSession->StartL(stype, *connPrefs, aMessage );
+ }
+ else
+ {
+ __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionSelectorShim %08x:\tSelect() no preferences, iSelectorSession %x"), this, iSelectorSession));
+ iSelectorSession->StartL(stype, aMessage );
+ }
+ );
+ if (ret != KErrNone)
+ {
+ iNotify.SelectComplete(NULL, ret);
+ DeleteAsync();
+ }
+ return ret;
+ }
+
+
+void CConnectionSelectorShim::SelectionComplete(TInt aError, const TDesC8& aSelectionInfo)
+/** Called by NIFMAN when the selection (previously triggered by CConnectionSelectorShim::SelectL)
+completes the selection. There are two methods NIFMAN will use to indicate progress to its client. This
+method and the generic ::ProgressNotification. This method forwards selection complete to
+this->ProgressNotification(KFinishedSelection).
+
+@param aError operation result.
+@param aSelectionInfo selection info (to be converted to TSoIfConnectionInfo {iIAPId; iNetworkId;})
+*/
+ {
+ __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionSelectorShim %08x:\tSelectionComplete(), aError: %d"), this, aError));
+ iSelectionInfo.Close();
+ TInt err;
+ if((err = iSelectionInfo.Create(aSelectionInfo)) != KErrNone)
+ {
+ aError = err;
+ }
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+ // The following line will extract connection information which is sent by nifman after agent selection.The information contains IAP , iNetworkId
+ //and connection information.
+
+ Mem::Copy(&iConnectionInfo, aSelectionInfo.Ptr(),sizeof(iConnectionInfo));
+#endif
+ ProgressNotification(KFinishedSelection, aError);
+ }
+
+void CConnectionSelectorShim::CreateProviderL()
+ {
+ ASSERT(iSelectionInfo.Length());//this should only happen after the agent's been selected
+ __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionSelectorShim %08x:\tCreateProviderL() iConnProvider %x"), this, iConnProvider));
+ if (iConnProvider)
+ {
+ __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionSelectorShim %08x:\tCreateProviderL() iConnProvider->GetNifSession() %x"), this, iConnProvider->GetNifSession()));
+ __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionSelectorShim %08x:\tCreateProviderL() iConnProvider->ConnectionInfo() %S"), this, &iConnProvider->ConnectionInfo()));
+ }
+ //if we have a provider already and it's the existing one we have to check whether the conn info still matches since there could've been
+ //a reconnection
+ if ( iConnProvider && iConnProvider->GetNifSession() && iConnProvider->ConnectionInfo() != iSelectionInfo )
+ {
+ __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionSelectorShim %08x:\tCreateProviderL() -> ReleaseRef()"), this));
+ iConnProvider->ReleaseRef(this);
+ iConnProvider = NULL;
+ }
+ if ( !iConnProvider )
+ {
+ TSockManData* sockManData = SockManGlobals::Get();
+ ASSERT(sockManData);
+
+ CConnectionFactoryContainer* connectionFactories = sockManData->iConnectionFactories;
+ ASSERT(connectionFactories);
+
+ CConnectionProviderFactoryBase* factory = connectionFactories->FindFactory(KShimConnectionProviderFactoryId);
+ ASSERT(factory);
+ if (IsConnectionStoppingL())
+ {
+ // We must force the creation of a new provider because the old one is on its way out.
+ // This is required to ensure that we do not receive progresses generated as the connection
+ // comes down. We are only interested in progresses generated when the connection subsequently
+ // starts coming up again. Upper layers starting a connection just as it is coming down will
+ // otherwise receive these progresses. In particular, progresses with an error will otherwise
+ // be mistaken for an indication that the connection startup failed.
+ iConnProvider = (CConnectionProviderShim*)factory->CreateProviderL();
+ __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionSelectorShim %08x:\tCreateProviderL() - connection stopping, iConnProvider %x"), this, iConnProvider));
+ }
+ else
+ {
+ XConnectionFactoryQueryInfo query(NULL, iSelectionInfo);
+ iConnProvider = (CConnectionProviderShim*)factory->FindOrCreateProviderL(query);
+ __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionSelectorShim %08x:\tCreateProviderL() - found/created iConnProvider %x"), this, iConnProvider));
+ }
+ //and keep provider up during the selection
+ iConnProvider->AddRefL(this);
+ }
+ }
+
+TBool CConnectionSelectorShim::IsConnectionStoppingL()
+ {
+ TPckg stopping(EFalse);
+ iSelectorSession->ControlL(KCOLProvider, KNifSessionGetStopping, stopping, NULL);
+ return stopping();
+ }
+
+void CConnectionSelectorShim::HandleSelectionL()
+ {
+ // HandleSelection will set up the provider
+
+ // Set default factory as the CConnectionProviderFactoryShim
+ CreateProviderL();
+ if (iSelectorSession && !iConnProvider->GetNifSession())
+ {
+ iConnProvider->SetConnectionInfo(iSelectionInfo);
+ //
+ // The factory didn't find an existing provider that matched the query.
+ // It's returned a brand new instance of CConnectionProviderShim.
+ // Hence we'll call Initialise. this will do 2 things:
+ //
+ // 1. Create a secure nif(man) session for the provider
+ // 2. Call ConnectionControlActivity for the provider so that
+ //
+ iConnProvider->InitialiseL(iSelectorSession);
+ iConnProvider->SetBlockProgressesL(iSelectorSession);
+ iSetProviderNull = ETrue;
+ }
+ }
+
+
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+void CConnectionSelectorShim::MaybeLockIapL()
+ {
+ //The value of Secure ID is fetched from DataBase againt IAP.Iap is taken agent selection is over.This will look
+ //into the database if secureID feild is NULL or not if it is NULL then IAP will not be locked
+ CMDBSession* cmdbSession;
+ CCDIAPRecord* ptrIapRecord;
+ ptrIapRecord = static_cast(CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord));
+ CleanupStack::PushL(ptrIapRecord);
+
+ // Create a new CMDB session Object
+ cmdbSession = CMDBSession::NewL(KCDVersion1_1);
+ // If successm Get and Load the record.
+ CleanupStack::PushL(cmdbSession);
+
+ ptrIapRecord->SetRecordId(iConnectionInfo.iIAPId);
+ ptrIapRecord->LoadL(*cmdbSession);
+ // Although the SecureID of the application is numerical, we have to take it into the string buffer
+ // because of the limitations of the CommsDat, which dont support hexadeciaml values, and truncate
+ // decimal values after 8 digits, for some unknown reasons.
+ // Because of the current project schedule, its not feasible to rectify commsdat as of now, so decided
+ // to take on string Buffers to be used for Secure Ids from commsdat
+ TUint32 secureId;
+ secureId=ptrIapRecord->iAppSid;
+
+ if(secureId==iAppSecureId.iId && iAppSecureId.iId!=NULL)
+ {
+ // Inform the Factory that the Ids match so IAP will be locked. The IAP number is also given to
+ // the factory so that the application can start connection on other IAPs which are not locked
+ // by the program
+ iFactoryIface->SetIAPLockStatus(ETrue,iConnectionInfo.iIAPId);
+ }
+
+ CleanupStack::Pop(cmdbSession);
+ delete cmdbSession;
+ CleanupStack::Pop(ptrIapRecord);
+ delete ptrIapRecord;
+
+ }
+#endif
+
+void CConnectionSelectorShim::ProgressNotification(TInt aStage, TInt aError)
+/**
+
+@param
+*/
+ {
+ __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionSelectorShim %08x:\tProgressNotification(%d, %d)"),
+ this, aStage, aError));
+
+ // In all cases we must pass the new progress up the chain of selectors
+ if (aError == KErrNone)
+ {
+ aError = iError;
+ }
+ //
+ // Depending on the progress and the progress error, we need to handle situations differently
+ //
+ // Normally, if progress has reached KFinishedSelection, we stop propogating the progress
+ // up, because, we would have already setup the provide (iProvider) with a new nif session
+ // pointing to the same agent as iSelectorSession, hence further messages from agent and
+ // nifman will be forwared to the provider.
+ //
+ // However, there are two exceptions to this situation:
+ // We have a provider that's already been initialized with a nif session
+ // signified by !iSetProviderNull, in which case, we forward the message up
+ // whether or not we have finished selection. Same goes for situations when
+ // we have progress error, instead of waiting for the provider to propogate the
+ // message upwards, we use iNotify to do that, since the client would expect the
+ // message (e.g. Stop) to be completed with error immidiately
+ //
+
+ // Any error means that the selection (and startup of the interface) will be abandoned and reported to the client.
+ if (aError != KErrNone)
+ {
+ iNotify.ProgressNotification(aStage, aError);
+ iNotify.SelectComplete(NULL, aError);
+ DeleteAsync();
+ }
+ else if (aStage <= KFinishedSelection || !iSetProviderNull)
+ {
+ iNotify.ProgressNotification(aStage, aError);
+ }
+
+ if (aStage == KFinishedSelection && aError == KErrNone)
+ {
+ // The selection is complete so we want to reach the situation where the selector (this object) is
+ // joined by the appropriate provider. The provider will be set up with a pointer to the CNifSession
+ // allowing the calls to methods such as EnumerateSubConnections to work between KFinishedSelection and
+ // KLinkLayerOpen. The provider will be accessible from the selector until KLinkLayerOpen is reached
+ // (when the selector will be destroyed).
+ TRAP(aError,HandleSelectionL());
+ if (aError == KErrNone)
+ {
+ iNotify.SelectComplete(iConnProvider, aError);
+ }
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+
+ // First Check IAP Locked, if yes Return,
+ TBool IapLocked = EFalse;
+ TInt IapNumber = -1;
+
+ iFactoryIface->GetIAPLockStatus(IapLocked, IapNumber);
+
+ if (IapLocked && IapNumber == iConnectionInfo.iIAPId)
+ {
+ //iNotify.ProgressNotification(aStage, KErrPermissionDenied);
+ iNotify.SelectComplete(iConnProvider, KErrPermissionDenied);
+ DeleteAsync();
+ return;
+ }
+#endif //SYMBIAN_NETWORKING_UMTSR5
+
+ }
+ else if (aStage == KConnectionUninitialised)
+ {
+ //KConnectionUninitialised means that the interface has been stopped.
+ DeleteAsync();
+ }
+ else if (aStage == KLinkLayerOpen && !iIsLinkLayerOpen)
+ {
+ // Calling iNotify.LayerUp when we have a provider setup with a nif session already
+ // follows from the logic above justifying propogating progress up when we have a
+ // provider setup with a nif session
+ iNotify.LayerUp(aError);
+ DeleteAsync(); // The interface has successfully started and all responsibility should be taken over by the the provider.
+ }
+
+#ifdef SYMBIAN_NETWORKING_3GPPDEFAULTQOS
+ else if ( aStage == ENullAgtConnecting && aError == KErrNone )
+ {
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+
+ TRAPD(ret,MaybeLockIapL());
+#ifdef __CFLOG_ACTIVE
+ if(ret!=KErrNone)
+ {
+ __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionSelectorShim %08x:\tMaybeLockIap left with %d"),
+ this, ret));
+ }
+#endif
+ (void)ret; //TRAP is safe to ignore becuase if MaybeLockIapL: leave the correct behaviour is to leave Iap unlocked.
+ //We can safely ignore the trap because the function will only lock IAP. One should not be effected if someth
+#endif //SYMBIAN_NETWORKING_UMTSR5
+ }
+
+#endif //SYMBIAN_NETWORKING_3GPPDEFAULTQOS //PREQ399_REMOVE
+ }
+
+
+void CConnectionSelectorShim::SubConnectionEvent(const TSubConnectionEvent& /*aSubConnectionEvent*/)
+/**
+
+@param
+*/
+ {
+ }
+
+void CConnectionSelectorShim::ServiceChangeNotification(TUint32 aId, const TDesC& aType)
+/**
+
+@param
+*/
+ {
+ iNotify.ServiceChangeNotification(aId, aType);
+ }
+
+void CConnectionSelectorShim::LinkLayerOpen(TInt aError)
+/**
+
+@param
+*/
+ {
+ __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionSelectorShim %08x:\tLinkLayerOpen(aError %d)"),
+ this, aError));
+ iIsLinkLayerOpen = ETrue;
+ if (aError == KErrNone)
+ {
+ if (iSetProviderNull)
+ {
+ ASSERT(iConnProvider->GetNifSession());
+ iConnProvider->ReleaseRef(this);
+ iConnProvider = NULL;
+ iSetProviderNull = EFalse;
+ }
+
+ DeleteAsync();
+ }
+ else
+ {
+ iNotify.SelectComplete(NULL, aError);
+ }
+ }
+
+void CConnectionSelectorShim::SetProviderNull()
+ {
+ __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionSelectorShim %08x:\tSetProviderNull() iConnProvider %x"), this, iConnProvider));
+ iConnProvider = NULL;
+ }
+
+void CConnectionSelectorShim::ConnectionError(TInt /*aError*/)
+/**
+
+@param
+*/
+ {
+ //ignore the event
+ }
+
+
+void CConnectionSelectorShim::LinkLayerClosed(TInt /*aError*/)
+/**
+
+@param
+*/
+ {
+ //ignore the event
+ }
+
+
+
+void CConnectionSelectorShim::ProgressNotification(TSubConnectionUniqueId /*aSubConnectionUniqueId*/, TInt /*aStage*/, TInt /*aError*/)
+/**
+
+@param
+*/
+ {
+ }
+
+void CConnectionSelectorShim::InterfaceStateChangeNotification(TDesC8& /*aInfo*/)
+/**
+
+@param
+*/
+ {
+ //ignore the event
+ }
+
+
+void CConnectionSelectorShim::NotifyDataSent(TSubConnectionUniqueId /*aSubConnectionUniqueId*/, TUint /*aUplinkVolume*/)
+/**
+
+@param
+*/
+ {
+ //ignore the event
+ }
+
+
+void CConnectionSelectorShim::NotifyDataReceived(TSubConnectionUniqueId /*aSubConnectionUniqueId*/, TUint /*aDownlinkVolume*/)
+/**
+
+@param
+*/
+ {
+ //ignore the event
+ }
+
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipcprshim/src/connectionSelectorShim.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipcprshim/src/connectionSelectorShim.h Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,120 @@
+/**
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+
+/**
+ @file CONNECTIONSELECTORSHIM.H
+ @internalComponent
+*/
+
+#if !defined(__CONNECTIONSELECTORSHIM_H__)
+#define __CONNECTIONSELECTORSHIM_H__
+
+#include
+#include
+#include
+#include
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+#include
+#include
+#include
+#include "shimcprfactory.h"
+#endif //SYMBIAN_NETWORKING_UMTSR5
+
+class CConnectionProviderShim;
+class CConnectionSelectorShim : public CBase, public MProviderSelector, public MConnectionNotify
+/**
+@internalTechnology
+@released Since 9.1
+*/
+ {
+ friend class CConnectionProviderFactoryShim;
+
+public:
+
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+
+ // This function will be called by the ShimCprFactory to set its interface for the information
+ // pertaining to the IAP lock status
+ void SetFactoryIface(MIAPLockInfo * aFactoryIface);
+
+#endif // #ifdef SYMBIAN_NETWORKING_UMTSR5
+
+protected:
+ CConnectionSelectorShim(ISelectionNotify& aNotify);
+ virtual ~CConnectionSelectorShim();
+ void DeleteAsync();
+
+public:
+ TInt Select(Meta::SMetaData& aPreferences, const RMessagePtr2* aMessage);
+
+ // From MConnectionNotify
+ virtual void SelectionComplete(TInt aError, const TDesC8& aSelectionInfo);
+ virtual void ConnectionError(TInt aError);
+ virtual void LinkLayerOpen(TInt aError);
+ virtual void LinkLayerClosed(TInt aError);
+ virtual void ProgressNotification(TInt aStage, TInt aError);
+ virtual void ProgressNotification(TSubConnectionUniqueId aSubConnectionUniqueId, TInt aStage, TInt aError);
+ virtual void ServiceChangeNotification(TUint32 aId, const TDesC& aType);
+ virtual void InterfaceStateChangeNotification(TDesC8& aInfo);
+ virtual void NotifyDataSent(TSubConnectionUniqueId aSubConnectionUniqueId, TUint aUplinkVolume);
+ virtual void NotifyDataReceived(TSubConnectionUniqueId aSubConnectionUniqueId, TUint aDownlinkVolume);
+ virtual void SubConnectionEvent(const TSubConnectionEvent& aSubConnectionEvent);
+
+ //MProviderSelector
+ virtual TInt Cancel(TInt aReason, const RMessage2* aMessage);
+ virtual TInt Cancel();
+ void SetProviderNull();
+private:
+ static TInt AsyncDestructorCb(TAny* aInstance);
+ void CreateProviderL();
+ void HandleSelectionL();
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+ void MaybeLockIapL();
+#endif
+ TBool IsConnectionStoppingL();
+
+private:
+ CConnectionProvdBase* iSelectorSession;
+ ISelectionNotify iNotify;
+ CAsyncCallBack iAsyncDestructor;
+ RBuf8 iSelectionInfo;
+ CConnectionProviderShim* iConnProvider;
+ TInt iError;
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+ TBool iSetProviderNull;
+ TBool iIsLinkLayerOpen;
+#else
+ TBool iSetProviderNull:1;
+ TBool iIsLinkLayerOpen:1;
+#endif
+ // New Variables added as required by 635 to achieve IAP locking
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+ // The Connection Info, IAP , etc.
+ TSoIfConnectionInfo iConnectionInfo;
+ // The Secure ID of the current Application
+ TSecureId iAppSecureId;
+ // Interface to the Factor which Stores and get the IAP Lock Status
+ MIAPLockInfo* iFactoryIface;
+#endif
+
+ };
+
+
+#endif // __CONNECTIONSELECTORSHIM_H__
+
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipcprshim/src/shimclient.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipcprshim/src/shimclient.cpp Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,733 @@
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// This is part of an ECOM plug-in
+//
+//
+
+#include
+#include "shimnifmansconn.h"
+#include "es_prot.h"
+
+
+/**
+@internalComponent
+*/
+const TUint KMicrosecondsInASecond = 1000000;
+const TInt KMaxTimerPeriod = KMaxTInt32/KMicrosecondsInASecond; //< max period of a CTimer using After()
+
+
+CSubConnectionLinkShimClient::CSubConnectionLinkShimClient(const CConnection& aConnection, CNifManSubConnectionShim& aSubConnectionShim) :
+ iConnection(aConnection),
+ iSubConnectionShim(aSubConnectionShim),
+ iOutstandingProgressNotification(EFalse),
+ iOutstandingDataSentNotification(EFalse),
+ iOutstandingDataReceivedNotification(EFalse),
+ iOutstandingSubConnectionActivity(EFalse)
+/**
+*/
+ {
+ __CFLOG_VAR((KShimScprTag, KShimScprClientTag, _L8("CSubConnectionLinkShimClient %08x:\tCSubConnectionLinkShimClient() created for id %d, iConnection %08x"),
+ this, aSubConnectionShim.Id(), &iConnection));
+ }
+
+CSubConnectionLinkShimClient::~CSubConnectionLinkShimClient()
+/**
+Complete all outstanding RMessages
+
+*/
+ {
+ __CFLOG_VAR((KShimScprTag, KShimScprClientTag, _L8("CSubConnectionLinkShimClient %08x:\t~CSubConnectionLinkShimClient(), id %d, iSubConnectionShim %08x"),
+ this, iSubConnectionShim.Id(), this, &iSubConnectionShim));
+
+ if(iActivityTimer)
+ {
+ iActivityTimer->Cancel();
+ delete iActivityTimer;
+ iActivityTimer = NULL;
+ }
+
+ if(iOutstandingProgressNotification)
+ iOutstandingProgressNotificationMessage.Complete(KErrCancel);
+ if(iOutstandingDataSentNotification)
+ iOutstandingDataSentNotificationMessage.Complete(KErrCancel);
+ if(iOutstandingDataReceivedNotification)
+ iOutstandingDataReceivedNotificationMessage.Complete(KErrCancel);
+ if(iOutstandingSubConnectionActivity)
+ iOutstandingSubConnectionActivityMessage.Complete(KErrCancel);
+ if (iSubConnectionShim.DataTransferShim())
+ {
+ iSubConnectionShim.DataTransferShim()->DeRegisterClient(*this);
+ }
+ }
+
+TBool CSubConnectionLinkShimClient::Match(const CConnection& aConnection) const
+ {
+ return &iConnection == &aConnection;
+ }
+
+TSubConnectionUniqueId CSubConnectionLinkShimClient::Id()
+ {
+ return iSubConnectionShim.Id();
+ }
+
+TInt CSubConnectionLinkShimClient::ReturnCode() const
+ {
+ return iReturnCode;
+ }
+
+TInt CSubConnectionLinkShimClient::GetCurrentProgress(TNifProgress& aProgress)
+/**
+Return the current progress state
+
+@param aProgress On return, contains the current progress from the subconnection
+@return KErrNone if successful; otherwise one of the system-wide error codes
+*/
+ {
+ aProgress = iCurrentProgress;
+
+ __CFLOG_VAR((KShimScprTag, KShimScprClientTag, _L8("CSubConnectionLinkShimClient %08x:\tGetCurrentProgress() => (%d, %d)"),
+ this, aProgress.iStage, aProgress.iError));
+ return KErrNone;
+ }
+
+TBool CSubConnectionLinkShimClient::StopL(const RMessage2& aMessage)
+ {
+ TInt stopCode = 0;
+ RConnection::TConnStopType stopType = static_cast(aMessage.Int1());
+ switch (stopType)
+ {
+ case RConnection::EStopNormal:
+ stopCode = KErrCancel;
+ break;
+ case RConnection::EStopAuthoritative:
+ stopCode = KErrConnectionTerminated;
+ break;
+ default:
+ stopCode = KErrCancel; // to remove compile warning
+ User::Leave(KErrArgument);
+ }
+
+ TInt ret = iSubConnectionShim.Provider().Stop(iSubConnectionShim.Id(), stopCode, &aMessage);
+ if (ret != KErrNone)
+ {
+ User::Leave(ret);
+ }
+ return ETrue;
+ }
+
+TBool CSubConnectionLinkShimClient::DataTransferredL(const RMessage2& aMessage)
+ {
+ __CFLOG_VAR((KShimScprTag, KShimScprClientTag, _L8("CSubConnectionLinkShimClient %08x:\tDataTransferredL(), id %d"),
+ this, iSubConnectionShim.Id()));
+
+ TUint uplinkDataVolume;
+ TUint downlinkDataVolume;
+
+ TInt ret = iSubConnectionShim.DataTransferShim()->DataTransferred(uplinkDataVolume, downlinkDataVolume);
+
+ __CFLOG_VAR((KShimScprTag, KShimScprClientTag, _L8("CSubConnectionLinkShimClient %08x:\tDataTransferredL(), ret %d, uplink %d, downlink %d"),
+ this, ret, uplinkDataVolume, downlinkDataVolume));
+
+ if (KErrNone == ret)
+ {
+ TPckg uplinkDataVolumePckg(uplinkDataVolume);
+ TPckg downlinkDataVolumePckg(downlinkDataVolume);
+
+ aMessage.WriteL(1, uplinkDataVolumePckg);
+ aMessage.WriteL(2, downlinkDataVolumePckg);
+ }
+ SetReturnCode(ret);
+ return ETrue;
+ }
+
+TBool CSubConnectionLinkShimClient::DataTransferredCancel(const RMessage2& /*aMessage*/)
+ {
+ return ETrue;
+ }
+
+TBool CSubConnectionLinkShimClient::RequestSubConnectionProgressNotificationL(const RMessage2& aMessage)
+/**
+Request from client for notification of new progress
+
+@pre No outstanding request for data sent notifications for this subconnection on this RConnection
+@param aMessage The client message
+@return ETrue if the client message is to be completed immediately
+@leave leaves with KErrInUse if there is already an outstanding RMessage for progress notification
+*/
+ {
+ if(iOutstandingProgressNotification)
+ User::Leave(KErrInUse);
+
+ TInt clientRequestedProgress = 0;
+ clientRequestedProgress = static_cast(aMessage.Int2());
+ // if - the last progress we sent to the client differs from the current one
+ // and - the current progress is the same as the client requested progress OR
+ // the client has no requested progress...
+ if(iLastProgressToClient!=iCurrentProgress.iStage &&
+ (iCurrentProgress.iStage == clientRequestedProgress || clientRequestedProgress==0))
+ {
+ __CFLOG_VAR((KShimScprTag, KShimScprClientTag, _L8("CSubConnectionLinkShimClient %08x:\tRequestSubConnectionProgressNotificationL() returning progress (%d, %d)"),
+ this, iCurrentProgress.iStage, iCurrentProgress.iError));
+
+ // ...send the current progress back
+ TPckg prog(iCurrentProgress);
+ aMessage.WriteL(1, prog);
+ return ETrue;
+ }
+ else // store the client message until the next progress value arrives
+ {
+ //__FLOG_STATIC1(_L("ESock: "), _L("CSubConnectionLinkShimClient"),
+ // _L("[id: %d]: client requested progress notification; storing client message for later completion"),
+ // iSubConnectionsUniqueId);
+ __CFLOG_VAR((KShimScprTag, KShimScprClientTag, _L8("CSubConnectionLinkShimClient %08x:\tRequestSubConnectionProgressNotificationL() storing client message for later completion"), this));
+
+ iClientRequestedProgress = clientRequestedProgress; // may be 0
+ iOutstandingProgressNotificationMessage = aMessage;
+ iOutstandingProgressNotification = ETrue;
+ return EFalse;
+ }
+ }
+
+TBool CSubConnectionLinkShimClient::CancelSubConnectionProgressNotification(const RMessage2& /*aMessage*/)
+/**
+Complete outstanding progress notification RMessage
+
+@param aMessage The client message
+@return ETrue if the client message is to be completed immediately
+*/
+ {
+ __CFLOG_VAR((KShimScprTag, KShimScprClientTag, _L8("CSubConnectionLinkShimClient %08x:\tCancelSubConnectionProgressNotification(), id %d, iSubConnectionShim %08x"),
+ iSubConnectionShim.Id(), this));
+
+ if(iOutstandingProgressNotification)
+ {
+ iOutstandingProgressNotificationMessage.Complete(KErrCancel);
+ iOutstandingProgressNotification = EFalse;
+ }
+ return ETrue;
+ }
+
+TBool CSubConnectionLinkShimClient::DataSentNotificationRequestL(const RMessage2& aMessage)
+/**
+Request notification when the specified (absolute or relative) volume of data has been sent
+
+@pre No outstanding request for data sent notifications for this subconnection on this RConnection
+@param aMessage The client message
+@return ETrue if the client message is to be completed immeadiately
+@leave leaves with KErrInUse if there is already an outstanding RMessage for data sent notification
+*/
+ {
+ if(iOutstandingDataSentNotification)
+ User::Leave(KErrInUse);
+
+ TUint requestedUplinkGranularity = static_cast(aMessage.Int1());
+ if(requestedUplinkGranularity) // the client is working in relative mode
+ {
+ iRemainingUplinkGranularity = requestedUplinkGranularity;
+ iDataSentNotificationsInAbsoluteMode = EFalse;
+
+ __CFLOG_VAR((KShimScprTag, KShimScprClientTag, _L8("CSubConnectionLinkShimClient %08x:\tDataSentNotificationRequestL(), id %d (relative mode: %d bytes)"),
+ this, iSubConnectionShim.Id(), iRemainingUplinkGranularity));
+ }
+ else // the client is working in absolute mode
+ {
+ TPckg iUplinkVolumeBuf(iUplinkDataNotificationVolume);
+ aMessage.ReadL(2, iUplinkVolumeBuf);
+ iDataSentNotificationsInAbsoluteMode = ETrue;
+
+ __CFLOG_VAR((KShimScprTag, KShimScprClientTag, _L8("CSubConnectionLinkShimClient %08x:\tDataSentNotificationRequestL() id %d (absolute mode: %d bytes)"),
+ this, iSubConnectionShim.Id(), iUplinkDataNotificationVolume));
+
+ if(iUplinkDataNotificationVolume >= iUplinkDataVolume) // we've already sent this amount of data
+ {
+ __CFLOG_VAR((KShimScprTag, KShimScprClientTag, _L8("CSubConnectionLinkShimClient %08x:\tDataSentNotificationRequestL() id %d (completed immediately"),
+ this, iSubConnectionShim.Id()));
+ return ETrue;
+ }
+ }
+
+ iOutstandingDataSentNotificationMessage = aMessage;
+ iOutstandingDataSentNotification = ETrue;
+
+ iSubConnectionShim.DataTransferShim()->DataSentNotificationRequest(requestedUplinkGranularity, iUplinkDataNotificationVolume);
+
+ return EFalse;
+ }
+
+TBool CSubConnectionLinkShimClient::DataSentNotificationCancel(const RMessage2& /*aMessage*/)
+/**
+Complete outstanding data sent notification RMessage
+
+@param aMessage The client message
+@return ETrue if the client message is to be completed immediately
+*/
+ {
+ __CFLOG_VAR((KShimScprTag, KShimScprClientTag, _L8("CSubConnectionLinkShimClient %08x:\tDataSentNotificationCancel() id %d"),
+ this, iSubConnectionShim.Id()));
+ iSubConnectionShim.DataTransferShim()->DataSentNotificationCancel();
+
+ if(iOutstandingDataSentNotification)
+ {
+ iOutstandingDataSentNotificationMessage.Complete(KErrCancel);
+ iOutstandingDataSentNotification= EFalse;
+ }
+ return ETrue;
+ }
+
+TBool CSubConnectionLinkShimClient::DataReceivedNotificationRequestL(const RMessage2& aMessage)
+/**
+Request notification when the specified (absolute or relative) volume of data has been sent
+
+@pre No outstanding request for data sent notifications for this subconnection on this RConnection
+@param aMessage The client message
+@return ETrue if the client message is to be completed immediately
+@leave leaves with KErrInUse if there is already an outstanding RMessage for data received notification
+*/
+ {
+
+ if(iOutstandingDataReceivedNotification)
+ User::Leave(KErrInUse);
+
+ TUint requestedDownlinkGranularity = static_cast(aMessage.Int1());
+ if(requestedDownlinkGranularity) // the client is working in relative mode
+ {
+ iRemainingDownlinkGranularity = requestedDownlinkGranularity;
+ iDataReceivedNotificationsInAbsoluteMode = EFalse;
+
+ __CFLOG_VAR((KShimScprTag, KShimScprClientTag, _L8("CSubConnectionLinkShimClient %08x:\tDataReceivedNotificationRequestL() id %d (relative mode: %d bytes)"),
+ this, iSubConnectionShim.Id(), iRemainingDownlinkGranularity));
+ }
+ else // the client is working in absolute mode
+ {
+ TPckg iDownlinkVolumeBuf(iDownlinkDataNotificationVolume);
+ aMessage.ReadL(2, iDownlinkVolumeBuf);
+ iDataReceivedNotificationsInAbsoluteMode = ETrue;
+
+ __CFLOG_VAR((KShimScprTag, KShimScprClientTag, _L8("CSubConnectionLinkShimClient %08x:\tDataReceivedNotificationRequestL() id %d (absolute mode: %d bytes)"),
+ this, iSubConnectionShim.Id(), iDownlinkDataNotificationVolume));
+
+ if(iDownlinkDataNotificationVolume >= iDownlinkDataVolume) // we've already received this amount of data
+ {
+ __CFLOG_VAR((KShimScprTag, KShimScprClientTag, _L8("CSubConnectionLinkShimClient %08x:\tDataReceivedNotificationRequestL() id %d(completed immediately)"),
+ this, iSubConnectionShim.Id()));
+ return ETrue;
+ }
+ }
+
+ iOutstandingDataReceivedNotificationMessage = aMessage;
+ iOutstandingDataReceivedNotification = ETrue;
+
+ iSubConnectionShim.DataTransferShim()->DataReceivedNotificationRequest(requestedDownlinkGranularity, iDownlinkDataNotificationVolume);
+
+ return EFalse;
+ }
+
+TBool CSubConnectionLinkShimClient::DataReceivedNotificationCancel(const RMessage2& /*aMessage*/)
+/**
+Complete outstanding data received notification RMessage
+
+@param aMessage The client message
+@return ETrue if the client message is to be completed immediately
+*/
+ {
+ __CFLOG_VAR((KShimScprTag, KShimScprClientTag, _L8("CSubConnectionLinkShimClient %08x:\tDataReceivedNotificationCancel() id %d"),
+ this, iSubConnectionShim.Id()));
+
+ iSubConnectionShim.DataTransferShim()->DataReceivedNotificationCancel();
+
+ if(iOutstandingDataReceivedNotification)
+ {
+ iOutstandingDataReceivedNotificationMessage.Complete(KErrCancel);
+ iOutstandingDataReceivedNotification = EFalse;
+ }
+ return ETrue;
+ }
+
+TBool CSubConnectionLinkShimClient::IsSubConnectionActiveRequestL(const RMessage2& aMessage)
+/**
+Indicate whether the subconnection is active or not
+
+@note Checks at a period defined in the RMessage
+@note Only returns when the state varies from that provided by the client
+@param aMessage The client message
+@return ETrue if the client message is to be completed immediately
+*/
+ {
+ if(iOutstandingSubConnectionActivity)
+ User::Leave(KErrInUse);
+
+ __CFLOG_VAR((KShimScprTag, KShimScprClientTag, _L8("CSubConnectionLinkShimClient %08x:\tIsSubConnectionActiveRequestL() id %d"),
+ this, iSubConnectionShim.Id()));
+
+ // Create the activity timer if it doesn't already exist (from a previous request)
+ if(!iActivityTimer)
+ {
+ __CFLOG_VAR((KShimScprTag, KShimScprClientTag, _L8("CSubConnectionLinkShimClient %08x:\tIsSubConnectionActiveRequestL() id %d - creating timer"),
+ this, iSubConnectionShim.Id()));
+
+ iActivityTimer = CActivityTimer::NewL(this, KActivityTimerPriority);
+ }
+
+ TPckg subConnectionActiveBuf(iClientBelievesSubConnectionActive);
+ aMessage.ReadL(2, subConnectionActiveBuf);
+
+ iSubConnectionShim.DataTransferShim()->DataTransferred(iPreviousUplinkDataVolume, iPreviousDownlinkDataVolume);
+
+ // get clients request timer period and check validity
+ TInt timeInSeconds = static_cast(aMessage.Int1());
+ if(timeInSeconds > KMaxTimerPeriod) // secs; underlying CTimer limitation
+ {
+ __CFLOG_VAR((KShimScprTag, KShimScprClientTag, _L8("CSubConnectionLinkShimClient %08x:\tIsSubConnectionActiveRequestL() id %d - rejecting timer request (%d secs)"),
+ this, iSubConnectionShim.Id(), timeInSeconds));
+
+ SetReturnCode(KErrArgument);
+ return ETrue;
+ }
+
+ // store in microsecs
+ iRequestedClientTimerPeriod = timeInSeconds * KMicrosecondsInASecond;
+
+ __CFLOG_VAR((KShimScprTag, KShimScprClientTag, _L8("CSubConnectionLinkShimClient %08x:\tIsSubConnectionActiveRequestL() id %d, iClientBelievesSubConnectionActive %d, iRequestedClientTimerPeriod %d - Starting timer."),
+ this, iSubConnectionShim.Id(), iClientBelievesSubConnectionActive, iRequestedClientTimerPeriod));
+
+ iOutstandingSubConnectionActivity = ETrue;
+ iOutstandingSubConnectionActivityMessage = aMessage;
+
+ iActivityTimer->After(iRequestedClientTimerPeriod);
+ return EFalse;
+ }
+
+TBool CSubConnectionLinkShimClient::IsSubConnectionActiveCancel(const RMessage2& /*aMessage*/)
+ {
+ __CFLOG_VAR((KShimScprTag, KShimScprClientTag, _L8("CSubConnectionLinkShimClient %08x:\tIsSubConnectionActiveCancel() id %d, connection %08x"),
+ this, iSubConnectionShim.Id(), &iConnection));
+
+ if(iOutstandingSubConnectionActivity)
+ {
+ iActivityTimer->Cancel();
+ ASSERT(iOutstandingSubConnectionActivity); // assert that the timer cancelled rather than completing
+ iOutstandingSubConnectionActivityMessage.Complete(KErrCancel);
+ iOutstandingSubConnectionActivity = EFalse;
+ }
+ return ETrue;
+ }
+
+TInt CSubConnectionLinkShimClient::GetSubConnectionInfo(const RMessage2& aMessage)
+ {
+ TUint index = static_cast(aMessage.Int0());
+
+ TInt result = KErrNone;
+ TRAP(result,
+
+ // Find the size of the clients descriptor
+ TInt sizeOfSubConnInfo = aMessage.GetDesLengthL(1);
+
+ // Create an appropriately sized descriptor server-side
+ HBufC8* subConnectionInfo;
+ subConnectionInfo = HBufC8::NewL(sizeOfSubConnInfo);
+ CleanupStack::PushL (subConnectionInfo);
+
+ TPtr8 subConnInfoPtr(subConnectionInfo->Des());
+
+ // and read the client data across
+ aMessage.ReadL(1, subConnInfoPtr);
+
+ // Pass it down to the connection provider using the appropriate call
+ if(index==KUseEmbeddedUniqueId)
+ {
+ result = iSubConnectionShim.Provider().GetSubConnectionInfo(subConnInfoPtr);
+ }
+ else
+ {
+ result = iSubConnectionShim.Provider().GetSubConnectionInfo(index, subConnInfoPtr);
+ }
+
+ if (KErrNone == result)
+ {
+ // Write result back into client's address space
+ aMessage.WriteL(1, subConnInfoPtr);
+ }
+
+ CleanupStack::PopAndDestroy (subConnectionInfo);
+ ); // END TRAP
+
+ SetReturnCode(result);
+ return ETrue;
+ }
+
+void CSubConnectionLinkShimClient::ProgressNotification(TInt aStage, TInt aError, const TDesC8& /*aInfo*/)
+/**
+Notification of new progress stage from nif/agent via Nifman and CInterface
+
+@param aStage The progress stage that has been reached
+@param aError Any errors that have occured
+@param aInfo No idea what this is, it's inserted by CInterface and is currently null
+*/
+ {
+ __CFLOG_VAR((KShimScprTag, KShimScprClientTag, _L8("CSubConnectionLinkShimClient %08x:\tProgressNotification(%d, %d) id %d"),
+ this, aStage, aError, iSubConnectionShim.Id()));
+
+ iCurrentProgress.iStage = aStage;
+ iCurrentProgress.iError = aError;
+
+ if(iOutstandingProgressNotification)
+ {
+ if(iLastProgressToClient!=iCurrentProgress.iStage && /* we could assume this since we've probably just received a new progress value */
+ (iCurrentProgress.iStage == iClientRequestedProgress || iClientRequestedProgress==0))
+ {
+ TPckg prog(iCurrentProgress);
+ TInt err= iOutstandingProgressNotificationMessage.Write(1, prog);
+ iOutstandingProgressNotificationMessage.Complete(err);
+ iOutstandingProgressNotification= EFalse;
+ }
+ }
+ }
+
+TInt CSubConnectionLinkShimClient::NotifyDataSent(TUint aUplinkVolume, TUint aCurrentGranularity)
+/**
+Upcall from connection provider, via MConnDataTransferNotify. Update the sent bytes count, and if necessary
+complete any outstanding RMessages
+
+@param aUplinkVolume The total number of bytes sent on this subconnection
+@note Upcall from CInterface via CConnection
+*/
+ {
+ __CFLOG_VAR((KShimScprTag, KShimScprClientTag, _L8("CSubConnectionLinkShimClient %08x:\tNotifyDataSent(aUplinkVolume %d, aCurrentGranularity %d) id %d"),
+ this, aUplinkVolume, aCurrentGranularity, iSubConnectionShim.Id()));
+
+ iUplinkDataVolume = aUplinkVolume;
+
+ TBool completeMessage = EFalse;
+
+ if(iOutstandingDataSentNotification)
+ {
+ __CFLOG_VAR((KShimScprTag, KShimScprClientTag, _L8("CSubConnectionLinkShimClient %08x:\tid %d - outstanding client request"),
+ this, iSubConnectionShim.Id()));
+ switch(iDataSentNotificationsInAbsoluteMode)
+ {
+ case ETrue:
+ __CFLOG_VAR((KShimScprTag, KShimScprClientTag, _L8("CSubConnectionLinkShimClient %08x:\tid %d - %d bytes remaining to be sent before client completion (absolute mode)"),
+ this, iSubConnectionShim.Id(), (iUplinkDataNotificationVolume - iUplinkDataVolume)));
+
+ if (iUplinkDataVolume >= iUplinkDataNotificationVolume)
+ {
+ completeMessage = ETrue;
+ }
+ break;
+
+ case EFalse: // in relative mode
+ iRemainingUplinkGranularity -= aCurrentGranularity;
+
+ __CFLOG_VAR((KShimScprTag, KShimScprClientTag, _L8("CSubConnectionLinkShimClient %08x:\tid %d - %d bytes remaining to be sent before client completion (relative mode)."),
+ this, iSubConnectionShim.Id(), iRemainingUplinkGranularity));
+
+ if(iRemainingUplinkGranularity <= 0)
+ {
+ completeMessage = ETrue;
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ if(completeMessage)
+ {
+ __CFLOG_VAR((KShimScprTag, KShimScprClientTag, _L8("CSubConnectionLinkShimClient %08x:\tid %d - completing client request."),
+ iSubConnectionShim.Id(), this));
+ TPckg iUplinkDataVolumePckg(iUplinkDataVolume);
+ TInt ret= iOutstandingDataSentNotificationMessage.Write(2, iUplinkDataVolumePckg);
+ iOutstandingDataSentNotificationMessage.Complete(ret);
+ iOutstandingDataSentNotification= EFalse;
+ }
+ return KErrNone;
+ }
+
+TInt CSubConnectionLinkShimClient::NotifyDataReceived(TUint aDownlinkVolume, TUint aCurrentGranularity)
+/**
+Update the received bytes count, and if necessary complete any outstanding RMessages
+
+@param aDownlinkVolume The total number of bytes sent on this subconnection
+@param aCurrentGranularity The currently set granularity of notifications from the CInterface object
+@note Upcall from CInterface via CConnection
+*/
+ {
+ __CFLOG_VAR((KShimScprTag, KShimScprClientTag, _L8("CSubConnectionLinkShimClient %08x:\tNotifyDataReceived(aDownlinkVolume %d, aCurrentGranularity %d)"),
+ this, iSubConnectionShim.Id(), aDownlinkVolume, aCurrentGranularity));
+
+ iDownlinkDataVolume = aDownlinkVolume;
+
+ TBool completeMessage = EFalse;
+
+ if(iOutstandingDataReceivedNotification)
+ {
+ __CFLOG_VAR((KShimScprTag, KShimScprClientTag, _L8("CSubConnectionLinkShimClient %08x:\tid %d - outstanding client request"),
+ this, iSubConnectionShim.Id()));
+ switch(iDataReceivedNotificationsInAbsoluteMode)
+ {
+ case ETrue:
+ __CFLOG_VAR((KShimScprTag, KShimScprClientTag, _L8("CSubConnectionLinkShimClient %08x:\tid %d - %d bytes remaining to be sent before client completion (absolute mode)."),
+ this, iSubConnectionShim.Id(), (iDownlinkDataNotificationVolume - iDownlinkDataVolume)));
+
+ if (iDownlinkDataVolume >= iDownlinkDataNotificationVolume)
+ {
+ completeMessage = ETrue;
+ }
+ break;
+
+ case EFalse: // in relative mode
+ iRemainingDownlinkGranularity -= aCurrentGranularity;
+
+ __CFLOG_VAR((KShimScprTag, KShimScprClientTag, _L8("CSubConnectionLinkShimClient %08x:\tid %d - %d bytes remaining to be sent before client completion (relative mode)."),
+ this, iSubConnectionShim.Id(), iRemainingDownlinkGranularity));
+
+ if(iRemainingDownlinkGranularity <= 0)
+ {
+ completeMessage = ETrue;
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ if(completeMessage)
+ {
+ __CFLOG_VAR((KShimScprTag, KShimScprClientTag, _L8("CSubConnectionLinkShimClient %08x:\tid %d - completing client request."),
+ this, &iSubConnectionShim));
+ TPckg iDownlinkDataVolumePckg(iDownlinkDataVolume);
+ TInt ret= iOutstandingDataReceivedNotificationMessage.Write(2, iDownlinkDataVolumePckg);
+ iOutstandingDataReceivedNotificationMessage.Complete(ret);
+ iOutstandingDataReceivedNotification= EFalse;
+ }
+ return KErrNone;
+ }
+
+TInt CSubConnectionLinkShimClient::NotifyDataTransferred(const TUint aUplinkVolume, const TUint aDownlinkVolume)
+/**
+Upcall from CConnection, indicating that it has performed a DataTransferred request and notifying us of the results
+
+@param aUplinkVolume The total amount of data sent so far on this subconnection
+@param aDownlinkVolume The total amount of data received so far on this subconnection
+*/
+ {
+ // Update internal data counters, complete any outstanding RMessages if appropriate
+ // No granularities because we don't know what they are, and because we're taking the
+ // opportunity of using the client's call to update our counters, ie. it's not an
+ // actual notification
+ NotifyDataSent(aUplinkVolume, 0);
+ NotifyDataReceived(aDownlinkVolume, 0);
+ return KErrNone;
+ }
+
+void CSubConnectionLinkShimClient::CheckSubConnectionActivity()
+/**
+Check for activity on the subconnection since the last call (to IsSubConnectionActiveRequest() )
+
+*/
+ {
+ __CFLOG_VAR((KShimScprTag, KShimScprClientTag, _L8("CSubConnectionLinkShimClient %08x:\tCheckSubConnectionActivity() id %d"),
+ this, iSubConnectionShim.Id()));
+
+ ASSERT(iOutstandingSubConnectionActivity);
+
+ TUint newUplinkDataVolume;
+ TUint newDownlinkDataVolume;
+
+ iSubConnectionShim.DataTransferShim()->DataTransferred(newUplinkDataVolume, newDownlinkDataVolume);
+
+ TBool dataTransferred = (newUplinkDataVolume!=iPreviousUplinkDataVolume) ||
+ (newDownlinkDataVolume!=iPreviousDownlinkDataVolume);
+
+ // If the data transferred volumes haven't change but the client thinks the connection is active...
+ if(iClientBelievesSubConnectionActive)
+ {
+ __CFLOG_VAR((KShimScprTag, KShimScprClientTag, _L8("CSubConnectionLinkShimClient %08x:\tid %d - client believes subconnection active"),
+ this, iSubConnectionShim.Id()));
+
+ if(dataTransferred) // ...and it is, so just start another timer cycle
+ {
+ __CFLOG_VAR((KShimScprTag, KShimScprClientTag, _L8("CSubConnectionLinkShimClient %08x:\tid %d - ...and it is. Restart timer for another cycle."),
+ this, iSubConnectionShim.Id()));
+
+ iPreviousUplinkDataVolume = newUplinkDataVolume;
+ iPreviousDownlinkDataVolume = newDownlinkDataVolume;
+ iActivityTimer->After(iRequestedClientTimerPeriod);
+ }
+ else // ...tell them it's not
+ {
+ __CFLOG_VAR((KShimScprTag, KShimScprClientTag, _L8("CSubConnectionLinkShimClient %08x:\tid %d - ...and it isn't. Notify client."),
+ this, iSubConnectionShim.Id()));
+
+ TPckg subConnectionActiveBuf(dataTransferred);
+ TInt ret= iOutstandingSubConnectionActivityMessage.Write(2, subConnectionActiveBuf);
+ iOutstandingSubConnectionActivityMessage.Complete(ret);
+ iOutstandingSubConnectionActivity = EFalse;
+ }
+ }
+ else // client believes subconnection is idle...
+ {
+ __CFLOG_VAR((KShimScprTag, KShimScprClientTag, _L8("CSubConnectionLinkShimClient %08x:\tid %d - client believes subconnection idle..."),
+ this, iSubConnectionShim.Id()));
+
+ if(dataTransferred)
+ {
+ __CFLOG_VAR((KShimScprTag, KShimScprClientTag, _L8("CSubConnectionLinkShimClient %08x:\tid %d - ...and it isn't. Notify client."),
+ this, iSubConnectionShim.Id()));
+
+ TPckg subConnectionActiveBuf(dataTransferred);
+ TInt ret= iOutstandingSubConnectionActivityMessage.Write(2, subConnectionActiveBuf);
+ iOutstandingSubConnectionActivityMessage.Complete(ret);
+ iOutstandingSubConnectionActivity = EFalse;
+ }
+ else // ...and it is, so just start another timer cycle
+ {
+ __CFLOG_VAR((KShimScprTag, KShimScprClientTag, _L8("CSubConnectionLinkShimClient %08x:\tid %d - ...and it is. Restart timer for another cycle."),
+ this, iSubConnectionShim.Id()));
+
+ iPreviousUplinkDataVolume = newUplinkDataVolume;
+ iPreviousDownlinkDataVolume = newDownlinkDataVolume;
+ iActivityTimer->After(iRequestedClientTimerPeriod);
+ }
+ }
+ }
+
+CSubConnectionLinkShimClient::CActivityTimer* CSubConnectionLinkShimClient::CActivityTimer::NewL(CSubConnectionLinkShimClient* aOwner, TInt aPriority)
+/**
+Construct a new CActivityTimer()
+
+@param aOwner The owning CSubConnectionLinkShimClient (on which we call methods upon timer completion)
+@param aPriority The priority of the active object underlying this timer object
+@return A pointer to the newly constructed CActivityTimer object
+*/
+ {
+ CSubConnectionLinkShimClient::CActivityTimer* newActivityTimer =
+ new(ELeave) CSubConnectionLinkShimClient::CActivityTimer(aOwner, aPriority);
+
+ CleanupStack::PushL(newActivityTimer);
+ newActivityTimer->ConstructL();
+ CleanupStack::Pop(newActivityTimer);
+ return newActivityTimer;
+ }
+
+void CSubConnectionLinkShimClient::CActivityTimer::RunL()
+/**
+Call the owning object's check activity method
+
+*/
+ {
+ iOwner->CheckSubConnectionActivity();
+ }
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipcprshim/src/shimconnsettings.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipcprshim/src/shimconnsettings.cpp Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,46 @@
+// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+/**
+ @file SS_CONNSETTINGS.CPP
+*/
+
+#include "shimconnsettings.h"
+#include "es_prot.h"
+
+void CConnectionSettingsShim::DoGetBoolSettingL(const TDesC& aSettingName, TBool& aValue, const RMessagePtr2* aMessage )
+ {
+ iConnectionProvdBase.DoGetBoolSettingL( aSettingName, aValue, aMessage );
+ }
+
+void CConnectionSettingsShim::DoGetDes16SettingL(const TDesC& aSettingName, TDes16& aValue, const RMessagePtr2* aMessage )
+ {
+ iConnectionProvdBase.DoGetDes16SettingL( aSettingName, aValue, aMessage );
+ }
+
+void CConnectionSettingsShim::DoGetDes8SettingL(const TDesC& aSettingName, TDes8& aValue, const RMessagePtr2* aMessage )
+ {
+ iConnectionProvdBase.DoGetDes8SettingL( aSettingName, aValue, aMessage );
+ }
+
+void CConnectionSettingsShim::DoGetIntSettingL(const TDesC& aSettingName, TUint32& aValue, const RMessagePtr2* aMessage )
+ {
+ iConnectionProvdBase.DoGetIntSettingL( aSettingName, aValue, aMessage );
+ }
+
+HBufC* CConnectionSettingsShim::DoGetLongDesSettingLC(const TDesC& aSettingName, const RMessagePtr2* aMessage )
+ {
+ return iConnectionProvdBase.DoGetLongDesSettingLC( aSettingName, aMessage );
+ }
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipcprshim/src/shimcpr.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipcprshim/src/shimcpr.cpp Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,681 @@
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#include
+#include
+#include
+#include "shimcpr.h"
+#include "shimconnsettings.h"
+#include "es_prot.h"
+#include "shimnifmansconn.h"
+#include "ss_glob.h"
+#include "connectionSelectorShim.h"
+
+using namespace ESock;
+
+//PREQ399_REMOVE
+#ifdef SYMBIAN_NETWORKING_3GPPDEFAULTQOS
+#include
+#endif
+//SYMBIAN_NETWORKING_3GPPDEFAULTQOS //PREQ399_REMOVE
+
+
+CConnectionProviderShim* CConnectionProviderShim::NewL(CConnectionProviderFactoryBase& aFactory)
+ {
+ CConnectionProviderShim* self = new (ELeave) CConnectionProviderShim(aFactory);
+ CleanupStack::PushL(self);
+ self->ConstructL();
+ CleanupStack::Pop(self);
+ return self;
+ }
+
+void CConnectionProviderShim::ConstructL()
+ {
+ __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionProviderShim %08x:\tConstructL"), this));
+ // Do nothing, atleast for now;
+ }
+
+CConnectionProviderShim::~CConnectionProviderShim()
+ {
+ delete iConnectionSettings;
+
+ // As soon as the provider has a valid iProvider pointer the ownership has passed to this provider
+ delete iProvider;
+
+ iSelectors.Close();
+ iConnections.Close();
+ iNifManSubConnections.Close();
+ __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionProviderShim %08x:\t~CConnectionProviderShim"), this));
+ }
+
+void CConnectionProviderShim::AddRefL(CConnectionSelectorShim* aSelector)
+ {
+ TInt index = iSelectors.Find(aSelector);
+ if (-1 == index)
+ {
+ __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionProviderShim %08x:\tAddRef(aSelector %x) adding selector"), this, aSelector));
+ iSelectors.AppendL(aSelector);
+ }
+ else
+ {
+ __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionProviderShim %08x:\tAddRef(aSelector %x) selector already known"), this, aSelector));
+ }
+ }
+
+
+void CConnectionProviderShim::ReleaseRef(CConnectionSelectorShim* aSelector)
+ {
+ TInt index = iSelectors.Find(aSelector);
+ if (-1 != index)
+ {
+ iSelectors[index]->SetProviderNull();
+ iSelectors.Remove(index);
+ __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionProviderShim %08x:\tReleaseRef(aSelector %x) removng selector"), this, aSelector));
+ }
+ else
+ {
+ __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionProviderShim %08x:\tReleaseRef(aSelector %x) selector not known"), this, aSelector));
+ }
+
+ if (ShouldIDeleteNow())
+ {
+ DeleteMeNow();
+ }
+ }
+
+// CConnectionProviderBase virtuals
+TBool CConnectionProviderShim::ShouldIDeleteNow()
+ {
+ TInt selectors = iSelectors.Count();
+ if (0 == selectors && !iHasAnyControlClientJoined)
+ {
+ return ETrue;
+ }
+
+ return EFalse;
+ }
+
+void CConnectionProviderShim::DoStartL(Meta::SMetaData& aParams, const RMessagePtr2* aMessage)
+ {
+#ifdef _DEBUG
+ Meta::STypeId tid = aParams.GetTypeId();
+ ASSERT( tid.iUid == TUid::Uid( KESockMessagesImplementationUid ) && tid.iType == EESockMessageConnStart);
+#endif
+
+ CConnStart& p = static_cast(aParams);
+ if ( p.ConnPrefs() )
+ {
+ __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionProviderShim %08x:\tDoStartL() with prefs"), this));
+ iProvider->StartL(p.StartType(), *p.ConnPrefs(), aMessage);
+ }
+ else
+ {
+ __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionProviderShim %08x:\tDoStartL() without prefs"), this));
+ iProvider->StartL(p.StartType(), aMessage);
+ }
+ }
+
+void CConnectionProviderShim::DoDataClientJoiningL(MConnectionDataClient& aDataClient)
+ {
+ (void)aDataClient;
+ __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionProviderShim %08x:\tDoDataClientJoiningL(aDataClient %x) [iDataClients.Count()=%d]"), this, &aDataClient, iDataClients.Count()));
+ }
+
+void CConnectionProviderShim::DoDataClientLeaving(MConnectionDataClient& aDataClient)
+ {
+ (void)aDataClient;
+ __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionProviderShim %08x:\tDoDataClientLeaving(aDataClient %x) [iDataClients.Count()=%d]"), this, &aDataClient, iDataClients.Count()));
+ }
+
+void CConnectionProviderShim::DoControlClientJoiningL(MConnectionControlClient& aControlClient)
+ {
+ (void)aControlClient;
+ __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionProviderShim %08x:\tDoControlClientJoiningL(aControlClient %x) [iControlClients.Count()=%d]"), this, &aControlClient, iControlClients.Count()));
+ }
+
+void CConnectionProviderShim::DoControlClientLeaving(MConnectionControlClient& aControlClient)
+ {
+ (void)aControlClient;
+ __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionProviderShim %08x:\tDoControlClientLeaving(aControlClient %x) [iControlClients.Count()=%d]"), this, &aControlClient, iControlClients.Count()));
+ }
+
+TInt CConnectionProviderShim::DoStop(TInt aError, const RMessagePtr2* aMessage)
+ {
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+ // when RConn::Stop() happens, that means one is releasing the connection, so the IAP associated with
+ // the Lock should go away. The code below will set the status of IAP locked to false, so that any further
+ // Start can lock it
+ iFactoryShim->SetIAPLockStatus(EFalse,-1);
+#endif // SYMBIAN_NETWORKING_UMTSR5
+ return iProvider->Stop( aError, aMessage );
+ }
+
+void CConnectionProviderShim::DoProgressL(Meta::SMetaData& aParams) const
+ {
+#ifdef _DEBUG
+ Meta::STypeId tid = aParams.GetTypeId();
+#endif
+ ASSERT( tid.iUid == TUid::Uid( KESockMessagesImplementationUid ) && tid.iType == EESockMessageCommsNifBuffer);
+ TMetaNifProgressBuf& p = static_cast(aParams);
+ iProvider->ProgressL( p.iNifProgressBuf );
+ }
+
+void CConnectionProviderShim::DoLastProgressError(Meta::SMetaData& aBuffer)
+ {
+#ifdef _DEBUG
+ Meta::STypeId tid = aBuffer.GetTypeId();
+#endif
+ ASSERT( tid.iUid == TUid::Uid( KESockMessagesImplementationUid ) && tid.iType == EESockMessageCommsNifBuffer);
+ TMetaNifProgressBuf& p = static_cast(aBuffer);
+ iProvider->LastProgressError( p.iNifProgressBuf );
+ }
+
+void CConnectionProviderShim::DoRequestServiceChangeNotificationL()
+ {
+ iProvider->RequestServiceChangeNotificationL();
+ }
+
+void CConnectionProviderShim::DoCancelServiceChangeNotification()
+ {
+ iProvider->CancelServiceChangeNotification();
+ }
+
+void CConnectionProviderShim::DoControlL(TUint aOptionLevel, TUint aOptionName, Meta::SMetaData& aOption, const RMessagePtr2* aMessage)
+ {
+#ifdef _DEBUG
+ Meta::STypeId tid = aOption.GetTypeId();
+#endif
+ ASSERT( tid.iUid == TUid::Uid( KESockMessagesImplementationUid ) && tid.iType == EESockMessageCommsDes8);
+ ::TMetaDes8& p = static_cast< ::TMetaDes8& >(aOption);
+ ASSERT(p.iDes);
+ iProvider->ControlL(aOptionLevel, aOptionName, *((TDes8*)(p.iDes)), aMessage);
+ }
+
+TInt CConnectionProviderShim::DoAllSubConnectionNotificationEnable()
+ {
+ return iProvider->AllSubConnectionNotificationEnable();
+ }
+
+TInt CConnectionProviderShim::DoCancelAllSubConnectionNotification()
+ {
+ return iProvider->CancelAllSubConnectionNotification();
+ }
+
+void CConnectionProviderShim::DoSendIoctlMessageL(const RMessage2& aMessage)
+ {
+ iProvider->SendIoctlMessageL(aMessage);
+ }
+
+void CConnectionProviderShim::DoSendCancelIoctl()
+ {
+ iProvider->SendCancelIoctl();
+ }
+
+TInt CConnectionProviderShim::DoEnumerateSubConnectionsL(TUint& aCount)
+ {
+ return iProvider->EnumerateSubConnections(aCount);
+ }
+
+TUint CConnectionProviderShim::DoEnumerateClientsL(HBufC8*& /*aClientInfoBuffer*/, TEnumClients /*aClientType*/)
+ {
+ return 0;
+ }
+
+CConnectionSettings& CConnectionProviderShim::DoSettingsAccessL()
+ {
+ ASSERT(iProvider);
+ if (iConnectionSettings == NULL)
+ {
+ iConnectionSettings = new (ELeave)CConnectionSettingsShim(*iProvider);
+ }
+ return *iConnectionSettings;
+ }
+
+void CConnectionProviderShim::ConnectionJoiningL( const CConnection& aConnection )
+ {
+ if (iConnections.Find(&aConnection) < 0)
+ {
+ iConnections.AppendL(&aConnection);
+ }
+ TInt count = iNifManSubConnections.Count();
+ for ( TInt n = 0; n < count; n++ )
+ {//here we exactly know what we are dealing with hence the cast
+ CNifManSubConnectionShim* c = static_cast(iNifManSubConnections[n]);
+ MSubInterfaceShim* subint = static_cast(c);
+ subint->ConnectionJoiningL(aConnection);
+ }
+ }
+
+void CConnectionProviderShim::ConnectionLeaving( const CConnection& aConnection )
+ {
+ TInt count = iNifManSubConnections.Count();
+ for ( TInt n = 0; n < count; n++ )
+ {//here we exactly know what we are dealing with hence the cast
+ CNifManSubConnectionShim* c = static_cast(iNifManSubConnections[n]);
+ MSubInterfaceShim* subint = static_cast(c);
+ subint->ConnectionLeaving(aConnection);
+ }
+ TInt n = iConnections.Find(&aConnection);
+ if (n >= 0)
+ {
+ iConnections.Remove(n);
+ }
+ }
+
+void CConnectionProviderShim::DoConnectionControlActivityL( TControlActivity aControlActivity, const Meta::SMetaData* aData, const RMessagePtr2* aMessage )
+ {
+ switch (aControlActivity)
+ {
+ case EAttachNormal:
+ case EAttachMonitor:
+ iProvider->AttachToConnectionL(iConnectionInfo.Right(KConnInfoPart), aControlActivity == EAttachMonitor, aMessage);
+ if ( aData == NULL )
+ {
+ break;
+ }
+ aControlActivity = EConnJoin; //and fall through
+ case EConnJoin:
+ if ( !aData || !aData->IsTypeOf( STypeId::CreateSTypeId(KShimCommsUid, Meta::KNetMetaTypeAny) ) )
+ {
+ User::Leave(KErrArgument);
+ }
+ ConnectionJoiningL(static_cast(aData)->iConnection);
+ break;
+ case EConnLeave:
+ if ( !aData || !aData->IsTypeOf( STypeId::CreateSTypeId(KShimCommsUid, Meta::KNetMetaTypeAny) ) )
+ {
+ User::Leave(KErrArgument);
+ }
+ ConnectionLeaving(static_cast(aData)->iConnection);
+ break;
+ case ESetUsageProfile:
+ {
+ ASSERT(aData);
+ #ifdef _DEBUG
+ Meta::STypeId tid = aData->GetTypeId();
+ #endif
+ ASSERT( tid.iUid == TUid::Uid( KESockMessagesImplementationUid ) && tid.iType == EESockMessageCommsDes8);
+ const ::TMetaDes8* p = static_cast(aData);
+ ASSERT(p->iDes);
+ const TUint* profile = reinterpret_cast(p->iDes->Ptr());
+ if (iUsageProfile != *profile)
+ {
+ __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionProviderShim %08x:\tSetting usage profile %x -> %x"),
+ this, iUsageProfile & 0xff, *profile & 0xff));
+ iUsageProfile = *profile;
+ iProvider->SetUsageProfile(*profile);
+ }
+ break;
+ }
+ };
+ }
+
+CNifManSubConnectionShim* CConnectionProviderShim::FindSubConnection( TSubConnectionUniqueId aId )
+ {
+ CNifManSubConnectionShim* client = NULL;
+ TInt count = iNifManSubConnections.Count();
+ for ( TInt n = 0; n < count; n++ )
+ {//here we exactly know what we are dealing with hence the cast
+ CNifManSubConnectionShim* c = static_cast(iNifManSubConnections[n]);
+ MSubInterfaceShim* subint = static_cast(c);
+ if (subint->Id() == aId )
+ {
+ client = c;
+ break;
+ }
+ }
+ return client;
+ }
+
+// Define methods from the interface specified by MConnectionNotify
+void CConnectionProviderShim::ProgressNotification(TInt aStage, TInt aError)
+ {
+ __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionProviderShim %08x:\tProgressNotification(%d, %d)"), this, aStage, aError));
+
+ TInt max = iControlClients.Count();
+ for (TInt n = max - 1 ; n >= 0 ; n--)
+ {
+ MConnectionControlClient* client = iControlClients[n];
+ client->ProgressNotification(aStage, aError);
+ //check whether the client dissapeared or not
+ if ( n < iControlClients.Count() && client == iControlClients[n] )
+ {
+ if (aStage == KLinkLayerOpen)
+ {
+ iControlClients[n]->LayerUp(aError);
+ }
+ else if (aError != KErrNone)
+ {
+ iControlClients[n]->ConnectionError(aStage, aError);
+ }
+ }
+ }
+ if (aStage == KConnectionUninitialised && !iIsAlreadyUninitialised /* Guard against receiving KConnectionUninitialised multiple times*/)
+ {
+ iIsAlreadyUninitialised = ETrue;
+ TInt selectors = iSelectors.Count();
+ for (TInt i = 0; i < selectors; ++i)
+ {
+ iSelectors[i]->SetProviderNull();
+ }
+ DeleteMeNow();
+ }
+ }
+
+void CConnectionProviderShim::LinkLayerOpen(TInt /*aError*/)
+/**
+Notification from the connection provider - ignored.
+
+*/
+ {
+ }
+
+void CConnectionProviderShim::LinkLayerClosed(TInt /*aError*/)
+/**
+Notification from the connection provider - not currently used.
+
+*/
+ {
+ User::Invariant();
+ }
+
+void CConnectionProviderShim::SelectionComplete(TInt aError, const TDesC8& /*aSelectionInfo*/)
+ {//obsolete call selection done by factories this could happen only on Attach
+ __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionProviderShim %08x:\tSelectionComplete(%d)"), this, aError));
+ ProgressNotification(KFinishedSelection, aError);
+ }
+
+void CConnectionProviderShim::ConnectionError(TInt /*aError*/)
+/**
+Notification from the connection provider - not currently used.
+
+*/
+ {
+ User::Invariant();
+ }
+
+void CConnectionProviderShim::ProgressNotification(TSubConnectionUniqueId aSubConnectionUniqueId, TInt aStage, TInt aError)
+ {
+ MSubInterfaceShim* subint = static_cast(FindSubConnection(aSubConnectionUniqueId));
+ if (subint)
+ {//here we exactly know what we are dealing with hence the cast
+ subint->ProgressNotification(aStage, aError, KNullDesC8);
+ }
+ else
+ {
+ __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionProviderShim %08x:\tProgressNotification(subConnectionId %d, %d, %d) subconnection ID lookup error occured"),
+ this, aSubConnectionUniqueId, aStage, aError));
+ }
+ }
+
+void CConnectionProviderShim::ServiceChangeNotification(TUint32 aId, const TDesC& aType)
+ {
+ TInt max = iControlClients.Count();
+ for (TInt i = max - 1 ; i >= 0 ; i--)
+ {
+ iControlClients[i]->ServiceChangeNotification(aId, aType);
+ }
+ }
+
+void CConnectionProviderShim::InterfaceStateChangeNotification(TDesC8& /*aInfo*/)
+ {//served through factories
+ ASSERT( NULL );
+ }
+
+void CConnectionProviderShim::NotifyDataSent(TSubConnectionUniqueId aSubConnectionUniqueId, TUint aUplinkVolume)
+ {//here we exactly know what we are dealing with hence the cast
+ MSubInterfaceShim* subint = static_cast(FindSubConnection(aSubConnectionUniqueId));
+ if (subint)
+ {
+ subint->NotifyDataSent(aUplinkVolume,0);
+ }
+ else
+ {
+ __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionProviderShim %08x:\tNotifyDataSent(subConnectionId %d, aUplinkVolume %d) subconnection ID lookup error %d occured"),
+ this, aSubConnectionUniqueId, aUplinkVolume, KErrNotFound));
+ }
+ }
+
+void CConnectionProviderShim::NotifyDataReceived(TSubConnectionUniqueId aSubConnectionUniqueId, TUint aDownlinkVolume)
+ {//here we exactly know what we are dealing with hence the cast
+ MSubInterfaceShim* subint = static_cast(FindSubConnection(aSubConnectionUniqueId));
+ if (subint)
+ {
+ subint->NotifyDataReceived(aDownlinkVolume,0);
+ }
+ else
+ {
+ __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionProviderShim %08x:\tNotifyDataReceived(SubConnectionId %d, aDownLinkVolume %d); subconnection ID lookup error %d occured"),
+ this, aSubConnectionUniqueId, aDownlinkVolume, KErrNotFound));
+ }
+ }
+
+void CConnectionProviderShim::SubConnectionEvent(const TSubConnectionEvent& aSubConnectionEvent)
+/**
+Upcall from connection provider indicating that a subconnection event has occured
+
+@param aSubConnectionEvent The event that occured
+@note Even if the not client is listening for subconnection events, we still need them to manage the array of subconnections by listening for started and stopped events on each subconnection
+@note Events are not handled on a per-subconnection basis - all events are distributed to anyone who uses the AllSubConnectionNotification() method, so no subconnection/subinterface involvement is necessary
+*/
+ {
+ TSubConnectionEventType eventType(aSubConnectionEvent.iEventType);
+ TInt ret = KErrNone;
+
+ TSockManData* sockManData = SockManGlobals::Get();
+ ASSERT(sockManData != NULL);
+
+ CNifManSubConnectionShim* c = NULL;
+ switch(eventType)
+ {
+ case ESubConnectionOpened:
+ {
+ __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionProviderShim %08x:\tSubConnectionEvent() ESubConnectionOpened"), this));
+ c = FindSubConnection(aSubConnectionEvent.iSubConnectionUniqueId);
+ if (c == NULL)
+ {
+ // no instance yet for particular Id, create one
+ TRAP(ret,c = new (ELeave)CNifManSubConnectionShim(*this));
+ if(ret!=KErrNone) // nothing we can do here, no point in throwing error back to event source - nothing they can do about it
+ {
+ // Array integrity will be broken here - may cause errors later with events on this subconnection if we recover
+ __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionProviderShim %08x:\tERROR: Subconnection opened event; could not create CSubInterface - possible OOM condition - subconnection ID %d, error %d - subinterface array integrity failure"),
+ this, aSubConnectionEvent.iSubConnectionUniqueId, ret));
+ break;
+ }
+ ret = iNifManSubConnections.Append(c);
+ if (ret != KErrNone)
+ {
+ __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionProviderShim %08x:\tERROR: could not append CNifManSubConnectionShim to the list - subconnection ID %d, error %d - subinterface array integrity failure"),
+ this, aSubConnectionEvent.iSubConnectionUniqueId, ret));
+ c->DeleteAsync();
+ break;
+ }
+ }
+ MSubInterfaceShim* subint = static_cast(c);
+ subint->SetSubConnectionUniqueId(aSubConnectionEvent.iSubConnectionUniqueId);
+
+ TInt count = iConnections.Count();
+ for (TInt i = count - 1; i >= 0; i--)
+ {
+ TRAP(ret,c->ConnectionJoiningL(*iConnections[i]));
+ if(ret!=KErrNone) // nothing we can do here, no point in throwing error back to event source - nothing they can do about it
+ {
+ // Array integrity will be broken here - may cause errors later with events on this subconnection if we recover
+ __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionProviderShim %08x:\tERROR: connection joining subconnection opened event; - possible OOM condition - subconnection ID %d, error %d - subinterface array integrity failure"),
+ this, aSubConnectionEvent.iSubConnectionUniqueId, ret));
+ break;
+ }
+ }
+ }
+ break;
+
+ case ESubConnectionClosed:
+ __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionProviderShim %08x:\tSubConnectionEvent() ESubConnectionClosed"), this));
+ c = FindSubConnection(aSubConnectionEvent.iSubConnectionUniqueId);
+ if(!c) // then there was an error (probably that we couldn't find the object in the array) - write error to log - not much else we can do
+ {
+ __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionProviderShim %08x:\tERROR: Subconnection closed event; could not find subconnection ID %d, lookup error %d occured"),
+ this, aSubConnectionEvent.iSubConnectionUniqueId, KErrNotFound));
+ }
+ else
+ {
+ iDeleteAsynchOnly = ETrue;
+ TInt n = iNifManSubConnections.Find(c);
+ if (n >= 0)
+ {
+ iNifManSubConnections.Remove(n);
+ }
+ c->DeleteAsync();
+ }
+ break;
+
+ default:
+ // do nothing; we only care about open and close events
+ break;
+ }
+
+ // Rebroadcast all events to all attached control clients
+ TInt max = iControlClients.Count();
+ for (TInt i = max - 1; i >= 0 ; i--)
+ {
+ iControlClients[i]->SubConnectionEvent(NULL, aSubConnectionEvent);
+ }
+
+ CheckDeleteThis();
+
+ }
+
+CConnectionProvdBase* CConnectionProviderShim::GetNifSession()
+ {
+ return iProvider;
+ }
+
+void CConnectionProviderShim::InitialiseL(CConnectionProvdBase* aStarterSession)
+ {
+ ASSERT(aStarterSession);
+ //
+ //can't set the provider twice
+ //
+ ASSERT(iProvider == NULL);
+ iProvider = Nif::NewConnectionL(this, 0);
+ __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionProviderShim %08x:\tInitialiseL(aStarterSession %x) iProvider %x"), this, aStarterSession, iProvider));
+ //
+ // After creating the new nif session (iProvider) we also need to transfer the connection attempt count
+ // from the old nif session (aStarterSession) to the new one, since it was the one that initially
+ // started the interface and connection attempt count was incremented in StartL of nif session
+ //
+ TPckg connectionAttempt(-1);
+ aStarterSession->ControlL(KCOLProvider, KNifSessionGetConnectionAttempt, connectionAttempt, NULL);
+ ASSERT(connectionAttempt() != -1);
+ iProvider->ControlL(KCOLProvider, KNifSessionSetConnectionAttempt, connectionAttempt, NULL);
+ //
+ // Finally, call ConnectionControlActivityL to ensure that the provider is attached to the connection
+ // and progress notifications from the provider end up in the connection object too
+ //
+ DoConnectionControlActivityL(EAttachNormal, NULL, NULL);
+
+//PREQ399_REMOVE
+#ifdef SYMBIAN_NETWORKING_3GPPDEFAULTQOS
+ _LIT(KIfNameField, "IfName");
+ TBuf nifname;
+ iProvider->GetDes16SettingL(KIfNameField(), nifname);
+ if (nifname.CompareF (KSpudName) == 0)
+ {
+ iSubConnectionType = KUmtsGprsSubConnectionProviderFactoryId;
+ }
+#endif //SYMBIAN_NETWORKING_3GPPDEFAULTQOS
+ iHasAnyControlClientJoined = ETrue;
+ }
+
+void CConnectionProviderShim::SetBlockProgressesL(CConnectionProvdBase* aStarterSession)
+/**
+Ensure that the "blocked progress" status of aStarterSession is copied across to iProvider session.
+
+@param aStarterSession session from which to copy "blocked progress" status.
+*/
+ {
+ TPckg blockProgresses(EFalse);
+ aStarterSession->ControlL(KCOLProvider, KNifSessionGetBlockProgresses, blockProgresses, NULL);
+ iProvider->ControlL(KCOLProvider, KNifSessionSetBlockProgresses, blockProgresses, NULL);
+ }
+
+void CConnectionProviderShim::DoJoinNextLayerL(CConnectionProviderBase* aNextLayer)
+ {
+ (void)aNextLayer;
+ if ( !iProvider )
+ {
+ ASSERT( !aNextLayer );
+// AddRef(); //The AddRef needs to be here since it follows the logic in the selector shim.
+ iProvider = Nif::NewConnectionL(this, 0);
+ __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionProviderShim %08x:\tDoJoinNextLayerL(aNextLayer %x) iProvider %x"), this, aNextLayer, iProvider));
+ }
+ }
+
+CConnectionProviderBase* CConnectionProviderShim::DoNextLayer() const
+ {
+ //This is (by design) the last layer.
+ return NULL;
+ }
+
+
+TInt CConnectionProviderShim::DoCanDoSubConnection(RSubConnection::TSubConnType aSubConnType) const
+ {
+ (void)aSubConnType;
+#ifdef SYMBIAN_NETWORKING_3GPPDEFAULTQOS
+ return iSubConnectionType;
+#else
+ return 0;
+#endif
+// SYMBIAN_NETWORKING_3GPPDEFAULTQOS
+ }
+
+/**
+Find particular CSubConnectionLinkShimClient object with the pointer to given aConnection
+
+@param aTypeId Id of CNifManSubConnectionShim
+@param aConnection aConnection pointer
+@return CSubConnectionLinkShimClient* or NULL
+*/
+CSubConnectionLinkShimClient* CConnectionProviderShim::QuerySubSessions(TInt32 aTypeId,const CConnection* aConnection)
+ {
+ TInt count = iNifManSubConnections.Count();
+ CNifManSubConnectionShim *nifManSubConnection;
+ CSubConnectionLinkShimClient *linkShimClient = NULL;
+ for (TInt i = count - 1; i >= 0; i--)
+ {
+ nifManSubConnection = iNifManSubConnections[i];
+ if (nifManSubConnection && nifManSubConnection->Id() == aTypeId)
+ {
+ TInt n = 0;
+ do
+ {
+ linkShimClient = nifManSubConnection->ShimClient(n++);
+ }
+ while (linkShimClient && !linkShimClient->Match(*aConnection));
+ }
+ }
+
+ return linkShimClient;
+ }
+
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+void CConnectionProviderShim::SetFactoryIfactory(CConnectionProviderFactoryShim *aFactoryShim)
+ {
+ iFactoryShim = aFactoryShim;
+ }
+#endif // SYMBIAN_NETWORKING_UMTSR5
+
+
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipcprshim/src/shimcprfactory.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipcprshim/src/shimcprfactory.cpp Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,256 @@
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// SHIMCPRFACTORY.H
+//
+//
+
+#include
+#include
+#include "shimcprfactory.h" // for CConnectionProviderFactoryShim
+
+#include "connectionSelectorShim.h"
+#include "shimcpr.h"
+#include "shimnifmansconn.h"
+#include "idquerynetmsg.h"
+#include
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+#include
+#endif // #ifdef SYMBIAN_NETWORKING_UMTSR5
+
+
+const TUint KShimConnectionProviderImplementationUid = 0x102070FF;
+/**
+Data required for instantiating ECOM Plugin
+*/
+const TImplementationProxy ImplementationTable[] =
+ {
+ IMPLEMENTATION_PROXY_ENTRY(KShimConnectionProviderImplementationUid, CConnectionProviderFactoryShim::NewL),
+ };
+
+
+/**
+ECOM Implementation Factory
+*/
+EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
+ {
+ aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
+
+ return ImplementationTable;
+ }
+
+CConnectionProviderFactoryShim* CConnectionProviderFactoryShim::NewL(TAny* aConstructionParameters)
+ {
+ CConnectionProviderFactoryShim* ptr = new (ELeave) CConnectionProviderFactoryShim(KShimConnectionProviderFactoryId, *(reinterpret_cast(aConstructionParameters)));
+ CleanupStack::PushL(ptr);
+ ptr->ConstructL();
+ CleanupStack::Pop(ptr);
+ return ptr;
+ }
+
+void CConnectionProviderFactoryShim::ConstructL()
+ {//create a provider session for global tasks (enumerate connections/all interface notification....)
+ iNifmanSession = Nif::NewConnectionL(this, 0);
+ iNifmanSession->AllInterfaceNotificationL();
+ }
+// Destructor
+CConnectionProviderFactoryShim::~CConnectionProviderFactoryShim()
+ {
+ delete iNifmanSession;
+ }
+
+// Constructor
+CConnectionProviderFactoryShim::CConnectionProviderFactoryShim(TUint aFactoryId, CConnectionFactoryContainer& aParentContainer) :
+ CConnectionProviderFactoryBase( aFactoryId, aParentContainer )
+ {
+ }
+
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+// Sets the IAP lock status
+void CConnectionProviderFactoryShim::SetIAPLockStatus(TBool aLockStatus, TInt aLockedIAP)
+ {
+ iIsIAPLocked = aLockStatus;
+ iLockedIAP = aLockedIAP;
+ }
+// Gets the IAP lock status
+void CConnectionProviderFactoryShim::GetIAPLockStatus(TBool &aLockStatus, TInt &aLockedIAP)
+ {
+ aLockStatus = iIsIAPLocked;
+ aLockedIAP = iLockedIAP;
+ }
+
+#endif // #ifdef SYMBIAN_NETWORKING_UMTSR5
+
+CConnectionProviderBase* CConnectionProviderFactoryShim::DoCreateProviderL()
+ {
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+ CConnectionProviderShim * shimProv = CConnectionProviderShim::NewL(*this);
+ shimProv->SetFactoryIfactory(this);
+ return shimProv;
+#else
+ return CConnectionProviderShim::NewL(*this);
+#endif // #ifdef SYMBIAN_NETWORKING_UMTSR5
+ }
+
+MProviderSelector* CConnectionProviderFactoryShim::DoSelectProvider( Meta::SMetaData& aPreferences, ISelectionNotify& aSelectionNotify, const RMessagePtr2* aMessage )
+ {
+ //create self-destructing object
+ CConnectionSelectorShim* selector = new CConnectionSelectorShim(aSelectionNotify);
+ if (!selector)
+ {
+ aSelectionNotify.SelectComplete(NULL,KErrNoMemory);
+ aSelectionNotify.Detach();
+ }
+ else
+ {
+ #ifdef SYMBIAN_NETWORKING_UMTSR5
+ selector->SetFactoryIface(this);
+ #endif
+ if ( selector->Select(aPreferences, aMessage) != KErrNone )
+ {
+ selector = NULL;
+ }
+ }
+
+
+ return selector;
+ }
+
+MProviderSelector* CConnectionProviderFactoryShim::DoSelectNextLayerProvider( Meta::SMetaData& /*aPreferences*/, ISelectionNotify& /*aSelectionNotify*/, const RMessagePtr2* /*aMessage*/ )
+ {
+ return NULL;
+ }
+
+void CConnectionProviderFactoryShim::DoEnumerateConnectionsL(RPointerArray& aConnectionInfoPtrArray)
+ {
+ iNifmanSession->EnumerateConnectionsL(aConnectionInfoPtrArray);
+ }
+
+//MConnectionNotify interface to catch the global events
+void CConnectionProviderFactoryShim::SelectionComplete(TInt /*aError*/, const TDesC8& /*aSelectionInfo*/)
+ {
+
+ ASSERT(NULL);//it's never to happen
+ }
+
+void CConnectionProviderFactoryShim::ConnectionError(TInt /*aError*/)
+ {
+ ASSERT(NULL);//it's never to happen
+ }
+
+void CConnectionProviderFactoryShim::LinkLayerOpen(TInt /*aError*/)
+ {
+ ASSERT(NULL);//it's never to happen
+ }
+
+void CConnectionProviderFactoryShim::LinkLayerClosed(TInt /*aError*/)
+ {
+ ASSERT(NULL);//it's never to happen
+ }
+
+void CConnectionProviderFactoryShim::ProgressNotification(TInt /*aStage*/, TInt /*aError*/)
+ {
+ ASSERT(NULL);//it's never to happen
+ }
+
+void CConnectionProviderFactoryShim::ProgressNotification(TSubConnectionUniqueId /*aSubConnectionUniqueId*/, TInt /*aStage*/, TInt /*aError*/)
+ {
+ ASSERT(NULL);//it's never to happen
+ }
+
+void CConnectionProviderFactoryShim::ServiceChangeNotification(TUint32 /*aId*/, const TDesC& /*aType*/)
+ {
+ ASSERT(NULL);//it's never to happen
+ }
+
+void CConnectionProviderFactoryShim::InterfaceStateChangeNotification(TDesC8& aInfo)
+ {
+ TInt count = iConnectionFactoryNotify.Count();
+ for (TInt n = 0; n < count; n++)
+ {
+ iConnectionFactoryNotify[n].InterfaceStateChange(aInfo);
+ }
+ }
+
+void CConnectionProviderFactoryShim::NotifyDataSent(TSubConnectionUniqueId /*aSubConnectionUniqueId*/, TUint /*aUplinkVolume*/)
+ {
+ ASSERT(NULL);//it's never to happen
+ }
+
+void CConnectionProviderFactoryShim::NotifyDataReceived(TSubConnectionUniqueId /*aSubConnectionUniqueId*/, TUint /*aDownlinkVolume*/)
+ {
+ ASSERT(NULL);//it's never to happen
+ }
+
+void CConnectionProviderFactoryShim::SubConnectionEvent(const TSubConnectionEvent& /*aSubConnectionEvent*/)
+ {
+ ASSERT(NULL);//it's never to happen
+ }
+
+
+/**
+Define the factory query to find out particular CSubConnectionLinkShimClient object based on CConnection address
+*/
+
+class XShimFactoryQuery : public MCommsFactoryQuery
+ {
+ friend class CConnectionProviderFactoryShim;
+
+public:
+ explicit XShimFactoryQuery( NetMessages::CTypeIdQuery& aQuery ) :
+ iQuery(aQuery),
+ iClient(NULL)
+ {
+ }
+
+protected:
+ NetMessages::CTypeIdQuery& iQuery;
+ CSubConnectionLinkShimClient* iClient;
+
+public:
+ virtual TMatchResult Match( TFactoryObjectInfo& aInfo );
+ };
+
+//This method is called for each instance of particular class being managed by CommsFactory framework
+MCommsFactoryQuery::TMatchResult XShimFactoryQuery::Match( TFactoryObjectInfo& aInfo )
+ {
+ CConnectionProviderShim* connectionProvider = static_cast(aInfo.iInfo.iFactoryObject);
+ ASSERT(connectionProvider);
+ //call the CNifManSubConnectionShim interface to do the job
+ iClient = connectionProvider->QuerySubSessions(iQuery.iTypeId, reinterpret_cast (iQuery.iHandle));
+
+ return iClient ? MCommsFactoryQuery::EMatch : MCommsFactoryQuery::EContinue;
+ }
+
+/** Handles incoming messages
+
+@param aNetMessage Messsge reference
+@return KErrNone|KErrNotFound|KErrNotSupported
+@return if object found passes its pointer to the aNetMessasge object
+*/
+TInt CConnectionProviderFactoryShim::DoReceiveMessage( NetMessages::CMessage& aNetMessage )
+{
+STypeId tid = STypeId::CreateSTypeId(NetMessages::KInterfaceUid, NetMessages::ETypeIdQueryId);
+NetMessages::CTypeIdQuery& query = static_cast(aNetMessage);
+TInt ret = KErrNotSupported;
+if (aNetMessage.GetTypeId() == tid && query.iUid == KShimCommsUid)
+ {
+ XShimFactoryQuery q(query);
+ ret = FindObject(q) ? KErrNone : KErrNotFound;
+ //carry the result back
+ query.iHandle = (TInt)(static_cast(q.iClient));
+ }
+return ret;
+}
+
+
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipcprshim/src/shimdatatransfer.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipcprshim/src/shimdatatransfer.cpp Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,458 @@
+// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+/**
+ @file SHIMDATATRANSFER.CPP
+*/
+
+#include "shimnifmansconn.h"
+#include "shimdatatransfer.h"
+#include "es_prot.h" //CConnectionProvdBase alias NIFMAN
+
+
+
+
+CConnDataTransferShim::CConnDataTransferShim(CNifManSubConnectionShim& aSubConnectionProviderShim) :
+ iSubConnectionProviderShim(aSubConnectionProviderShim)
+ {
+ }
+
+CConnDataTransferShim::~CConnDataTransferShim()
+ {
+ iUplinkGranularities.Close();
+ iDownlinkGranularities.Close();
+ }
+
+
+TInt CConnDataTransferShim::DoDataTransferred(TUint& aUplinkVolume, TUint& aDownlinkVolume)
+ {
+ // Find out the amount of data transferred from the connection provider
+ TInt ret = iSubConnectionProviderShim.Provider().DataTransferred(iSubConnectionProviderShim.Id(), aUplinkVolume, aDownlinkVolume);
+
+ // Let the subinterface know in case any subconnections have outstanding data notification requests that might be completed by this
+ NotifyDataTransferred(aUplinkVolume, aDownlinkVolume);
+
+ // And return the results to the connection
+ return(ret);
+ }
+
+TInt CConnDataTransferShim::DoDataTransferredCancel()
+ {
+ // do nothing
+ return KErrNone;
+ }
+
+TInt CConnDataTransferShim::DoDataSentNotificationRequest(TUint aRequestedGranularity, TUint aRequestedNotificationVolume)
+ {
+ TInt requiredGranularity;
+
+ if(aRequestedGranularity == 0) // absolute mode
+ {
+ // Start by finding out how much data has been sent, then calculate granularity
+ TUint uplinkDataVolume;
+ TUint dummyDataVolume;
+
+ DoDataTransferred( uplinkDataVolume, dummyDataVolume);
+
+ requiredGranularity = aRequestedNotificationVolume - uplinkDataVolume;
+ if(requiredGranularity < 0) // we've already achieved this so notify immediately
+ {
+ // possible optimisation: pass reference to caller in here and
+ // only notify them if this condition is met
+ // essentially we don't know what the granularity was here
+ for(TInt i=0; i < iClients.Count(); i++)
+ {
+ iClients[i]->NotifyDataSent(uplinkDataVolume, 0);
+ }
+ }
+ }
+ else // relative mode
+ {
+ requiredGranularity = aRequestedGranularity;
+ }
+
+ return CalculateNewUplinkGranularity(requiredGranularity);
+ }
+
+TInt CConnDataTransferShim::DoDataSentNotificationCancel()
+ {
+ // Do nothing. Not worth trying to adjust granularity array.
+ return KErrNone;
+ }
+
+TInt CConnDataTransferShim::DoDataReceivedNotificationRequest(TUint aRequestedGranularity, TUint aRequestedNotificationVolume)
+ {
+ TInt requiredGranularity;
+
+ if(aRequestedGranularity == 0) // absolute mode
+ {
+ // Start by finding out how much data has been sent, then calculate granularity
+ TUint dummyDataVolume;
+ TUint downlinkDataVolume;
+
+ DoDataTransferred( dummyDataVolume, downlinkDataVolume);
+
+ requiredGranularity = aRequestedNotificationVolume - downlinkDataVolume;
+ if(requiredGranularity < 0) // we've already achieved this so notify immediately
+ {
+ // possible optimisation: pass reference to caller in here
+ // and only notify them if this condition is met
+ // essentially we don't know what the granularity was here
+ for(TInt i=0; i < iClients.Count(); i++)
+ {
+ iClients[i]->NotifyDataReceived(downlinkDataVolume, 0);
+ }
+ }
+ }
+ else // relative mode
+ {
+ requiredGranularity = aRequestedGranularity;
+ }
+
+ return CalculateNewDownlinkGranularity(requiredGranularity);
+ }
+
+TInt CConnDataTransferShim::DoDataReceivedNotificationCancel()
+ {
+ // Do nothing. Not worth trying to adjust granularity array.
+ return KErrNone;
+ }
+
+TInt CConnDataTransferShim::NotifyDataTransferred(TUint aUplinkVolume, TUint aDownlinkVolume)
+/**
+Called as a side-effect of someone calling DataTransferredRequest(), to allow any absolute volume notifications that may be outstanding to be completed if the required amount of data has been sent/received
+
+@param aUplinkVolume The total volume of data sent on this subconnection
+@param aDownlinkVolume The total volume of data received on this subconnection
+@return KErrNone, or one of the system-wide error codes
+*/
+ {
+ __CFLOG_VAR((KShimScprTag, KShimScprDataTag, _L8("CConnDataTransferShim[id: %d]: New data transferred notification (uplink: %d, downlink: %d)"),
+ iSubConnectionProviderShim.Id(), aUplinkVolume, aDownlinkVolume));
+
+ for(TInt i=0; i < iClients.Count(); i++)
+ {
+ iClients[i]->NotifyDataTransferred(aUplinkVolume, aDownlinkVolume);
+ }
+
+ return KErrNone;
+ }
+
+TInt CConnDataTransferShim::NotifyDataSent(TUint aUplinkVolume)
+/**
+Notification from connection provider via CInterface that the requested granularity for data sent has been met or exceeded
+
+@note The granularity system is not perfect, as it may be the case that we get notifications for more than "granularity" quantity of data.
+@param aUplinkVolume The total volume of data sent so far on this subconnection
+@return KErrNone, or one of the system-wide error codes
+*/
+ {
+ __CFLOG_VAR((KShimScprTag, KShimScprDataTag, _L8("CConnDataTransferShim[id: %d]: New data sent notification (uplink: %d)"),
+ iSubConnectionProviderShim.Id(), aUplinkVolume));
+
+ // Pass notification up to all subconnections, including the current granularity setting in case they are in relative notification mode
+ for(TInt i=0; i < iClients.Count(); i++)
+ {
+ iClients[i]->NotifyDataSent(aUplinkVolume, iCurrentUplinkGranularity);
+ }
+
+ // Set the new granularity required of the interface
+ return SetNextUplinkGranularity();
+ }
+
+TInt CConnDataTransferShim::NotifyDataReceived(TUint aDownlinkVolume)
+/**
+Notification from connection provider via CInterface that the requested granularity for data received has been met or exceeded
+
+@param aDownlinkVolume The total volume of data received so far on this subconnection
+@return KErrNone, or one of the system-wide error codes
+*/
+ {
+ __CFLOG_VAR((KShimScprTag, KShimScprDataTag, _L8("CConnDataTransferShim[id: %d]: New data received notification (downlink: %d)"), iSubConnectionProviderShim.Id(), aDownlinkVolume));
+
+ // Pass notification up to all subconnections, including the current granularity setting in case they are in relative notification mode
+ for(TInt i=0; i < iClients.Count(); i++)
+ {
+ iClients[i]->NotifyDataReceived(aDownlinkVolume, iCurrentDownlinkGranularity);
+ }
+
+ // Set the new granularity required of the interface
+ return SetNextDownlinkGranularity();
+ }
+
+TInt CConnDataTransferShim::CalculateNewUplinkGranularity(TUint aRequestedGranularity)
+/**
+Calculate the required granularity to satisfy client requests
+This function calculates the delta between client requests and stores it in an array.
+
+@param aRequestedGranularity The new requested granularity
+@return KErrNone if successful, otherwise one of the system-wide error codes
+@todo Quantise requests to granularity of 1K
+*/
+ {
+ TInt ret = KErrNone;
+ TInt requestedGranularity = static_cast(aRequestedGranularity);
+
+ //@todo In the future, this method could be rewritten to expand the maximum
+ //granularity from 2GB to 4GB. Probably not necessary...
+ if(requestedGranularity < 0) // check that the cast didn't produce an invalid result
+ {
+ __CFLOG_VAR((KShimScprTag, KShimScprDataTag, _L8("CConnDataTransferShim[id: %d]: ERROR - calculating new uplink granularity - overflow when casting integer"),
+ iSubConnectionProviderShim.Id()));
+ return(KErrOverflow);
+ }
+
+ __CFLOG_VAR((KShimScprTag, KShimScprDataTag, _L8("CConnDataTransferShim[id: %d]: Calculating new uplink granularity..."),
+ iSubConnectionProviderShim.Id()));
+
+ TUint newGranularity = 0;
+
+ ret = CalculateNewGranularity(requestedGranularity, iCurrentUplinkGranularity, iUplinkGranularities, newGranularity);
+ if (ret == KErrNone && newGranularity)
+ {
+ ret = SetUplinkGranularity(newGranularity);
+ }
+ return(ret);
+ }
+
+TInt CConnDataTransferShim::CalculateNewDownlinkGranularity(TUint aRequestedGranularity)
+/**
+Calculate the required granularity to satisfy client requests
+This function calculates the delta between client requests and stores it in an array.
+
+@param aRequestedGranularity The new requested granularity
+@return KErrNone if successful, otherwise one of the system-wide error codes
+@todo Quantise requests to granularity of 1K
+*/
+ {
+ TInt ret;
+ TInt requestedGranularity = static_cast(aRequestedGranularity);
+
+ //@todo In the future, this method could be rewritten to expand the maximum
+ // granularity from 2GB to 4GB. Probably not necessary...
+ if(requestedGranularity < 0) // check that the cast didn't produce an invalid result
+ {
+ __CFLOG_VAR((KShimScprTag, KShimScprDataTag, _L8("CConnDataTransferShim[id: %d]: ERROR - calculating new downlink granularity - overflow when casting integer"),
+ iSubConnectionProviderShim.Id()));
+ return(KErrOverflow);
+ }
+
+ __CFLOG_VAR((KShimScprTag, KShimScprDataTag, _L8("ESock: CConnDataTransferShim[id: %d]: Calculating new downlink granularity..."),
+ iSubConnectionProviderShim.Id()));
+
+ TUint newGranularity = 0;
+
+ ret = CalculateNewGranularity(requestedGranularity, iCurrentDownlinkGranularity, iDownlinkGranularities, newGranularity);
+ if (ret == KErrNone && newGranularity)
+ {
+ ret = SetDownlinkGranularity(newGranularity);
+ }
+ return(ret);
+ }
+
+TInt CConnDataTransferShim::CalculateNewGranularity(TInt aRequestedGranularity, TUint aCurrentGranularity, RArray& aGranularities, TUint& aNewCurrentGranularity)
+/**
+Given a new granularity, calculate new values for the Current granularity and granularity array.
+
+Helper function used for processing new uplink and downlink granularities.
+
+@param aRequestedGranularity new granularity (in).
+@param aCurrentGranularity current granularity in the lower provider (in).
+@param aGranularities ordered array of delta granularities which will become the current granularity
+after the latter has expired (in/out).
+@param aNewCurrentGranularity new value of current granularity to be set in lower provider (out).
+@return KErrNone or a system wide error code.
+*/
+ {
+ TInt ret = KErrNone;
+ TInt i = 0;
+ TInt count = aGranularities.Count(); // granularities in the array
+
+ // The reason we have the three way if statement below is because we have to deal with
+ // the fact that there is a "current" granularity (set in the lower provider), and
+ // an array of delta granularities which will become the current granularity in turn:
+ //
+ // +---+ +---+---+---+
+ // | | | | | |...
+ // +---+ +---+---+---+
+ // 0 1 2
+ // Current Array
+ //
+ // The complexity comes when a new granularity needs to be notionally inserted either before the
+ // current granularity or between the current granularity and the first entry in the array.
+
+ if (count == 0 && aCurrentGranularity == 0)
+ {
+ // Empty granularity array and no current granularity.
+ //
+ // - set current granularity to the requested granularity (no entries needed in array)
+ aNewCurrentGranularity = aRequestedGranularity;
+ }
+ else
+ if (aRequestedGranularity < aCurrentGranularity)
+ {
+ // Requested granularity is less than current granularity. The requested granularity
+ // needs to be notionally inserted before the current granularity.
+
+ // add a new entry into the beginning of the array that contains the delta between the requested
+ // granularity and current granularity. This new entry represents the "old" current granularity.
+ ret = aGranularities.Insert(aCurrentGranularity - aRequestedGranularity, 0);
+ if (ret == KErrNone)
+ {
+ // the requested granularity becomes the new current granularity
+ aNewCurrentGranularity = aRequestedGranularity;
+ }
+ }
+ else
+ if (aRequestedGranularity > aCurrentGranularity)
+ {
+ // Requested granularity is greater than current granularity. The requested granularity
+ // needs to be inserted into the array at the appropriate place. The current granularity
+ // remains unchanged.
+
+ // Take into account the current granularity by subtracting it from requested granularity
+ aRequestedGranularity -= aCurrentGranularity;
+
+ // Find correct insertion position. Each entry visited in the array will subtract from the
+ // requested granularity, leaving the latter as being delta based.
+ for(i=0; i < count ; i++)
+ {
+ aRequestedGranularity -= aGranularities[i];
+ if (aRequestedGranularity <= 0)
+ {
+ break;
+ }
+ }
+
+ if (aRequestedGranularity < 0)
+ {
+ // Insertion position found within the array - held in "i".
+ aRequestedGranularity += aGranularities[i];
+ ret = aGranularities.Insert(aRequestedGranularity, i);
+ if (ret == KErrNone)
+ {
+ // Adjust the next granularity in the array by the Requested granularity
+ // that we've just inserted. "i+1" because of the Insert() above.
+ aGranularities[i+1] -= aRequestedGranularity;
+ }
+ }
+ else
+ if (aRequestedGranularity > 0)
+ {
+ // Reached end of the array while searching - insert requested granularity at the end.
+ ret = aGranularities.Append(aRequestedGranularity);
+ }
+ // aRequestedGranularity == 0 is a no-op case (setting zero granularity).
+ }
+ // (aRequestedGranularity == iCurrentUplinkGranularity) is a no-op case (setting the same
+ // granularity as current value).
+ return (ret);
+ }
+
+
+TInt CConnDataTransferShim::SetUplinkGranularity(TUint aRequestedGranularity)
+/**
+Set data sent notification granularity in lower provider.
+
+@param aRequestedGranularity granularity to set. If zero, cancel data sent notifications.
+@return KErrNone or a system wide error code.
+*/
+ {
+ iCurrentUplinkGranularity = aRequestedGranularity;
+ if (iCurrentUplinkGranularity)
+ {
+ return iSubConnectionProviderShim.Provider().SetDataSentNotificationGranularity(iSubConnectionProviderShim.Id(), iCurrentUplinkGranularity);
+ }
+ else
+ {
+ return iSubConnectionProviderShim.Provider().DataSentNotificationCancel(iSubConnectionProviderShim.Id());
+ }
+ }
+
+TInt CConnDataTransferShim::SetNextUplinkGranularity()
+/**
+Get the next uplink granularity from the array, and send it to the connection provider
+
+@return KErrNone if successful, otherwise one of the system-wide error codes
+*/
+ {
+ if(iUplinkGranularities.Count())
+ {
+ __CFLOG_VAR((KShimScprTag, KShimScprDataTag, _L8("CConnDataTransferShim[id: %d]: setting new uplink granularity (%d)"),
+ iSubConnectionProviderShim.Id(), iCurrentUplinkGranularity));
+
+ // Read the next granularity from the array
+ TUint granularity = iUplinkGranularities[0];
+
+ // Remove the value read
+ iUplinkGranularities.Remove(0);
+
+ return SetUplinkGranularity(granularity);
+ }
+ else
+ {
+ __CFLOG_VAR((KShimScprTag, KShimScprDataTag, _L8("CConnDataTransferShim[id: %d]: cancelling data sent notifications - no values remaining in granularity array"),
+ iSubConnectionProviderShim.Id()));
+
+ return SetUplinkGranularity(0); // cancel notifications
+ }
+ }
+
+TInt CConnDataTransferShim::SetDownlinkGranularity(TUint aRequestedGranularity)
+/**
+Set data received notification granularity in lower provider.
+
+@param aRequestedGranularity granularity to set. If zero, cancel data received notifications.
+@return KErrNone or a system wide error code.
+*/
+ {
+ iCurrentDownlinkGranularity = aRequestedGranularity;
+ if (iCurrentDownlinkGranularity)
+ {
+ return iSubConnectionProviderShim.Provider().SetDataReceivedNotificationGranularity(iSubConnectionProviderShim.Id(), iCurrentDownlinkGranularity);
+ }
+ else
+ {
+ return iSubConnectionProviderShim.Provider().DataReceivedNotificationCancel(iSubConnectionProviderShim.Id());
+ }
+ }
+
+TInt CConnDataTransferShim::SetNextDownlinkGranularity()
+/**
+Get the next downlink granularity from the array, and send it to the connection provider
+
+@return KErrNone if successful, otherwise one of the system-wide error codes
+*/
+ {
+ if(iDownlinkGranularities.Count())
+ {
+ __CFLOG_VAR((KShimScprTag, KShimScprDataTag, _L8("CConnDataTransferShim[id: %d]: setting new downlink granularity (%d)"),
+ iSubConnectionProviderShim.Id(), iCurrentDownlinkGranularity));
+ // Read the next granularity from the array
+ TUint granularity = iDownlinkGranularities[0];
+
+ // Remove the value read
+ iDownlinkGranularities.Remove(0);
+
+ return SetDownlinkGranularity(granularity);
+ }
+ else
+ {
+ __CFLOG_VAR((KShimScprTag, KShimScprDataTag, _L8("ESock: CConnDataTransferShim[id: %d]: cancelling data received notifications - no values remaining in granularity array"),
+ iSubConnectionProviderShim.Id()));
+
+ return SetDownlinkGranularity(0); // cancel notifications
+ }
+ }
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipcprshim/src/shimnifmansconn.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipcprshim/src/shimnifmansconn.cpp Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,244 @@
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// SHIMSCPR.CPP
+// This is part of an ECOM plug-in
+//
+//
+
+#include
+#include
+#include "shimnifmansconn.h"
+
+START_ATTRIBUTE_TABLE(TShimConnectionInfo, KShimCommsUid, Meta::KNetMetaTypeAny)
+END_ATTRIBUTE_TABLE()
+
+TInt CNifManSubConnectionShim::AsyncDestructorCb(TAny* aInstance)
+ {
+ CNifManSubConnectionShim* nifManSubConnection= reinterpret_cast(aInstance);
+ delete nifManSubConnection;
+ return KErrNone;
+ }
+
+/**
+Create a new CNifManSubConnectionShim to act as a mux/demux for subconnections
+*/
+CNifManSubConnectionShim::CNifManSubConnectionShim (CConnectionProviderShim& aProviderShim)
+ :iSubConnectionsUniqueId(0), iConnectionProvider(&aProviderShim),
+ iAsyncDestructor(CActive::EPriorityStandard + 1)
+ {
+ __CFLOG_VAR((KShimScprTag, KShimScprSubTag, _L8("CNifManSubConnectionShim [this=%08x]:\tCNifManSubConnectionShim() [MConnectionDataClient=%08x]"),
+ this, (MConnectionDataClient*)this));
+ iAsyncDestructor.Set(TCallBack(AsyncDestructorCb, this));
+ }
+
+/**
+D'tor
+*/
+CNifManSubConnectionShim::~CNifManSubConnectionShim()
+ {
+ __CFLOG_VAR((KShimScprTag, KShimScprSubTag, _L8("CNifManSubConnectionShim::~CNifManSubConnectionShim() %08x"), this));
+ iShimClients.ResetAndDestroy();
+ delete iConnDataTransferShim;
+ }
+
+
+void CNifManSubConnectionShim::DeleteAsync()
+ {
+ if ( !iAsyncDestructor.IsActive() )
+ {
+ iAsyncDestructor.CallBack();
+ }
+ }
+
+TInt CNifManSubConnectionShim::FindClient(const CConnection& aConnection)
+ {
+ TInt max = iShimClients.Count();
+ for (TInt i = max - 1 ; i >= 0 ; i--)
+ {
+ CSubConnectionLinkShimClient* client = iShimClients[i];
+ if ( client->Match(aConnection) )
+ {
+ return i;
+ }
+ }
+ return KErrNotFound;
+ }
+
+void CNifManSubConnectionShim::ConnectionJoiningL(const CConnection& aConnection)
+ {//create a new CSubConnectionLinkShimClient for the joining conection
+ TInt i = FindClient(aConnection);
+ if ( i == KErrNotFound )
+ {
+ CSubConnectionLinkShimClient* client = new (ELeave)CSubConnectionLinkShimClient(aConnection,*this);
+ CleanupStack::PushL(client);
+ //create data transfer object if not created yet
+ CreateDataTransferL();
+ iConnDataTransferShim->RegisterClientL(*client);
+ TInt ret = iShimClients.Append(client);
+ if (ret != KErrNone)
+ {
+ iConnDataTransferShim->DeRegisterClient(*client);
+ User::Leave(ret);
+ }
+ CleanupStack::Pop(client);
+ }
+ }
+
+void CNifManSubConnectionShim::ConnectionLeaving(const CConnection& aConnection)
+ {//destroy a CSubConnectionLinkShimClient belonging to leaving conection
+ TInt i = FindClient(aConnection);
+ if ( i >= 0 )
+ {
+ CSubConnectionLinkShimClient* client = iShimClients[i];
+ iShimClients.Remove(i);
+ delete client;
+ }
+ }
+
+void CNifManSubConnectionShim::ConnectionGoingDown(CConnectionProviderBase& /*aConnProvider*/)
+ {
+ __CFLOG_VAR((KShimScprTag, KShimScprSubTag, _L8("CNifManSubConnectionShim %08x:\tConnectionGoingDown() Id %d"),
+ this, iSubConnectionsUniqueId));
+
+ // The ConnectionProvider has told us its going down so we delete ourselves, clearing
+ // the pointer to it so our d'tor doesn't make any calls on it.
+ iConnectionProvider = NULL;
+ delete this;
+ }
+
+void CNifManSubConnectionShim::ConnectionError(TInt /*aStage*/, TInt /*aError*/)
+ {
+ }
+
+void CNifManSubConnectionShim::Notify(TNotify /*aNotifyType*/, CConnectionProviderBase* /*aConnProvider*/, TInt /*aError*/, const CConNotificationEvent* /*aConNotificationEvent*/)
+ {
+ }
+
+void CNifManSubConnectionShim::AttachToNext(CSubConnectionProviderBase* /*aSubConnProvider*/)
+ {
+ }
+
+TInt CNifManSubConnectionShim::ProgressNotification(TInt aStage, TInt aError, const TDesC8& aInfo)
+/**
+Upcall from connection provider via CInterface with notification of new progress stage reached
+
+@param aStage The progress stage that the subconnection has reached
+@param aError Any errors that were encountered at this stage
+@param aInfo No idea what this is, it's inserted by CInterface and is currently null
+@return KErrNone, or one of the system-wide error codes
+*/
+ {
+ __CFLOG_VAR((KShimScprTag, KShimScprSubTag, _L8("CNifManSubConnectionShim %08x:\tProgressNotification(%d, %d) SubConnId: %d"),
+ this, aStage, aError, iSubConnectionsUniqueId));
+
+ TInt max = iShimClients.Count();
+ for (TInt i = max - 1 ; i >= 0 ; i--)
+ {
+ iShimClients[i]->ProgressNotification(aStage, aError, aInfo);
+ }
+
+ return KErrNone;
+ }
+
+
+TInt CNifManSubConnectionShim::NotifyDataTransferred(TUint aUplinkVolume, TUint aDownlinkVolume)
+ {
+ return iConnDataTransferShim ? iConnDataTransferShim->NotifyDataTransferred(aUplinkVolume, aDownlinkVolume) : KErrNone;
+
+ }
+
+TInt CNifManSubConnectionShim::NotifyDataSent(TUint aUplinkVolume, TUint /*aCurrentGranularity*/)
+ {
+ return iConnDataTransferShim ? iConnDataTransferShim->NotifyDataSent(aUplinkVolume) : KErrNone;
+
+ }
+
+TInt CNifManSubConnectionShim::NotifyDataReceived(TUint aDownlinkVolume, TUint /*aCurrentGranularity*/)
+ {
+ return iConnDataTransferShim ? iConnDataTransferShim->NotifyDataReceived(aDownlinkVolume) : KErrNone;
+
+ }
+
+TSubConnectionUniqueId CNifManSubConnectionShim::Id()
+ /**
+ Access this subconnections unique id for search purposes
+ */
+ {
+ return iSubConnectionsUniqueId;
+ }
+
+void CNifManSubConnectionShim::SetSubConnectionUniqueId( TSubConnectionUniqueId aSubConnectionUniqueId )
+ {
+ iSubConnectionsUniqueId = aSubConnectionUniqueId;
+ }
+
+//void CNifManSubConnectionShim::DataClientJoiningL(MSubConnectionDataClient& aDataClient)
+// {
+// aDataClient.JoinComplete(*this);
+// }
+
+//void CNifManSubConnectionShim::DataClientLeaving(MSubConnectionDataClient& aDataClient)
+// {
+// aDataClient.LeaveComplete(*this);
+// }
+
+//void CNifManSubConnectionShim::DoSourceAddressUpdate(MSubConnectionDataClient& /*aDataClient*/, const TSockAddr& /*aSource*/)
+// {//do nothing
+// }
+
+//void CNifManSubConnectionShim::DoDestinationAddressUpdate(MSubConnectionDataClient& /*aDataClient*/, const TSockAddr& /*aDestination*/)
+// {//do nothing
+// }
+
+//void CNifManSubConnectionShim::DoDataClientRouted(MSubConnectionDataClient& /*aDataClient*/, const TSockAddr& /*aSource*/, const TSockAddr& /*aDestination*/, const TDesC8& /*aConnectionInfo*/)
+// {//do nothing
+// }
+
+//void CNifManSubConnectionShim::DoParametersAboutToBeSetL(CSubConParameterBundle& /*aParameterBundle*/)
+// {//do nothing
+// }
+
+//TInt CNifManSubConnectionShim::DoControl(TUint /*aOptionLevel*/, TUint /*aOptionName*/, TDes8& /*aOption*/)
+// {//do nothing
+// return KErrNotSupported;
+// }
+
+//void CNifManSubConnectionShim::DoStartL()
+// {
+// User::Leave(KErrNotSupported);
+// }
+
+//void CNifManSubConnectionShim::DoStop()
+// {
+// }
+
+//CSubConnectionProviderBase* CNifManSubConnectionShim::DoNextLayer()
+// {
+// return NULL;
+// }
+
+CConnDataTransfer& CNifManSubConnectionShim::CreateDataTransferL()
+ {
+ if (!iConnDataTransferShim)
+ {
+ iConnDataTransferShim = new (ELeave)CConnDataTransferShim(*this);
+ }
+ return *iConnDataTransferShim;
+ }
+
+//MConnectionDataClient* CNifManSubConnectionShim::DoSelfConnectionDataClient()
+// {
+// return this;
+// }
+
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipnetworklayer/addressinfohook/src/hookaddrinfo.cpp
--- a/networkcontrol/ipnetworklayer/addressinfohook/src/hookaddrinfo.cpp Mon May 03 13:58:16 2010 +0300
+++ b/networkcontrol/ipnetworklayer/addressinfohook/src/hookaddrinfo.cpp Tue Jun 29 19:20:22 2010 +0530
@@ -39,7 +39,9 @@
{
TIpAddrBinder *addrBinder = new(ELeave) TIpAddrBinder(aBinder, aAddrInfo);
- iAddrInfo.Append(addrBinder);
+ CleanupStack::PushL(addrBinder);
+ iAddrInfo.AppendL(addrBinder);
+ CleanupStack::Pop(addrBinder);
//Try match the address info to existing flows
TDblQueIter iter(*iFlows);
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipnetworklayer/inc/IPProtoSCPRStates.h
--- a/networkcontrol/ipnetworklayer/inc/IPProtoSCPRStates.h Mon May 03 13:58:16 2010 +0300
+++ b/networkcontrol/ipnetworklayer/inc/IPProtoSCPRStates.h Tue Jun 29 19:20:22 2010 +0530
@@ -19,7 +19,7 @@
#define IPPROTOSCPRSTATES_H_DEFINED
#include
-#include "ipprotomessages.h"
+#include "IPProtoMessages.h"
class CIPQoSProtoSubConnectionProviderBase;
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipnetworklayer/inc/ipprotodeftscprstates.h
--- a/networkcontrol/ipnetworklayer/inc/ipprotodeftscprstates.h Mon May 03 13:58:16 2010 +0300
+++ b/networkcontrol/ipnetworklayer/inc/ipprotodeftscprstates.h Tue Jun 29 19:20:22 2010 +0530
@@ -19,7 +19,7 @@
#define IPPROTODEFTSCPRSTATES_H_DEFINED
#include
-#include "ipprotomessages.h"
+#include "IPProtoMessages.h"
class CIPProtoSubConnectionProviderBase;
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipnetworklayer/src/IPProtoCPR.cpp
--- a/networkcontrol/ipnetworklayer/src/IPProtoCPR.cpp Mon May 03 13:58:16 2010 +0300
+++ b/networkcontrol/ipnetworklayer/src/IPProtoCPR.cpp Tue Jun 29 19:20:22 2010 +0530
@@ -190,8 +190,8 @@
namespace IPProtoCprClientLeaveActivity
{ //This activity will wait for ECFActivityBinderRequest to complete
using namespace CprClientLeaveActivity;
-DECLARE_DEFINE_CUSTOM_NODEACTIVITY(ECFActivityClientLeave, IPProtoCprClientLeave, Messages::TNodeSignal::TNullMessageId, CClientLeaveActivity::NewL) //May be waiting for both messages
- FIRST_NODEACTIVITY_ENTRY(CoreStates::TAwaitingClientLeave, MeshMachine::TNoTag)
+DECLARE_DEFINE_RESERVED_CUSTOM_NODEACTIVITY(ECFActivityClientLeave, IPProtoCprClientLeave, TCFServiceProvider::TLeaveRequest, CClientLeaveActivity::New) //May be waiting for both messages
+ FIRST_NODEACTIVITY_ENTRY(MeshMachine::TAwaitingMessageState, MeshMachine::TNoTag)
THROUGH_NODEACTIVITY_ENTRY(KNoTag, CprClientLeaveActivity::CClientLeaveActivity::TRemoveClientAndDestroyOrphanedDataClients, CClientLeaveActivity::TNoTagOrSendPriorityToCtrlProvider)
NODEACTIVITY_ENTRY(CprStates::KSendPriorityToCtrlProvider, CClientLeaveActivity::TUpdatePriorityForControlProvider, CoreStates::TAwaitingJoinComplete, CClientLeaveActivity::TNoTagOrSendPriorityToServProvider)
NODEACTIVITY_ENTRY(CprStates::KSendPriorityToServProvider, CClientLeaveActivity::TUpdatePriorityForServiceProviders, CoreStates::TAwaitingJoinComplete, MeshMachine::TNoTag)
@@ -229,8 +229,11 @@
THROUGH_NODEACTIVITY_ENTRY(KActiveTag, CoreNetStates::TCancelDataClientStart, MeshMachine::TNoTag)
NODEACTIVITY_ENTRY(KNoTag, CoreNetStates::TStopSelf, CoreNetStates::TAwaitingDataClientStopped, CoreNetStates::TNoTagOrNoBearer)
NODEACTIVITY_ENTRY(KNoTag, CoreNetStates::TSendStop, CoreNetStates::TAwaitingStopped, MeshMachine::TNoTag)
- NODEACTIVITY_ENTRY(KNoTag, CoreNetStates::TSendClientLeavingRequestToServiceProvider, MeshMachine::TAwaitingLeaveComplete, TTag)
- LAST_NODEACTIVITY_ENTRY(CoreNetStates::KNoBearer, IpProtoCpr::TSendStoppedAndGoneDown)
+ NODEACTIVITY_ENTRY(KNoTag, CoreNetStates::TSendClientLeavingRequestToServiceProvider, MeshMachine::TAwaitingLeaveComplete, TTag)
+ THROUGH_NODEACTIVITY_ENTRY(CoreNetStates::KNoBearer, IpProtoCpr::TSendStoppedAndGoneDown, MeshMachine::TNoTag)
+ //Ensure that we reset the iLinkUp flag, otherwise a Start activity blocked against this Stop activity will
+ //cause an assertion failure as iLinkUp will be set twice.
+ LAST_NODEACTIVITY_ENTRY(KNoTag, IpProtoCpr::TLinkDown)
NODEACTIVITY_END()
}
@@ -755,8 +758,7 @@
{
iTimerExpired = ETrue;
CancelTimer();
- if (CountActivities(ECFActivityStop) == 0 &&
-+ CountActivities(ECFActivityDestroy) == 0)
+ if (CountActivities(ECFActivityStop) == 0 && CountActivities(ECFActivityDestroy) == 0)
{
RClientInterface::OpenPostMessageClose(Id(), TNodeCtxId(ECFActivityStop, Id()), TCFServiceProvider::TStop(KErrTimedOut).CRef());
}
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipnetworklayer/src/IPProtoSCPRFactory.cpp
--- a/networkcontrol/ipnetworklayer/src/IPProtoSCPRFactory.cpp Mon May 03 13:58:16 2010 +0300
+++ b/networkcontrol/ipnetworklayer/src/IPProtoSCPRFactory.cpp Tue Jun 29 19:20:22 2010 +0530
@@ -21,7 +21,7 @@
@internalComponent
*/
-#include "ipprotomessages.h"
+#include "IPProtoMessages.h"
#include "IPProtoSCPRFactory.h"
#include "ipprotodeftscpr.h"
#include "IPProtoSCPR.h"
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipnetworklayer/src/ipprotodeftscpr.cpp
--- a/networkcontrol/ipnetworklayer/src/ipprotodeftscpr.cpp Mon May 03 13:58:16 2010 +0300
+++ b/networkcontrol/ipnetworklayer/src/ipprotodeftscpr.cpp Tue Jun 29 19:20:22 2010 +0530
@@ -23,7 +23,7 @@
#include
#include
-#include "ipprotocprstates.h"
+#include "IPProtoCprStates.h"
#include "ipprotodeftscpr.h"
#include "ipprotodeftscprstates.h"
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipscpr/group/basicipscpr.mmp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipscpr/group/basicipscpr.mmp Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,34 @@
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// BasicIPSCPR.MMP IP Subconnection Provider ECOM plugin
+//
+//
+
+/**
+ @file
+*/
+
+#ifdef SYMBIAN_NETWORKING_3GPPDEFAULTQOS
+
+#define BASIC_IPSCPR_MMP
+MACRO BASIC_IPSCPR
+
+#include "ipscpr.mmh"
+
+#endif
+// SYMBIAN_NETWORKING_3GPPDEFAULTQOS
+
+UNPAGED
+
+SMPSAFE
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipscpr/group/bld.inf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipscpr/group/bld.inf Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,32 @@
+// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#ifndef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
+
+PRJ_EXPORTS
+../inc/ip_subconparams.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(ip_subconparams.h)
+../inc/ip_subconparams.inl SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(ip_subconparams.inl)
+
+../group/ipscpr.iby /epoc32/rom/include/ipscpr.iby
+
+PRJ_MMPFILES
+#ifdef SYMBIAN_NETWORKING_3GPPDEFAULTQOS
+basicipscpr.mmp
+#endif
+ipscpr.mmp
+
+PRJ_TESTMMPFILES
+
+#endif // SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
\ No newline at end of file
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipscpr/group/ipscpr.iby
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipscpr/group/ipscpr.iby Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,43 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef __IPSCPR_IBY__
+#define __IPSCPR_IBY__
+
+REM IP Subconnection Provider
+
+
+#if defined(SYMBIAN_EXCLUDE_QOS_PROTPLUGINS) && defined(SYMBIAN_NETWORKING_3GPPDEFAULTQOS)
+REM Feature QoS is not included in this ROM
+
+#ifdef _DEBUG
+ECOM_PLUGIN_UDEB(basicipscpr.dll,102752C4.rss)
+#else
+ECOM_PLUGIN(basicipscpr.dll,102752C4.rss)
+#endif
+
+#else
+
+#ifdef _DEBUG
+ECOM_PLUGIN_UDEB(ipscpr.dll,10204307.rss)
+#else
+ECOM_PLUGIN(ipscpr.dll,10204307.rss)
+#endif
+
+#endif
+
+#endif
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipscpr/group/ipscpr.mmh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipscpr/group/ipscpr.mmh Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,86 @@
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// Ipscpr/Basic Ipscpr.MMH IP Subconnection Provider ECOM plugin
+//
+//
+
+/**
+ @file
+*/
+
+#ifdef BASIC_IPSCPR_MMP
+
+// Should be ARMV5 only really...
+
+TARGET basicipscpr.dll
+TARGETTYPE PLUGIN
+UID 0x10009D8D 0x102752C4
+#else
+TARGET ipscpr.dll
+TARGETTYPE PLUGIN
+UID 0x10009D8D 0x10204307
+#endif
+
+VENDORID 0x70000001
+
+SOURCEPATH ../src
+SOURCE ipscpr.cpp
+SOURCE ip_subconparams.cpp
+SOURCE deft_scpr.cpp
+SOURCE ipscprlog.cpp
+#ifndef BASIC_IPSCPR_MMP
+SOURCE asyncwriter.cpp
+SOURCE qos_msg.cpp
+#endif
+
+USERINCLUDE ../inc
+#ifndef BASIC_IPSCPR_MMP
+USERINCLUDE ../../pfqoslib/inc
+#endif
+
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+USERINCLUDE ../../ipcpr/inc
+#endif
+
+OS_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+#ifdef BASIC_IPSCPR_MMP
+START RESOURCE 102752C4.rss
+TARGET basicipscpr.rsc
+END
+#else
+START RESOURCE 10204307.rss
+TARGET ipscpr.rsc
+END
+#endif
+
+LIBRARY euser.lib esock.lib esocksvr.lib eintsock.lib insock.lib netmeta.lib
+#ifndef BASIC_IPSCPR_MMP
+
+LIBRARY pfqoslib.lib qoslib.lib
+
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+LIBRARY qosextnapi.lib
+#else
+LIBRARY umtsapi.lib sblpapi.lib
+#endif
+// SYMBIAN_NETWORKING_UMTSR5
+
+
+#endif
+
+#include "comms-infras/commsdebugutility.mmh"
+
+CAPABILITY ALL -Tcb
+
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipscpr/group/ipscpr.mmp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipscpr/group/ipscpr.mmp Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,26 @@
+// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// Ipscpr.MMP IP Subconnection Provider ECOM plugin
+//
+//
+
+/**
+ @file
+*/
+
+#include "ipscpr.mmh"
+
+UNPAGED
+
+SMPSAFE
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipscpr/group/networking_ipscpr.history.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipscpr/group/networking_ipscpr.history.xml Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,5 @@
+
+
+
+
+
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipscpr/group/networking_ipscpr.mrp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipscpr/group/networking_ipscpr.mrp Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,25 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+component networking_ipscpr
+source \sf\os\networkingsrv\networkcontrol\ipscpr
+binary \sf\os\networkingsrv\networkcontrol\ipscpr\group all
+exports \sf\os\networkingsrv\networkcontrol\ipscpr\group
+notes_source \component_defs\release.src
+
+
+ipr E
+
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipscpr/inc/asyncwriter.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipscpr/inc/asyncwriter.h Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,41 @@
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#ifndef ASYNCWRITER_H_
+#define ASYNCWRITER_H_
+
+#include
+#include
+#include "pfqoslib.h"
+#include "pfqos_stream.h"
+#include "qos_msg.h"
+
+NONSHARABLE_CLASS(CAsyncWriter) : public CActive
+ {
+ public:
+ static CAsyncWriter* NewL(CQoSMsgWriter* aWriter);
+ void Send(CQoSMsg* aMessage);
+ protected:
+ CAsyncWriter(CQoSMsgWriter* aWriter);
+ void ConstructL();
+ void RunL();
+ void DoCancel();
+ private:
+ CQoSMsgWriter* iWriter;
+ CQoSMsg* iMessage;
+ TSglQue iPendingMsg;
+ };
+
+#endif //ASYNCWRITER_H_
\ No newline at end of file
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipscpr/inc/deft_scpr.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipscpr/inc/deft_scpr.h Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,170 @@
+/**
+* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Header file for the default SubConnection Provider
+*
+*
+*/
+
+
+
+/**
+ @file deft_scpr.h
+*/
+
+#ifndef __DEFT_CPR_H__
+#define __DEFT_CPR_H__
+
+#include
+#include
+#include
+#include
+#include "ipscprlog.h"
+
+
+class CConnDataTransfer;
+class CEmptySubConnectionProvider : public CSubConnectionProviderBase, public MConnectionEnumerateClients, public MConnectionDataClient
+/**
+Defines the IP Connection Provider. Class provides a mapping from ESock Subconnection
+function calls to QoS.PRT messages.
+
+@internalComponent
+
+@released Since v9.0
+*/
+ {
+protected:
+ // Construction
+ CEmptySubConnectionProvider(CSubConnectionProviderFactoryBase& aFactory, CConnectionProviderBase& aConnProvider) :
+ CSubConnectionProviderBase(aFactory, aConnProvider)
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("CEmptySubConnectionProvider [this=%08x]:\tCEmptySubConnectionProvider() [MConnectionDataClient=%08x]"),
+ this, (MConnectionDataClient*)this));
+ }
+
+ ~CEmptySubConnectionProvider();
+
+ virtual MConnectionDataClient* DoSelfConnectionDataClient();
+
+ //MConnectionEnumerateClients
+ virtual void EnumerateClientsL(TUint& aCount, TDes8& aDes, CConnectionProviderBase::TEnumClients aClientType);
+
+ //MConnectionDataClient
+ virtual void ConnectionError(TInt aStage, TInt aError);
+
+ virtual void DoControlClientJoiningL(MSubConnectionControlClient& aControlClient);
+ virtual void DoControlClientLeaving(MSubConnectionControlClient& aControlClient);
+ };
+
+
+/**
+Defines the default IP Connection Provider.
+
+@internalComponent
+
+@released Since v9.0
+*/
+#ifdef SYMBIAN_NETWORKING_3GPPDEFAULTQOS
+class CDefaultSubConnectionProvider : public CEmptySubConnectionProvider, public MSubConnectionControlClient
+#else
+class CDefaultSubConnectionProvider : public CEmptySubConnectionProvider
+#endif
+//SYMBIAN_NETWORKING_3GPPDEFAULTQOS
+ {
+public:
+
+ // Construction
+#ifdef SYMBIAN_NETWORKING_3GPPDEFAULTQOS
+ CDefaultSubConnectionProvider(CSubConnectionProviderFactoryBase& aFactory, CConnectionProviderBase& aConnProvider, RSubConnection::TSubConnType aType)
+ : CEmptySubConnectionProvider(aFactory, aConnProvider), iSubConnType(aType)
+#else
+ CDefaultSubConnectionProvider(CSubConnectionProviderFactoryBase& aFactory, CConnectionProviderBase& aConnProvider)
+ : CEmptySubConnectionProvider(aFactory, aConnProvider)
+#endif
+ {
+#ifdef SYMBIAN_NETWORKING_3GPPDEFAULTQOS
+ __IPCPRLOG(IpCprLog::Printf(_L("CDefaultSubConnectionProvider [this=%08x]:\tCDefaultSubConnectionProvider() [MSubConnectionControlClient=%08x] [MConnectionDataClient=%08x]"),
+ this, (MSubConnectionControlClient*)this, (MConnectionDataClient*)this));
+#else
+ __IPCPRLOG(IpCprLog::Printf(_L("CDefaultSubConnectionProvider [this=%08x]:\tCDefaultSubConnectionProvider() [MConnectionDataClient=%08x]"),
+ this, (MConnectionDataClient*)this));
+#endif
+ }
+
+ ~CDefaultSubConnectionProvider();
+
+#ifdef SYMBIAN_NETWORKING_3GPPDEFAULTQOS
+ //-=========================================================
+ // MSubConnectionControlClient methods
+ //-=========================================================
+ /** Override this to inform the sub-connection client (e.g. socket, host resolver etc.) that
+ the sub-connection is going down
+
+ @param aSubConnProvider the sub-connection provider going down */
+ virtual void SubConnectionGoingDown(CSubConnectionProviderBase& aSubConnProvider);
+
+ /** Override this to notify the control client of a sub-connection event, eg. layer up etc.
+
+ @param aSubConnProvider The provider which the event was generated on
+ @param aNotifyType The type of event
+ @param aError Error code, if any
+ @param aEvent The notification object containing specialized information */
+ virtual void SubConnectionEvent(CSubConnectionProviderBase& aSubConnProvider, MConnectionDataClient::TNotify aNotifyType, TInt aError, const CSubConNotificationEvent* aEvent);
+
+
+ virtual void LayerUp(CSubConnectionProviderBase& aSubConnProvider, TInt aError);
+ virtual void IncomingConnection(CSubConnectionProviderBase* aSubConnProvider, CSubConParameterBundle* aParameterBundle, TInt aError);
+#endif
+// SYMBIAN_NETWORKING_3GPPDEFAULTQOS
+
+protected:
+ //-=========================================================
+ // CSubConnectionProviderBase methods
+ //-=========================================================
+ // Methods to be overriden be derived subconnection provider
+ virtual void DoControlClientJoiningL(MSubConnectionControlClient& aControlClient); //Fix for DEF096132
+ virtual void DoDataClientJoiningL(MSubConnectionDataClient& aDataClient);
+ virtual void DoDataClientLeaving(MSubConnectionDataClient& aDataClient);
+ virtual void DoSourceAddressUpdate(MSubConnectionDataClient& aDataClient, const TSockAddr& aSource);
+ virtual void DoDestinationAddressUpdate(MSubConnectionDataClient& aDataClient, const TSockAddr& aDestination);
+ virtual void DoDataClientRouted(MSubConnectionDataClient& aDataClient, const TSockAddr& aSource, const TSockAddr& aDestination, const TDesC8& aConnectionInfo);
+ virtual void DoParametersAboutToBeSetL(CSubConParameterBundle& aParameterBundle);
+ virtual TInt DoControl(TUint aOptionLevel, TUint aOptionName, TDes8& aOption);
+
+ virtual void DoStartL();
+ virtual void DoStop();
+ virtual CSubConnectionProviderBase* DoNextLayer();
+ virtual CConnDataTransfer& DoDataTransferL();
+
+ //MConnectionDataClient
+ virtual TAny* FetchInterfaceInstanceL(CConnectionProviderBase& aProvider, const STypeId& aTid);
+ virtual void ConnectionGoingDown(CConnectionProviderBase& aConnProvider);
+ virtual void Notify(TNotify aNotifyType, CConnectionProviderBase* aConnProvider, TInt aError, const CConNotificationEvent* aConNotificationEvent);
+ virtual void AttachToNext(CSubConnectionProviderBase* aSubConnProvider);
+
+#ifdef SYMBIAN_NETWORKING_3GPPDEFAULTQOS
+ virtual void DoControlClientLeaving(MSubConnectionControlClient& aControlClient);
+private:
+ const RSubConnection::TSubConnType iSubConnType;
+#endif
+
+
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+ TUint32 iAppId;
+ CSubConnectionProviderBase * iSubConNextLayer;
+#endif
+ };
+#endif
+// __DEFT_CPR_H__
+
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipscpr/inc/ip_subconparams.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipscpr/inc/ip_subconparams.h Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,221 @@
+/**
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Header file for the IP SubConnection Parameters
+*
+*
+*/
+
+
+
+/**
+ @file ip_subconparams.h
+*/
+
+#ifndef __IP_SUBCONPARAMS_H__
+#define __IP_SUBCONPARAMS_H__
+
+#include
+#include
+#include
+#include
+
+
+// NOTE: This Uid may be changed - See #ifdef at bottom of the file
+const TInt KSubConIPParamsUid = 0x10204309;
+const TInt KSubConQosIPLinkR99ParamsType = 1;
+
+
+#ifdef SYMBIAN_NETWORKING_3GPPDEFAULTQOS
+#include
+
+#else
+const TInt KSubConnSBLPR5ExtensionParamsType = 2;
+
+
+/** Constant definitions particular to the Generic Parameters. */
+const TInt KMAuthTokenLength = 255;
+/** Typedef for the AuthToken Holder. */
+typedef TBuf8 TAuthToken;
+
+#if defined(SYMBIAN_NETWORKING_UMTSR5) && !defined(SYMBIAN_NETWORKING_3GPPDEFAULTQOS)
+#pragma message("SYMBIAN_NETWORKING_UMTSR5 cannot be defined without SYMBIAN_NETWORKING_3GPPDEFAULTQOS")
+#endif
+// SYMBIAN_NETWORKING_UMTSR5
+
+
+#endif
+
+
+#ifdef SYMBIAN_NETWORKING_3GPPDEFAULTQOS
+/** Provides Implementation of IP QoS Parameters
+
+@publishedAll
+@released since v9.1
+@deprecated from v9.2 onwards. Use CSubConQosR99ParamSet from Qos3GPP_Subconparams.h instead.
+*/
+#else
+/** Provides Implementation of IP QoS Parameters
+
+@publishedAll
+@released since v9.1
+*/#endif
+class CSubConQosIPLinkR99ParamSet : public CSubConExtensionParameterSet
+{
+public:
+ inline static CSubConQosIPLinkR99ParamSet* NewL(CSubConParameterFamily& aFamily, CSubConParameterFamily::TParameterSetType aType);
+ inline static CSubConQosIPLinkR99ParamSet* NewL();
+
+ inline CSubConQosIPLinkR99ParamSet();
+
+ inline RPacketQoS::TTrafficClass GetTrafficClass() const;
+ inline RPacketQoS::TDeliveryOrder GetDeliveryOrder() const;
+ inline RPacketQoS::TErroneousSDUDelivery GetErroneousSDUDelivery() const;
+ inline RPacketQoS::TBitErrorRatio GetResidualBitErrorRatio() const;
+ inline RPacketQoS::TSDUErrorRatio GetSDUErrorRatio() const;
+ inline RPacketQoS::TTrafficHandlingPriority GetTrafficHandlingPriority() const;
+ inline TInt GetTransferDelay() const;
+ inline TInt GetMaxSduSize() const;
+ inline TInt GetMaxBitrateUplink() const;
+ inline TInt GetMaxBitrateDownlink() const;
+ inline TInt GetGuaBitrateUplink() const;
+ inline TInt GetGuaBitrateDownlink() const;
+ inline void SetTrafficClass(RPacketQoS::TTrafficClass aTrafficClass);
+ inline void SetDeliveryOrder(RPacketQoS::TDeliveryOrder aDeliveryOrder);
+ inline void SetErroneousSDUDelivery(RPacketQoS::TErroneousSDUDelivery aDeliveryOfErroneusSdu);
+ inline void SetResidualBitErrorRatio(RPacketQoS::TBitErrorRatio aResidualBer);
+ inline void SetSDUErrorRatio(RPacketQoS::TSDUErrorRatio aErrorRatio);
+ inline void SetTrafficHandlingPriority(RPacketQoS::TTrafficHandlingPriority aPriority);
+ inline void SetTransferDelay(TInt aTransferDelay);
+ inline void SetMaxSduSize(TInt aMaxSduSize);
+ inline void SetMaxBitrateUplink(TInt aMaxBitrateUplink);
+ inline void SetMaxBitrateDownlink(TInt aMaxBitrateDownlink);
+ inline void SetGuaBitrateUplink(TInt aGuaBitrateUplink);
+ inline void SetGuaBitrateDownlink(TInt aGuaBitrateDownlink);
+
+protected:
+
+ DATA_VTABLE
+
+protected:
+ RPacketQoS::TTrafficClass iTrafficClass; // Traffic class
+ RPacketQoS::TDeliveryOrder iDeliveryOrder; // Delivery order
+ RPacketQoS::TErroneousSDUDelivery iDeliveryOfErroneusSdu; // Delivery of erroneous SDUs
+ RPacketQoS::TBitErrorRatio iResidualBer; // Residual BER
+ RPacketQoS::TSDUErrorRatio iErrorRatio; // SDU error ratio
+ RPacketQoS::TTrafficHandlingPriority iPriority; // Traffic handling priority
+ TInt iTransferDelay; // Transfer delay
+ TInt iMaxSduSize; // Maximum SDU size
+ TInt iMaxBitrateUplink; // Maximum bit rate for uplink
+ TInt iMaxBitrateDownlink; // Maximum bit rate for downlink
+ TInt iGuaBitrateUplink; // Guaranteed bit rate for uplink
+ TInt iGuaBitrateDownlink; // Guaranteed bit rate for downlink
+ };
+
+#ifndef SYMBIAN_NETWORKING_3GPPDEFAULTQOS
+
+
+/** Flow Identifires
+ECOM Implementation Id for SBLP Extension parameters.
+
+@publishedAll
+@released since v9.1 */
+struct TFlowId
+ {
+ /** Getter Function for the Components of Flow ids. */
+ inline TUint16 GetMediaComponentNumber() const;
+ inline TUint16 GetIPFlowNumber() const;
+ /** Setter Function For Flow Id Components. */
+ inline void SetMediaComponentNumber(TUint16 aMediaComponentNumber);
+ inline void SetIPFlowNumber(TUint16 aIPFlowNumber);
+
+private:
+ TUint16 iMediaComponentNumber;
+ TUint16 iIPFlowNumber;
+ };
+
+typedef RArray RFlowIdentifiers;
+
+/** Extension Parameter Sets, Consise of MAT and FI(s).
+Provides Implementation of Extension parameters of the SBLP Family.
+
+@publishedAll
+@released since v9.1 */
+class CSubConSBLPR5ExtensionParamSet : public CSubConExtensionParameterSet
+ {
+public:
+ inline static CSubConSBLPR5ExtensionParamSet* NewL(CSubConParameterFamily& aFamily, CSubConParameterFamily::TParameterSetType aType);
+ inline static CSubConSBLPR5ExtensionParamSet* NewL();
+
+ /** Media Authorization Token setter and getter functions. */
+ inline const TAuthToken& GetMAT() const;
+ inline void SetMAT(const TAuthToken& aAuthToken);
+
+ /** Flow identifires setter and getter functions. */
+ inline TInt GetNumberOfFlowIds() const;
+ inline const TFlowId& GetFlowIdAt(TInt aIndex) const;
+
+ /** Adding of Flow Identifires into an array. */
+ inline void AddFlowIdL(const TFlowId& aFlowId);
+
+ /** public constructors so that it can be accessed by factory. */
+ inline CSubConSBLPR5ExtensionParamSet();
+ inline ~CSubConSBLPR5ExtensionParamSet();
+
+protected:
+ DATA_VTABLE
+
+ /** Single Media Authorization Token (MAT). */
+ TAuthToken iAuthToken;
+
+ /** Multiple Flow Identifiers. */
+ RFlowIdentifiers iFlowIds;
+ };
+#endif
+
+
+
+
+
+/**
+Factory used to create instances of IP SubConnection Parameters.
+
+@internalComponent
+@released since v9.1
+*/
+class CSubConIPExtensionParamsFactory : public CBase
+ {
+public:
+ static CSubConExtensionParameterSet* NewL(TAny* aConstructionParameters);
+ };
+
+#include
+
+
+
+#ifdef SYMBIAN_NETWORKING_3GPPDEFAULTQOS
+/*
+ Umts QoS extension classes have been relocated to the UmtsGprsSCPR component.
+ So now we need to make sure that the correct class factory TUid, class name,
+ and class Id are used
+*/
+#define KSubConIPParamsUid KSubCon3GPPExtParamsFactoryUid
+#define KSubConQosIPLinkR99ParamsType KSubConQosR99ParamsType
+#define CSubConQosIPLinkR99ParamSet CSubConQosR99ParamSet
+#endif
+// SYMBIAN_NETWORKING_3GPPDEFAULTQOS
+
+
+#endif
+// __IP_SUBCONPARAMS_H__
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipscpr/inc/ip_subconparams.inl
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipscpr/inc/ip_subconparams.inl Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,261 @@
+/**
+* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Inline Functions file for the IP SubConnection Parameters
+*
+*
+*/
+
+
+
+/**
+ @file ip_subconparams.inl
+*/
+
+
+#ifndef __IP_SUBCONPARAMS_INL__
+#define __IP_SUBCONPARAMS_INL__
+
+#ifndef SYMBIAN_NETWORKING_3GPPDEFAULTQOS
+
+CSubConQosIPLinkR99ParamSet* CSubConQosIPLinkR99ParamSet::NewL(CSubConParameterFamily& aFamily, CSubConParameterFamily::TParameterSetType aType)
+ {
+ CSubConQosIPLinkR99ParamSet* obj = NewL();
+ CleanupStack::PushL(obj);
+ aFamily.AddExtensionSetL(*obj, aType);
+ CleanupStack::Pop(obj);
+ return obj;
+ }
+
+CSubConQosIPLinkR99ParamSet* CSubConQosIPLinkR99ParamSet::NewL()
+ {
+ STypeId typeId = STypeId::CreateSTypeId(KSubConIPParamsUid, KSubConQosIPLinkR99ParamsType);
+ return static_cast(CSubConParameterSet::NewL(typeId));
+ }
+
+CSubConQosIPLinkR99ParamSet::CSubConQosIPLinkR99ParamSet()
+ : CSubConExtensionParameterSet(),
+ iTrafficClass(RPacketQoS::ETrafficClassUnspecified),
+ iDeliveryOrder(RPacketQoS::EDeliveryOrderUnspecified),
+ iDeliveryOfErroneusSdu(RPacketQoS::EErroneousSDUDeliveryUnspecified),
+ iResidualBer(RPacketQoS::EBERUnspecified),
+ iErrorRatio(RPacketQoS::ESDUErrorRatioUnspecified),
+ iPriority(RPacketQoS::ETrafficPriorityUnspecified),
+ iTransferDelay(0),
+ iMaxSduSize(0),
+ iMaxBitrateUplink(0),
+ iMaxBitrateDownlink(0),
+ iGuaBitrateUplink(0),
+ iGuaBitrateDownlink(0)
+ {
+ }
+
+RPacketQoS::TTrafficClass CSubConQosIPLinkR99ParamSet::GetTrafficClass() const
+ {
+ return iTrafficClass;
+ }
+
+RPacketQoS::TDeliveryOrder CSubConQosIPLinkR99ParamSet::GetDeliveryOrder() const
+ {
+ return iDeliveryOrder;
+ }
+
+RPacketQoS::TErroneousSDUDelivery CSubConQosIPLinkR99ParamSet::GetErroneousSDUDelivery() const
+ {
+ return iDeliveryOfErroneusSdu;
+ }
+
+RPacketQoS::TBitErrorRatio CSubConQosIPLinkR99ParamSet::GetResidualBitErrorRatio() const
+ {
+ return iResidualBer;
+ }
+
+RPacketQoS::TSDUErrorRatio CSubConQosIPLinkR99ParamSet::GetSDUErrorRatio() const
+ {
+ return iErrorRatio;
+ }
+
+RPacketQoS::TTrafficHandlingPriority CSubConQosIPLinkR99ParamSet::GetTrafficHandlingPriority() const
+ {
+ return iPriority;
+ }
+
+TInt CSubConQosIPLinkR99ParamSet::GetTransferDelay() const
+ {
+ return iTransferDelay;
+ }
+
+TInt CSubConQosIPLinkR99ParamSet::GetMaxSduSize() const
+ {
+ return iMaxSduSize;
+ }
+
+TInt CSubConQosIPLinkR99ParamSet::GetMaxBitrateUplink() const
+ {
+ return iMaxBitrateUplink;
+ }
+
+TInt CSubConQosIPLinkR99ParamSet::GetMaxBitrateDownlink() const
+ {
+ return iMaxBitrateDownlink;
+ }
+
+TInt CSubConQosIPLinkR99ParamSet::GetGuaBitrateUplink() const
+ {
+ return iGuaBitrateUplink;
+ }
+
+TInt CSubConQosIPLinkR99ParamSet::GetGuaBitrateDownlink() const
+ {
+ return iGuaBitrateDownlink;
+ }
+
+void CSubConQosIPLinkR99ParamSet::SetTrafficClass(RPacketQoS::TTrafficClass aTrafficClass)
+ {
+ iTrafficClass = aTrafficClass;
+ }
+
+void CSubConQosIPLinkR99ParamSet::SetDeliveryOrder(RPacketQoS::TDeliveryOrder aDeliveryOrder)
+ {
+ iDeliveryOrder = aDeliveryOrder;
+ }
+
+void CSubConQosIPLinkR99ParamSet::SetErroneousSDUDelivery(RPacketQoS::TErroneousSDUDelivery aDeliveryOfErroneusSdu)
+ {
+ iDeliveryOfErroneusSdu = aDeliveryOfErroneusSdu;
+ }
+
+void CSubConQosIPLinkR99ParamSet::SetResidualBitErrorRatio(RPacketQoS::TBitErrorRatio aResidualBer)
+ {
+ iResidualBer = aResidualBer;
+ }
+
+void CSubConQosIPLinkR99ParamSet::SetSDUErrorRatio(RPacketQoS::TSDUErrorRatio aErrorRatio)
+ {
+ iErrorRatio = aErrorRatio;
+ }
+
+void CSubConQosIPLinkR99ParamSet::SetTrafficHandlingPriority(RPacketQoS::TTrafficHandlingPriority aPriority)
+ {
+ iPriority = aPriority;
+ }
+
+void CSubConQosIPLinkR99ParamSet::SetTransferDelay(TInt aTransferDelay)
+ {
+ iTransferDelay = aTransferDelay;
+ }
+
+void CSubConQosIPLinkR99ParamSet::SetMaxSduSize(TInt aMaxSduSize)
+ {
+ iMaxSduSize = aMaxSduSize;
+ }
+
+void CSubConQosIPLinkR99ParamSet::SetMaxBitrateUplink(TInt aMaxBitrateUplink)
+ {
+ iMaxBitrateUplink = aMaxBitrateUplink;
+ }
+
+void CSubConQosIPLinkR99ParamSet::SetMaxBitrateDownlink(TInt aMaxBitrateDownlink)
+ {
+ iMaxBitrateDownlink = aMaxBitrateDownlink;
+ }
+
+void CSubConQosIPLinkR99ParamSet::SetGuaBitrateUplink(TInt aGuaBitrateUplink)
+ {
+ iGuaBitrateUplink = aGuaBitrateUplink;
+ }
+
+void CSubConQosIPLinkR99ParamSet::SetGuaBitrateDownlink(TInt aGuaBitrateDownlink)
+ {
+ iGuaBitrateDownlink = aGuaBitrateDownlink;
+ }
+
+
+TUint16 TFlowId::GetMediaComponentNumber() const
+ {
+ return iMediaComponentNumber;
+ }
+
+TUint16 TFlowId::GetIPFlowNumber() const
+ {
+ return iIPFlowNumber;
+ }
+
+void TFlowId::SetMediaComponentNumber(TUint16 aMediaComponentNumber)
+ {
+ iMediaComponentNumber = aMediaComponentNumber;
+ }
+
+void TFlowId::SetIPFlowNumber(TUint16 aIPFlowNumber)
+ {
+ iIPFlowNumber = aIPFlowNumber;
+ }
+
+
+//===========================
+// Implementation Extension class
+CSubConSBLPR5ExtensionParamSet::CSubConSBLPR5ExtensionParamSet()
+ : CSubConExtensionParameterSet()
+ {
+ }
+
+CSubConSBLPR5ExtensionParamSet::~CSubConSBLPR5ExtensionParamSet()
+ {
+ iFlowIds.Close();
+ }
+
+CSubConSBLPR5ExtensionParamSet* CSubConSBLPR5ExtensionParamSet::NewL(CSubConParameterFamily& aFamily, CSubConParameterFamily::TParameterSetType aType)
+ {
+ CSubConSBLPR5ExtensionParamSet* sblpExtn = NewL();
+ CleanupStack::PushL(sblpExtn);
+ aFamily.AddExtensionSetL(*sblpExtn, aType);
+ CleanupStack::Pop(sblpExtn);
+ return sblpExtn;
+ }
+CSubConSBLPR5ExtensionParamSet* CSubConSBLPR5ExtensionParamSet::NewL()
+ {
+ STypeId typeId = STypeId::CreateSTypeId(KSubConIPParamsUid, KSubConnSBLPR5ExtensionParamsType);
+ return static_cast(CSubConParameterSet::NewL(typeId));
+ }
+
+const TAuthToken& CSubConSBLPR5ExtensionParamSet::GetMAT() const
+ {
+ return iAuthToken;
+ }
+
+void CSubConSBLPR5ExtensionParamSet::SetMAT(const TAuthToken& aAuthToken)
+ {
+ iAuthToken = aAuthToken;
+ }
+
+TInt CSubConSBLPR5ExtensionParamSet::GetNumberOfFlowIds() const
+ {
+ return iFlowIds.Count();
+ }
+
+const TFlowId& CSubConSBLPR5ExtensionParamSet::GetFlowIdAt(TInt aIndex) const
+ {
+ return iFlowIds[aIndex];
+ }
+
+void CSubConSBLPR5ExtensionParamSet::AddFlowIdL(const TFlowId & aFlowId)
+ {
+ iFlowIds.AppendL(aFlowId);
+ }
+#endif
+// SYMBIAN_NETWORKING_3GPPDEFAULTQOS
+
+#endif
+// __IP_SUBCONPARAMS_INL__
+
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipscpr/inc/ipscpr.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipscpr/inc/ipscpr.h Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,249 @@
+/**
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Header file for the IP SubConnection Provider and its basic version
+*
+*
+*/
+
+
+
+/**
+ @file ipscpr.h
+*/
+
+#ifndef __IPSCPR_H__
+#define __IPSCPR_H__
+
+#include
+#include
+#include
+#include "deft_scpr.h"
+#include
+#include
+#include
+
+
+#ifndef BASIC_IPSCPR
+#include "asyncwriter.h"
+#include
+#include
+
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+#include
+#include
+#endif
+#endif
+
+
+/**
+Connection Provider Id - Protocol Family
+
+@internalComponent
+
+@released Since v9.0
+*/
+const TUint KIPConnectionProviderFactoryId = KAfInet;
+
+/**
+ECOM Implementation Id for Connection Provider
+
+@internalComponent
+
+@released Since v9.0
+*/
+#ifdef BASIC_IPSCPR
+const TInt KSubConnectionProviderImplementationUid = { 0x102752C5 };
+#else
+const TInt KSubConnectionProviderImplementationUid = { 0x10204308 };
+#endif
+
+
+class CConnectionProviderBase;
+class CIpSubConnectionProviderFactory : public CSubConnectionProviderFactoryBase
+/**
+Factory that is used to create instances of IP Connection Providers
+
+@internalComponent
+
+@released Since v9.0
+*/
+ {
+public:
+ static CIpSubConnectionProviderFactory* NewL(TAny* aConstructionParameters);
+ virtual ~CIpSubConnectionProviderFactory();
+
+ CIpSubConnectionProviderFactory(TUint aFactoryId, CSubConnectionFactoryContainer& aParentContainer);
+
+ // methods to be overriden for CSubConnectionProviderFactory
+ virtual CSubConnectionProviderBase* DoCreateProviderL(CConnectionProviderBase& aConnProvider, RSubConnection::TSubConnType aType);
+ };
+
+
+#ifndef BASIC_IPSCPR
+
+class CQoSMsgWriter;
+class CQoSMsgReader;
+class TPfqosMessage;
+class CSubConGenEventParamsGranted;
+class CSubConQosGenericParamSet;
+class CSubConQosIPLinkR99ParamSet;
+class CSubConSBLPR5ExtensionParamSet;
+class CSblpParameters;
+class TQoSParameters;
+class TUmtsQoSParameters;
+
+
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+class TUmtsR5QoSParameters;
+class TImsParameter;
+class CSubConQosR5ParamSet;
+class CSubConIMSExtParamSet;
+#endif
+// SYMBIAN_NETWORKING_UMTSR5
+
+
+class CIpSubConnectionProvider : public CEmptySubConnectionProvider
+/**
+Defines the IP Connection Provider. Class provides a mapping from ESock Subconnection
+function calls to QoS.PRT messages.
+
+@internalComponent
+
+@released Since v9.0
+*/
+ {
+private:
+ enum
+ {
+ KParameterRelInvalid = 0,
+ KParameterRelGeneric = 1,
+ KParameterRel4Rel99 = 4,
+ KParameterRel5 = 5,
+ };
+
+public:
+ // Construction
+ static CIpSubConnectionProvider* NewL(CIpSubConnectionProviderFactory& aFactory, CConnectionProviderBase& aConnProvider);
+
+protected:
+ // Construction
+ CIpSubConnectionProvider(CIpSubConnectionProviderFactory& aFactory, CConnectionProviderBase& aConnProvider);
+
+ // Methods to be overriden be derived subconnection provider
+ virtual void DoDataClientJoiningL(MSubConnectionDataClient& aDataClient);
+ virtual void DoDataClientLeaving(MSubConnectionDataClient& aDataClient);
+ virtual void DoSourceAddressUpdate(MSubConnectionDataClient& aDataClient, const TSockAddr& aSource);
+ virtual void DoDestinationAddressUpdate(MSubConnectionDataClient& aDataClient, const TSockAddr& aDestination);
+ virtual void DoDataClientRouted(MSubConnectionDataClient& aDataClient, const TSockAddr& aSource, const TSockAddr& aDestination, const TDesC8& aConnectionInfo);
+ virtual void DoParametersAboutToBeSetL(CSubConParameterBundle& aParameterBundle);
+ virtual TInt DoControl(TUint aOptionLevel, TUint aOptionName, TDes8& aOption);
+
+ virtual void DoStartL();
+ virtual void DoStop();
+ virtual CSubConnectionProviderBase* DoNextLayer();
+ virtual CConnDataTransfer& DoDataTransferL();
+
+ //MConnectionDataClient
+ virtual TAny* FetchInterfaceInstanceL(CSubConnectionProviderBase& aProvider, const STypeId& aTid);
+ virtual void ConnectionGoingDown(CConnectionProviderBase& aConnProvider);
+ virtual void Notify(TNotify aNotifyType, CConnectionProviderBase* aConnProvider, TInt aError, const CConNotificationEvent* aConNotificationEvent);
+ virtual void AttachToNext(CSubConnectionProviderBase* aSubConnProvider);
+
+ // Don't allow clients to invoke the destructor.
+ // (Only the CCommsFactoryBase should do this)
+ virtual ~CIpSubConnectionProvider();
+
+ void ConstructL();
+
+public:
+ // Messages from PRT
+ void ProcessPRTMsg(TPfqosMessage& aMsg);
+ void ProcessPRTError(TPfqosMessage& aMsg, TInt aError);
+#ifdef _DEBUG
+ void ProcessPRTError(TInt aMsgType, TInt aError);
+#endif
+
+private:
+ // Messages to PRT
+ void SendOpenExistingL(const TInetAddr &aSrcAddr, const TInetAddr &aDstAddr, TUint32 aIapId, TUint32 aProtocol);
+ void SendCreateL(const TInetAddr &aSrcAddr, const TInetAddr &aDstAddr, TUint32 aIapId, TUint32 aProtocol);
+ void SendCloseL();
+ void SendJoinL(const TInetAddr &aSrcAddr, const TInetAddr &aDstAddr, TUint32 aIapId, TUint32 aProtocol);
+ void SendLeaveL(const TInetAddr &aSrcAddr, const TInetAddr &aDstAddr, TUint32 aIapId, TUint32 aProtocol);
+ void SendSetQoSL();
+
+ // Internal Processing
+ void ProcessPRTEventL(TPfqosMessage& aMsg);
+ void ProcessPRTReplyL(TPfqosMessage& aMsg);
+
+ void ConvertParametersFromESockL(CSubConParameterBundle& aParameterBundle);
+ void ConvertParametersFromQOSL(TPfqosMessage& aMsg, CSubConGenEventParamsGranted* aEvent);
+
+ TInt DetermineClient(const TPfqosMessage& aMsg, MSubConnectionDataClient*& aDataClient);
+ void MapGenericParamsFromESockToPRTL(const CSubConQosGenericParamSet& generic) const;
+ void MapGenericParamsFromPRTToESockL(CSubConQosGenericParamSet& generic) const;
+ void MapExtensionParamsFromESockToPRTL(const CSubConQosIPLinkR99ParamSet& extension, TUmtsQoSParameters& params);
+
+ void ResetPrtExtensions();
+
+
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+ void MapExtensionParamsFromESockToPRTL(const CSubConQosR5ParamSet& aExtension, TUmtsR5QoSParameters& aParams);
+ void MapExtensionParamsFromESockToPRTL(const CSubConImsExtParamSet& aExtension, TImsParameter& aParams);
+
+ CSubConExtensionParameterSet* MapFromUmtsR5ExtensionL (const CUmtsR5QoSPolicy* aPolicy);
+ CSubConExtensionParameterSet* MapFromImsExtensionL (const CImsPolicy* aPolicy);
+#endif
+// SYMBIAN_NETWORKING_UMTSR5
+
+
+ void MapExtensionParamsFromESockToPRTL(const CSubConSBLPR5ExtensionParamSet& extension, CSblpParameters& params) const;
+
+ void ConvertTQoSIntoCQoSParamsL(const TQoSParameters& aParameter);
+ void ConvertCQoSIntoTQoSParamsL(TQoSParameters& aParameters) const;
+
+private:
+ /** Internal Socket */
+ RInternalSocket iSocket;
+
+ /** PRT message writer */
+ CQoSMsgWriter* iWriter;
+
+ /** PRT message reader */
+ CQoSMsgReader* iReader;
+
+ /** QoS channel Id */
+ TInt iChannelId;
+
+ /** Process UID */
+ TUidType iUid;
+
+ /** QoS Parameters */
+ CQoSParameters* iPrtParameters;
+
+ /** QoS Extensions */
+ TQoSExtensionQueue iPrtExtensions;
+
+ /** QoS Parameters Set */
+ TBool iParametersSet;
+ TInt iParameterRelease;
+
+ /**Class for doing async writes */
+ CAsyncWriter* iAsyncWriter;
+ };
+
+#endif // BASIC_IPSCPR
+#endif // __IPSCPR_H__
+
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipscpr/src/10204307.rss
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipscpr/src/10204307.rss Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,60 @@
+// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// Registry info for IP Sub-Connection Provider plug-in
+//
+//
+
+/**
+ @file 10204307.RSS
+*/
+
+#include
+
+RESOURCE REGISTRY_INFO theInfo
+{
+dll_uid = 0x10204307;
+interfaces =
+ {
+ INTERFACE_INFO
+ {
+ interface_uid = 0x10204301;
+ implementations =
+ {
+ IMPLEMENTATION_INFO
+ {
+ implementation_uid = 0x10204308;
+ version_no = 1;
+ display_name = "IP Sub-Connection Provider Factory";
+ default_data = "IpSubConnectionProviderFactory";
+ opaque_data = "";
+ }
+ };
+ },
+ INTERFACE_INFO
+ {
+ interface_uid = 0x10204303;
+ implementations =
+ {
+ IMPLEMENTATION_INFO
+ {
+ implementation_uid = 0x10204309;
+ version_no = 1;
+ display_name = "CSubConnection Qos IP Link R5 Extension Parameter Set";
+ default_data = "text/wml";
+ opaque_data = "";
+ }
+ };
+ }
+ };
+}
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipscpr/src/102752C4.rss
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipscpr/src/102752C4.rss Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,60 @@
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// Registry info for Basic IP Sub-Connection Provider plug-in
+//
+//
+
+/**
+ @file
+*/
+
+#include
+
+RESOURCE REGISTRY_INFO theInfo
+{
+dll_uid = 0x102752C4;
+interfaces =
+ {
+ INTERFACE_INFO
+ {
+ interface_uid = 0x10204301;
+ implementations =
+ {
+ IMPLEMENTATION_INFO
+ {
+ implementation_uid = 0x102752C5;
+ version_no = 1;
+ display_name = "Basic IP Sub-Connection Provider Factory";
+ default_data = "BasicIpSubConnectionProvdFactory";
+ opaque_data = "";
+ }
+ };
+ },
+ INTERFACE_INFO
+ {
+ interface_uid = 0x10204303;
+ implementations =
+ {
+ IMPLEMENTATION_INFO
+ {
+ implementation_uid = 0x102754C7;
+ version_no = 1;
+ display_name = "CSubConnection Qos IP Link R5 Extension Parameter Set";
+ default_data = "text/wml";
+ opaque_data = "";
+ }
+ };
+ }
+ };
+}
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipscpr/src/asyncwriter.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipscpr/src/asyncwriter.cpp Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,70 @@
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#include "asyncwriter.h"
+
+
+CAsyncWriter* CAsyncWriter::NewL(CQoSMsgWriter* aWriter)
+ {
+ CAsyncWriter* self = new (ELeave) CAsyncWriter(aWriter);
+ CleanupStack::PushL(self);
+ self->ConstructL();
+ CleanupStack::Pop(self);
+ return self;
+ }
+
+CAsyncWriter::CAsyncWriter(CQoSMsgWriter* aWriter) :
+ CActive(EPriorityNormal),
+ iWriter(aWriter)
+ {
+ iPendingMsg.SetOffset(_FOFF(CQoSMsg, iLink));
+ }
+
+void CAsyncWriter::ConstructL()
+ {
+ CActiveScheduler::Add(this);
+ }
+
+void CAsyncWriter::Send(CQoSMsg* aMessage)
+ {
+ if (IsActive())
+ {
+ iPendingMsg.AddLast(*aMessage);
+ }
+ else
+ {
+ iWriter->Send(aMessage);
+ SetActive();
+ TRequestStatus* stat = &iStatus;
+ User::RequestComplete(stat,KErrNone);
+ }
+ }
+
+void CAsyncWriter::RunL()
+ {
+ ASSERT(iWriter);
+ if (!iPendingMsg.IsEmpty())
+ {
+ CQoSMsg* msg = iPendingMsg.First();
+ iPendingMsg.Remove(*msg);
+ iWriter->Send(msg);
+ SetActive();
+ }
+ }
+
+void CAsyncWriter::DoCancel()
+ {
+ //No code needed here becuase the request is completed immediately on activation
+ }
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipscpr/src/deft_scpr.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipscpr/src/deft_scpr.cpp Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,460 @@
+// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// Implementation file for the IP SubConnection Provider
+//
+//
+
+/**
+ @file
+*/
+
+#include
+#include
+#include
+#include "deft_scpr.h"
+#include "ipscprlog.h"
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+#include "MAppIdInfo.h"
+#include
+#include
+#endif //SYMBIAN_NETWORKING_UMTSR5
+
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+ const TUint32 KSIPSecureId = 270490934;
+ const TUint32 KDHCPSecureId = 270522821;
+ const TUint32 KDNSSecureId = 268437634;
+#endif //SYMBIAN_NETWORKING_UMTSR5
+
+CEmptySubConnectionProvider::~CEmptySubConnectionProvider()
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("~CEmptySubConnectionProvider [this=%08x]"), this));
+ if (iConnectionProvider)
+ {
+ iConnectionProvider->Leave(*this);
+ }
+ }
+
+void CEmptySubConnectionProvider::DoControlClientJoiningL(MSubConnectionControlClient& aControlClient)
+ {
+ (void)aControlClient;
+ __IPCPRLOG(IpCprLog::Printf(_L("CEmptySubConnectionProvider [this=%08x]:\tDoControlClientJoiningL() [iControlClients.Count=%d] [aControlClient=%08x]"), this, iControlClients.Count(), &aControlClient));
+ }
+
+void CEmptySubConnectionProvider::DoControlClientLeaving(MSubConnectionControlClient& aControlClient)
+ {
+ (void)aControlClient;
+ __IPCPRLOG(IpCprLog::Printf(_L("CEmptySubConnectionProvider [this=%08x]:\tDoControlClientLeaving() [iControlClients.Count=%d] [aControlClient=%08x]"), this, iControlClients.Count(), &aControlClient));
+ }
+
+void CEmptySubConnectionProvider::EnumerateClientsL(TUint& aCount, TDes8& aDes, CConnectionProviderBase::TEnumClients aClientType)
+ {
+ STypeId tid = STypeId::CreateSTypeId(KConnectionClientExtUid,EConnectionClientDesc);
+ TInt max = iControlClients.Count();
+ for ( TInt n = 0; n < max; n++ )
+ {
+ MConnectionClientDesc* intf = reinterpret_cast(iControlClients[n]->FetchInterfaceInstanceL(*this,tid));
+ if ( intf )
+ {
+ TConnectionProcessInfo cinfo;
+ cinfo.GetInfoL(aClientType,aCount, *intf, aDes);
+ }
+ }
+ STypeId tid2 = STypeId::CreateSTypeId(KConnectionClientExtUid,EConnectionEnumerateClients);
+ max = iDataClients.Count();
+ for ( TInt n = 0; n < max; n++ )
+ {
+ MConnectionEnumerateClients* intf = reinterpret_cast(iDataClients[n]->FetchInterfaceInstanceL(*this,tid2));
+ if ( intf )
+ {
+ intf->EnumerateClientsL(aCount,aDes,aClientType);
+ }
+ }
+ }
+
+void CEmptySubConnectionProvider::ConnectionError(TInt /*aStage*/, TInt aError)
+ {//it's comming from connection at the same level so forward it sideways
+ //with an origin EConnection
+ TInt max = iDataClients.Count();
+ for ( TInt n = max - 1; n >= 0; n-- )
+ {
+ iDataClients[n]->SubConnectionError(*this, MSubConnectionDataClient::EConnection, aError);
+ }
+ }
+
+MConnectionDataClient* CEmptySubConnectionProvider::DoSelfConnectionDataClient()
+ {
+ return this;
+ }
+
+
+// Methods to be overriden be derived subconnection provider
+void CDefaultSubConnectionProvider::DoControlClientJoiningL(MSubConnectionControlClient& aControlClient)
+ {
+ (void)aControlClient;
+ __IPCPRLOG(IpCprLog::Printf(_L("CDefaultSubConnectionProvider::DoControlClientJoiningL [this=%08x]"), this));
+ if (NULL != NextLayer())
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Lower subconnection provider for IP exists - joined with provider")));
+ }
+ else
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Lower subconnection provider for IP doesn't exists - not joined")));
+ }
+
+ }
+
+void CDefaultSubConnectionProvider::DoDataClientJoiningL(MSubConnectionDataClient& aDataClient)
+ {
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+ // This piece of code is being added as per the requirements of PREQ 635 of dedicated PDP signalling
+ // context. When Primary PDP Context is created Network will return back the code saying whether it
+ // accepts the request to be dedicated signalling context or not. If Network decided to allow for dedicated
+ // signalling context then UmtsGprs SCPR add the information into the iParameterBundle of the UmtsGprsScpr
+
+ // However, if the User doesnt do RSubConnection::SetParamter(EAttachDefault), which actually the user shouldn't do
+ // then we have to Get the parameter from the Next Layer, which again might or might not be UmtsGprs SubConnection Provider.
+ // Nevertheless if we call SetParameter() on iNextLayer then SetParameters across all the Layers below will get called, and
+ // since I knew that if any of the layer below is UmtsGprsSCpr, it will update the IMCN Signalling flag in the
+ // parameter Bundle which I will pass with the SetParameter()
+
+ // We Initialize this variable everytime so that it can it can point to proper next layer
+ // everytime. Just a safety measure because it will anyway be initialised by the code written
+ // below
+ iSubConNextLayer = NULL;
+ if (NULL == iNextLayer)
+ {
+ // Find the Next Layer , otherwise iSubConNextLayer will be NULL by default.
+ CConnectionProviderBase* lowerConnectionProvider = iConnectionProvider->NextLayer();
+ if (lowerConnectionProvider)
+ {
+ TUint nextLayerFactoryId = lowerConnectionProvider->CanDoSubConnection(RSubConnection::EAttachToDefault);
+ if (nextLayerFactoryId != 0)
+ {
+ TSockManData* sockManData = SockManGlobals::Get();
+ CSubConnectionFactoryContainer* subConnectionFactories = sockManData->iSubConnectionFactories;
+ XSubConnectionFactoryQuery query(lowerConnectionProvider, RSubConnection::EAttachToDefault);
+ iSubConNextLayer = subConnectionFactories->FindOrCreateProviderL(nextLayerFactoryId, query);
+ }
+
+ }
+ }
+ else
+ {
+ // We have a NextLayer, Point iSubConNextLayer to the same
+ iSubConNextLayer = iNextLayer;
+ }
+
+ // Get The parameter Bundle for this SubConnectionProvider Instance. if Not available create one
+ // and Get the parameters from the Next Lyer
+ CSubConParameterBundle *tempBundle = NULL;
+ if (iSubConNextLayer != NULL)
+ {
+ tempBundle = iParameterBundle != NULL? iParameterBundle :CSubConParameterBundle::NewL();
+ TRAP_IGNORE(iSubConNextLayer->SetParametersL(*tempBundle));
+ }
+
+ // Get the family if Available
+ CSubConParameterFamily *imcnFamily = tempBundle != NULL ? tempBundle->FindFamily(KSubConnContextDescrParamsFamily) : NULL;
+ if (imcnFamily)
+ {
+ // Find the family, Look for the IMCN value, using CSubConImsExtParamSet defined in Qos3gpp
+ CSubConImsExtParamSet *imcnSigParams = static_cast
+ (imcnFamily->FindExtensionSet(STypeId::CreateSTypeId(KSubConIPParamsUid,KSubConImsExtParamsType),
+ CSubConParameterFamily::EGranted));
+ // If Family contains IMCN Signalling Parameters
+ if (imcnSigParams&& imcnSigParams->GetImsSignallingIndicator())
+ {
+ // Check and Delete
+ if (tempBundle != iParameterBundle)
+ {
+ tempBundle->Close();
+ tempBundle=NULL;
+ }
+ // Fetch the interface from the connection provider
+ STypeId typeID = STypeId::CreateSTypeId(KConnectionAppInfoInterfaceId,0); // IP Conenction provider factory Uid
+ TAny* intf = iConnectionProvider->FetchInterfaceInstanceL(typeID);
+ if (!intf)
+ {
+ // We are not able to get the AppSId so leaving
+ User::Leave(KErrNotSupported);
+ }
+ MConnectionAppIdInfo *appIdIP = static_cast(intf);
+ TUint32 appSecureId = appIdIP->GetAppSecureId();
+
+ // if socket is being opened by any application other than SIP, DHCP, and DNS we need to
+ // restrict the socket from being Created.
+
+
+ if ( ( appSecureId==KSIPSecureId || iAppId == KSIPSecureId) ||
+ (appSecureId==KDHCPSecureId || iAppId == KDHCPSecureId) ||
+ (appSecureId==KDNSSecureId || iAppId == KDNSSecureId) )
+ {
+ aDataClient.JoinComplete(*this);
+ }
+ else
+ {
+ User::Leave(KErrPermissionDenied);
+ }
+ } // if (imcnSigParams&& imcnSigParams->GetImsSignallingIndicator())
+ else
+ {
+ if (iConnectionProvider->IsLayerUp())
+ {
+ aDataClient.JoinComplete(*this);
+ }
+
+ }
+ } // if (imcnFamily)
+ // Check and Delete
+ if (tempBundle != iParameterBundle && tempBundle!=NULL)
+ {
+ tempBundle->Close();
+ }
+#else
+
+ if (iConnectionProvider->IsLayerUp())
+ {
+ aDataClient.JoinComplete(*this);
+ }
+#endif // #ifdef SYMBIAN_NETWORKING_UMTSR5
+
+ }
+
+void CDefaultSubConnectionProvider::DoDataClientLeaving(MSubConnectionDataClient& aDataClient)
+ {
+ aDataClient.LeaveComplete(*this);
+ }
+
+void CDefaultSubConnectionProvider::DoSourceAddressUpdate(MSubConnectionDataClient& /*aDataClient*/, const TSockAddr& /*aSource*/)
+ {
+ }
+
+void CDefaultSubConnectionProvider::DoDestinationAddressUpdate(MSubConnectionDataClient& /*aDataClient*/, const TSockAddr& /*aDestination*/)
+ {
+ }
+
+void CDefaultSubConnectionProvider::DoDataClientRouted(MSubConnectionDataClient& /*aDataClient*/, const TSockAddr& /*aSource*/, const TSockAddr& /*aDestination*/, const TDesC8& /*aConnectionInfo*/)
+ {
+ }
+
+#ifdef SYMBIAN_NETWORKING_3GPPDEFAULTQOS
+void CDefaultSubConnectionProvider::DoParametersAboutToBeSetL(CSubConParameterBundle& aParameterBundle)
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("CDefaultSubConnectionProvider::DoParametersAboutToBeSetL [this=%08x]"), this));
+ if (NULL != NextLayer())
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Lower subconnection provider for IP exists - forwarding the request")));
+ iNextLayer->SetParametersL(aParameterBundle);
+ }
+ else
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Lower subconnection provider for IP doesn't exists - the request not supported")));
+ User::Leave(KErrNotSupported);
+ }
+ }
+
+#else
+void CDefaultSubConnectionProvider::DoParametersAboutToBeSetL(CSubConParameterBundle& /*)aParameterBundle*/)
+ {//this could potentially fetch a current parameters from GuQoS and return them back as granted ones
+ User::Leave(KErrNotSupported);
+ }
+#endif
+
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+TInt CDefaultSubConnectionProvider::DoControl(TUint aOptionLevel, TUint /*aOptionName*/, TDes8& /*aOption*/)
+#else
+TInt CDefaultSubConnectionProvider::DoControl(TUint /*aOptionLevel*/, TUint /*aOptionName*/, TDes8& /*aOption*/)
+#endif //#ifdef SYMBIAN_NETWORKING_UMTSR5
+ {
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+//This control is used to send application secure ID of Active Connection. This Id
+//will be used to for adding socket as data client to the subconnection.
+ iAppId=aOptionLevel;
+ return KErrNone;
+#else
+ return KErrNotSupported;
+#endif //#ifdef SYMBIAN_NETWORKING_UMTSR5
+ }
+
+void CDefaultSubConnectionProvider::DoStartL()
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("CDefaultSubConnectionProvider::DoStartL [this=%08x]"), this));
+ }
+
+void CDefaultSubConnectionProvider::DoStop()
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("CDefaultSubConnectionProvider::DoStop [this=%08x]"), this));
+#ifdef SYMBIAN_NETWORKING_3GPPDEFAULTQOS
+ if (iNextLayer)
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Leaving Lower subconnection provider")));
+ iNextLayer->Leave(*this);
+ iNextLayer = NULL;
+ }
+#endif
+ }
+
+CSubConnectionProviderBase* CDefaultSubConnectionProvider::DoNextLayer()
+ {
+#ifdef SYMBIAN_NETWORKING_3GPPDEFAULTQOS
+ __IPCPRLOG(IpCprLog::Printf(_L("CDefaultSubConnectionProvider [this=%08x]:\tDoNextLayer()"), this));
+ if (NULL == iNextLayer)
+ {
+ CConnectionProviderBase* lowerConnectionProvider = iConnectionProvider->NextLayer();
+ if (!lowerConnectionProvider)
+ {
+ //This could denote the connection isn't started and perhaps should be from here,
+ // but since the selection isn't separated from startup, we don't have enough
+ // information to do it here.
+ __IPCPRLOG(IpCprLog::Printf(_L("CDefaultSubConnectionProvider [this=%08x]:\tDoNextLayer() Connection Provider is missing its NextLayer"), this));
+ return NULL; // No Lower layer,so leaving rhostresolver without connection.
+ }
+
+ TUint nextLayerFactoryId = lowerConnectionProvider->CanDoSubConnection(RSubConnection::EAttachToDefault);
+ TRAP_IGNORE(
+
+ if (nextLayerFactoryId != 0)
+ {
+ //'This' not started yet. The lower layer unknown
+ //This is as much as we can delay with resolving the subconnection stack
+ TSockManData* sockManData = SockManGlobals::Get();
+ CSubConnectionFactoryContainer* subConnectionFactories = sockManData->iSubConnectionFactories;
+
+ XSubConnectionFactoryQuery query(lowerConnectionProvider, RSubConnection::EAttachToDefault);
+ iNextLayer = subConnectionFactories->FindOrCreateProviderL(nextLayerFactoryId, query);
+ }
+
+ if (iNextLayer)
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Lower subconnection provider for IP found.. Joining")));
+ iNextLayer->JoinL(*this);
+ }
+ else
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Lower subconnection provider for IP not found.. Continuing")));
+ }
+ );
+
+ }
+
+ return iNextLayer;
+
+#else
+ __IPCPRLOG(IpCprLog::Printf(_L("Lower subconnection provider for IP not supported")));
+ return NULL;
+#endif
+//SYMBIAN_NETWORKING_3GPPDEFAULTQOS
+ }
+
+CConnDataTransfer& CDefaultSubConnectionProvider::DoDataTransferL()
+ {
+ User::Leave(KErrNotSupported);
+ //unreachable code
+ return iNextLayer->DataTransferL();
+ }
+
+//MConnectionDataClient
+TAny* CDefaultSubConnectionProvider::FetchInterfaceInstanceL(CConnectionProviderBase& /*aProvider*/, const STypeId& aTid)
+ {
+ return (aTid == STypeId::CreateSTypeId(KConnectionClientExtUid,EConnectionEnumerateClients)) ? static_cast(this) : NULL;
+ }
+
+void CDefaultSubConnectionProvider::ConnectionGoingDown(CConnectionProviderBase& /*aConnProvider*/)
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("CDefaultSubConnectionProvider [this=%08x]:\tConnectionGoingDown()"), this));
+ iConnectionProvider = NULL;
+ DeleteMeNow();
+ }
+
+void CDefaultSubConnectionProvider::Notify(MConnectionDataClient::TNotify aNotifyType, CConnectionProviderBase* /*aConnProvider*/, TInt aError, const CConNotificationEvent* /*aConNotificationEvent*/)
+ {
+ int count = iControlClients.Count();
+ for (int i = count - 1; i >= 0; --i)
+ {
+ iControlClients[i]->SubConnectionEvent(*this, aNotifyType, aError, NULL);
+ }
+ if (aNotifyType == ENotifyLayerUp)
+ {//complete outstanding data client joins
+ TInt max = iDataClients.Count();
+ for ( TInt n = max - 1; n >= 0; n-- )
+ {
+ if (aError == KErrNone)
+ {
+ iDataClients[n]->JoinComplete(*this);
+ }
+ else
+ {
+ iDataClients[n]->JoinFailed(*this,aError);
+ }
+ }
+ }
+ }
+
+void CDefaultSubConnectionProvider::AttachToNext(CSubConnectionProviderBase* /*aSubConnProvider*/)
+ {
+ }
+
+CDefaultSubConnectionProvider::~CDefaultSubConnectionProvider ()
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("~CDefaultSubConnectionProvider [this=%08x]"), this));
+#ifdef SYMBIAN_NETWORKING_3GPPDEFAULTQOS
+ if (iNextLayer)
+ {
+ iNextLayer->Leave (*this);
+ }
+#endif
+ }
+
+
+#ifdef SYMBIAN_NETWORKING_3GPPDEFAULTQOS
+void CDefaultSubConnectionProvider::DoControlClientLeaving(MSubConnectionControlClient& aControlClient)
+ {
+ (void)aControlClient;
+ __IPCPRLOG(IpCprLog::Printf(_L("CDefaultSubConnectionProvider [this=%08x]:\tDoControlClientLeaving() [iControlClients.Count=%d] [aControlClient=%08x]"), this, iControlClients.Count(), &aControlClient));
+
+ // Note: control client count == 1 because the the client has not been removed yet
+ if (iNextLayer && iControlClients.Count() == 1 && iDataClients.Count() == 0)
+ {
+ iNextLayer->Leave (*this);
+ iNextLayer = NULL;
+ }
+ }
+
+void CDefaultSubConnectionProvider::SubConnectionEvent(CSubConnectionProviderBase& /*aSubConnProvider*/, MConnectionDataClient::TNotify /*aNotifyType*/, TInt /*aError*/, const CSubConNotificationEvent* aEvent)
+ {
+ NotifyClientEvent(*aEvent);
+ }
+
+
+void CDefaultSubConnectionProvider::SubConnectionGoingDown(CSubConnectionProviderBase& /*aSubConnProvider*/)
+ {
+ TInt max = iControlClients.Count();
+ for ( TInt n = max - 1; n >= 0; n-- )
+ {
+ iControlClients[n]->SubConnectionGoingDown(*this);
+ }
+ }
+
+
+void CDefaultSubConnectionProvider::LayerUp(CSubConnectionProviderBase& /*aSubConnProvider*/, TInt /*aError*/)
+ {
+ }
+
+void CDefaultSubConnectionProvider::IncomingConnection(CSubConnectionProviderBase* /*aSubConnProvider*/, CSubConParameterBundle* /*aParameterBundle*/, TInt /*aError*/)
+ {
+ }
+
+#endif
+// SYMBIAN_NETWORKING_3GPPDEFAULTQOS
+
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipscpr/src/ip_subconparams.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipscpr/src/ip_subconparams.cpp Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,74 @@
+// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// Implementation file for the IP SubConnection Parameters
+//
+//
+
+/**
+ @file ip_subconparams.h
+*/
+
+
+#include
+#include
+#include
+#include
+#include
+#include
+
+#ifndef SYMBIAN_NETWORKING_3GPPDEFAULTQOS
+// need to ensure the original class name and TUid of the factory class
+// is used for implementions in this component
+#undef KSubConIPParamsUid
+#undef KSubConQosIPLinkR99ParamsType
+#undef CSubConQosIPLinkR99ParamSet
+#endif
+
+START_ATTRIBUTE_TABLE( CSubConQosIPLinkR99ParamSet, KSubConIPParamsUid, KSubConQosIPLinkR99ParamsType )
+ REGISTER_ATTRIBUTE( CSubConQosIPLinkR99ParamSet, iTrafficClass, TMetaNumber )
+ REGISTER_ATTRIBUTE( CSubConQosIPLinkR99ParamSet, iDeliveryOrder, TMetaNumber )
+ REGISTER_ATTRIBUTE( CSubConQosIPLinkR99ParamSet, iDeliveryOfErroneusSdu, TMetaNumber )
+ REGISTER_ATTRIBUTE( CSubConQosIPLinkR99ParamSet, iResidualBer, TMetaNumber )
+ REGISTER_ATTRIBUTE( CSubConQosIPLinkR99ParamSet, iErrorRatio, TMetaNumber )
+ REGISTER_ATTRIBUTE( CSubConQosIPLinkR99ParamSet, iPriority, TMetaNumber )
+ REGISTER_ATTRIBUTE( CSubConQosIPLinkR99ParamSet, iTransferDelay, TMetaNumber )
+ REGISTER_ATTRIBUTE( CSubConQosIPLinkR99ParamSet, iMaxSduSize, TMetaNumber )
+ REGISTER_ATTRIBUTE( CSubConQosIPLinkR99ParamSet, iMaxBitrateUplink, TMetaNumber )
+ REGISTER_ATTRIBUTE( CSubConQosIPLinkR99ParamSet, iMaxBitrateDownlink, TMetaNumber )
+ REGISTER_ATTRIBUTE( CSubConQosIPLinkR99ParamSet, iGuaBitrateUplink, TMetaNumber )
+ REGISTER_ATTRIBUTE( CSubConQosIPLinkR99ParamSet, iGuaBitrateDownlink, TMetaNumber )
+END_ATTRIBUTE_TABLE()
+
+START_ATTRIBUTE_TABLE( CSubConSBLPR5ExtensionParamSet, KSubConIPParamsUid, KSubConnSBLPR5ExtensionParamsType )
+ REGISTER_ATTRIBUTE( CSubConSBLPR5ExtensionParamSet, iAuthToken, TMeta)
+ REGISTER_ATTRIBUTE( CSubConSBLPR5ExtensionParamSet, iFlowIds, TMetaArray)
+END_ATTRIBUTE_TABLE()
+
+CSubConExtensionParameterSet* CSubConIPExtensionParamsFactory::NewL(TAny* aConstructionParameters)
+ {
+ TInt32 type = reinterpret_cast(aConstructionParameters);
+ switch (type)
+ {
+ case (KSubConQosIPLinkR99ParamsType):
+ return new (ELeave) CSubConQosIPLinkR99ParamSet;
+ // break;
+ case (KSubConnSBLPR5ExtensionParamsType):
+ return new (ELeave) CSubConSBLPR5ExtensionParamSet;
+ // break;
+ default:
+ User::Leave(KErrNotFound);
+ }
+ return NULL;
+ }
+
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipscpr/src/ipscpr.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipscpr/src/ipscpr.cpp Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,2006 @@
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// Implementation file for the IP SubConnection Provider and its basic version.
+//
+//
+
+/**
+ @file ipscpr.cpp
+*/
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include "ipscpr.h"
+#include "ipscprlog.h"
+#include "sblpextn.h"
+#include
+
+#ifndef BASIC_IPSCPR
+#include "pfqos_stream.h"
+#include "ipscprlog.h"
+#include
+#include "qos_msg.h"
+#include "pfqoslib.h"
+#include
+
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+#include
+#include
+#include
+#else
+#include
+#include
+#endif
+// SYMBIAN_NETWORKING_UMTSR5
+
+#endif
+
+#ifndef SYMBIAN_NETWORKING_3GPPDEFAULTQOS
+// need to ensure the original TUid of the factory class is used for implementions in this component
+#undef KSubConIPParamsUid
+#endif
+
+
+/**
+Data required for instantiating ECOM Plugin
+*/
+const TImplementationProxy ImplementationTable[] =
+ {
+ IMPLEMENTATION_PROXY_ENTRY(KSubConnectionProviderImplementationUid, CIpSubConnectionProviderFactory::NewL),
+ IMPLEMENTATION_PROXY_ENTRY(KSubConIPParamsUid, CSubConIPExtensionParamsFactory::NewL)
+ };
+
+
+/**
+ECOM Implementation Factory
+*/
+EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
+ {
+ aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
+
+ return ImplementationTable;
+ }
+
+
+/**
+Plugin Implementation
+*/
+
+
+CIpSubConnectionProviderFactory* CIpSubConnectionProviderFactory::NewL(TAny* aConstructionParameters)
+/**
+Constructs a IP Connection Provider Factory
+
+@param aConstructionParameters construction data passed by ECOM
+
+@return pointer to a constructed factory
+*/
+ {
+ CIpSubConnectionProviderFactory* ptr = new (ELeave) CIpSubConnectionProviderFactory(KIPConnectionProviderFactoryId, *(reinterpret_cast(aConstructionParameters)));
+ return ptr;
+ }
+
+
+CIpSubConnectionProviderFactory::CIpSubConnectionProviderFactory(TUint aFactoryId, CSubConnectionFactoryContainer& aParentContainer)
+ : CSubConnectionProviderFactoryBase(aFactoryId, aParentContainer)
+/**
+IP SubConnection Provider Factory Constructor
+
+@param aFactoryId ECOM Implementation Id
+@param aParentContainer Object Owner
+*/
+ {
+ }
+
+
+CIpSubConnectionProviderFactory::~CIpSubConnectionProviderFactory()
+/**
+IP SubConnection Provider Factory Destructor
+*/
+ {
+ }
+
+
+CSubConnectionProviderBase* CIpSubConnectionProviderFactory::DoCreateProviderL(CConnectionProviderBase& aConnProvider, RSubConnection::TSubConnType aType)
+/**
+Factory Function that either creates a new SubConnection Provider or attaches
+to the default Provider. The type of creation can be either RSubConnection::ECreateNew
+or RSubConnection::EAttachToDefault.
+
+Use of other types will cause the factory to leave with KErrNotSupported.
+
+@param aConnProvider Associated Connection Provider
+@param aType Type of SubConnection Provider Creation.
+*/
+ {
+ CSubConnectionProviderBase* p = NULL;
+ switch (aType)
+ {
+#ifdef SYMBIAN_NETWORKING_3GPPDEFAULTQOS
+ case RSubConnection::EAttachToDefault:
+ p = new(ELeave)CDefaultSubConnectionProvider(*this, aConnProvider, aType);
+ break;
+#ifdef BASIC_IPSCPR
+ case RSubConnection::ECreateNew:
+ // The Basic IPSCPR, itself, by definition, doesn't support secondary contexts.
+ // Ideally it should defer to the transport layer provider as for primary contexts...
+ //
+ User::Leave(KErrNotSupported);
+ break;
+#else
+ case RSubConnection::ECreateNew:
+ p = CIpSubConnectionProvider::NewL(*this, aConnProvider);
+ break;
+#endif // BASIC_IPSCPR
+#else
+ case RSubConnection::ECreateNew:
+ p = CIpSubConnectionProvider::NewL(*this, aConnProvider);
+ break;
+ case RSubConnection::EAttachToDefault:
+ p = new(ELeave)CDefaultSubConnectionProvider(*this, aConnProvider);
+ break;
+#endif // SYMBIAN_NETWORKING_3GPPDEFAULTQOS
+ default:
+ {
+ User::Leave(KErrNotSupported);
+ }
+ };
+ return p;
+ }
+
+
+#ifndef BASIC_IPSCPR
+
+/**
+Provider Implementation
+*/
+
+
+CIpSubConnectionProvider* CIpSubConnectionProvider::NewL(CIpSubConnectionProviderFactory& aFactory, CConnectionProviderBase& aConnProvider)
+/**
+Construct a new IP SubConnection Provider Object
+
+@param aFactory factory that create this object
+@param aConnProvider Connection Provider associated with this object
+*/
+ {
+ CIpSubConnectionProvider* ptr = new (ELeave) CIpSubConnectionProvider(aFactory, aConnProvider);
+
+ CleanupStack::PushL(ptr);
+ ptr->ConstructL();
+ CleanupStack::Pop();
+
+ return ptr;
+ }
+
+
+CIpSubConnectionProvider::CIpSubConnectionProvider(CIpSubConnectionProviderFactory& aFactory, CConnectionProviderBase& aConnProvider)
+ : CEmptySubConnectionProvider(aFactory, aConnProvider)
+ , iChannelId(-1)
+ , iPrtExtensions(_FOFF(CExtensionBase,iLink))
+ , iParametersSet(EFalse)
+/**
+IP SubConnection Provider Constructor
+
+@param aFactory factory that create this object
+@param aConnProvider Connection Provider associated with this object
+*/
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("CIpSubConnectionProvider [this=%08x]:\tCIpSubConnectionProvider() [MConnectionDataClient=%08x]"),
+ this, (MConnectionDataClient*)this));
+ }
+
+
+CIpSubConnectionProvider::~CIpSubConnectionProvider()
+/**
+IP SubConnection Provider Destructor
+*/
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("CIpSubConnectionProvider::Destruct [%08x]"), this));
+
+ if( iChannelId >= 0 ) // Only send a Close if have opened a channel
+ {
+ TRAPD(ret,SendCloseL());
+ if( ret != KErrNone )
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("SendCloseL left with error: %d"), ret));
+ }
+ }
+
+ if( iWriter )
+ {
+ iWriter->Cancel();
+ delete iWriter;
+ iWriter = NULL;
+ }
+
+ if( iReader )
+ {
+ iReader->Cancel();
+ delete iReader;
+ iReader = NULL;
+ }
+
+ delete iPrtParameters;
+ delete iAsyncWriter;
+ ResetPrtExtensions();
+
+ iSocket.Close();
+ }
+
+
+void CIpSubConnectionProvider::ConstructL()
+/**
+IP SubConnection Provider Second Phase Constructor
+*/
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("CIpSubConnectionProvider::Construct [%08x]"), this));
+
+ // Open a connection to the QoS PRT
+ _LIT(KDescPfqos, "pfqos");
+
+#ifdef SYMBIAN_NETWORKING_3GPPDEFAULTQOS
+ // If we couldn't open pipe to QoS framework then it is not supported
+ TInt ret = iSocket.Open(KDescPfqos);
+ if(ret == KErrNotFound)
+ {
+ User::Leave(KErrNotSupported);
+ }
+ else if (ret != KErrNone)
+ {
+ User::Leave(ret);
+ }
+#else
+ User::LeaveIfError(iSocket.Open(KDescPfqos));
+#endif
+ iUid = RProcess().Type();
+
+ iReader = CQoSMsgReader::NewL(this, iSocket);
+ iWriter = CQoSMsgWriter::NewL(this, iSocket);
+ iAsyncWriter = CAsyncWriter::NewL(iWriter);
+
+ /** Create the CQoSParameters to hold the Qos
+ * and Extension Parameters. The values will initially
+ be set to default
+ */
+ iPrtParameters = new (ELeave) CQoSParameters;
+ // Set Default Uplink Parameters
+ iPrtParameters->SetUpLinkMaximumBurstSize(3000); // for TokenBucketSizeUplink
+ iPrtParameters->SetUpLinkMaximumPacketSize(1500); // for MaxPacketSizeUplink
+ iPrtParameters->SetUplinkBandwidth(1500); // for TokenRateUplink
+ iPrtParameters->SetUpLinkAveragePacketSize(1500); // for MinimumPolicedUnitUplink
+ iPrtParameters->SetUpLinkPriority(KQoSLowestPriority); // for PriorityUplink
+ iPrtParameters->SetUpLinkDelay(0); // for DelayUplink
+ // Set Default Downlink parameters
+ iPrtParameters->SetDownLinkMaximumBurstSize(3000); // for TokenBucketSizeDownlink
+ iPrtParameters->SetDownLinkMaximumPacketSize(1500); // for MaxPacketSizeDownlink
+ iPrtParameters->SetDownlinkBandwidth(1500); // for TokenRateDownlink
+ iPrtParameters->SetDownLinkAveragePacketSize(1500); // for MinimumPolicedUnitDownlink
+ iPrtParameters->SetDownLinkPriority(KQoSLowestPriority); // for PriorityDownlonk
+ iPrtParameters->SetDownLinkDelay(0); // for DelayDownlink
+
+ iPrtParameters->SetAdaptMode(EFalse);
+// iPrtParameters->SetHeaderMode(???);
+// User::LeaveIfError(iPrtParameters->SetName(name));
+ }
+
+
+TAny* CIpSubConnectionProvider::FetchInterfaceInstanceL(CSubConnectionProviderBase& /*aProvider*/, const STypeId& aTid)
+ {
+ return (aTid == STypeId::CreateSTypeId(KConnectionClientExtUid,EConnectionEnumerateClients)) ? static_cast(this) : NULL;
+ }
+
+void CIpSubConnectionProvider::DoDataClientJoiningL(MSubConnectionDataClient& aDataClient)
+/**
+Function called by Connection Provider when a socket is to be added to a QoS Flow
+
+@param aDataClient Data Client to add to the QoS Channel
+*/
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("CIpSubConnectionProvider [this=%08x]:\tDoDataClientJoiningL() [iDataClients.Count=%d] [aDataClient=%08x]"), this, iDataClients.Count(), &aDataClient));
+
+ // Can only join to a channel once it has been successfully routed
+ // Can only open/create/join the channel once the connection has been established
+ const TSockAddr* srcAddr = NULL;
+ const TSockAddr* dstAddr = NULL;
+ const TDesC8* connInfo;
+ if(aDataClient.ReadAddressInformation(srcAddr, dstAddr, connInfo) == KErrNone)
+ {
+ if( srcAddr == NULL || srcAddr->Family() == KAFUnspec )
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Source Address not defined")));
+ User::Leave( KErrNotReady );
+ }
+
+ if( dstAddr == NULL || dstAddr->Family() == KAFUnspec )
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Destination Address not defined")));
+ User::Leave( KErrNotReady );
+ }
+
+ if( connInfo == NULL )
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Connection Information not defined")));
+ User::Leave( KErrNotReady );
+ }
+
+ TConnectionInfoBuf* connInfoBuf = (TConnectionInfoBuf*)connInfo->Ptr();
+ TUint32 iapId = (*connInfoBuf)().iIapId;
+
+ if( iChannelId >= 0 )
+ {
+ SendJoinL((TInetAddr)*srcAddr, (TInetAddr)*dstAddr, iapId, aDataClient.ProtocolId());
+ }
+ else
+ {
+ SendCreateL((TInetAddr)*srcAddr, (TInetAddr)*dstAddr, iapId, aDataClient.ProtocolId());
+ }
+ }
+ }
+
+
+void CIpSubConnectionProvider::DoDataClientLeaving(MSubConnectionDataClient& aDataClient)
+/**
+Function called by Connection Provider when a socket is to be removed from a QoS Flow
+
+@param aDataClient Data Client to remove from the QoS Channel
+*/
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("CIpSubConnectionProvider [this=%08x]:\tDoDataClientLeaving() [iDataClients.Count=%d] [aDataClient=%08x]"), this, iDataClients.Count(), &aDataClient));
+
+ // Can only leave on a routed conection that has been successfully
+ // attached to a QoS Channel. Otherwise we cannot leave
+ const TSockAddr* srcAddr = NULL;
+ const TSockAddr* dstAddr = NULL;
+ const TDesC8* connInfo;
+ TInt err = aDataClient.ReadAddressInformation(srcAddr, dstAddr, connInfo);
+ if( err != KErrNone )
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Unable to read Address Information")));
+ return;
+ }
+
+ if( srcAddr == NULL || srcAddr->Family() == KAFUnspec )
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Source Address not defined")));
+ return;
+ }
+
+ if( dstAddr == NULL || dstAddr->Family() == KAFUnspec )
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Destination Address not defined")));
+ return;
+ }
+
+ if( connInfo == NULL )
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Connection Information not defined")));
+ return;
+ }
+
+ TConnectionInfoBuf* connInfoBuf = (TConnectionInfoBuf*)connInfo->Ptr();
+ TUint32 iapId = (*connInfoBuf)().iIapId;
+
+ if( iChannelId >= 0 )
+ {
+ TRAPD(ret, SendLeaveL((TInetAddr)*srcAddr, (TInetAddr)*dstAddr, iapId, aDataClient.ProtocolId()));
+ if (ret != KErrNone)
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("SendLeaveL left with err=%d"), ret));
+ }
+ }
+ else
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Attempted to leave on an unconnected channel")));
+ }
+ }
+
+
+void CIpSubConnectionProvider::DoSourceAddressUpdate(MSubConnectionDataClient& /*aDataClient*/, const TSockAddr& /*aSource*/)
+/**
+Function called by Connection Provider when the source address on a data client is set
+
+@param aDataClient Data Client affected
+@param aSource Source Address
+*/
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("CIpSubConnectionProvider::DoSourceAddressUpdate [%08x]"), this));
+ // Not Interested in either souce or destination updates; wait until connected
+ }
+
+
+void CIpSubConnectionProvider::DoDestinationAddressUpdate(MSubConnectionDataClient& /*aDataClient*/, const TSockAddr& /*aDestination*/)
+/**
+Function called by Connection Provider when the destination address on a data client is set
+
+@param aDataClient Data Client affected
+@param aDestination Destination Address
+*/
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("CIpSubConnectionProvider::DoDestinationAddressUpdate [%08x]"), this));
+ // Not Interested in either souce or destination updates; wait until connected
+ }
+
+
+void CIpSubConnectionProvider::DoDataClientRouted(MSubConnectionDataClient& aDataClient, const TSockAddr& aSource, const TSockAddr& aDestination, const TDesC8& aConnectionInfo)
+/**
+Function called by Connection Provider when the connection has been established
+
+@param aDataClient Data Client affected
+@param aSource Source Address
+@param aDestination Destination Address
+@param aConnectionInfo Connection Data
+*/
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("CIpSubConnectionProvider::DoDestinationAddressUpdate [%08x]"), this));
+
+ TConnectionInfoBuf* connInfo = (TConnectionInfoBuf*)aConnectionInfo.Ptr();
+ TUint32 iapId = (*connInfo)().iIapId;
+
+ if( aSource.Family() != KAFUnspec && aDestination.Family() != KAFUnspec)
+ {
+ // If already have a open channel add this socket. o/w create a new channel
+ if( iChannelId >= 0 )
+ {
+ TRAPD(ret,SendJoinL((TInetAddr)aSource, (TInetAddr)aDestination, iapId, aDataClient.ProtocolId()));
+ if( ret != KErrNone )
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("SendJoinL left with error: %d"), ret));
+ }
+ }
+ else
+ {
+ TRAPD(ret,SendCreateL((TInetAddr)aSource, (TInetAddr)aDestination, iapId, aDataClient.ProtocolId()));
+ if( ret != KErrNone )
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("SendCreateL left with error: %d"), ret));
+ }
+ }
+ }
+ else
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Data Client Routed contains invalid source or dest address")));
+ }
+ }
+
+
+void CIpSubConnectionProvider::DoParametersAboutToBeSetL(CSubConParameterBundle& aParameterBundle)
+/**
+Function called by the Connection Provider before the QoS Parameters are set by the client
+
+@param aParameterBundle Container holding pending QoS Parameters
+*/
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("CIpSubConnectionProvider::DoParametersAboutToBeSetL [%08x]"), this));
+
+ iParameterRelease = KParameterRelInvalid;
+ ConvertParametersFromESockL( aParameterBundle );
+ iParametersSet = ETrue;
+
+ if(iChannelId >= 0)
+ {
+ SendSetQoSL();
+ }
+ }
+
+
+TInt CIpSubConnectionProvider::DoControl(TUint /*aOptionLevel*/, TUint /*aOptionName*/, TDes8& /*aOption*/)
+/**
+@param aOptionLevel
+@param aOptionName
+@param aOption
+*/
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("CIpSubConnectionProvider::DoControl [%08x]"), this));
+
+ return KErrNotSupported;
+ }
+
+
+void CIpSubConnectionProvider::DoStartL()
+ {
+ }
+
+void CIpSubConnectionProvider::DoStop()
+ {
+ }
+
+CSubConnectionProviderBase* CIpSubConnectionProvider::DoNextLayer()
+ {
+ return NULL;
+ }
+
+CConnDataTransfer& CIpSubConnectionProvider::DoDataTransferL()
+ {
+ User::Leave(KErrNotSupported);
+ //unreachable code
+ return iNextLayer->DataTransferL();
+// return *((CConnDataTransfer*)this);
+ }
+
+//MConnectionDataClient
+void CIpSubConnectionProvider::ConnectionGoingDown(CConnectionProviderBase& /*aConnProvider*/)
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("CIpSubConnectionProvider::ConnectionGoingDown [%08x]"), this));
+ iConnectionProvider = NULL;
+ DeleteMeNow();
+ }
+
+void CIpSubConnectionProvider::Notify(TNotify /*aNotifyType*/, CConnectionProviderBase* /*aConnProvider*/, TInt /*aError*/, const CConNotificationEvent* /*aConNotificationEvent*/)
+ {
+ }
+
+void CIpSubConnectionProvider::AttachToNext(CSubConnectionProviderBase* /*aSubConnProvider*/)
+ {
+ }
+
+
+
+void CIpSubConnectionProvider::SendOpenExistingL(const TInetAddr &aSrcAddr, const TInetAddr &aDstAddr, TUint32 aIapId, TUint32 aProtocolId)
+/**
+Sends a Message to QoS PRT to open a QoS Channel
+
+@param aSrcAddr Source Address
+@param aDstAddr Destination Address
+@param aIapId IAP Id
+@param aProtocolId Protocol Id
+*/
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Sending PRT Msg: EPfqosOpenExistingChannel")));
+
+ CQoSMsg* msg = CQoSMsg::NewL(EPfqosOpenExistingChannel);
+ msg->AddConnInfo(aProtocolId, iUid, aIapId);
+ msg->AddSrcAddr(aSrcAddr);
+ msg->AddDstAddr(aDstAddr);
+ msg->AddChannel(0);
+
+ iWriter->Send(msg);
+ }
+
+
+void CIpSubConnectionProvider::SendCreateL(const TInetAddr &aSrcAddr, const TInetAddr &aDstAddr, TUint32 aIapId, TUint32 aProtocolId)
+/**
+Sends a Message to QoS PRT to create a QoS Channel
+
+@param aSrcAddr Source Address
+@param aDstAddr Destination Address
+@param aIapId IAP Id
+@param aProtocolId Protocol Id
+*/
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Sending PRT Msg: EPfqosCreateChannel")));
+
+ CQoSMsg* msg = CQoSMsg::NewL(EPfqosCreateChannel);
+ msg->AddConnInfo(aProtocolId, iUid, aIapId);
+ msg->AddSrcAddr(aSrcAddr);
+ msg->AddDstAddr(aDstAddr);
+ msg->AddChannel(0);
+
+ TQoSParameters qosParams;
+ ConvertCQoSIntoTQoSParamsL(qosParams);
+ msg->AddQoSParameters(qosParams);
+ msg->AddExtensionPolicy(iPrtExtensions);
+ //Now we need to write to the qos.prt asynchronously. This becuase the TCP/IP stack in CIp6Flow::Connect() calls Bearer() before RefreshFlow()
+ iAsyncWriter->Send(msg);
+ }
+
+
+void CIpSubConnectionProvider::SendCloseL()
+/**
+Sends a Message to QoS PRT to close a QoS Channel
+*/
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Sending PRT Msg: EPfqosDeleteChannel")));
+
+ CQoSMsg* msg = CQoSMsg::NewL(EPfqosDeleteChannel);
+ msg->AddChannel(iChannelId);
+
+ iWriter->Send(msg);
+ }
+
+
+void CIpSubConnectionProvider::SendJoinL(const TInetAddr &aSrcAddr, const TInetAddr &aDstAddr, TUint32 aIapId, TUint32 aProtocolId)
+/**
+Sends a Message to QoS PRT to add a socket to a QoS Channel
+
+@param aSrcAddr Source Address
+@param aDstAddr Destination Address
+@param aIapId IAP Id
+@param aProtocolId Protocol Id
+*/
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Sending PRT Msg: EPfqosJoin")));
+
+ CQoSMsg* msg = CQoSMsg::NewL(EPfqosJoin);
+ msg->AddConnInfo(aProtocolId, iUid, aIapId);
+ msg->AddSrcAddr(aSrcAddr);
+ msg->AddDstAddr(aDstAddr);
+ msg->AddChannel(iChannelId);
+
+ iWriter->Send(msg);
+ }
+
+
+void CIpSubConnectionProvider::SendLeaveL(const TInetAddr &aSrcAddr, const TInetAddr &aDstAddr, TUint32 aIapId, TUint32 aProtocolId)
+/**
+Sends a Message to QoS PRT to remove a socket from a QoS Channel
+
+@param aSrcAddr Source Address
+@param aDstAddr Destination Address
+@param aIapId IAP Id
+@param aProtocolId Protocol Id
+*/
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Sending PRT Msg: EPfqosLeave")));
+
+ CQoSMsg* msg = CQoSMsg::NewL(EPfqosLeave);
+ msg->AddConnInfo(aProtocolId, iUid, aIapId);
+ msg->AddSrcAddr(aSrcAddr);
+ msg->AddDstAddr(aDstAddr);
+ msg->AddChannel(iChannelId);
+
+ iWriter->Send(msg);
+ }
+
+
+
+void CIpSubConnectionProvider::SendSetQoSL()
+/**
+Sends Message to QoS PRT to update the parameters for a QoS Channel
+*/
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Sending PRT Msg: EPfqosConfigChannel")));
+
+ CQoSMsg* msg = CQoSMsg::NewL(EPfqosConfigChannel);
+ msg->AddChannel(iChannelId);
+
+ TQoSParameters qosParams;
+ ConvertCQoSIntoTQoSParamsL(qosParams);
+ msg->AddQoSParameters(qosParams);
+ msg->AddExtensionPolicy(iPrtExtensions);
+
+ iWriter->Send(msg);
+ }
+
+
+void CIpSubConnectionProvider::ProcessPRTMsg(TPfqosMessage& aMsg)
+/**
+Process Messages sent from the PRT to the SubConnection Provider
+Messages are either replies or events
+
+@param aMsg the message from the PRT
+*/
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("CIpSubConnectionProvider::ProcessPRTMsg [%08x]"), this));
+
+ if( aMsg.iBase.iMsg == NULL )
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Received malformed message from PRT")));
+ }
+ else
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Received PRT Msg: %d"), aMsg.iBase.iMsg->pfqos_msg_type));
+ switch(aMsg.iBase.iMsg->pfqos_msg_type)
+ {
+ case EPfqosEvent:
+ {
+ TRAPD(ret, ProcessPRTEventL(aMsg) );
+ if( ret != KErrNone )
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("ProcessPRTEventL left with error: %d"), ret));
+ }
+ }
+ break;
+
+ case EPfqosUpdate:
+ case EPfqosDelete:
+ case EPfqosAdd:
+ case EPfqosGet:
+ case EPfqosReject:
+ case EPfqosDump:
+ case EPfqosConfigure:
+ case EPfqosJoin:
+ case EPfqosLeave:
+ case EPfqosCreateChannel:
+ case EPfqosOpenExistingChannel:
+ case EPfqosDeleteChannel:
+ case EPfqosConfigChannel:
+ case EPfqosLoadFile:
+ case EPfqosUnloadFile:
+ {
+ TRAPD(ret, ProcessPRTReplyL(aMsg) );
+ if( ret != KErrNone )
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("ProcessPRTReplyL left with error: %d"), ret));
+ }
+ }
+ break;
+
+ default:
+ __IPCPRLOG(IpCprLog::Printf(_L("Received Unknown PRT Msg: %d"), aMsg.iBase.iMsg->pfqos_msg_type));
+ break;
+ }
+ }
+ }
+
+
+void CIpSubConnectionProvider::ProcessPRTEventL(TPfqosMessage& aMsg)
+/**
+Process Events sent from the PRT to the SubConnection Provider
+
+@param aMsg the message from the PRT
+*/
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("CIpSubConnectionProvider::ProcessPRTEventL [%08x]"), this));
+
+ // Only interested in Channel Events
+ if (aMsg.iEvent.iExt == NULL || aMsg.iFlowSpec.iExt == NULL || aMsg.iChannel.iExt == NULL)
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Received malformed event message from PRT")));
+ return;
+ }
+
+ MSubConnectionDataClient* client = NULL;
+ TInt ret = DetermineClient(aMsg, client);
+ if( ret != KErrNone || client == NULL )
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Could not determine DataClient from message. Error=%d"), ret));
+ }
+
+ switch (aMsg.iEvent.iExt->event_type)
+ {
+ case KPfqosEventFailure:
+ {
+/*
+ EQoSOk,
+ EQoSPolicyExists = -5119, //< -5119 Policy exists in database
+ EQoSNoModules, //< -5118 No QoS modules available
+ EQoSInterface, //< -5117 Flows are using different interfaces
+ EQoSModules, //< -5116 Flows use different QoS modules
+ EQoSModuleLoadFailed, //< -5115 Loading of QoS module failed
+ EQoSMessageCorrupt, //< -5114 Pfqos message corrupted
+ EQoSJoinFailure, //< -5113 Join to QoS channel failed
+ EQoSLeaveFailure, //< -5112 Leave from QoS channel failed
+ EQoSNoInterface, //< -5111 Network interface deleted
+ EQoSChannelDeleted, //< -5110 QoS channel deleted
+ EQoSDowngradeForced //< -5109 QoS parameters downgraded by administrative policy
+*/
+ CSubConNotificationEvent* event = NULL;
+ __IPCPRLOG(IpCprLog::Printf(_L("Received PRT Event: KPfqosEventFailure. Error=%d"),aMsg.iBase.iMsg->pfqos_msg_errno));
+
+#if defined(QOS_ERROR_REPORTING) //Awaiting code delivery for qos and guqos to support this functionality
+ switch(aMsg.iBase.iMsg->pfqos_msg_errno)
+ {
+ case EQoSJoinFailure:
+
+ if( client )
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Join failed Event")));
+ client->JoinFailed(*this,aMsg.iBase.iMsg->pfqos_msg_errno);
+ }
+ break;
+
+ case EQoSLeaveFailure:
+ if( client )
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Leave failed Event")));
+ //We don't particularly care that it failed - just pretend that it was successful
+ client->LeaveComplete(*this);
+ }
+ break;
+ case EQoSNoInterface:
+ case EQoSChannelDeleted:
+ {
+ CSubConGenEventSubConDown* scde = CSubConGenEventSubConDown::NewL();
+ scde->SetError(aMsg.iBase.iMsg->pfqos_msg_errno);
+ event = scde;
+ iChannelId = -1;
+ break;
+ }
+ case EQoSDowngradeForced:
+ {
+ event = CSubConGenEventParamsChanged::NewL();
+ break;
+ }
+
+ case EQoSChannelFailed:
+ if( client )
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Join failed Event")));
+ client->JoinFailed(*this,aMsg.iBase.iMsg->pfqos_msg_errno);
+ }
+ // no break here we want to continue into the next case statement;
+ case EQoSParamsRejected:
+ {
+ CSubConGenEventParamsRejected* scde = CSubConGenEventParamsRejected::NewL();
+ scde->SetError(aMsg.iBase.iMsg->pfqos_msg_errno);
+ scde->SetFamilyId(KSubConQoSFamily);
+ event = scde;
+ break;
+ }
+
+ default:
+ __IPCPRLOG(IpCprLog::Printf(_L("Unknown event sent ")));
+ };
+#else
+ if( client )
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Join failed Event")));
+ client->JoinFailed(*this,aMsg.iBase.iMsg->pfqos_msg_errno);
+ CSubConGenEventParamsRejected* scde = CSubConGenEventParamsRejected::NewL();
+ /**
+ There can be two set of parameters that are sent to QOS either as KSubConQoSFamily
+ or as KSubConAuthorisationFamily. Here we should differentiate, the QOS is rejected
+ because of which parameter family.
+ At present there is no indication comes from the lower layer why the QOS has failed, and in
+ all the case the member *aMsg.iBase.iMsg->pfqos_msg_type* will return *EPfQoSReject*.
+
+ At the time of writing this code any differentiation method was not available to differentiate
+ between events. i.e whether the event is SBLP or UMTS events. So this has not been done.
+ This needs to be done when the TPfqosMessage will have the differentiation
+ */
+ scde->SetError(aMsg.iBase.iMsg->pfqos_msg_errno);
+ scde->SetFamilyId(KSubConQoSFamily);
+ event = scde;
+ }
+#endif
+
+ // Setting QoS Parameters Failed
+ /**
+ There can be two set of parameters that are sent to QOS either as KSubConQoSFamily
+ or as KSubConAuthorisationFamily. Here we should differentiate, the QOS is rejected
+ because of which parameter family.
+ At present there is no indication comes from the lower layer why the QOS has failed, and in
+ all the case the member *aMsg.iBase.iMsg->pfqos_msg_type* will return *EPfQoSReject*.
+
+ At the time of writing this code any differentiation method was not available to differentiate
+ between events. i.e whether the event is SBLP or UMTS events. So this has not been done.
+ This needs to be done when the TPfqosMessage will have the differentiation
+ */
+ if (event)
+ {
+
+ NotifyClientEvent(*event);
+ delete event;
+ }
+ }
+ break;
+
+ case KPfqosEventConfirm:
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Received PRT Event: KPfqosEventConfirm")));
+
+ // Setting QoS Parameters OK
+ CSubConGenEventParamsGranted* event = CSubConGenEventParamsGranted::NewL();
+ ConvertParametersFromQOSL(aMsg, event);
+
+ NotifyClientEvent(*event);
+ delete event;
+
+ if( client != NULL )
+ {
+ client->JoinComplete(*this);
+ }
+ }
+ break;
+
+ case KPfqosEventAdapt:
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Received PRT Event: KPfqosEventAdapt")));
+
+ // Available QoS Changed
+ CSubConGenEventParamsChanged* event = CSubConGenEventParamsChanged::NewL();
+ event->SetError(aMsg.iBase.iMsg->pfqos_msg_errno);
+ ConvertParametersFromQOSL(aMsg, event);
+
+ NotifyClientEvent(*event);
+ delete event;
+ }
+ break;
+
+ case KPfqosEventJoin:
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Received PRT Event: KPfqosEventJoin")));
+ if (aMsg.iBase.iMsg->pfqos_msg_errno)
+ {
+ ProcessPRTError( aMsg, aMsg.iBase.iMsg->pfqos_msg_errno );
+ return;
+ }
+
+
+ CSubConGenEventDataClientJoined* event = CSubConGenEventDataClientJoined::NewL();
+
+ if( client )
+ {
+ const TSockAddr* SrcAddr = NULL;
+ const TSockAddr* DstAddr = NULL;
+ const TDesC8* connInfo;
+ client->ReadAddressInformation(SrcAddr, DstAddr, connInfo); // return can be would have errored above
+
+ TConnectionInfoBuf* connInfoBuf = (TConnectionInfoBuf*)connInfo->Ptr();
+ TUint32 iapId = (*connInfoBuf)().iIapId;
+
+ event->SetSourceAddress( *SrcAddr );
+ event->SetDestAddress( *DstAddr );
+ event->SetIap( iapId );
+
+ client->JoinComplete(*this);
+ }
+
+ NotifyClientEvent(*event);
+ delete event;
+ }
+ break;
+
+ case KPfqosEventLeave:
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Received PRT Event: KPfqosEventLeave")));
+
+ CSubConGenEventDataClientLeft* event = CSubConGenEventDataClientLeft::NewL();
+
+ if( client )
+ {
+ const TSockAddr* SrcAddr = NULL;
+ const TSockAddr* DstAddr = NULL;
+ const TDesC8* connInfo;
+ client->ReadAddressInformation(SrcAddr, DstAddr, connInfo); // return can be would have errored above
+
+ TConnectionInfoBuf* connInfoBuf = (TConnectionInfoBuf*)connInfo->Ptr();
+ TUint32 iapId = (*connInfoBuf)().iIapId;
+
+ event->SetSourceAddress( *SrcAddr );
+ event->SetDestAddress( *DstAddr );
+ event->SetIap( iapId );
+ }
+
+ NotifyClientEvent(*event);
+ delete event;
+
+ if( client != NULL )
+ {
+ client->LeaveComplete(*this);
+ }
+ }
+ break;
+
+ default:
+ __IPCPRLOG(IpCprLog::Printf(_L("Received PRT Event: Unknown - %d"), aMsg.iEvent.iExt->event_type));
+ break;
+ }
+ }
+
+void CIpSubConnectionProvider::ProcessPRTReplyL(TPfqosMessage& aMsg)
+/**
+Process Replies sent from the PRT to the SubConnection Provider
+
+@param aMsg the message from the PRT
+*/
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("CIpSubConnectionProvider::ProcessPRTReplyL [%08x]"), this));
+
+ if( aMsg.iChannel.iExt == NULL )
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Received malformed reply message from PRT")));
+ }
+ else if( aMsg.iBase.iMsg->pfqos_msg_errno != KErrNone )
+ {
+ ProcessPRTError( aMsg, aMsg.iBase.iMsg->pfqos_msg_errno );
+ }
+ else
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Received PRT Reply: %d"), aMsg.iBase.iMsg->pfqos_msg_type));
+
+ MSubConnectionDataClient* client = NULL;
+ TInt ret = DetermineClient(aMsg, client);
+ if( ret != KErrNone || client == NULL )
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Could not determine DataClient from message. Error=%d"),ret));
+ }
+
+ switch (aMsg.iBase.iMsg->pfqos_msg_type)
+ {
+ case EPfqosOpenExistingChannel:
+ iChannelId = aMsg.iChannel.iExt->channel_id;
+ __IPCPRLOG(IpCprLog::Printf(_L("Processing Reply for message: EPfqosOpenExistingChannel")));
+ break;
+
+ case EPfqosCreateChannel:
+ iChannelId = aMsg.iChannel.iExt->channel_id;
+ __IPCPRLOG(IpCprLog::Printf(_L("Processing Reply for message: EPfqosCreateChannel")));
+ //Now you will expect to complete the join here. This will not work becuase
+ //qos.prt send a reply before finishing the join down to the nif level
+ //we will have to delay the response until the event is received
+ break;
+
+ case EPfqosJoin:
+ __IPCPRLOG(IpCprLog::Printf(_L("Processing Reply for message: EPfqosJoin")));
+ //Now you will expect to complete the join here. This will not work becuase
+ //qos.prt send a reply before finishing the join down to the nif level
+ //we will have to delay the response until the event is received
+ break;
+
+ case EPfqosLeave:
+ __IPCPRLOG(IpCprLog::Printf(_L("Processing Reply for message: EPfqosLeave")));
+ break;
+
+ case EPfqosConfigChannel:
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Processing Reply for message: EPfqosConfigChannel")));
+ }
+ break;
+
+ case EPfqosDeleteChannel:
+ iChannelId = -1;
+ __IPCPRLOG(IpCprLog::Printf(_L("Processing Reply for message: EPfqosDeleteChannel")));
+ break;
+
+ default:
+ __IPCPRLOG(IpCprLog::Printf(_L("Ignoring Reply for unknown message: %d"), aMsg.iBase.iMsg->pfqos_msg_type));
+ break;
+ }
+ }
+
+ __IPCPRLOG(IpCprLog::Printf(_L("Provider=0x%x Channel=%d"), this, iChannelId));
+ }
+
+
+#ifdef _DEBUG
+void CIpSubConnectionProvider::ProcessPRTError(TInt aMsgType, TInt __IPCPRLOG(aError))
+/**
+Process Errors that occur in communicating between the PRT and the
+SubConnection Provider
+
+@param aMsgType the type of message that encountered the error
+@param aError the error ththas occurred
+*/
+ {
+ switch (aMsgType)
+ {
+ case EPfqosOpenExistingChannel:
+ __IPCPRLOG(IpCprLog::Printf(_L("Received PRT Error %d on EPfqosOpenExistingChannel"), aError));
+ break;
+
+ case EPfqosCreateChannel:
+ __IPCPRLOG(IpCprLog::Printf(_L("Received PRT Error %d on EPfqosCreateChannel"), aError));
+ break;
+
+ case EPfqosDeleteChannel:
+ __IPCPRLOG(IpCprLog::Printf(_L("Received PRT Error %d on EPfqosDeleteChannel"), aError));
+ break;
+
+ case EPfqosJoin:
+ __IPCPRLOG(IpCprLog::Printf(_L("Received PRT Error %d on EPfqosJoin"), aError));
+ break;
+
+ case EPfqosLeave:
+ __IPCPRLOG(IpCprLog::Printf(_L("Received PRT Error %d on EPfqosLeave"), aError));
+ break;
+
+ case EPfqosConfigChannel:
+ __IPCPRLOG(IpCprLog::Printf(_L("Received PRT Error %d on EPfqosConfigChannel"), aError));
+ break;
+
+ case EPfqosEvent:
+ __IPCPRLOG(IpCprLog::Printf(_L("Received PRT Error %d on EPfqosEvent"), aError));
+ break;
+
+ default:
+ __IPCPRLOG(IpCprLog::Printf(_L("Received PRT Error %d on Unknown Message"), aError));
+ break;
+ }
+ }
+#endif
+
+
+void CIpSubConnectionProvider::ProcessPRTError(TPfqosMessage& aMsg, TInt aError)
+/**
+Process Errors that occur in communicating between the PRT and the
+SubConnection Provider
+
+@param aMsg the message from the PRT
+@param aError the error ththas occurred
+*/
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("CIpSubConnectionProvider::ProcessPRTError [%08x]"), this));
+
+ if( aError != KErrNone)
+ {
+ TInt msgType = aMsg.iBase.iMsg->pfqos_msg_type;
+
+#ifdef _DEBUG
+ ProcessPRTError(msgType, aError);
+#endif
+
+ MSubConnectionDataClient* client = NULL;
+ TInt ret = DetermineClient(aMsg, client);
+ if( ret != KErrNone || client == NULL )
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Could not determine DataClient from message. Error=%d"),ret));
+ }
+
+ if( msgType == EPfqosJoin ||
+ msgType == EPfqosOpenExistingChannel ||
+ msgType == EPfqosCreateChannel ||
+ (msgType == EPfqosEvent && aMsg.iBase.iMsg->pfqos_msg_errno == EQoSJoinFailure))
+ {
+ if( client )
+ {
+ client->JoinFailed(*this,aError);
+ }
+ }
+ else if( msgType == EPfqosConfigChannel )
+ {
+ //This will send an error only if ECom successfuly constructs the event object
+ CSubConGenEventParamsRejected* event = NULL;
+ TRAP_IGNORE(event = CSubConGenEventParamsRejected::NewL());
+ if (event)
+ {
+ /**
+ comments give in case of *KPfqosEventFailure* in function *ProcessPRTEventL*
+ will also applicable here
+ */
+ if (aMsg.iBase.iMsg->pfqos_msg_errno == RPacketContext::EEtelPcktPolicyControlRejectionCode)
+ {
+ event->SetFamilyId(KSubConAuthorisationFamily);
+ }
+ else
+ {
+ event->SetFamilyId(KSubConQoSFamily);
+ }
+
+ event->SetError(aError);
+
+ NotifyClientEvent(*event);
+ delete event;
+ }
+ }
+ else if( msgType == EPfqosLeave ||
+ (msgType == EPfqosEvent && aMsg.iBase.iMsg->pfqos_msg_errno == EQoSLeaveFailure))
+ {
+ // Not Interested in whether the leave was successful. Inform client regardless
+ if( client != NULL )
+ {
+ client->LeaveComplete(*this);
+ }
+ }
+ else
+ {
+ if( client )
+ {
+ client->SubConnectionError(*this, MSubConnectionDataClient::ESubConnection, aError);
+ }
+ }
+ }
+ }
+
+
+TInt CIpSubConnectionProvider::DetermineClient(const TPfqosMessage& aMsg, MSubConnectionDataClient*& aDataClient)
+/**
+Determines which Data Client a message from the QoS PRT is for based upon source and destination
+address; and Protocol Id.
+
+@param aMsg QoS PRT Response Message
+@param aDataClient Output Variable as Data Client that matches reponse.
+
+@return KErrNone on finding the required client. Client passed back as argument.
+*/
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("CIpSubConnectionProvider::DetermineClient [%08x]"), this));
+
+ aDataClient = NULL;
+
+ const TInetAddr* msgSrcAddr = aMsg.iSrcAddr.iAddr;
+ const TInetAddr* msgDstAddr = aMsg.iDstAddr.iAddr;
+
+ if( msgSrcAddr == NULL || msgDstAddr == NULL || aMsg.iSelector.iExt == NULL )
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Received malformed message from PRT")););
+ }
+ else
+ {
+ TUint32 msgProtocol = aMsg.iSelector.iExt->protocol;
+
+ __IPCPRLOG(
+ THostName srcName;
+ msgSrcAddr->OutputWithScope(srcName);
+ THostName dstName;
+ msgDstAddr->OutputWithScope(dstName);
+ IpCprLog::Printf(_L("Msg SAddr[%S][%d] DAddr[%S][%d] Prot[%d]"), &srcName, msgSrcAddr->Port(), &dstName, msgDstAddr->Port(), msgProtocol);
+ );
+
+ // Compare message parameters with those from each client finding the one required
+ TInt numClients = iDataClients.Count();
+ for( TInt index=0; indexReadAddressInformation(cliSrcAddr, cliDstAddr, connInfo);
+ if( err != KErrNone )
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Unable to read Address Information")));
+ continue;
+ }
+
+ if( cliSrcAddr != NULL && cliDstAddr != NULL && connInfo != NULL )
+ {
+ TUint32 cliProtocol = client->ProtocolId();
+
+ TInetAddr srcInetAddr(*cliSrcAddr);
+ TInetAddr dstInetAddr(*cliDstAddr);
+
+ if (dstInetAddr.Family() == KAfInet)
+ {
+ dstInetAddr.ConvertToV4Mapped();
+ }
+
+ __IPCPRLOG(
+ srcInetAddr.OutputWithScope(srcName);
+ dstInetAddr.OutputWithScope(dstName);
+ IpCprLog::Printf(_L("Cli SAddr[%S][%d] DAddr[%S][%d] Prot[%d]"), &srcName, srcInetAddr.Port(), &dstName, dstInetAddr.Port(), cliProtocol);
+ );
+
+ if( (msgSrcAddr->Port() == srcInetAddr.Port() &&
+ (msgDstAddr->CmpAddr(dstInetAddr) && msgDstAddr->Port() == dstInetAddr.Port())) &&
+ msgProtocol == cliProtocol )
+ {
+ // Have our required client
+ __IPCPRLOG(IpCprLog::Printf(_L("Client Matched [%08x]"), client));
+ aDataClient = client;
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ if( aDataClient != NULL )
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Client Found")));
+ }
+ else
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Client Not Found!")));
+ }
+
+ return aDataClient != NULL ? KErrNone : KErrNotFound;
+ }
+
+
+void CIpSubConnectionProvider::MapGenericParamsFromESockToPRTL(const CSubConQosGenericParamSet& generic) const
+/**
+Mapping function to map the generic parameters from the ESock to QoS PRT equivalent
+@param Generic Input structure contains the generic parameters
+*/
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("CIpSubConnectionProvider::MapGenericParamsFromESockToPRTL")));
+ /**
+ Get and Set Uplink Parameters
+ */
+ iPrtParameters->SetUpLinkMaximumBurstSize(generic.GetUpLinkMaximumBurstSize());
+ iPrtParameters->SetUpLinkMaximumPacketSize(generic.GetUpLinkMaximumPacketSize());
+ iPrtParameters->SetUplinkBandwidth(generic.GetUplinkBandwidth());
+ iPrtParameters->SetUpLinkAveragePacketSize(generic.GetUpLinkAveragePacketSize());
+ iPrtParameters->SetUpLinkPriority(generic.GetUpLinkPriority());
+ iPrtParameters->SetUpLinkDelay(generic.GetUpLinkDelay());
+ /**
+ Get and Set Downlink Parameters
+ */
+ iPrtParameters->SetDownLinkMaximumBurstSize(generic.GetDownLinkMaximumBurstSize());
+ iPrtParameters->SetDownLinkMaximumPacketSize(generic.GetDownLinkMaximumPacketSize());
+ iPrtParameters->SetDownlinkBandwidth(generic.GetDownlinkBandwidth());
+ iPrtParameters->SetDownLinkAveragePacketSize(generic.GetDownLinkAveragePacketSize());
+ iPrtParameters->SetDownLinkPriority(generic.GetDownLinkPriority());
+ iPrtParameters->SetDownLinkDelay(generic.GetDownLinkDelay());
+ /**
+ Get and Set rest of the Parameters
+ */
+ iPrtParameters->SetHeaderMode(generic.GetHeaderMode());
+ TName name = generic.GetName();
+ iPrtParameters->SetName(name);
+ }
+
+void CIpSubConnectionProvider::MapGenericParamsFromPRTToESockL(CSubConQosGenericParamSet& generic) const
+/**
+Map generic parameters from QoS PRT to the ESock Equivalents
+
+@param params input structure that contains the QoS PRT generic parameters
+*/
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("CIpSubConnectionProvider::MapGenericParamsFromPRTToESockL")));
+ /**
+ Get and Set Uplink Parameters
+ */
+ generic.SetUpLinkMaximumBurstSize(iPrtParameters->GetUpLinkMaximumBurstSize());
+ generic.SetUpLinkMaximumPacketSize(iPrtParameters->GetUpLinkMaximumPacketSize());
+ generic.SetUplinkBandwidth(iPrtParameters->GetUplinkBandwidth());
+ generic.SetUpLinkAveragePacketSize(iPrtParameters->GetUpLinkAveragePacketSize());
+ generic.SetUpLinkPriority(iPrtParameters->GetUpLinkPriority());
+ generic.SetUpLinkDelay(iPrtParameters->GetUpLinkDelay());
+ /**
+ Get and Set Downlink Parameters
+ */
+ generic.SetDownLinkMaximumBurstSize(iPrtParameters->GetDownLinkMaximumBurstSize());
+ generic.SetDownLinkMaximumPacketSize(iPrtParameters->GetDownLinkMaximumPacketSize());
+ generic.SetDownlinkBandwidth(iPrtParameters->GetDownlinkBandwidth());
+ generic.SetDownLinkAveragePacketSize(iPrtParameters->GetDownLinkAveragePacketSize());
+ generic.SetDownLinkPriority(iPrtParameters->GetDownLinkPriority());
+ generic.SetDownLinkDelay(iPrtParameters->GetDownLinkDelay());
+ /**
+ Get and Set rest of the Parameters
+ */
+ generic.SetHeaderMode(iPrtParameters->GetHeaderMode());
+ TName name = iPrtParameters->GetName();
+ generic.SetName(name);
+ }
+
+void CIpSubConnectionProvider::ConvertTQoSIntoCQoSParamsL(const TQoSParameters& aParameters)
+/**
+This function will copy the aParameters into the class CQoSParameters
+using member access functions
+@param aParameters input parameters that needs to be copied
+*/
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("CIpSubConnectionProvider::ConvertTQoSIntoCQoSParamsL")));
+ /**
+ Get and Set Uplink Parameters
+ */
+ iPrtParameters->SetUplinkBandwidth(aParameters.GetUplinkBandwidth());
+ iPrtParameters->SetUpLinkMaximumBurstSize(aParameters.GetUpLinkMaximumBurstSize());
+ iPrtParameters->SetUpLinkMaximumPacketSize(aParameters.GetUpLinkMaximumPacketSize());
+ iPrtParameters->SetUpLinkAveragePacketSize(aParameters.GetUpLinkAveragePacketSize());
+ iPrtParameters->SetUpLinkDelay(aParameters.GetUpLinkDelay());
+ iPrtParameters->SetUpLinkPriority(aParameters.GetUpLinkPriority());
+ /**
+ Get and Set Downlink Parameters
+ */
+ iPrtParameters->SetDownlinkBandwidth(aParameters.GetDownlinkBandwidth());
+ iPrtParameters->SetDownLinkMaximumBurstSize(aParameters.GetDownLinkMaximumBurstSize());
+ iPrtParameters->SetDownLinkMaximumPacketSize(aParameters.GetDownLinkMaximumPacketSize());
+ iPrtParameters->SetDownLinkAveragePacketSize(aParameters.GetDownLinkAveragePacketSize());
+ iPrtParameters->SetDownLinkDelay(aParameters.GetDownLinkDelay());
+ iPrtParameters->SetDownLinkPriority(aParameters.GetDownLinkPriority());
+
+ iPrtParameters->SetAdaptMode(aParameters.AdaptMode());
+ iPrtParameters->SetHeaderMode(aParameters.GetHeaderMode());
+ const TName name = aParameters.GetName();
+ iPrtParameters->SetName(name);
+ }
+
+void CIpSubConnectionProvider::ConvertCQoSIntoTQoSParamsL(TQoSParameters& aParameters) const
+/**
+This function will copy the iParameters (CQoSParameters) into aParameters
+using member access functions
+@param aParameters output parameters that iParameters will be copied into
+*/
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("CIpSubConnectionProvider::ConvertCQoSIntoTQoSParamsL")));
+ /**
+ Get and Set Uplink Parameters
+ */
+ aParameters.SetUplinkBandwidth(iPrtParameters->GetUplinkBandwidth());
+ aParameters.SetUpLinkMaximumBurstSize(iPrtParameters->GetUpLinkMaximumBurstSize());
+ aParameters.SetUpLinkMaximumPacketSize(iPrtParameters->GetUpLinkMaximumPacketSize());
+ aParameters.SetUpLinkAveragePacketSize(iPrtParameters->GetUpLinkAveragePacketSize());
+ aParameters.SetUpLinkDelay(iPrtParameters->GetUpLinkDelay());
+ aParameters.SetUpLinkPriority(iPrtParameters->GetUpLinkPriority());
+
+ /**
+ Get and Set Downlink Parameters
+ */
+ aParameters.SetDownlinkBandwidth(iPrtParameters->GetDownlinkBandwidth());
+ aParameters.SetDownLinkMaximumBurstSize(iPrtParameters->GetDownLinkMaximumBurstSize());
+ aParameters.SetDownLinkMaximumPacketSize(iPrtParameters->GetDownLinkMaximumPacketSize());
+ aParameters.SetDownLinkAveragePacketSize(iPrtParameters->GetDownLinkAveragePacketSize());
+ aParameters.SetDownLinkDelay(iPrtParameters->GetDownLinkDelay());
+ aParameters.SetDownLinkPriority(iPrtParameters->GetDownLinkPriority());
+
+ aParameters.SetAdaptMode(iPrtParameters->AdaptMode());
+ aParameters.SetHeaderMode(iPrtParameters->GetHeaderMode());
+ const TName name = iPrtParameters->GetName();
+ aParameters.SetName(name);
+ }
+
+
+void CIpSubConnectionProvider::MapExtensionParamsFromESockToPRTL(const CSubConQosIPLinkR99ParamSet& extension, TUmtsQoSParameters& params)
+/**
+Map extension parameters from QoS PRT to the ESock Equivalents
+
+@param extension input structure that contains the ESock extension parameters
+@param params structure updated to contains the equivalent QoS PRT extension parameters
+*/
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("MapExtensionParamsFromESockToPRTL")));
+
+ RPacketQoS::TTrafficClass trafficClass = extension.GetTrafficClass();
+ User::LeaveIfError(params.SetTrafficClass((TUmtsTrafficClass)trafficClass));
+
+ RPacketQoS::TDeliveryOrder deliveryOrder = extension.GetDeliveryOrder();
+ User::LeaveIfError(params.SetDeliveryOrder((TUmtsDeliveryOrder)deliveryOrder));
+
+ RPacketQoS::TErroneousSDUDelivery sduDelivery = extension.GetErroneousSDUDelivery();
+ User::LeaveIfError(params.SetDeliveryOfErroneusSdu((TUmtsErroneousSDUDelivery)sduDelivery));
+
+ RPacketQoS::TBitErrorRatio bitErrorRate = extension.GetResidualBitErrorRatio();
+ User::LeaveIfError(params.SetResidualBer((TUmtsBitErrorRatio)bitErrorRate));
+
+ RPacketQoS::TSDUErrorRatio sduErrorRatio = extension.GetSDUErrorRatio();
+ User::LeaveIfError(params.SetErrorRatio((TUmtsSDUErrorRatio)sduErrorRatio));
+
+ RPacketQoS::TTrafficHandlingPriority trafficHandlingPriority = extension.GetTrafficHandlingPriority();
+ User::LeaveIfError(params.SetPriority((TUmtsTrafficHandlingPriority)trafficHandlingPriority));
+
+ TInt transferDelay = extension.GetTransferDelay();
+ User::LeaveIfError(params.SetTransferDelay(transferDelay));
+
+ TInt maxSduSize = extension.GetMaxSduSize();
+ User::LeaveIfError(params.SetMaxSduSize(maxSduSize));
+
+ TInt maxBitRateUp = extension.GetMaxBitrateUplink();
+ User::LeaveIfError(params.SetMaxBitrateUplink(maxBitRateUp));
+
+ TInt maxBitRateDown = extension.GetMaxBitrateDownlink();
+ User::LeaveIfError(params.SetMaxBitrateDownlink(maxBitRateDown));
+
+ TInt guaBitRateUp = extension.GetGuaBitrateUplink();
+ User::LeaveIfError(params.SetGuaranteedBitrateUplink(guaBitRateUp));
+
+ TInt guaBitRateDown = extension.GetGuaBitrateDownlink();
+ User::LeaveIfError(params.SetGuaranteedBitrateDownlink(guaBitRateDown));
+
+ iParameterRelease = KParameterRel4Rel99;
+ }
+
+void CIpSubConnectionProvider::MapExtensionParamsFromESockToPRTL(const CSubConSBLPR5ExtensionParamSet& extension, CSblpParameters& params) const
+ {
+ TAuthToken authToken = extension.GetMAT();
+ params.SetMAT(authToken);
+
+ /**
+ Get Flow Identifires And store that into the RArray of Flow Ids
+ of SBLP Paramters
+ */
+ RArray arrFlowIds;
+ CleanupClosePushL(arrFlowIds);
+
+ TInt nrOfFlows = extension.GetNumberOfFlowIds();
+ for ( TInt i = 0; i < nrOfFlows; i ++ )
+ {
+ const TFlowId & Fid = extension.GetFlowIdAt(i);
+ CSblpParameters::TFlowIdentifier FlowId;
+ FlowId.iMediaComponentNumber = Fid.GetMediaComponentNumber();
+ FlowId.iIPFlowNumber = Fid.GetIPFlowNumber();
+ arrFlowIds.AppendL(FlowId);
+ }
+ params.SetFlowIds(arrFlowIds);
+ CleanupStack::Pop(&arrFlowIds);
+ arrFlowIds.Close();
+ }
+
+void MapExtensionParamsFromPRTToESockL(TUmtsQoSParameters& params, CSubConQosIPLinkR99ParamSet& extension)
+/**
+Map extension parameters from ESock to the QoS PRT Equivalents
+
+@param params input structure that contains the QoS PRT extension parameters
+@param extension structure updated to contain the ESock equivalent extension parameters
+*/
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("MapExtensionParamsFromPRTToESockL")));
+
+ TUmtsTrafficClass trafficClass = params.TrafficClass();
+ extension.SetTrafficClass((RPacketQoS::TTrafficClass) trafficClass);
+
+ TUmtsDeliveryOrder deliveryOrder = params.DeliveryOrder();
+ extension.SetDeliveryOrder((RPacketQoS::TDeliveryOrder) deliveryOrder);
+
+ TUmtsErroneousSDUDelivery deliveryOfErroneusSdu = params.DeliveryOfErroneusSdu();
+ extension.SetErroneousSDUDelivery((RPacketQoS::TErroneousSDUDelivery) deliveryOfErroneusSdu);
+
+ TUmtsBitErrorRatio residualBer = params.ResidualBer();
+ extension.SetResidualBitErrorRatio((RPacketQoS::TBitErrorRatio) residualBer);
+
+ TUmtsSDUErrorRatio errorRatio = params.ErrorRatio();
+ extension.SetSDUErrorRatio((RPacketQoS::TSDUErrorRatio) errorRatio);
+
+ TUmtsTrafficHandlingPriority priority = params.Priority();
+ extension.SetTrafficHandlingPriority((RPacketQoS::TTrafficHandlingPriority) priority);
+
+ TInt transferDelay = params.TransferDelay();
+ extension.SetTransferDelay(transferDelay);
+
+ TInt maxSduSize = params.MaxSduSize();
+ extension.SetMaxSduSize(maxSduSize);
+
+ TInt maxBitrateUplink = params.MaxBitrateUplink();
+ extension.SetMaxBitrateUplink(maxBitrateUplink);
+
+ TInt maxBitrateDownlink = params.MaxBitrateDownlink();
+ extension.SetMaxBitrateDownlink(maxBitrateDownlink);
+
+ TInt guaBitrateUplink = params.GuaranteedBitrateUplink();
+ extension.SetGuaBitrateUplink(guaBitrateUplink);
+
+ TInt guaBitrateDownlink = params.GuaranteedBitrateDownlink();
+ extension.SetGuaBitrateDownlink(guaBitrateDownlink);
+ }
+
+
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+void CIpSubConnectionProvider::MapExtensionParamsFromESockToPRTL(const CSubConQosR5ParamSet& aExtension, TUmtsR5QoSParameters& aParams)
+/**
+Map extension parameters from QoS PRT to the ESock Equivalents
+
+@param extension input structure that contains the ESock extension parameters
+@param params structure updated to contains the equivalent QoS PRT extension parameters
+*/
+ {
+
+ __IPCPRLOG(IpCprLog::Printf(_L("MapExtensionParamsFromESockToPRTL")));
+
+ MapExtensionParamsFromESockToPRTL(static_cast(aExtension), static_cast(aParams));
+
+ TBool signallingIndicator = aExtension.GetSignallingIndicator();
+ User::LeaveIfError(aParams.SetSignallingIndicator(signallingIndicator));
+
+ RPacketQoS::TSourceStatisticsDescriptor sourceStatisticsDescriptor = aExtension.GetSourceStatisticsDescriptor();
+ User::LeaveIfError(aParams.SetSourceStatisticsDescriptor(reinterpret_cast(sourceStatisticsDescriptor)));
+
+ iParameterRelease = KParameterRel5;
+ }
+
+void MapExtensionParamsFromPRTToESockL(TUmtsR5QoSParameters& aParams, CSubConQosR5ParamSet& aExtension)
+/**
+Map extension parameters from ESock to the QoS PRT Equivalents
+
+@param params input structure that contains the QoS PRT extension parameters
+@param extension structure updated to contain the ESock equivalent extension parameters
+*/
+ {
+
+ __IPCPRLOG(IpCprLog::Printf(_L("MapExtensionParamsFromPRTToESockL")));
+
+ MapExtensionParamsFromPRTToESockL(static_cast(aParams),static_cast(aExtension));
+
+ TBool signallingprtIndicator = aParams.SignallingIndicator();
+ aExtension.SetSignallingIndicator(signallingprtIndicator);
+
+ TUmtsSourceStatisticsDescriptor sourceStatisticsprtDescriptor = aParams.SourceStatisticsDescriptor();
+ aExtension.SetSourceStatisticsDescriptor(reinterpret_cast(sourceStatisticsprtDescriptor));
+
+ }
+
+void CIpSubConnectionProvider::MapExtensionParamsFromESockToPRTL(const CSubConImsExtParamSet& aExtension, TImsParameter& aParams)
+/**
+Map extension parameters from QoS PRT to the ESock Equivalents
+
+@param extension input structure that contains the ESock extension parameters
+@param params structure updated to contains the equivalent QoS PRT extension parameters
+*/
+ {
+
+
+ __IPCPRLOG(IpCprLog::Printf(_L("MapExtensionParamsFromESockToPRTL")));
+
+ TBool IMSSignallingIndicator = aExtension.GetImsSignallingIndicator();
+ aParams.SetIMSSigallingIndicator(IMSSignallingIndicator);
+
+ }
+
+void MapExtensionParamsFromPRTToESockL(TImsParameter& aParams, CSubConImsExtParamSet& aExtension)
+/**
+Map extension parameters from ESock to the QoS PRT Equivalents
+
+@param params input structure that contains the QoS PRT extension parameters
+@param extension structure updated to contain the ESock equivalent extension parameters
+*/
+ {
+
+ __IPCPRLOG(IpCprLog::Printf(_L("MapExtensionParamsFromPRTToESockL")));
+
+ TBool IMSSignallingIndicator = aParams.GetIMSSigallingIndicator();
+ aExtension.SetImsSignallingIndicator(IMSSignallingIndicator);
+
+ }
+
+#endif
+// SYMBIAN_NETWORKING_UMTSR5
+
+void CIpSubConnectionProvider::ResetPrtExtensions()
+ {
+ TQoSExtensionQueueIter iter(iPrtExtensions);
+ CExtensionBase *ext;
+ ext = iter++;
+ while (ext)
+ {
+ delete ext;
+ ext = iter++;
+ }
+ iPrtExtensions.Reset();
+ }
+
+void CIpSubConnectionProvider::ConvertParametersFromESockL(CSubConParameterBundle& aParameterBundle)
+/**
+Covert QoS Parameters sent from ESock to QoS PRT values and cache the values
+
+@param aParameterBundle the bundle that contains all of ESock's QoS Variables
+*/
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("CIpSubConnectionProvider::ConvertParametersFromESockL [%08x]"), this));
+
+ ResetPrtExtensions();
+
+ CSubConParameterFamily* family = aParameterBundle.FindFamily(KSubConQoSFamily);
+ if(family)
+ {
+ CUmtsQoSPolicy* policy = CUmtsQoSPolicy::NewL();
+ CleanupStack::PushL(policy);
+ TBool policySet = EFalse;
+
+ // Map Requested Generic Parameters from ESock to PRT Values
+ CSubConQosGenericParamSet* generic = (CSubConQosGenericParamSet*)family->GetGenericSet(CSubConParameterFamily::ERequested);
+ if(generic)
+ {
+ TRAPD(err, MapGenericParamsFromESockToPRTL(*generic));
+ if( err != KErrNone )
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Failed to convert from ESock to PRT Generic Parameters (Requested) with Error: %d"),err));
+ }
+ }
+
+ // Map Requested UMTS Parameters from ESock to PRT values
+ CSubConQosIPLinkR99ParamSet* extension = (CSubConQosIPLinkR99ParamSet*)family->FindExtensionSet(
+ STypeId::CreateSTypeId(KSubConIPParamsUid,KSubConQosIPLinkR99ParamsType), CSubConParameterFamily::ERequested);
+ if(extension)
+ {
+ TUmtsQoSParameters params;
+
+ TRAPD(err, MapExtensionParamsFromESockToPRTL(*extension, params));
+ if( err != KErrNone )
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Failed to convert from ESock to PRT Extension Parameters (Requested) with Error: %d"),err));
+ }
+
+ policy->SetQoSRequested(params);
+ policySet = ETrue;
+ }
+
+ // Map Minimum UMTS Parameters from ESock to PRT values
+ extension = (CSubConQosIPLinkR99ParamSet*)family->FindExtensionSet(
+ STypeId::CreateSTypeId(KSubConIPParamsUid,KSubConQosIPLinkR99ParamsType), CSubConParameterFamily::EAcceptable);
+ if(extension)
+ {
+ TUmtsQoSParameters params;
+ TRAPD(err, MapExtensionParamsFromESockToPRTL(*extension,params));
+ if( err != KErrNone )
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Failed to convert from ESock to PRT Extension Parameters (Minimum) with Error: %d"),err));
+ }
+
+ policy->SetQoSMinimum(params);
+ policySet = ETrue;
+ }
+
+ if(policySet)
+ {
+ iPrtExtensions.AddFirst(*policy);
+ CleanupStack::Pop();
+ }
+ else
+ {
+ CleanupStack::PopAndDestroy(policy);
+ }
+
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+
+ CUmtsR5QoSPolicy* policyR5 = CUmtsR5QoSPolicy::NewL();
+ CleanupStack::PushL(policyR5);
+ TBool policySetR5 = EFalse;
+ // Map Requested UMTS Parameters from ESock to PRT values
+ CSubConQosR5ParamSet* extensionR5 = static_cast(family->FindExtensionSet(STypeId::CreateSTypeId(KSubConIPParamsUid,KSubConQosR5ParamsType), CSubConParameterFamily::ERequested));
+ if(extensionR5)
+ {
+ TUmtsR5QoSParameters paramsR5;
+ TRAPD(err, MapExtensionParamsFromESockToPRTL(*extensionR5, paramsR5));
+ if( err != KErrNone )
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Failed to convert from ESock to PRT Extension Parameters (Requested) with Error: %d"),err));
+ }
+
+ policyR5->SetQoSRequested(paramsR5);
+ policySetR5 = ETrue;
+ }
+ // Map Minimum UMTS Parameters from ESock to PRT values
+ extensionR5 = static_cast(family->FindExtensionSet(STypeId::CreateSTypeId(KSubConIPParamsUid,KSubConQosR5ParamsType), CSubConParameterFamily::EAcceptable));
+ if(extensionR5)
+ {
+ TUmtsR5QoSParameters paramsR5;
+ TRAPD(err, MapExtensionParamsFromESockToPRTL(*extensionR5,paramsR5));
+ if( err != KErrNone )
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Failed to convert from ESock to PRT Extension Parameters (Minimum) with Error: %d"),err));
+ }
+
+ policyR5->SetQoSMinimum(paramsR5);
+ policySetR5 = ETrue;
+ }
+
+ if(policySetR5)
+ {
+ iPrtExtensions.AddFirst(*policyR5);
+ CleanupStack::Pop();
+ }
+ else
+ {
+ CleanupStack::PopAndDestroy(policyR5);
+ }
+
+
+ CImsPolicy* policyIms = CImsPolicy ::NewL();
+ CleanupStack::PushL(policyIms);
+ TBool policySetIms = EFalse;
+ // Map Requested UMTS IMS Parameters from ESock to PRT values
+ CSubConImsExtParamSet* extensionIms = static_cast(family->FindExtensionSet(STypeId::CreateSTypeId(KSubConIPParamsUid,KSubConImsExtParamsType), CSubConParameterFamily::ERequested));
+ if(extensionIms)
+ {
+ TImsParameter paramsIms;
+
+ TRAPD(err, MapExtensionParamsFromESockToPRTL(*extensionIms, paramsIms));
+ if( err != KErrNone )
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Failed to convert from ESock to PRT Extension Parameters (Requested) with Error: %d"),err));
+ }
+
+ policyIms->SetImsParameter(paramsIms);
+ policySetIms = ETrue;
+ }
+
+ if(policySetIms)
+ {
+ iPrtExtensions.AddFirst(*policyIms);
+ CleanupStack::Pop();
+ }
+ else
+ {
+ CleanupStack::PopAndDestroy(policyIms);
+ }
+
+#endif
+// SYMBIAN_NETWORKING_UMTSR5
+
+ }
+
+ // Convert SBLP set if present
+ // Check for the presence of the family in the bundle
+ CSubConParameterFamily* sblpFamily = aParameterBundle.FindFamily(KSubConAuthorisationFamily);
+ if (sblpFamily)
+ {
+ CSblpPolicy* policy = CSblpPolicy::NewL();
+ CleanupStack::PushL(policy);
+ TBool policySet = EFalse;
+
+ /**
+ Extract the generic and extension Parmaters of the Family. At present the generic
+ parameters will just contains a dummy , and will not be used. The code is commented
+ and can be enabled sometimes when any parameter varification at the code is required
+ */
+ // CSubConAuthorisationGenericParamSet* generic = (CSubConAuthorisationGenericParamSet*)SblpFamily->GetGenericSet(CSubConParameterFamily::ERequested);
+ /**
+ There can be more than one extension set containing multiple MATs, as a requirement for the R6.
+ currently the APIs in CSubConParameterFamily is not able to extract multiple parameters. once this
+ is done, the code below must be changed to run on a loop on number of extensions
+ */
+
+ // Map Requested UMTS Parameters from ESock to PRT values
+ CSubConSBLPR5ExtensionParamSet* extension = (CSubConSBLPR5ExtensionParamSet*)sblpFamily->FindExtensionSet(
+ STypeId::CreateSTypeId(KSubConIPParamsUid,KSubConnSBLPR5ExtensionParamsType), CSubConParameterFamily::ERequested);
+ if(extension)
+ {
+ CSblpParameters* params = new (ELeave)CSblpParameters;
+ CleanupStack::PushL(params);
+ TRAPD(err, MapExtensionParamsFromESockToPRTL(*extension,*params));
+ if( err != KErrNone )
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("Failed to convert from ESock to PRT Extension Parameters (Requested) with Error: %d"),err));
+ }
+
+ policy->SetSblpParameters(*params); //does a bitwise copy therefore we must still delete params afterwards
+ policySet = ETrue;
+ CleanupStack::Pop(params);
+ delete params;
+ }
+
+ if( policySet )
+ {
+ iPrtExtensions.AddFirst(*policy);
+ CleanupStack::Pop();
+ }
+ else
+ {
+ CleanupStack::PopAndDestroy(policy);
+ }
+ }
+ }
+
+
+void CIpSubConnectionProvider::ConvertParametersFromQOSL(TPfqosMessage& aMsg, CSubConGenEventParamsGranted* aEvent)
+/**
+Convert parameters from a PRT response to ESock equivalents. PRT parameters are cached
+
+@param aMsg QoS PRT Response Message
+@param aEvent ESock event to contain changed QoS Parameters
+*/
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("CIpSubConnectionProvider::ConvertParametersFromQOSL [%08x]"), this));
+
+ /** Changed as per usase of CQosParamaters instead of
+ TQoSParameter
+ */
+
+ TQoSParameters qosParams;
+ aMsg.SetQoSParameters(qosParams);
+
+ // Copy qosParams into the iPrtParameters
+ ConvertTQoSIntoCQoSParamsL(qosParams);
+ aEvent->SetFamily(KSubConQoSFamily);
+
+ CSubConQosGenericParamSet* generic = CSubConQosGenericParamSet::NewL();
+ MapGenericParamsFromPRTToESockL(*generic);
+ aEvent->SetGenericSet(generic);
+
+
+
+ TSglQueIter iter(aMsg.iExtensions);
+ CPfqosPolicyData* data = NULL;
+
+ // for each pfqos extension that exists in aMsg
+ while ((data = iter++) != NULL)
+ {
+ const TUint8 *p = data->Data().Ptr();
+ TInt length = data->Data().Length();
+ const struct pfqos_configure* pfqosExtConfig = reinterpret_cast(p);
+
+ if (length > (TInt)sizeof(pfqos_configure) &&
+ pfqosExtConfig->pfqos_configure_len * 8 == length &&
+ pfqosExtConfig->pfqos_ext_type == EPfqosExtExtension)
+ {
+
+ // pfqos_extension struct is located straight after pfqos_configure struct
+ p += sizeof(struct pfqos_configure);
+ const struct pfqos_extension* pfqosExtension = reinterpret_cast(p);
+ TInt extType = pfqosExtension->pfqos_extension_type;
+
+ CExtensionBase* scPfqosExtension = NULL;
+ TQoSExtensionQueueIter iter2(iPrtExtensions);
+
+ // for each pfqos extension that has been configured in this subconnection
+ while ((scPfqosExtension = iter2++) != NULL)
+ {
+ if (scPfqosExtension->Type() == extType)
+ {
+ // the extension in the message matches an extension that is configured on the
+ // subconnection, now we can parse it
+ scPfqosExtension->ParseMessage(data->Data());
+
+ CSubConExtensionParameterSet* extension = NULL;
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+ switch (extType)
+ {
+ case KPfqosExtensionUmts:
+#endif
+ {
+ CUmtsQoSPolicy *policy = static_cast(scPfqosExtension);
+ TNegotiatedUmtsQoSParameters grantedQoS;
+ policy->GetQoSNegotiated(grantedQoS);
+ extension = CSubConQosIPLinkR99ParamSet::NewL();
+ CleanupStack::PushL(extension);
+ MapExtensionParamsFromPRTToESockL(grantedQoS,*static_cast(extension));
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+ break;
+ }
+ case KPfqosR5ExtensionUmts:
+ extension = MapFromUmtsR5ExtensionL(static_cast(scPfqosExtension));
+ CleanupStack::PushL(extension);
+ break;
+
+ case KPfqosExtensionIMS:
+ extension = MapFromImsExtensionL(static_cast(scPfqosExtension));
+ CleanupStack::PushL(extension);
+ break;
+#endif
+ }
+
+ if (extension)
+ {
+ // Need to add it to the cleanup stack so we don't lose the ptr
+ // in the event that AddExtensionSetL leaves
+ aEvent->AddExtensionSetL(extension);
+ CleanupStack::Pop(extension);
+ }
+
+ // Next extension from aMsg
+ break;
+ }
+ }
+ }
+ }
+ }
+
+
+
+#ifdef SYMBIAN_NETWORKING_UMTSR5
+CSubConExtensionParameterSet* CIpSubConnectionProvider::MapFromUmtsR5ExtensionL (const CUmtsR5QoSPolicy* aPolicy)
+ {
+ ASSERT(aPolicy);
+
+ TNegotiatedUmtsR5QoSParameters grantedR5QoS;
+ aPolicy->GetQoSNegotiated(grantedR5QoS);
+
+ CSubConExtensionParameterSet* paramSet;
+
+ switch (iParameterRelease)
+ {
+ case KParameterRel5:
+ paramSet = CSubConQosR5ParamSet::NewL();
+ CleanupStack::PushL(paramSet);
+ MapExtensionParamsFromPRTToESockL(static_cast(grantedR5QoS),
+ *static_cast(paramSet));
+ CleanupStack::Pop(paramSet);
+ break;
+
+ case KParameterRel4Rel99:
+ paramSet = CSubConQosR99ParamSet::NewL();
+ CleanupStack::PushL(paramSet);
+ MapExtensionParamsFromPRTToESockL(static_cast(grantedR5QoS),
+ *static_cast(paramSet));
+ CleanupStack::Pop(paramSet);
+ break;
+
+ default:
+ // Break in debug builds
+ ASSERT(EFalse);
+ return NULL;
+ }
+
+ return paramSet;
+ }
+
+
+CSubConExtensionParameterSet* CIpSubConnectionProvider::MapFromImsExtensionL (const CImsPolicy* aPolicy)
+ {
+ ASSERT(aPolicy);
+
+ TImsParameter grantedImsQoS;
+ aPolicy->GetImsParameter(grantedImsQoS);
+
+ CSubConImsExtParamSet* extensionIms = CSubConImsExtParamSet::NewL();
+ CleanupStack::PushL(extensionIms);
+ MapExtensionParamsFromPRTToESockL(grantedImsQoS, *extensionIms);
+ CleanupStack::Pop(extensionIms);
+
+ return extensionIms;
+ }
+#endif
+// SYMBIAN_NETWORKING_UMTSR5
+
+#endif
+// BASIC_IPSCPR
+
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipscpr/src/ipscprlog.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipscpr/src/ipscprlog.cpp Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,73 @@
+// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// Implementation file for the IP CPR Logger
+//
+//
+
+/**
+ @file ipcprlog.cpp
+*/
+
+#ifdef _DEBUG
+
+#include
+#include "ipscprlog.h"
+#include "comms-infras/commsdebugutility.h"
+
+/**
+Comms Debug Utility Folder Name
+@internalComponent
+*/
+_LIT(KQFrameLogFolder, "SubConn");
+
+/**
+Comms Debug Utilitiy File Name
+@internalComponent
+*/
+_LIT(KQFrameLogFile, "ipscpr");
+
+void IpCprLog::Printf(TRefByValue aFmt,...)
+/**
+Write arguments in supplied format to log file
+*/
+ {
+#if defined __FLOG_ACTIVE
+ VA_LIST list;
+ VA_START(list,aFmt);
+ RFileLogger::WriteFormat(KQFrameLogFolder(), KQFrameLogFile(), EFileLoggingModeAppend, aFmt, list);
+#else // stop variable not used message
+ (void)aFmt;
+ (void)KQFrameLogFolder();
+ (void)KQFrameLogFile();
+#endif
+ }
+
+void IpCprLog::Printf(TRefByValue aFmt,...)
+/**
+Write arguments in supplied format to log file
+*/
+ {
+#if defined __FLOG_ACTIVE
+ VA_LIST list;
+ VA_START(list,aFmt);
+ RFileLogger::WriteFormat(KQFrameLogFolder(), KQFrameLogFile(), EFileLoggingModeAppend, aFmt, list);
+#else
+ (void)aFmt;
+ (void)KQFrameLogFolder();
+ (void)KQFrameLogFile();
+#endif
+ }
+
+#endif // _DEBUG
+
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipscpr/src/ipscprlog.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipscpr/src/ipscprlog.h Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,62 @@
+/**
+* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Header file for the IP CPR Logger
+*
+*
+*/
+
+
+
+/**
+ @file ipcprlog.h
+*/
+
+#ifndef __IPCPRLOG_H__
+#define __IPCPRLOG_H__
+
+#include
+
+#ifdef _DEBUG
+
+/**
+@internalComponent
+*/
+#define __IPCPRLOG(x) x
+
+
+class IpCprLog
+/**
+Provides a wrapper around use of Comms Debug Utility for the the
+IP Connection Provider. Calls are usuallly enclosed with the use
+of the LOG macro. This will thus remove calls to logging in
+release builds.
+
+@internalComponent
+
+@released Since v9.0
+*/
+ {
+public:
+ static void Printf(TRefByValue aFmt, ...);
+ static void Printf(TRefByValue aFmt, ...);
+ };
+
+#else
+
+#define __IPCPRLOG(x)
+
+#endif
+
+#endif // __IPCPRLOG_H__
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipscpr/src/qos_msg.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipscpr/src/qos_msg.cpp Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,393 @@
+// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// Implementation file for the QoS Mapping Messages
+//
+//
+
+/**
+ @file qos_msg.cpp
+*/
+
+#include "pfqos_stream.h"
+#include "pfqoslib.h"
+#include "ipscpr.h"
+#include "qos_msg.h"
+#include "ipscprlog.h"
+
+
+const TIp6Addr KInet6AddrMask = {{{0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff}}};
+
+const TInt KQoSDefaultBufSize = 8000;
+
+
+CQoSMsg* CQoSMsg::NewL( TPfqosMessages aMsgType )
+/**
+Create a new QoS PRT Message
+
+@param aMsgType Message Type
+*/
+ {
+ CQoSMsg* msg = new (ELeave) CQoSMsg();
+
+ CleanupStack::PushL( msg );
+ msg->ConstructL( aMsgType );
+ CleanupStack::Pop();
+
+ return msg;
+ }
+
+
+CQoSMsg::~CQoSMsg()
+/**
+Destructor
+*/
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("CQoSMsg::Destroy [%08x] Type=%d"), this, iType));
+
+ delete iMsg;
+ iMsg = NULL;
+ }
+
+
+CQoSMsg::CQoSMsg()
+/**
+Constructor
+*/
+ {
+ }
+
+
+void CQoSMsg::ConstructL( TPfqosMessages aMsgType )
+/**
+QoS PRT Message second phase construction
+
+@param aMsgType Message Type
+*/
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("CQoSMsg::Construct [%08x] Type=%d"), this, aMsgType));
+
+ iMsg = CPfqosStream::NewL(KQoSDefaultBufSize);
+ iMsg->Init((TUint8)aMsgType);
+ iType = aMsgType;
+ }
+
+
+void CQoSMsg::AddSrcAddr(const TInetAddr &aAddr)
+/**
+Adds Source Address Information to the QoS PRT Message
+
+@param aAddr Source Address
+*/
+ {
+ TInetAddr srcInetAddr(aAddr);
+ srcInetAddr.SetFamily(KAFUnspec);
+ srcInetAddr.SetAddress(KInet6AddrNone);
+
+ TInetAddr mask;
+ mask.SetAddress(KInet6AddrMask);
+ iMsg->AddSrcAddress(srcInetAddr, mask, (TUint16)srcInetAddr.Port());
+ }
+
+
+void CQoSMsg::AddDstAddr(const TInetAddr &aAddr)
+/**
+Adds Destination Address Information to the QoS PRT Message
+
+@param aAddr Destination Address
+*/
+ {
+ TInetAddr dstInetAddr(aAddr);
+ if (dstInetAddr.Family() == KAfInet)
+ {
+ dstInetAddr.ConvertToV4Mapped();
+ }
+
+ TInetAddr mask;
+ mask.SetAddress(KInet6AddrMask);
+ iMsg->AddDstAddress(dstInetAddr, mask, (TUint16)dstInetAddr.Port());
+ }
+
+
+void CQoSMsg::AddExtensionPolicy(TQoSExtensionQueue& aExtensions)
+/**
+Add QoS Extension Parameters to the QoS Message
+
+@param aExtensions Collection of Extensions Parameters
+*/
+ {
+ TQoSExtensionQueueIter iter(aExtensions);
+ CExtensionBase* extension;
+ while ((extension=iter++) != NULL)
+ {
+ TDesC8& extData = extension->Data();
+ iMsg->AddExtensionPolicy(extData);
+ }
+ }
+
+
+void CQoSMsg::Send(RInternalSocket &aSocket, TRequestStatus& aStatus)
+/**
+Sends the current message to the QoS PRT
+
+@param aSocket Internal Socket over which to send a message
+@param aStatus Request Status
+*/
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("CQoSMsg::Send [%08x] Type=%d"), this, iType));
+
+ iMsg->Send(aSocket, aStatus);
+ }
+
+
+// ###########################################################
+
+
+CQoSMsgWriter* CQoSMsgWriter::NewL(CIpSubConnectionProvider* aOwner, RInternalSocket& aSocket)
+/**
+Create QoS PRT Message Writer
+
+@param aOwner The IP SubConnection Provider that creates this object
+@param aSocket reference to an Internal Socket owned by the IP SubConnection Provider
+*/
+ {
+ return new (ELeave) CQoSMsgWriter(aOwner, aSocket);
+ }
+
+
+CQoSMsgWriter::CQoSMsgWriter(CIpSubConnectionProvider* aOwner, RInternalSocket& aSocket)
+/**
+Constructor
+
+@param aOwner The IP SubConnection Provider that creates this object
+@param aSocket reference to an Internal Socket owned by the IP SubConnection Provider
+*/
+ : CActive(EPriorityStandard)
+ , iOwner(aOwner)
+ , iSocket(aSocket)
+ , iClosing(EFalse)
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("CQoSMsgWriter::Construct [%08x]"), this));
+
+ CActiveScheduler::Add(this);
+ iPendingMsg.SetOffset(_FOFF(CQoSMsg, iLink));
+ }
+
+
+CQoSMsgWriter::~CQoSMsgWriter()
+/**
+Destructor
+*/
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("CQoSMsgWriter::Destroy [%08x]"), this));
+
+ if (IsActive())
+ {
+ Cancel();
+ }
+
+ iClosing = ETrue;
+
+ if (iCurrentMsg)
+ {
+ delete iCurrentMsg;
+ iCurrentMsg = NULL;
+ }
+
+ while (!iPendingMsg.IsEmpty())
+ {
+ CQoSMsg* msg = iPendingMsg.First();
+ iPendingMsg.Remove(*msg);
+ delete msg;
+ }
+
+ iPendingMsg.Reset();
+ }
+
+
+void CQoSMsgWriter::Send(CQoSMsg* aMsg)
+/**
+Sends a Message to the QoS PRT
+
+@param aMsg The message to send
+*/
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("CQoSMsgWriter::Send [%08x]"), this));
+
+ // Can only process one message at a time.
+ if (IsActive())
+ {
+ iPendingMsg.AddLast(*aMsg);
+ }
+ else
+ {
+ iCurrentMsg = aMsg;
+ iCurrentMsg->Send(iSocket, iStatus);
+ SetActive();
+ }
+ }
+
+
+void CQoSMsgWriter::RunL()
+/**
+Active Object main processing function
+*/
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("CQoSMsgWriter::RunL [%08x] - Enter"), this));
+
+ TInt err = iStatus.Int();
+ if (err != KErrNone && iOwner)
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("CQoSMsgWriter::RunL [%08x] - Process Error"), this));
+#ifdef _DEBUG
+ TInt msgType = EPfqosReserved;
+ if( iCurrentMsg )
+ {
+ msgType = iCurrentMsg->iType;
+ }
+ iOwner->ProcessPRTError(msgType, err);
+#endif
+ }
+
+ delete iCurrentMsg;
+ iCurrentMsg = NULL;
+
+ if (!iClosing && !iPendingMsg.IsEmpty())
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("CQoSMsgWriter::RunL [%08x] - Send next message"), this));
+ CQoSMsg* msg = iPendingMsg.First();
+ iPendingMsg.Remove(*msg);
+ iCurrentMsg = msg;
+ iCurrentMsg->Send(iSocket, iStatus);
+ SetActive();
+ }
+
+ __IPCPRLOG(IpCprLog::Printf(_L("CQoSMsgWriter::RunL [%08x] - Exit"), this));
+ }
+
+
+// ###########################################################
+
+
+CQoSMsgReader* CQoSMsgReader::NewL( CIpSubConnectionProvider *aOwner, RInternalSocket& aSocket)
+/**
+Create QoS PRT Message Reader
+
+@param aOwner The IP SubConnection Provider that creates this object
+@param aSocket reference to an Internal Socket owned by the IP SubConnection Provider
+*/
+ {
+ CQoSMsgReader* reader = new (ELeave) CQoSMsgReader(aOwner, aSocket);
+
+ CleanupStack::PushL( reader );
+ reader->ConstructL();
+ CleanupStack::Pop();
+
+ return reader;
+ }
+
+
+CQoSMsgReader::CQoSMsgReader(CIpSubConnectionProvider *aOwner, RInternalSocket& aSocket)
+/**
+Constructor
+
+@param aOwner The IP SubConnection Provider that creates this object
+@param aSocket reference to an Internal Socket owned by the IP SubConnection Provider
+*/
+ : CActive(EPriorityStandard)
+ , iOwner(aOwner)
+ , iSocket(aSocket)
+ , iRecvPtr(0,0)
+ , iClosing(EFalse)
+ {
+ CActiveScheduler::Add(this);
+ }
+
+
+CQoSMsgReader::~CQoSMsgReader()
+/**
+Destructor
+*/
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("CQoSMsgReader::Destruct [%08x]"), this));
+
+ if (IsActive())
+ {
+ Cancel();
+ }
+
+ iClosing = ETrue;
+
+ if (iRecvBuf)
+ {
+ delete iRecvBuf;
+ iRecvBuf = NULL;
+ }
+ }
+
+
+void CQoSMsgReader::ConstructL()
+/**
+QoS PRT Message Reader second phase construction
+*/
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("CQoSMsgReader::Construct [%08x]"), this));
+
+ iRecvBuf = HBufC8::NewL(KQoSDefaultBufSize);
+ TPtr8 tmp(iRecvBuf->Des());
+ iRecvPtr.Set(tmp);
+
+ iRecvPtr.Zero();
+ iRecvPtr.SetLength(KQoSDefaultBufSize);
+ iSocket.Recv(iRecvPtr, 0, iStatus);
+ SetActive();
+ }
+
+
+void CQoSMsgReader::RunL()
+/**
+Active Object main processing function
+*/
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("CQoSMsgReader::RunL [%08x] - Enter"), this));
+
+ if (iStatus.Int() == KErrNone && iRecvPtr.Length() > 0 )
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("CQoSMsgReader::RunL [%08x] - Process Response"), this));
+ TPfqosMessage msg(iRecvPtr);
+ if (msg.iError == KErrNone)
+ {
+ iOwner->ProcessPRTMsg(msg);
+ }
+#ifdef _DEBUG
+ else
+ {
+ TInt msgType = EPfqosReserved;
+ iOwner->ProcessPRTError(msgType, msg.iError);
+ }
+#endif
+ }
+
+ if (!iClosing)
+ {
+ __IPCPRLOG(IpCprLog::Printf(_L("CQoSMsgReader::RunL [%08x] - Wait for next message"), this));
+ iRecvPtr.Zero();
+ iRecvPtr.SetLength(KQoSDefaultBufSize);
+ iSocket.Recv(iRecvPtr, 0, iStatus);
+ SetActive();
+ }
+
+ __IPCPRLOG(IpCprLog::Printf(_L("CQoSMsgReader::RunL [%08x] - Exit"), this));
+ }
+
diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipscpr/src/qos_msg.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/networkcontrol/ipscpr/src/qos_msg.h Tue Jun 29 19:20:22 2010 +0530
@@ -0,0 +1,168 @@
+/**
+* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Header file for the QoS Mapping Messages
+*
+*
+*/
+
+
+
+/**
+ @file qos_msg.h
+*/
+
+#ifndef __QOS_MSG_H__
+#define __QOS_MSG_H__
+
+#include