datacommsserver/esockserver/test/providers/dummy/inc/dummypr_connprov.h
changeset 32 d2396c80c344
parent 30 df67dc5d759e
child 48 07656293a99c
--- a/datacommsserver/esockserver/test/providers/dummy/inc/dummypr_connprov.h	Mon May 24 18:38:45 2010 +0100
+++ b/datacommsserver/esockserver/test/providers/dummy/inc/dummypr_connprov.h	Mon May 24 18:44:15 2010 +0100
@@ -26,7 +26,7 @@
 
 #include <comms-infras/mobilitycpr.h>
 #include <comms-infras/mobilitycprstates.h>
-
+#include <elements/mm_activities_internal.h> 
 
 #ifdef __FLOG_ACTIVE
 // CommsDebugUtility logging tags. Use them to enable tracing for DummyCPR
@@ -34,6 +34,12 @@
 _LIT8(KTestDummyLogTag2,"TestDummyRef");
 #endif
 
+enum TCFNodeActivityId
+    {
+    ECFActivityDummyCprDestroy                 = ESock::ECFActivityCustom +1,
+    };
+
+
 class CDummyConnectionProvider : public CMobilityConnectionProvider, public ESock::MLegacyControlApiExt,
                                  public ITFHIERARCHY_LINK_1(CDummyConnectionProvider, CMobilityConnectionProvider, ESock::MLegacyControlApiExt)
 
@@ -67,6 +73,37 @@
 	TConnType iConnStatus;
     };
 
+
+class CDelayTimer: public CTimer
+    {
+public:
+    static CDelayTimer* NewL( Messages::RNodeInterface* aSender, const Messages::TNodeId& aRecipient, const Messages::TNodeSignal::TMessageId& aMessageId );
+
+    virtual ~CDelayTimer();
+    void Start( TInt aIntervalInSecs );    
+
+public:
+class TDelayMessage : public Messages::TSignatureBase
+    {
+public:
+    TDelayMessage();
+    TDelayMessage(const TNodeSignal::TMessageId& aMessageId);
+    };
+
+private:
+    CDelayTimer( Messages::RNodeInterface* aSender, const Messages::TNodeId& aRecipient, const Messages::TNodeSignal::TMessageId& aMessageId );
+    void ConstructL();
+    
+protected: // From CTimer (CActive)
+    void RunL();
+        
+private:
+    Messages::RNodeInterface* iSender;
+    Messages::TNodeId iRecipient;
+    Messages::TNodeSignal::TMessageId iMessageId;
+    };
+
+
 //-================================================
 //
 // States and Transitions
@@ -88,6 +125,13 @@
 	virtual TBool Accept();
 DECLARE_SMELEMENT_FOOTER( TAwaitingStart )
 
+DECLARE_SMELEMENT_HEADER( TAwaitingDestroy, MeshMachine::TState<TContext>, NetStateMachine::MState, DummyCPRStates::TContext )
+    virtual TBool Accept();
+DECLARE_SMELEMENT_FOOTER( TAwaitingDestroy )
+
+DECLARE_SMELEMENT_HEADER( TThreeSecDelayAndPostToSelf, MeshMachine::TStateTransition<TContext>, NetStateMachine::MStateTransition, DummyCPRStates::TContext )
+    virtual void DoL();
+DECLARE_SMELEMENT_FOOTER( TThreeSecDelayAndPostToSelf )
 
 } // namespace DummyCPRStates