Tt_status ttdt_Save( Tt_message context, const char * pathname, Tt_scope the_scope, XtAppContext app2run, int ms_timeout );
The ttdt_Save() function requests a ToolTalk client to save a file. It sends a Save request in the_scope and waits for a reply. The Save request asks the handling ToolTalk client to discard any changes pending on pathname.
If the context parameter is a value other than zero, messages created by this routine inherit all contexts whose slot name begins with ENV_.
If the value of the the_scope parameter is zero (that is, TT_SCOPE_NONE), the file scope is set to the default (TT_BOTH); however, if, for example, the ToolTalk database server rpc.ttdbserver is not installed on the file server that owns pathname, the file scope is set to TT_FILE_IN_SESSION.
The app2run and ms_timeout parameters are passed to the tttk_block_while() function to block on the reply to the Save request sent by this function.
If the request receives an affirmative reply within the indicated timeout, the ttdt_Save() 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-14 .
Table A-14 Possible Returns of the ttdt_Save function
Error Returned |
Description |
---|---|
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. |
|
The process identifier specified is out of date or invalid. |
|
There is not enough memory available to perform the operation. |
|
The ToolTalk service has received the maximum amount of active messages (2000) it can properly handle. |
|
The ToolTalk service could not access the ToolTalk database needed for this operation. |
|
The ToolTalk service did not find the specified ToolTalk database in the expected place. |
|
No reply was received before the allotted timeout. |
|
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. |
|
Path name was null, or was a ToolTalk error pointer. |