linklayercontrol/networkinterfacemgr/agentprcore/src/tunnelagentcpr.cpp
changeset 37 052078dda061
parent 0 af10295192d8
child 55 5eca823bbf17
equal deleted inserted replaced
18:39bb7c3571e9 37:052078dda061
    64     NODEACTIVITY_ENTRY(KErrorTag, CoreNetStates::TStopSelf, CoreNetStates::TAwaitingDataClientStopped, MeshMachine::TErrorTag)
    64     NODEACTIVITY_ENTRY(KErrorTag, CoreNetStates::TStopSelf, CoreNetStates::TAwaitingDataClientStopped, MeshMachine::TErrorTag)
    65     LAST_NODEACTIVITY_ENTRY(KErrorTag, MeshMachine::TDoNothing)
    65     LAST_NODEACTIVITY_ENTRY(KErrorTag, MeshMachine::TDoNothing)
    66 NODEACTIVITY_END()
    66 NODEACTIVITY_END()
    67 }
    67 }
    68 
    68 
       
    69 namespace TunnelGoneDownActivity
       
    70 {
       
    71 DECLARE_DEFINE_NODEACTIVITY(ECFActivityGoneDown, TunnelGoneDown, TCFControlClient::TGoneDown)
       
    72     // Our Service Provider has gone down unexpectedly (we haven't issued a TStop)
       
    73     FIRST_NODEACTIVITY_ENTRY(CoreNetStates::TAwaitingGoneDown, MeshMachine::TNoTag)
       
    74     LAST_NODEACTIVITY_ENTRY(KNoTag, MeshMachine::TDoNothing)
       
    75 NODEACTIVITY_END()
       
    76 }
       
    77 
    69 #ifdef SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
    78 #ifdef SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
    70 namespace TunnelAgentCprNotificationActivity
    79 namespace TunnelAgentCprNotificationActivity
    71 {
    80 {
    72 DECLARE_DEFINE_NODEACTIVITY(ECFActivityNotification, TunnelAgentCprNotification, TCFSubConnControlClient::TPlaneNotification)
    81 DECLARE_DEFINE_NODEACTIVITY(ECFActivityNotification, TunnelAgentCprNotification, TCFSubConnControlClient::TPlaneNotification)
    73 	NODEACTIVITY_ENTRY(KNoTag, CoreNetStates::TPassPlaneEventToControlClients, CoreNetStates::TAwaitingConEvent, MeshMachine::TNoTag)
    82 	NODEACTIVITY_ENTRY(KNoTag, CoreNetStates::TPassPlaneEventToControlClients, CoreNetStates::TAwaitingConEvent, MeshMachine::TNoTag)
    76 #endif // SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
    85 #endif // SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
    77 namespace TunnelAgentCprStates
    86 namespace TunnelAgentCprStates
    78 {
    87 {
    79 DECLARE_DEFINE_ACTIVITY_MAP(TunnelAgentCprActivities)
    88 DECLARE_DEFINE_ACTIVITY_MAP(TunnelAgentCprActivities)
    80 	ACTIVITY_MAP_ENTRY(TunnelAgentCprStartActivity, TunnelCprStart)
    89 	ACTIVITY_MAP_ENTRY(TunnelAgentCprStartActivity, TunnelCprStart)
       
    90       ACTIVITY_MAP_ENTRY(TunnelGoneDownActivity, TunnelGoneDown)
    81 #ifdef SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
    91 #ifdef SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
    82 	ACTIVITY_MAP_ENTRY(TunnelAgentCprNotificationActivity, TunnelAgentCprNotification)
    92 	ACTIVITY_MAP_ENTRY(TunnelAgentCprNotificationActivity, TunnelAgentCprNotification)
    83 #endif // SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
    93 #endif // SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
    84 ACTIVITY_MAP_END_BASE(AgentCprStates, agentCprActivities)
    94 ACTIVITY_MAP_END_BASE(AgentCprStates, agentCprActivities)
    85 }
    95 }
    99 	return self;
   109 	return self;
   100 	}
   110 	}
   101 
   111 
   102 
   112 
   103 CTunnelAgentConnectionProvider::CTunnelAgentConnectionProvider(CConnectionProviderFactoryBase& aFactory)
   113 CTunnelAgentConnectionProvider::CTunnelAgentConnectionProvider(CConnectionProviderFactoryBase& aFactory)
   104    : CAgentConnectionProvider(aFactory, TunnelAgentCprStates::TunnelAgentCprActivities::Self())
   114    : CAgentConnectionProvider(aFactory, TunnelAgentCprStates::TunnelAgentCprActivities::Self()),
       
   115      TIfStaticFetcherNearestInHierarchy(this)
   105 	{
   116 	{
   106 	LOG_NODE_CREATE(KTunnelAgentCprTag, CTunnelAgentConnectionProvider);
   117 	LOG_NODE_CREATE(KTunnelAgentCprTag, CTunnelAgentConnectionProvider);
   107 	}
   118 	}
   108 
   119 
   109 
   120 
   113 EXPORT_C CTunnelAgentConnectionProvider::~CTunnelAgentConnectionProvider()
   124 EXPORT_C CTunnelAgentConnectionProvider::~CTunnelAgentConnectionProvider()
   114 	{
   125 	{
   115 	LOG_NODE_DESTROY(KTunnelAgentCprTag, CTunnelAgentConnectionProvider);
   126 	LOG_NODE_DESTROY(KTunnelAgentCprTag, CTunnelAgentConnectionProvider);
   116 	}
   127 	}
   117 
   128 
       
   129 //
       
   130 // MPlatSecApiExt
       
   131 //
   118 
   132 
       
   133 void CTunnelAgentConnectionProvider::ReturnInterfacePtrL(MPlatsecApiExt*& aInterface)
       
   134     {
       
   135     aInterface = this;
       
   136     }
   119 
   137 
       
   138 TInt CTunnelAgentConnectionProvider::SecureId(TSecureId& /*aResult*/) const
       
   139 	{
       
   140 	return KErrNotSupported;
       
   141 	}
       
   142 
       
   143 TInt CTunnelAgentConnectionProvider::VendorId(TVendorId& /*aResult*/) const
       
   144 	{
       
   145 	return KErrNotSupported;
       
   146 	}
       
   147 
       
   148 TBool CTunnelAgentConnectionProvider::HasCapability(const TCapability /*aCapability*/) const
       
   149 	{
       
   150 	return KErrNotSupported;
       
   151 	}
       
   152 
       
   153 TInt CTunnelAgentConnectionProvider::CheckPolicy(const TSecurityPolicy& /*aPolicy*/) const
       
   154 	{
       
   155 	// This is the whole reason that we need to implement MPlatSecApiExt in this node at all.  When TunnelAgentCpr issues
       
   156 	// a TStop towards IpCpr, IpCpr requires the sending node (normally ESockSvr but TunnelAgentCpr in this case)
       
   157 	// to implement MPlatSecApiExt through which IpCpr can check platsec capabilities (IpCprStates::TCheckStopCapabilities).
       
   158 	// If TunnelAgentCpr does not impement MPlatSecApiExt, then IpCpr will error the stop request with KErrInterfaceNotSupported.
       
   159 	return KErrNone;
       
   160 	}