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