windowing/windowserver/nga/SERVER/openwfc/CLIENT.CPP
branchNewGraphicsArchitecture
changeset 27 525ea837ea6b
parent 13 1cb83e7796ad
parent 19 ac96196b945c
child 37 31d52bbe209c
equal deleted inserted replaced
24:61720828305f 27:525ea837ea6b
     1 // Copyright (c) 1994-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 1994-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
  1842 	SetClientPriority();
  1842 	SetClientPriority();
  1843 	}
  1843 	}
  1844 
  1844 
  1845 void CWsClient::CompleteMessage(const RMessage2& aMessage,TInt aReason)
  1845 void CWsClient::CompleteMessage(const RMessage2& aMessage,TInt aReason)
  1846 	{
  1846 	{
  1847 	WS_ASSERT_DEBUG(!aMessage.IsNull(),EWsPanicPanicFlagError);
  1847 	WS_ASSERT_DEBUG(!aMessage.IsNull(),EWsPanicCompleteNullMessage);
  1848 	if (iInternalFlags&EPanicClientAsSoonAsPossible)
  1848 	// This defensive check should not be necessary as aMessage should never
  1849 		{
  1849 	// be null, but in rare situations it is and WServ would die without this check.
  1850 		aMessage.Panic(KWSERVSessionPanicCategory,iPanicReason);
  1850 	if (!aMessage.IsNull())
  1851 		iInternalFlags&=~EPanicClientAsSoonAsPossible;
  1851 		{
  1852 		}
  1852 		if (iInternalFlags&EPanicClientAsSoonAsPossible)
  1853 	else
  1853 			{
  1854 		{
  1854 			aMessage.Panic(KWSERVSessionPanicCategory,iPanicReason);
  1855 		if(!iResponseHandle)
  1855 			iInternalFlags&=~EPanicClientAsSoonAsPossible;
  1856 			aMessage.Complete(aReason);
  1856 			}
  1857 		else
  1857 		else
  1858 			{
  1858 			{
  1859 			aMessage.Complete(*iResponseHandle);
  1859 			if(!iResponseHandle)
  1860 			iResponseHandle=NULL;
  1860 				aMessage.Complete(aReason);
  1861 			}
  1861 			else
  1862 		}
  1862 				{
  1863 	}
  1863 				aMessage.Complete(*iResponseHandle);
       
  1864 				iResponseHandle=NULL;
       
  1865 				}
       
  1866 			}
       
  1867 		}
       
  1868     }
  1864 
  1869 
  1865 void CWsClient::ServiceError(const RMessage2& /*aMessage*/,TInt aError)
  1870 void CWsClient::ServiceError(const RMessage2& /*aMessage*/,TInt aError)
  1866 	{
  1871 	{
  1867 	CompleteMessage(iClientMessage,aError);	// (finish)
  1872 	CompleteMessage(iClientMessage,aError);	// (finish)
  1868 	}
  1873 	}