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