Tt_message ( *Ttdt_file_cb) ( Tt_message msg, Tttk_op op, char * pathname, void * clientdata, int same_euid_egid, int same_procid ); Tt_pattern * ttdt_file_join( const char * pathname, Tt_scope the_scope, int join, Ttdt_file_cb cb, void * clientdata );
The ttdt_file_join() function registers to observe ToolTalk events on the specified file. It registers in the scope to observe Deleted, Modified, Reverted, Moved, and Saved notices.
The callback message argument Ttdt_file_cb takes the parameters listed in Table A-5.
Table A-5 Parameters taken by Ttdt_file_cb
If the value of 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 ttdt_file_join() function associates the value of the_scope and a copy of pathname with the Tt_patterns returned to allow the ttdt_file_quit() function to access the patterns. The caller can modify or free pathname after the ttdt_file_join() call returns.
If the value of the join parameter is true, this function calls
tt_file_join( pathname )
This function returns a null-terminated array of Tt_pattern. Use the ttdt_file_quit() function to destroy the array. If an error is returned, the returned array is an error pointer that can be decoded with tt_ptr_error. Table A-6 is a list of the possible errors returned by the ttdt_file_join() function.
Table A-6 Possible Errors Returned by ttdt_file_join
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 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 ToolTalk service was not able to read a directory in the specified file path name. |
|
There is not enough memory available to perform the operation. |