--- a/bearermanagement/S60MCPR/inc/s60mcpractivities.h Fri Jul 09 10:25:55 2010 +0300
+++ b/bearermanagement/S60MCPR/inc/s60mcpractivities.h Tue Jul 13 11:25:48 2010 +0300
@@ -24,7 +24,7 @@
#define S60MCPR_ACTIVITIES_H
#include <comms-infras/mobilitymcpractivities.h>
-
+#include <platform/elements/mm_context.h>
#include "s60mcprstates.h"
// Forward declarations
@@ -50,13 +50,24 @@
* S60 MCPR's connection selection activity related
* states, transitions and forks.
*
- * The activity doesn't need activity class because it
- * reuses the Symbian's core implementation for
- * selection.
- *
*/
namespace S60MCprSelectActivity
{
+
+ class CS60SelectActivity : public MCprActivities::CSelectNextLayerActivity
+ {
+ public: // Methods
+ static MeshMachine::CNodeActivityBase* NewL(const MeshMachine::TNodeActivity& aActivitySig, MeshMachine::AMMNodeBase& aNode);
+
+ // Overrides CNodeActivityBase's implementation
+ virtual void Cancel(MeshMachine::TNodeContextBase& aContext);
+
+ private: // Methods
+
+ // C++ constructor
+ CS60SelectActivity(const MeshMachine::TNodeActivity& aActivitySig, MeshMachine::AMMNodeBase& aNode);
+ };
+
/**
* Execution context definition for meshmachine activities.
*/
@@ -109,11 +120,6 @@
* S60MCprSimpleSelectActivity namespace packages the
* S60 MCPR's connection selection activity related
* states, transitions and forks.
- *
- * The activity doesn't need activity class because it
- * reuses the Symbian's core implementation for
- * selection.
- *
*/
namespace S60MCprSimpleSelectActivity
{
--- a/bearermanagement/S60MCPR/src/s60mcpractivities.cpp Fri Jul 09 10:25:55 2010 +0300
+++ b/bearermanagement/S60MCPR/src/s60mcpractivities.cpp Tue Jul 13 11:25:48 2010 +0300
@@ -38,7 +38,7 @@
DECLARE_DEFINE_CUSTOM_NODEACTIVITY( ECFActivitySelect,
S60MCprSelect,
TCFSelector::TSelect,
- CSelectNextLayerActivity::NewL )
+ CS60SelectActivity::NewL )
// Reply from TAwaitingSelectNextLayer if no choices, otherwise accept
FIRST_NODEACTIVITY_ENTRY( TAwaitingSelectNextLayer,
@@ -117,7 +117,7 @@
DECLARE_DEFINE_CUSTOM_NODEACTIVITY( ECFActivitySelect,
MCprSimpleSelect,
TCFSelector::TSimpleSelect,
- CSelectNextLayerActivity::NewL )
+ S60MCprSelectActivity::CS60SelectActivity::NewL )
// Reply from TAwaitingSelectNextLayer if no choices, otherwise accept
FIRST_NODEACTIVITY_ENTRY( S60MCprSimpleSelectActivity::TAwaitingSelectNextLayer,
S60MCprSimpleSelectActivity::TChooseBestIAPRequiredOrNoTagOrSetChosenApActive )
--- a/bearermanagement/S60MCPR/src/s60mcprsimpleselectactivity.cpp Fri Jul 09 10:25:55 2010 +0300
+++ b/bearermanagement/S60MCPR/src/s60mcprsimpleselectactivity.cpp Tue Jul 13 11:25:48 2010 +0300
@@ -42,6 +42,36 @@
//
namespace S60MCprSelectActivity
{
+ // Overrides CNodeActivityBase method implementation
+ void CS60SelectActivity::Cancel(MeshMachine::TNodeContextBase& aContext)
+ {
+ S60MCPRLOGSTRING1("S60MCPR<%x>::CS60SelectActivity::Cancel()",(TInt*)&aContext.Node())
+ __ASSERT_DEBUG(aContext.iNodeActivity, User::Panic(KS60MCprPanic, KPanicNoActivity));
+ CSelectNextLayerActivity& ac =
+ static_cast<CSelectNextLayerActivity&>( *aContext.iNodeActivity );
+
+ if (!ac.iTierManager.IsNull() && ac.iTierManager == PostedToNodeId())
+ {
+ S60MCPRLOGSTRING1("S60MCPR<%x>::CS60SelectActivity::Cancel() Forwarding TCancel to TM",(TInt*)&aContext.Node())
+ RClientInterface::OpenPostMessageClose(TNodeCtxId(ActivityId(), iNode.Id()), PostedToNodeId(), TEBase::TCancel().CRef());
+ SetError( KErrCancel );
+ }
+ else
+ {
+ CSelectNextLayerActivity::Cancel(aContext);
+ }
+ }
+
+ MeshMachine::CNodeActivityBase* CS60SelectActivity::NewL(const MeshMachine::TNodeActivity& aActivitySig, MeshMachine::AMMNodeBase& aNode)
+ {
+ return new(ELeave) CS60SelectActivity( aActivitySig, aNode );
+ }
+
+ CS60SelectActivity::CS60SelectActivity(const MeshMachine::TNodeActivity& aActivitySig, MeshMachine::AMMNodeBase& aNode)
+ : CSelectNextLayerActivity(aActivitySig, aNode)
+ {
+ }
+
// -----------------------------------------------------------------------------
// TAwaitingSelectNextLayer
// -----------------------------------------------------------------------------
@@ -170,8 +200,7 @@
CleanupStack::PushL(nextAP);
node.ConnPrefList().AppendL(nextAP);
CleanupStack::Pop();
- /* END OF HACK */
-
+ /* END OF HACK */
// Attach. 399 attach shouldn't be visible here.
if ( prefs.Scope()&TSelectionPrefs::ESelectFromExisting )
{
@@ -194,7 +223,7 @@
newPrefs.SetPrefs( ippprefs );
TCFSelector::TSimpleSelect msg(newPrefs);
iContext.iNodeActivity->PostRequestTo(ac.iTierManager, msg);
- }
+ }
}
}