datacommsserver/esockserver/test/providers/dummy/inc/dummypr_metaconnprov.h
branchRCL_3
changeset 13 0b0e9fce0b58
parent 2 dee179edb159
child 18 9644881fedd0
equal deleted inserted replaced
12:8b5d60ce1e94 13:0b0e9fce0b58
    24 #define SYMBIAN_DUMMYPR_METACONNPROV_H
    24 #define SYMBIAN_DUMMYPR_METACONNPROV_H
    25 
    25 
    26 #include <comms-infras/ss_coreprstates.h>
    26 #include <comms-infras/ss_coreprstates.h>
    27 #include <comms-infras/mobilitymcpr.h>
    27 #include <comms-infras/mobilitymcpr.h>
    28 
    28 
    29 class CMCPrPubSubSubscriber;
    29 class CMCPrPubSubAvailability;
       
    30 class CMCPrPubSubStopTrigger;
    30 
    31 
    31 struct TCprConfigModifier
    32 struct TCprConfigModifier
    32 	{
    33 	{
    33 	enum 
    34 	enum
    34 	/*
    35 	/*
    35 	Bits on the CprConfig.
    36 	Bits on the CprConfig.
    36 	This is a very naive way of instructing the dummy providers to respond to
    37 	This is a very naive way of instructing the dummy providers to respond to
    37 	various scenarios in a varying way. This needs to be retought when migrating away
    38 	various scenarios in a varying way. This needs to be retought when migrating away
    38 	from NS.
    39 	from NS.
    41 		EDontStart = 0,					  //when lit on CprConfig, the CPR will fail to start
    42 		EDontStart = 0,					  //when lit on CprConfig, the CPR will fail to start
    42 		ESCPRHangOnRebind = 1,			  //when lit on CprConfig, the SCPR will hang on rebind
    43 		ESCPRHangOnRebind = 1,			  //when lit on CprConfig, the SCPR will hang on rebind
    43 		ESCPRHangOnStart  = 2,			  //when lit on CprConfig, the SCPR will hang on start
    44 		ESCPRHangOnStart  = 2,			  //when lit on CprConfig, the SCPR will hang on start
    44 		ESCPRFailOnRebind = 3,            //when lit on CprConfig, the SCPR will fail on rebind
    45 		ESCPRFailOnRebind = 3,            //when lit on CprConfig, the SCPR will fail on rebind
    45 		};
    46 		};
    46 	
    47 
    47 	static TBool Is(TInt aValue, TInt aFlags) 
    48 	static TBool Is(TInt aValue, TInt aFlags)
    48 	    {
    49 	    {
    49 	    aFlags = (1 << aFlags);
    50 	    aFlags = (1 << aFlags);
    50 	    return aValue & aFlags; 
    51 	    return aValue & aFlags;
    51 	    }
    52 	    }
    52 	};
    53 	};
    53 
    54 
    54 class CDummyMetaConnectionProvider : public CMobilityMetaConnectionProvider
    55 class CDummyMetaConnectionProvider : public CMobilityMetaConnectionProvider
    55     {
    56     {
    63                                  const MeshMachine::TNodeActivityMap& aActivityMap);
    64                                  const MeshMachine::TNodeActivityMap& aActivityMap);
    64 
    65 
    65 	virtual ~CDummyMetaConnectionProvider();
    66 	virtual ~CDummyMetaConnectionProvider();
    66 	virtual void ReceivedL(const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage);
    67 	virtual void ReceivedL(const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage);
    67 	virtual void ConstructL();
    68 	virtual void ConstructL();
    68 	
    69 
    69 	virtual void StartAvailabilityMonitoringL(const Messages::TNodeCtxId& aAvailabilityActivity); //Default implementation, usually empty on the mid-tier MCprs
    70 	virtual void StartAvailabilityMonitoringL(const Messages::TNodeCtxId& aAvailabilityActivity); //Default implementation, usually empty on the mid-tier MCprs
    70     virtual void CancelAvailabilityMonitoring(); //Default implementation, usually empty on the mid-tier MCprs
    71     virtual void CancelAvailabilityMonitoring(); //Default implementation, usually empty on the mid-tier MCprs
    71     
    72 
    72     CMCPrPubSubSubscriber* iPubSubSubscriber;    
    73     CMCPrPubSubAvailability* iPubSubAvailability;
       
    74     CMCPrPubSubStopTrigger* iPubSubStopTrigger;
    73     };
    75     };
    74 
    76 
    75 namespace DummyMCPRStates
    77 namespace DummyMCPRStates
    76 {
    78 {
    77 typedef MeshMachine::TNodeContext<CDummyMetaConnectionProvider,PRStates::TContext> TContext;
    79 typedef MeshMachine::TNodeContext<CDummyMetaConnectionProvider,PRStates::TContext> TContext;