windowing/windowserver/nga/SERVER/openwfc/CLIENT.CPP
branchNewGraphicsArchitecture
changeset 37 31d52bbe209c
parent 27 525ea837ea6b
parent 33 25f95128741d
equal deleted inserted replaced
35:3aa07f06a4b7 37:31d52bbe209c
    49 TInt CWsClient::iReply;
    49 TInt CWsClient::iReply;
    50 TInt CWsClient::iReplyOffset;
    50 TInt CWsClient::iReplyOffset;
    51 CWsClient* CWsClient::iCurrentClient;
    51 CWsClient* CWsClient::iCurrentClient;
    52 CWsObject* CWsClient::iDestObj;
    52 CWsObject* CWsClient::iDestObj;
    53 const TUint8* CWsClient::iNextCmd;
    53 const TUint8* CWsClient::iNextCmd;
    54 CIdle* CWsClient::iMoreCommands=NULL;
       
    55 
    54 
    56 TUint CWsClient::iConnectionId = CDebugLogBase::EDummyConnectionId+1;
    55 TUint CWsClient::iConnectionId = CDebugLogBase::EDummyConnectionId+1;
    57 CArrayFixFlat<CWsClient::TWsCursorArrayItem>* CWsClient::iSystemPointerCursors = NULL;
    56 CArrayFixFlat<CWsClient::TWsCursorArrayItem>* CWsClient::iSystemPointerCursors = NULL;
    58 TInt CWsClient::iDefaultSystemPointerCursorIndex = 0;		//Negative when there isn't one
    57 TInt CWsClient::iDefaultSystemPointerCursorIndex = 0;		//Negative when there isn't one
    59 CWsPointerCursor* CWsClient::iDefaultSystemPointerCursor;
    58 CWsPointerCursor* CWsClient::iDefaultSystemPointerCursor;
   547 			wsDebugLog->Command(iDestObj->Type(), opcode, cmdParams, iDestObj->LogHandle());
   546 			wsDebugLog->Command(iDestObj->Type(), opcode, cmdParams, iDestObj->LogHandle());
   548 		
   547 		
   549 		// Dispatch the command to the WServ object that will process it
   548 		// Dispatch the command to the WServ object that will process it
   550 		iDestObj->CommandL(opcode, cmdParams);	// (call #5)
   549 		iDestObj->CommandL(opcode, cmdParams);	// (call #5)
   551 		} 
   550 		} 
   552 	while(iNextCmd<endCmd && !TWindowServerEvent::EventReceiver()->IsReadyToRun());
   551 	while(iNextCmd<endCmd);
   553 	
   552 	
   554 	}
   553 	}
   555 
   554 
   556 void CWsClient::DoServiceCommandBuf() // (step #3.1)
   555 void CWsClient::DoServiceCommandBuf() // (step #3.1)
   557 	{
   556 	{
   567 	if (err<KErrNone)
   566 	if (err<KErrNone)
   568 		SetReply(err);
   567 		SetReply(err);
   569 
   568 
   570 	if (iInternalFlags&(EFinishedProcessingCommands|EPanicClientAsSoonAsPossible))
   569 	if (iInternalFlags&(EFinishedProcessingCommands|EPanicClientAsSoonAsPossible))
   571 		CompleteMessage(iClientMessage,iReply);	// (finish)
   570 		CompleteMessage(iClientMessage,iReply);	// (finish)
   572 	else
       
   573 		iMoreCommands->Start(TCallBack(CWsClient::DoContinueDeferredServiceOfCommandBuf,this));	// (call #3.1.1)
       
   574 	
   571 	
   575 	iCurrentClient=NULL;
   572 	iCurrentClient=NULL;
   576 #if defined(_DEBUG)
   573 #if defined(_DEBUG)
   577 	User::Heap().Check();
   574 	User::Heap().Check();
   578 #endif
   575 #endif
   579 	}
   576 	}
   580 
       
   581 TInt CWsClient::DoContinueDeferredServiceOfCommandBuf(TAny* aClient)	// (step #3.1.1)
       
   582 	{
       
   583 	static_cast<CWsClient*>(aClient)->DoServiceCommandBuf();	// (call #3.1)
       
   584 	return KErrNone;
       
   585 	}
       
   586 
       
   587 
   577 
   588 void CWsClient::ExecuteAsyncClientCommandL(TInt aOpcode, const RMessage2& aMessage)	// (step #3.2)
   578 void CWsClient::ExecuteAsyncClientCommandL(TInt aOpcode, const RMessage2& aMessage)	// (step #3.2)
   589 	{
   579 	{
   590 	switch(aOpcode)
   580 	switch(aOpcode)
   591 		{
   581 		{
  1995 	iClientMessage.ReadL(KRemoteBufferMessageSlot,aDes,aOffset);
  1985 	iClientMessage.ReadL(KRemoteBufferMessageSlot,aDes,aOffset);
  1996 	}
  1986 	}
  1997 
  1987 
  1998 void CWsClient::InitStaticsL()
  1988 void CWsClient::InitStaticsL()
  1999 	{
  1989 	{
  2000 	iMoreCommands=CIdle::NewL(EClientBufferPriority);
       
  2001 	}
  1990 	}
  2002 
  1991 
  2003 void CWsClient::DeleteStatics()
  1992 void CWsClient::DeleteStatics()
  2004 	{
  1993 	{
  2005 	if (iTextCursorArray)
  1994 	if (iTextCursorArray)
  2010 
  1999 
  2011 		delete iTextCursorArray;
  2000 		delete iTextCursorArray;
  2012 		iTextCursorArray = NULL;
  2001 		iTextCursorArray = NULL;
  2013 		}
  2002 		}
  2014 
  2003 
  2015 	delete iMoreCommands;
       
  2016 	iMoreCommands=NULL;
       
  2017 	// coverity[extend_simple_error] 
  2004 	// coverity[extend_simple_error] 
  2018 	}
  2005 	}
  2019 		
  2006 		
  2020 /* CWsClient implementing MWsClient */
  2007 /* CWsClient implementing MWsClient */
  2021 
  2008