Common Desktop Environment: ToolTalk Messaging Overview

ttdt_file_event

Tt_status    ttdt_file_event(	Tt_message   		 context,
 								Tttk_op        event,
  								Tt_pattern *   patterns,
  								int            send );

The ttdt_file_event() function uses the ToolTalk service to announce an event about a file. This function creates and, optionally, sends a ToolTalk notice that announces an event pertaining to a specified file. This file is indicated in the path name that was passed to the ttdt_file_join() function when the patterns were created.

Table A-3 Effect of event Parameter

Event Announced 

Announcement 

TTDT_MODIFIED

Registers in the scope passed to the ttdt_file_join() function to announce the event to interested tools that handle Get_Modified, Save, and Revert requests.

TTDT_SAVED, TTDT_REVERTED

Unregisters handler patterns for Get_Modified, Save, and Revert requests. 

If the send parameter is set, this function sends a Saved or Reverted notice, respectively, in the scope.

Table A-4 lists the possible errors that can be returned by this function.

Table A-4 Possible Errors Returned by ttdt_file_event

Error Returned 

Description 

TT_DESKTOP_EINVAL

The event notice was invalid. Valid event notices are TTDT_MODIFIED, TTD_TSAVED, and TTDT_REVERTED.

TT_ERR_POINTER

The patterns parameter was null.

TT_ERR_OVERFLOW

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

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.