Common Desktop Environment: ToolTalk Messaging Overview


Tt_message					  ttdt_file_request(
			Tt_message			  context,
			Tttk_op			     op,
			Tt_scope			     scope,
 		const char         pathname,
			Ttdt_file_cb	     cb,
 		void               client_data,
 		int			        send_and_destroy

The ttdt_file_request() function creates, and optionally sends, any standard Desktop file-scoped request (such as Get_Modified, Save, and Revert).

Note -

This function is a lower-level interface than the ttdt_Get_Modified(), ttdt_Save(), and ttdt_Revert() functions, which create and send the request and then block on its reply.

The ttdt_file_request() function creates a request with the specified op and scope, and sets its file attribute to pathname. Per Desktop messaging conventions, an unset Tt_mode argument of TT_IN and the vtype File is added to the request; and if the specified operation is ttdt_Get_Modified(), an unset Tt_mode argument of TT_OUT and the vtype Boolean is also added to the request.

If context is not zero, the request created by this routine inherits from context all contexts whose slot name are prefixed with ENV_.

This function installs cb as a message callback for the created request, and ensures that client data will be passed into the callback. If send is true, this function sends the request before returning the handle to it.

This function returns the created Tt_message when successful. If an error occurs, an error pointer is returned. Use tt_ptr_error to find out the Tt_status. Table A-9 lists the possible errors returned by this function.

Table A-9 Possible Errors Returned by ttdt_file_request

Error Returned 



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 available memory 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. 


The path name was null or otherwise invalid.