IBM Webcam 4J ユーザーズマニュアル

ページ / 98
C++ Function
C Function
Description
exit_child_init()
exit_child_init_c()
Use this function as the first line in a user exit
program to initialize communications between
Sterling Connect:Direct and the user exit program.
recv_exit_msg()
recv_exit_msg_c()
Used by both Sterling Connect:Direct and the user
exit program to receive a message from the other
Process. The receive exit messages wait for a
response from the other Process.
send_exit_file()
send_exit_file_c()
The user exit program uses this function when it
has opened a file for Sterling Connect:Direct. This
function uses underlying UNIX methods to pass
an open file descriptor. from one Process to
another.
send_exit_msg()
send_exit_msg_c()
Both Sterling Connect:Direct and the user exit
program use this function to send a message to
the other Process. Send messages are followed
with a receive message to get the response from
the other Process.
Initializing Communications with exit_child_init() or
exit_child_init_c()
Use the exit_child_init() or exit_child_init_c() function as the first line of code of
the user exit program to initialize communications. This function performs a check
to verify that each side is ready to communicate. Following is the format of the
exit_child_init()
function:
int exit_child_init( char * logfile )
The exit_child_init() or exit_child_init_c() function has the following parameter:
Parameter
Description
Value
logfile
The name of the log or trace file that is opened for
use by the user exit programs. Because the file open
and security exit are started by SMGR, which is
running as root, the exits also run as root. Running
the exits as root can cause problems with file
permissions of the log file, so logfile enables you to
easily change owner or permissions on the file. See
the sample exit in d_dir/ndm/src/exit_skeleton.c
for more details.
Name of log file or
trace file
The exit_child_init() or exit_child_init_c() function have the following return
codes. Return codes for the function are defined in ndmapi.h.
Return Code
Description
GOOD_RC
Communications between Sterling
Connect:Direct and the user exit program
were successfully initialized.
ERROR_RC
Communications between Sterling
Connect:Direct and the user exit program
could not be initialized.
76
Sterling Connect:Direct for UNIX: User Guide