lowlevellibsandfws/apputils/src/Baksrv.cpp
branchRCL_3
changeset 57 2efc27d87e1c
parent 56 acd3cd4aaceb
equal deleted inserted replaced
56:acd3cd4aaceb 57:2efc27d87e1c
  1025 EXPORT_C void CBaServBackupSession::ServiceL(const RMessage2& aMessage)
  1025 EXPORT_C void CBaServBackupSession::ServiceL(const RMessage2& aMessage)
  1026 	{
  1026 	{
  1027 	
  1027 	
  1028 	TCompletionType completionType = ECompleteSync;
  1028 	TCompletionType completionType = ECompleteSync;
  1029 	
  1029 	
  1030 	BSUL::CClientMessage* clientMessage = 0;
  1030 	iClientMessage = BSUL::CClientMessage::NewL(aMessage);
  1031 	clientMessage = BSUL::CClientMessage::NewL(aMessage);
       
  1032 	
  1031 	
  1033 	//Push iClientMessage onto the cleanupstack. Although an instance variable, 
  1032 	//Push iClientMessage onto the cleanupstack. Although an instance variable, 
  1034 	//the lifetime of the object is contained to this function so it needs to
  1033 	//the lifetime of the object is contained to this function so it needs to
  1035 	//be pushed and popped here as it is not deleted in the destructor
  1034 	//be pushed and popped here as it is not deleted in the destructor
  1036 	CleanupStack::PushL(clientMessage);
  1035 	CleanupStack::PushL(iClientMessage);
  1037 	
  1036 	
  1038 	//Validate the message
  1037 	//Validate the message
  1039 	TRAPD(error, clientMessage->ValidateL());
  1038 	TRAPD(error, iClientMessage->ValidateL());
  1040 	
  1039 		
  1041 	iClientMessage = clientMessage;
       
  1042 	
       
  1043 	if(error == KErrNone)	
  1040 	if(error == KErrNone)	
  1044 		{
  1041 		{
  1045 		TRAP(error, DoServiceL(completionType));
  1042 		TRAP(error, DoServiceL(completionType));
  1046 		}
  1043 		}
  1047 	
  1044 	
  1056 			iClientMessage->CompleteRequestL(error);
  1053 			iClientMessage->CompleteRequestL(error);
  1057 			}
  1054 			}
  1058 		}
  1055 		}
  1059 	
  1056 	
  1060 	//Pop and destroy message
  1057 	//Pop and destroy message
  1061 	CleanupStack::PopAndDestroy(clientMessage);
  1058 	CleanupStack::PopAndDestroy(iClientMessage);
  1062 	clientMessage = NULL;
       
  1063 	iClientMessage = NULL;
  1059 	iClientMessage = NULL;
  1064 	}
  1060 	}
  1065 
  1061 
  1066 void CBaServBackupSession::HandleEventReadyL()
  1062 void CBaServBackupSession::HandleEventReadyL()
  1067 	{
  1063 	{