datacommsserver/esockserver/ssock/ss_nodemessages_legacy.cpp
changeset 4 928ed51ddc43
parent 0 dfb7c4ff071f
child 14 4ccf8e394726
equal deleted inserted replaced
3:b6139031a239 4:928ed51ddc43
   120     	{
   120     	{
   121 		aContext.Activity()->PostRequestTo(*rcpt, *this);
   121 		aContext.Activity()->PostRequestTo(*rcpt, *this);
   122     	}
   122     	}
   123 	else
   123 	else
   124 		{
   124 		{
   125 		User::Leave(KErrNotFound);
   125 		User::Leave(KErrNotReady);
   126 		}
   126 		}
   127 
   127 
   128 	}
   128 	}
   129 
   129 
   130 EXPORT_C TInt TCFSigLegacyRMessage2PlatsecExt::SecureId(TSecureId& aResult) const
   130 EXPORT_C TInt TCFSigLegacyRMessage2PlatsecExt::SecureId(TSecureId& aResult) const
   306 
   306 
   307 TInt TCprRetrieveProgress::CheckError(MeshMachine::TNodeContextBase& aContext, TInt aError)
   307 TInt TCprRetrieveProgress::CheckError(MeshMachine::TNodeContextBase& aContext, TInt aError)
   308 	{
   308 	{
   309 	CConnection* conn = static_cast<CConnection*>(&aContext.Node());
   309 	CConnection* conn = static_cast<CConnection*>(&aContext.Node());
   310     ConnActivities::CConnLegacyRMessage2Activity* act = static_cast<ConnActivities::CConnLegacyRMessage2Activity*>(aContext.Activity());
   310     ConnActivities::CConnLegacyRMessage2Activity* act = static_cast<ConnActivities::CConnLegacyRMessage2Activity*>(aContext.Activity());
   311     if (aError == KErrNotFound)
   311     if (aError == KErrNotReady)
   312         {
   312         {
   313         TPckgBuf<TStateChange> progressBuf;
   313         TPckgBuf<TStateChange> progressBuf;
   314 		progressBuf().iStage = conn->iLastProgress.iStage;
   314 		progressBuf().iStage = conn->iLastProgress.iStage;
   315 		progressBuf().iError = conn->iLastProgress.iError;
   315 		progressBuf().iError = conn->iLastProgress.iError;
   316 
   316 
   370 
   370 
   371 TInt TCprRetrieveLastProgressError::CheckError(MeshMachine::TNodeContextBase& aContext, TInt aError)
   371 TInt TCprRetrieveLastProgressError::CheckError(MeshMachine::TNodeContextBase& aContext, TInt aError)
   372 	{
   372 	{
   373 	CConnection* conn = static_cast<CConnection*>(&aContext.Node());
   373 	CConnection* conn = static_cast<CConnection*>(&aContext.Node());
   374     ConnActivities::CConnLegacyRMessage2Activity* act = static_cast<ConnActivities::CConnLegacyRMessage2Activity*>(aContext.Activity());
   374     ConnActivities::CConnLegacyRMessage2Activity* act = static_cast<ConnActivities::CConnLegacyRMessage2Activity*>(aContext.Activity());
   375     if (aError == KErrNotFound)
   375     if (aError == KErrNotReady)
   376         {
   376         {
   377         TPckgBuf<TStateChange> progressBuf;
   377         TPckgBuf<TStateChange> progressBuf;
   378 		progressBuf().iStage = conn->iLastProgressError.iStage;
   378 		progressBuf().iStage = conn->iLastProgressError.iStage;
   379 		progressBuf().iError = conn->iLastProgressError.iError;
   379 		progressBuf().iError = conn->iLastProgressError.iError;
   380 		conn->ResetLastProgressError();
   380 		conn->ResetLastProgressError();
   644 void TLegacyDataMonitoringTransferredRequest::Cancel(MeshMachine::TNodeContextBase& /*aContext*/)
   644 void TLegacyDataMonitoringTransferredRequest::Cancel(MeshMachine::TNodeContextBase& /*aContext*/)
   645 	{
   645 	{
   646 	// do nothing, a DataMonitoringTransferedRequest cannot be cancelled as the response is immediate
   646 	// do nothing, a DataMonitoringTransferedRequest cannot be cancelled as the response is immediate
   647 	}
   647 	}
   648 
   648 
   649 TInt TLegacyDataMonitoringTransferredRequest::CheckError(MeshMachine::TNodeContextBase& /*aContext*/, TInt aError)
       
   650 	{
       
   651 	if (aError == KErrNotFound)
       
   652 		{
       
   653 		return KErrNotReady;
       
   654 		}
       
   655 	return aError;
       
   656 	}
       
   657 
       
   658 /**
   649 /**
   659 Return ETrue if the node has a Service Provider, else EFalse.
   650 Return ETrue if the node has a Service Provider, else EFalse.
   660 
   651 
   661 Code copied from TCFItfExt::ForwardMessageLTCFItfExt::ForwardMessageL().
   652 Code copied from TCFItfExt::ForwardMessageLTCFItfExt::ForwardMessageL().
   662 */
   653 */
   775 		case EReceived:
   766 		case EReceived:
   776 			dataMonItf.CancelDataReceivedNotificationRequest(iClientId);
   767 			dataMonItf.CancelDataReceivedNotificationRequest(iClientId);
   777 			break;
   768 			break;
   778     		}
   769     		}
   779     	}
   770     	}
   780 	}
       
   781 
       
   782 TInt TLegacyDataMonitoringNotificationRequest::CheckError(MeshMachine::TNodeContextBase& /*aContext*/, TInt aError)
       
   783 	{
       
   784 	return aError;
       
   785 	}
   771 	}
   786 
   772 
   787 /**
   773 /**
   788  *
   774  *
   789  * TLegacyEnumerateSubConnections
   775  * TLegacyEnumerateSubConnections
   888 			// The option level/name wasn't supported on this node
   874 			// The option level/name wasn't supported on this node
   889 			// Continue forwarding down until we find an interface that does support
   875 			// Continue forwarding down until we find an interface that does support
   890 			// it or we hit the bottom
   876 			// it or we hit the bottom
   891 			TRAP(ret, ForwardRequestL(aContext));
   877 			TRAP(ret, ForwardRequestL(aContext));
   892 			
   878 			
   893 			if(ret == KErrNotFound)
   879 			if(ret == KErrNotReady)
   894 				{
   880 				{
   895 				// We've reached the bottom of the stack and control call was never serviced
   881 				// We've reached the bottom of the stack and control call was never serviced
   896 				User::Leave(KErrNotSupported);
   882 				User::Leave(KErrNotSupported);
   897 				}
   883 				}
   898 			break;
   884 			break;