Common Desktop Environment: ToolTalk Messaging Overview

ttdt_Revert

Tt_status    ttdt_Revert(	Tt_message    	  context,
  						const char *    pathname,
  						Tt_scope       the_scope, 
							XtAppContext	   app2run,
   					int             ms_timeout
);

The ttdt_Revert() function requests a ToolTalk client to revert a file. It sends a Revert request in the_scope and waits for a reply. The Revert request asks the handling ToolTalk client to discard any changes pending on pathname.

If the request receives an affirmative reply within the indicated timeout, the ttdt_Revert() function returns TT_OK; otherwise, it returns either the tt_message_status of the failure reply, or one of the errors listed in Table A-13.

Table A-13 Possible Errors Returned by ttdt_Revert

Error Returned 

Description 

TT_ERR_NOMP

The ttsession process is not available. The ToolTalk service tries to restart ttsession if it is not running. This error indicates that the ToolTalk service is either not installed or not installed correctly. 

TT_ERR_PROCID

The process identifier specified is out of date or invalid. 

TT_ERR_NOMEM

There is not enough memory available to perform the operation. 

TT_ERR_OVERFLOW

The ToolTalk service has received the maximum amount of active messages (2000) it can properly handle. 

TT_ERR_DBAVAIL

The ToolTalk service could not access the ToolTalk database needed for this operation. 

TT_ERR_DBEXIST

The ToolTalk service did not find the specified ToolTalk database in the expected place. 

TT_DESKTOP_ETIMEOUT

No reply was received before the allotted timeout. 

TT_DESKTOP_EPROTO

The request was failed; however, the handler set the tt_message_status of the failure reply to TT_OK instead of a specific error status. 

TT_ERR_POINTER

Path name was null, or was a ToolTalk error pointer.