This chapter provides reference information for these components of the ToolTalk API:
The enumerated types and functions are listed in alphabetical order in each section.
Closes the current default process identifier (procid).
 | Note: tt_close() should be the last ToolTalk function the process calls.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_PROCID
|
|
Returns the current default file. Joining a file makes it the default file.
char * | |
Pointer to a character string specifying the current default file. If the pointer is NULL, no default is set. Use tt_ptr_error(), which returns Tt_status, to determine if the pointer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_PROCID
|
|
Tt_status | | tt_default_file_set(const char *docid)
|
Sets the default file to the specified file.
const char *docid | |
Pointer to a character string specifying the file you want as the default file.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_PROCID
TT_ERR_FILE
|
|
char | | *tt_default_procid(void)
|
Retrieves the current default process identifier (procid) for your process. The procid is used in the sender field of messages.
char * | |
Pointer to character string that uniquely identifies the current default process. Use tt_ptr_error(), which returns Tt_status, to determine if the pointer is valid.
Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_PROCID
|
|
Tt_status | | tt_default_procid_set(const char *procid)
|
Sets the current default procid. The default procid is set by tt_open(). Only processes that do multiple tt_open() calls and juggle multiple procids ever need to use this function.
const char *procid | |
Name of process you want to set up as the default process.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_PROCID
|
|
char | | *tt_default_ptype(void)
|
Retrieves the current default process type (ptype). Declaring a ptype makes it the default ptype. The default ptype is used in the sender ptype field of your message.
char * | |
Pointer to character string that uniquely identifies the current default process type. If the pointer is NULL, no default is set. Use tt_ptr_error(), which returns Tt_status, to determine if the pointer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_PROCID
|
|
Tt_status | | tt_default_ptype_set(const char *ptid)
|
Sets the default process type (ptype) to the provided string.
const char *ptid | |
Use the character string that uniquely identifies the process type you wish to set up as the default process type.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_PROCID
|
|
char | | *tt_default_session(void)
|
Retrieves the current default session identifier from the ToolTalk service for the current default procid.
char * | |
Pointer to the unique identifier for the current session. If the pointer is NULL, no default is set. Use tt_ptr_error(), which returns Tt_status, to determine if the pointer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_PROCID
|
|
Tt_status | | tt_default_session_set(const char *sessid)
|
Sets the current default session identifier for the current default procid.
 | Note: The ToolTalk service uses the initial user session as the default session and supports one session per procid. To join other sessions, your program must first set the new session as the default and then initialize and register. The calls required must be in this order: tt_default_session_set, tt_open, tt_fd
|
const char *sessid | |
Pointer to the unique identifier for the session in question.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_PROCID
TT_ERR_SESSION
|
|
int | | tt_error_int(Tt_status ttrc)
|
Given a Tt_status code, returns an integer error object encoding the code.
 | Note: The integer error objects are negative integers, so only use this when the valid integer values are non-negative.
|
Tt_status ttrc | |
Tt_status code you want to encode.
|
int | |
Encoded Tt_status code.
|
void | | *tt_error_pointer(Tt_status ttrc)
|
Given a Tt_status code, returns a pointer to an error object encoding the code.
Tt_status ttrc | |
Tt_status code you want to encode.
|
void * | |
Pointer to encoded Tt_status code.
|
Returns a file descriptor (fd) which is used to alert your program that a message has arrived for the default procid in the default session. File descriptors are either active or inactive. When your file descriptor becomes active, you need to call tt_message_receive.
 | Note: You must have a separate file descriptor for each procid. Each time you call tt_open, use tt_fd to get an associated file descriptor.
|
int | |
File descriptor for your current procid. Use tt_int_error(), which returns Tt_status, to determine if the integer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_PROCID
TT_ERR_SESSION
|
|
tt_open()
tt_message_receive()
|
Tt_status | | tt_file_copy(const char *oldfilepath, const char *newfilepath)
|
Copies all the objects on the specified file to the new file. Any objects already on the second file are not removed.
const char *oldfilepath | |
Pointer to the name of the file whose objects are to be copied.
|
const char *newfilepath | |
Pointer to the name of the file on which to create the copied objects.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_DBAVAIL
TT_ERR_DBEXIST
TT_ERR_FILE
TT_ERR_NOMP
TT_ERR_PATH
TT_ERR_POINTER
|
|
tt_file_move()
tt_file_destroy()
|
Tt_status | | tt_file_destroy(const char *filepath)
|
Removes all the objects on the files and directories rooted at filepath from the appropriate ToolTalk database. Call this function when you unlink a file or rmdir a directory.
const char *filepath | |
Pointer to the pathname of the file to be removed.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_ACCESS
TT_ERR_DBAVAIL
TT_ERR_DBEXIST
TT_ERR_FILE
TT_ERR_NOMP
TT_ERR_PATH
TT_ERR_POINTER
|
|
tt_file_copy()
tt_file_move()
rmdir(2)
unlink(2)
|
Tt_status | | tt_file_join(const char *filepath)
|
Informs the ToolTalk service that your process is interested in messages involving the file named by the provided string. The ToolTalk service adds this file value to any currently registered patterns with scope TT_FILE. The named file becomes the default file.
const char *filepath | |
Pointer to the pathname of the file to be joined.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_DBAVAIL
TT_ERR_DBEXIST
TT_ERR_NOMP
TT_ERR_PATH
|
|
Tt_status | | tt_file_move(const char *oldfilepath, const char *newfilepath)
|
Destroys all the objects on the files and directories rooted at the new filepath, and then moves all the objects on the first file to the second file.
If oldfilepath and newfilepath are in the same filesystem, then tt_file_move() replaces oldfilepath with newfilepath in the path associated with every object in that filesystem. That is, it picks up all the objects in the directory tree rooted at oldfilepath, and overlays them onto newfilepath. In this mode, tt_file_move() is like the system call rename(2).
If oldfilepath and newfilepath are on different file systems, neither may be a directory.
const char *oldfilepath | |
The name of the file or directory whose objects are to be moved.
|
const char *newfilepath | |
The name of the file or directory to which the objects are to be moved.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_ACCESS
TT_ERR_DBAVAIL
TT_ERR_DBEXIST
TT_ERR_FILE
TT_ERR_NOMP
TT_ERR_PATH
TT_ERR_POINTER
|
|
tt_file_copy()
tt_file_destroy()
rename(2)
|
Tt_status | | tt_file_objects_query(const char *filepath, Tt_filter_function filter, void *context, void *accumulator)
|
Instructs the ToolTalk service to find all the objects in the named file and pass back the objids to the filter function you created. The context pointer and accumulator pointer you initially specify will also be passed to your filter function.
As the ToolTalk service finds each object, it calls your filter function, passing the objid of the object and the two application-supplied pointers. Your filter function performs its computation, and returns a Tt_filter_action value to tell the query function whether to continue or to stop. Tt_filter action values are:
TT_FILTER_CONTINUE
TT_FILTER_STOP
|
const char *filepath | |
File name.
|
Tt_filter_function filter | |
Your filter function. Tt_filter_function is a typedef “Tt_filter_action (*) (char *objid, void *context, void *accumulator)”.
|
void *context | |
A pointer to any information your filter needs to execute. The ToolTalk service does not interpret this argument. It passes it straight through to your filter function.
|
void *accumulator | |
A pointer to a place for your filter to store the results of the query and filter operations. The ToolTalk service does not interpret this argument. It passes it straight through to your filter function.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_DBAVAIL
TT_ERR_DBEXIST
TT_ERR_NOMP
TT_ERR_PATH
TT_WRN_STOPPED
|
|
Tt_status | | tt_file_quit(const char *filepath)
|
Informs the ToolTalk service that your process is no longer interested in messages involving the file named by the provided string. The ToolTalk service removes this file value from any currently registered patterns with scope TT_FILE. The default file is nulled.
const char *filepath | |
File name.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_DBAVAIL
TT_ERR_DBEXIST
TT_ERR_PATH
|
|
Frees this storage from the ToolTalk API allocation stack.
You may find tt_free more convenient than using tt_mark and tt_release if your application is in a loop obtaining strings from the ToolTalk service and processing each in turn.
char | | *tt_initial_session(void)
|
Returns the session in which the process was created. This is either a process tree session or the X session associated with the display named in the DISPLAY environment variable.
char * | |
Identifier for the current ToolTalk session. Use tt_ptr_error(), which returns Tt_status, to determine if the pointer is valid. Possible Tt_status values are:
|
Tt_status | | tt_int_error(int return_val)
|
Given an integer, returns TT_OK if the integer is not an error object or the encoded Tt_status value if the integer is an error object.
int return_val | |
Integer returned by a ToolTalk function.
|
Tt_status | |
The status of the operation. Possible values are:
|
int | | tt_is_err(Tt_status s)
|
A macro that tells you if the Tt_status enum you provided is a warning or an error. tt_is_err() expands to (TT_WRN_LAST < (p)).
Tt_status s | |
The Tt_status code you want to check.
|
int | |
If you receive 1, the Tt_status enum is an error. If you receive 0, the Tt_status enum is either a warning or TT_OK.
|
caddr_t | | tt_malloc(size_t s)
|
Allocates storage on the ToolTalk API allocation stack.
This capability is provided so that your application-provided callback routines can take advantage of the allocation stack. For example, a query filter function might allocate storage to hold a result.
size_t s | |
The amount of storage you want in bytes.
|
caddr_t | |
Storage in the ToolTalk API allocation stack given to your application. If NULL is returned, no storage is available.
|
Marks a storage position in the ToolTalk API allocation stack. Your application typically does this at the beginning of a procedure.
int | |
Integer that marks your application`s storage position in the ToolTalk API allocation stack.
|
Tt_address | | tt_message_address(Tt_message m)
|
Retrieves the address attribute from the specified message.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
Tt_address | |
specifies which message attributes form the address of this message. Possible values are:
TT_PROCEDURE
TT_OBJECT
TT_HANDLER
TT_OTYPE
|
Use tt_int_error(), which returns Tt_status, to determine if the Tt_address integer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
Tt_status | | tt_message_address_set(Tt_message m,
Tt_address a)
|
Sets the address attribute for the specified message.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
Tt_address a | |
Specifies which message attributes form the address to which the message will be delivered. Possible values are:
TT_PROCEDURE
TT_OBJECT
TT_HANDLER
TT_OTYPE
|
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
Tt_status | | tt_message_arg_add(Tt_message m, Tt_mode n,
const char *vtype, const char *value)
|
Adds a new argument to a message object. Add all arguments before the message is sent.
 | Note: Do not add arguments to a reply. Only change existing argument values with modes of TT_OUT or TT_INOUT.
|
Tt_message m | |
Opaque handle for the message involved in this operation.
|
Tt_mode n | |
Specifies who (sender, handler, observers) writes and reads a message argument. Possible modes are:
|
const char *vtype | |
Describes the type of argument data being added. The vtype name is used by the message recipient to interpret data.
|
const char *value | |
Contents for the message argument attribute. Use NULL for values of mode TT_OUT, or if the value will be filled in later with tt_message_arg_val_set, tt_message_barg_val_set, or tt_message_iarg_val_set.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_MODE
TT_ERR_NOMP
TT_ERR_POINTER
|
|
tt_message_arg_val_set()
tt_message_barg_add()
tt_message_iarg_add()
|
Tt_status | | tt_message_arg_bval(Tt_message m, int n,
unsigned char **value, int *len)
|
Retrieves the value of the n-th message argument as a byte string.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
int n | |
Number of the argument you want to retrieve. The first argument is 0.
|
unsigned char **value | |
Address of a character pointer that the ToolTalk service should aim to a string containing the contents of the argument.
|
int *len | |
Address of an integer that the ToolTalk service should set to the length of the value in bytes.
|
Tt_status | |
The status of the operation. Possible values are:
TT_ERR_NOMP
TT_ERR_NUM
TT_ERR_POINTER
|
|
unsigned char **value | |
Address of a character pointer that the ToolTalk service aimed at a string containing the contents of the argument.
|
int *len | |
Address of an integer that the ToolTalk service set to the length of the value in bytes.
|
Tt_status | | tt_message_arg_bval_set(Tt_message m, int n,
const unsigned char *value, int len)
|
Sets the value and the type of the n-th message argument as a byte string. You (the sender) can use tt_message_arg_bval_set to fill in opaque data.
Also, changes the value of the n-th message argument to a byte string. Used by the handler before replying to the message.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
int n | |
Number of the argument you want to set. The first argument is 0.
|
const unsigned char *value | |
Byte string with the contents for the message argument.
|
int len | |
Length of the value in bytes.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_NUM
TT_ERR_POINTER
|
|
tt_message_barg_add()
tt_message_arg_val_set()
tt_message_iarg_val_set()
|
Tt_status | | tt_message_arg_ival(Tt_message m, int n,
int *value)
|
Retrieves the value of the n-th message argument as an integer.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
int n | |
Number of the argument you want to retrieve. The first argument is 0.
|
int *value | |
Pointer to an integer where the ToolTalk service should store the contents of the argument.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_NUM
TT_ERR_POINTER
|
|
int value | |
Value of the n-th argument.
|
Tt_status | | tt_message_arg_ival_set(Tt_message m, int n,
int value)
|
Fills in the n-th message argument with an integer value.
Also, changes the value of the n-th message argument to an integer.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
int n | |
Number of the argument you want to set. The first argument is 0.
|
int value | |
Contents (in integer form) for the message argument.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_NUM
TT_ERR_POINTER
|
|
tt_message_arg_ival_add()
tt_message_arg_val_set()
tt_message_barg_val_set()
|
Tt_mode | | tt_message_arg_mode(Tt_message m, int n)
|
Returns the mode of the n-th message argument.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
int n | |
Number of the argument in which you are interested. The first argument is 0.
|
Tt_mode | |
Specifies who (sender, handler, observers) writes and reads a message argument. Possible modes are:
Use tt_int_error(), which returns Tt_status, to determine if the Tt_mode integer is valid.
Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_NUM
TT_ERR_POINTER
|
|
char | | *tt_message_arg_type(Tt_message m, int n)
|
Retrieves the type of the n-th message argument.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
int n | |
Number of the argument in which you are interested. The first argument is 0.
|
char * | |
Type of the n-th message argument. Use tt_ptr_error(), which returns Tt_status, to determine if the pointer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_NUM
TT_ERR_POINTER
|
|
char | | *tt_message_arg_val(Tt_message m, int n)
|
Returns a pointer to the value (assuming it is a character string) of the n-th message argument.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
int n | |
Number of the argument in which you are interested. The first argument is 0.
|
char * | |
Contents for the message argument. Use tt_ptr_error(), which returns Tt_status, to determine if the pointer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_NUM
TT_ERR_POINTER
|
|
Tt_status | | tt_message_arg_val_set(Tt_message m, int n,
const char *value)
|
Changes the value of the n-th message argument. Generally used by the handler before replying to the message.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
int n | |
Number of the argument you want to change. The first argument is 0.
|
const char *value | |
Contents for the message argument.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_NUM
TT_ERR_POINTER
|
|
int | | tt_message_args_count(Tt_message m)
|
Returns the number of arguments in the message.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
int | |
Total number of arguments in the message. Use tt_int_error(), which returns Tt_status, to determine if the integer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
Tt_status | | tt_message_barg_add(Tt_message m, Tt_mode n,
const char *vtype, const unsigned char
*value, int len)
|
Adds an argument to a pattern that may have a value containing imbedded nulls.
 | Note: Do not add arguments to a reply. Only change existing argument values with modes of TT_OUT or TT_INOUT.
|
Tt_message m | |
Opaque handle for the message involved in this operation.
|
Tt_mode n | |
Specifies who (sender, handler, observers) writes and reads a message argument. Possible modes are:
|
const char *vtype | |
Describes the type of argument data being added. The vtype name is used by the message recipient to interpret data. The ToolTalk service treats the value as an opaque byte string. To pass structured data, your application and the receiving application must encode and decode these opaque byte strings. The most common way of doing this is to use XDR.
|
const unsigned char *value | |
Value that the ToolTalk service should fill in.
|
int len | |
Length of the value in bytes.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
tt_message_barg_val_set()
tt_message_arg_add()
tt_message_iarg_add()
|
Tt_status | | tt_message_callback_add(Tt_message m,
Tt_message_callback f)
|
Registers a callback function that will be automatically invoked by tt_message_receive whenever a reply or other state-change to this message is returned.
Tt_callback_action is an enum containing the values TT_CALLBACK_CONTINUE and TT_CALLBACK_PROCESSED. If the callback returns TT_CALLBACK_PROCESSED, no further callbacks will be invoked for this event, and the message will not be returned by tt_message_receive. If the callback returns TT_CALLBACK_CONTINUE, other callbacks will be run, and if no callback returns TT_CALLBACK_PROCESSED, tt_message_receive will return the message.
This behavior can be used to create wrappers for ToolTalk messages. A library routine can construct a request, attach a callback to the message, send the message, and process the reply in the callback. By having the callback return TT_CALLBACK_PROCESSED, the message reply will not be returned to the main program, so the message and reply are completely hidden. Note that these callbacks are invoked from tt_message_receive, so it's still necessary for programs to arrange for tt_message_receive to be called when the file descriptor returned by tt_fd becomes active.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
Tt_message_callback f | |
Tt_message_callback is a type definition for a pointer to a function declared like: Tt_callback_action func(Tt_message m, Tt_pattern p). The callback is passed the message in question and the pattern that matched it. The pattern handle will be null if the message didn't match a dynamic pattern (this is usually the case for message callbacks.)
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
Tt_class | | tt_message_class(Tt_message m)
|
Retrieves the class attribute from the specified message.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
Tt_class | |
Indicates whether or not the sender wanted an action to take place after the message is received. Possible values are:
Use tt_int_error(), which returns Tt_status, to determine if the Tt_class integer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
Tt_status | | tt_message_class_set(Tt_message m,
Tt_class c)
|
Sets the class attribute for the specified message.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
Tt_class c | |
Indicates whether or not you want an action to take place after the message is received. Possible values are:
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
Tt_message | | tt_message_create(void)
|
Creates a new message object. The ToolTalk service returns a message handle that's really an opaque pointer to a ToolTalk structure. You do not manipulate the structure directly.
Tt_message | |
The unique opaque handle that identifies your message object. If ToolTalk is unable to create a message when requested, an invalid handle will be returned to you. When you attempt to use this handle, the ToolTalk service will report an error. Use tt_pointer_error to determine why the ToolTalk service was not able to create the message. Use tt_ptr_error(), which returns Tt_status, to determine if the pointer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_NUM
TT_ERR_POINTER
|
|
tt_message_send()
tt_message_destroy()
|
Tt_message | | tt_message_create_super(Tt_message m)
|
Re-addresses the specified message to the parent otype of the otype or object listed in the message. Returns the re-addressed message so you can fill in additional message attributes and send the message.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
Tt_message | |
Opaque unique handle for the re-addressed message. Use tt_ptr_error(), which returns Tt_status, to determine if the pointer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_ADDRESS
TT_ERR_NOMP
TT_ERR_OBJID
TT_ERR_OTYPE
TT_ERR_POINTER
|
|
tt_message_send()
tt_message_destroy()
|
Tt_status | | tt_message_destroy(Tt_message m)
|
Destroys the message. Destroying a message has no effect on the delivery of a message you have already sent.
If you sent a request and are expecting a reply with return values, destroy a message after you have received the reply. If you sent a notice, you can destroy the message after you send it.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
tt_message_create()
tt_message_create_super()
|
Tt_disposition | | tt_message_disposition(Tt_message m)
|
Retrieves the disposition attribute from the specified message.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
Tt_disposition | |
Indicates whether the receiver should be started to receive the message or if the message should be queued until the receiving process is started at a later time. Possible values are:
TT_QUEUE
TT_START
TT_QUEUE+TT_START
|
Use tt_int_error(), which returns Tt_status, to determine if the Tt_disposition integer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
tt_message_disposition_set
Tt_status | | tt_message_disposition_set(Tt_message m,
Tt_disposition r)
|
Sets the disposition attribute for the specified message.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
Tt_disposition r | |
Indicates whether the receiver should be started to receive the message or if the message should be queued until the receiving process is started at a later time. Possible values are:
TT_QUEUE
TT_START
TT_QUEUE+TT_START
|
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
Tt_status | | tt_message_fail(Tt_message m)
|
Informs the ToolTalk service that your process can not handle the request you just received and that the message should not be offered to other processes of the same ptype as yours. The ToolTalk service will send the message back to the sender with state TT_FAILED.
To help the requestor distinguish this case from the case where a message failed because no matching handler could be found, place an explanatory message code in the status attribute of the message with tt_message_status_set and tt_message_status_string_set before calling tt_message_fail.
 | Note: The status value must be greater than 2047 (TT_ERR_LAST) to avoid confusion with the ToolTalk service status values.
|
Tt_message m | |
Opaque handle for the message involved in this operation.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_NOTHANDLER
TT_ERR_POINTER
|
|
tt_message_status_set()
tt_message_status_string_set()
|
char | | *tt_message_file(Tt_message m)
|
Retrieves the file attribute from the specified message.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
char * | |
File attribute of the specified message. Use tt_ptr_error(), which returns Tt_status, to determine if the pointer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
Tt_status | | tt_message_file_set(Tt_message m,
const char *file)
|
Sets the file attribute for the specified message.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_FILE
TT_ERR_NOMP
TT_ERR_POINTER
|
|
gid_t | | tt_message_gid(Tt_message m)
|
Retrieves the group ID attribute from the specified message.
The ToolTalk service automatically sets the group ID of a message with the group ID of the process that created the message.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
gid_t | |
The group ID of the message. If the “nobody” group is returned, the message handle is not valid.
|
char | | *tt_message_handler(Tt_message m)
|
Retrieves the handler attribute from the specified message.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
char * | |
Character value that uniquely identifies the process that should handle the message (Tt_state = TT_CREATED or TT_SENT) or the process that did handle the message (Tt_state = TT_SENT or TT_HANDLED).
Use tt_ptr_error(), which returns Tt_status, to determine if the pointer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
char | | *tt_message_handler_ptype(Tt_message m)
|
Retrieves the handler ptype attribute from the specified message.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
char * | |
Type of process that should handle this message.
Use tt_ptr_error(), which returns Tt_status, to determine if the pointer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
tt_message_handler_ptype_set
Tt_status | | tt_message_handler_ptype_set(Tt_message m,
const char *ptid)
|
Sets the handler process type (ptype) attribute for the specified message.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
const char *ptid | |
Type of process that should or did handle this message.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
Tt_status | | tt_message_handler_set(Tt_message m,
const char *procid)
|
Sets the handler attribute for the specified message.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
const char *procid | |
Character value that uniquely identifies the process you want to handle the message.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
Tt_status | | tt_message_iarg_add(Tt_messagem, Tt_mode n, const char *vtype, int value)
|
Adds a new argument to a message object and sets the value to a given integer. Add all arguments before the message is sent.
 | Note: Do not add arguments to a reply. Only change existing argument values with modes of TT_OUT or TT_INOUT.
|
Tt_message m | |
Opaque handle for the message involved in this operation.
|
Tt_mode n | |
Specifies who (sender, handler, observers) writes and reads a message argument. Possible modes are:
|
const char *vtype | |
Describes the type of argument data being added. The vtype name is used by the message recipient to interpret data.
|
int value | |
Value to fill in.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_MODE
TT_ERR_NOMP
TT_ERR_POINTER
TT_ERR_VTYPE
|
|
tt_message_arg_ival_set()
tt_message_arg_add()
tt_message_barg_add()
|
char | | *tt_message_object(Tt_message m)
|
Retrieves the object attribute from the specified message.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
char * | |
Object involved in this message. Use tt_ptr_error(), which returns Tt_status, to determine if the pointer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_OBJID
TT_ERR_POINTER
|
|
Tt_status | | tt_message_object_set(Tt_message m,
const char *objid)
|
Sets the object attribute for the specified message.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
const char *objid | |
Object involved in this message.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
char | | *tt_message_op(Tt_message m)
|
Retrieves the operation (op) attribute from the specified message.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
char * | |
Operation the receiver should perform. Use tt_ptr_error(), which returns Tt_status, to determine if the pointer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
Tt_status | | tt_message_op_set(Tt_message m,
const char *opname)
|
Sets the operation (op) attribute for the specified message.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
const char *opname | |
Operation the receiver should perform.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
int | | tt_message_opnum(Tt_message m)
|
Retrieves the operation number (opnum) attribute from the specified message.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
int | |
The number of the operation (opnum) involved in this message. Use tt_int_error(), which returns Tt_status, to determine if the Tt_disposition integer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
char | | *tt_message_otype(Tt_message m)
|
Retrieves the object type (otype) attribute from the specified message.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
char * | |
Type of the object involved in this message. Use tt_ptr_error(), which returns Tt_status, to determine if the pointer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
Tt_status | | tt_message_otype_set(Tt_message m,
const char *otype)
|
Sets the object type (otype) attribute for the specified message.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
const char *otype | |
Type of the object involved in this message.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_OTYPE
TT_ERR_POINTER
|
|
Tt_pattern | | tt_message_pattern(Tt_message m)
|
Retrieves the pattern attribute from the specified message.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
Tt_pattern | |
Opaque handle for a message pattern. Use tt_ptr_error(), which returns Tt_status, to determine if the handle is valid. Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
Tt_message | | tt_message_receive(void)
|
Returns a handle for the next message waiting to be delivered to your process. tt_message_receive() also runs any message or pattern callbacks applicable to this message. Check Tt_status with tt_message_status() to see if the return value is TT_WRN_STARTING. If it is, the ToolTalk service started your application to deliver this message. You must reply to this message.
 | Note: If the returned handle is 0, no message is available. This can occur if a message or pattern callback processes the message. It can also happen if the time between the tt_fd() file descriptor becoming active and the tt_message_receive() call is too long. The ToolTalk service will time out and offer the message to another process.
|
Tt_message | |
Handle for the message object. Use tt_ptr_error(), which returns Tt_status, to determine if the handle is valid. Possible Tt_status values are:
|
Tt_status | | tt_message_reject(Tt_message m)
|
Informs the ToolTalk service that your process can not handle this message. The ToolTalk service will try other handlers.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_NOTHANDLER
TT_ERR_POINTER
|
|
Tt_status | | tt_message_reply(Tt_message m)
|
Informs the ToolTalk service that your process has finished handling the message, and all return values (any arguments with the TT_OUT or TT_INOUT mode) have been filled in. The ToolTalk service will send the message back to the sender and fill the state attribute in with TT_HANDLED.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_NOTHANDLER
TT_ERR_POINTER
TT_ERR_PROCID
|
|
Tt_scope | | tt_message_scope(Tt_message m)
|
Retrieves the scope attribute from the specified message.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
Tt_scope | |
Identifies the set of processes eligible to receive the message. Possible values are:
TT_SESSION
TT_FILE
TT_BOTH
TT_FILE_IN_SESSION
|
Use tt_int_error(), which returns Tt_status, to determine if the Tt_scope integer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
Tt_status | | tt_message_scope_set(Tt_message m,
Tt_scope s)
|
Sets the scope attribute for the specified message.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
Tt_scope s | |
Identifies the set of processes eligible to receive the message. Possible values are:
TT_SESSION
TT_FILE
TT_BOTH
TT_FILE_IN_SESSION
|
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
Tt_status | | tt_message_send(Tt_message m)
|
Sends the specified message.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_ADDRESS
TT_ERR_CLASS
TT_ERR_FILE
TT_ERR_NOMP
TT_ERR_OBJID
TT_ERR_OTYPE
TT_ERR_OVERFLOW
TT_ERR_POINTER
TT_ERR_PROCID
TT_ERR_SESSION
TT_WRN_STALE_OBJID
|
|
char | | *tt_message_sender(Tt_message m)
|
Retrieves the sender attribute from the specified message.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
char * | |
Character value that uniquely identifies the process that sent the message. Use tt_ptr_error(), which returns Tt_status, to determine if the pointer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
char | | *tt_message_sender_ptype(Tt_message m)
|
Retrieves the sender ptype attribute from the specified message.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
char * | |
Process that sent this message. Use tt_ptr_error(), which returns Tt_status, to determine if the pointer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
tt_message_sender_ptype_set
Tt_status | | tt_message_sender_ptype_set(Tt_message m,
const char *ptid)
|
Sets the sender ptype attribute for the specified message.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
const char *ptid | |
Type of process that is sending this message.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
char | | *tt_message_session(Tt_message m)
|
Retrieves the session attribute from the specified message.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
char * | |
Identifier of the session to which this message applies. Use tt_ptr_error(), which returns Tt_status, to determine if the pointer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
Tt_status | | tt_message_session_set(Tt_message m,
const char *sessid)
|
Sets the session attribute for the specified message.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
const char *sessid | |
Identifier of the session in which you are interested.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
Tt_state | | tt_message_state(Tt_message m)
|
Retrieves the state attribute from the specified message.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
Tt_state | |
Indicates a message's current delivery state. Possible values are:
TT_CREATED
TT_SENT
TT_HANDLED
TT_FAILED
TT_QUEUED
TT_STARTED
TT_REJECTED
|
Use tt_int_error(), which returns Tt_status, to determine if the Tt_state integer is valid.
Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
int | | tt_message_status(Tt_message m)
|
Retrieves the status attribute from the specified message.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
int | |
An integer that describes the status stored in the status attribute of this message.
Use tt_int_error(), which returns Tt_status, to determine if the integer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
tt_message_status_string()
|
Tt_status | | tt_message_status_set(Tt_message m,
int status)
|
Sets the status attribute for the specified message.
 | Note: The status value must be greater than 2047 (TT_ERR_LAST) to avoid confusion with the ToolTalk service status values.
|
Tt_message m | |
Opaque handle for the message involved in this operation.
|
int status | |
Status to be stored in this message.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
char | | *tt_message_status_string(Tt_message m)
|
Retrieves the character string stored with the status attribute for the specified message.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
char * | |
Status string stored in this message. Use tt_ptr_error(), which returns Tt_status, to determine if the pointer is valid.
Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
tt_message_status_string_set
Tt_status | | tt_message_status_string_set(Tt_message m,
const char *status_str)
|
Sets a character string with the status attribute for the specified message.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
const char *status_str | |
Status string stored in this message.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
uid_t | | tt_message_uid(Tt_message m)
|
Retrieves the user ID attribute from the specified message.
The ToolTalk service automatically sets the user ID of a message with the user ID of the process that created the message.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
uid_t | |
The user ID of the message, or the “nobody” user (65534) if the message handle is not valid.
|
void | | *tt_message_user(Tt_message m, int key)
|
Retrieves the user information stored in data cells associated with the specified message object you created. Since the user data is part of the message object (the storage buffer in your application), not the actual message, you can only retrieve user information that you placed on the message.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
int key | |
User data cell in which you are interested. It must be unique over all user data cells for this message.
|
void * | |
A piece of arbitrary user data that is one word in size. Use tt_ptr_error(), which returns Tt_status, to determine if the pointer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
Tt_status | | tt_message_user_set(Tt_message m, int key,
void *v)
|
Stores user information in data cells associated with the specified message object.
Note that the user data is part of the message object (the storage buffer in your application), not the actual message. Data stored by the sender in user data cells is not seen by any handlers or observers. Use arguments for data that handlers or observers need to see.
Tt_message m | |
Opaque handle for the message involved in this operation.
|
int key | |
User data cell in which you are interested.
|
void *v | |
A piece of arbitrary user data that is one word in size.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
TT_ERR_PROCID
|
|
int | | tt_objid_equal(const char *objid1,
const char *objid2)
|
Tests to see if two objids are equal. tt_objid_equal() is better than strcmp for the purpose since it returns “1” even in the case where one objid is a forwarding pointer for the other.
const char *objid1 | |
Identifier of one of the objects involved in this operation.
|
const char *objid2
| | Identifier of the other object involved in this operation.
|
int | |
Integer indicating whether or not the objids are equal. Possible values are:
Use tt_int_error(), which returns Tt_status, to determine if the integer is valid.
Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_OBJID
|
|
char | | *tt_objid_objkey(const char *objid)
|
Returns the “unique key” portion of a objid.
const char *objid | |
Identifier of the object involved in this operation.
|
char * | |
Unique key of the objid. No two objids have the same unique key.
Use tt_ptr_error(), which returns Tt_status, to determine if the pointer is valid. Possible Tt_status values are:
|
Tt_message | | tt_onotice_create(const char *objid,
const char *op)
|
Creates a message with: | |
Tt_address = TT_OBJECT
Tt_class = TT_NOTICE
|
The handle for the created message is returned so you can add arguments, other attributes, and send the message.
const char *objid | |
Identifier of the desired object.
|
const char *op | |
Operation to be performed by the receiver.
|
Tt_message | |
The unique handle that identifies your message.
Use tt_ptr_error(), which returns Tt_status, to determine if the handle is valid. Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_PROCID
|
|
Returns the process identifier (procid) for the calling process, and sets this procid as the default procid for the process. tt_open() is typically the first the ToolTalk function you call from your process. A process may call tt_open() more than once to obtain more than one procid. Each procid has its own associated tt_fd() file descriptor, and can join another session. To switch to another procid use tt_default_procid_set().
char * | |
Character value that uniquely identifies your process.
Use tt_ptr_error(), which returns Tt_status, to determine if the pointer is valid. Possible Tt_status values are:
|
tt_fd()
tt_default_procid_set()
|
Tt_message | | tt_orequest_create(const char *objid,
const char *op)
|
Creates a message with: | |
Tt_address = TT_OBJECT
|
The handle for the created message is returned so you can add arguments, other attributes, and send the message.
const char *objid | |
Identifier of the desired object.
|
const char *op | |
The operation to be performed by the receiver.
|
Tt_message | |
The unique handle that identifies your message. Use tt_ptr_error(), which returns Tt_status, to determine if the handle is valid. Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_PROCID
|
|
char | | *tt_otype_base(const char *otype)
|
Returns the base otype that the given otype is derived from, or NULL if the given otype is not derived.
char *otype | |
Object type involved in this operation.
|
char * | |
Name of the base otype, or NULL if the given otype is not derived. Use tt_ptr_error(), which returns Tt_status, to determine if the pointer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_OTYPE
|
|
tt_otype_is_derived()
tt_otype_derived()
tt_otype_deriveds_count()
tt_spec_type()
tt_message_otype()
|
char | | *tt_otype_derived(const char *otype, int i)
|
Returns the i-th otype derived from the given otype.
const char *otype | |
Object type involved in this operation.
|
int i | |
Zero-based index into the otypes derived from the given otype.
|
char * | |
Name of the i-th otype derived from the given otype. Use tt_ptr_error(), which returns Tt_status, to determine if the pointer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_OTYPE
|
|
tt_otype_is_derived()
tt_otype_base()
tt_otype_deriveds_count()
tt_spec_type()
tt_message_otype()
|
int | | tt_otype_deriveds_count(const char *otype)
|
Returns the number of otypes derived from the given otype.
const char *otype | |
Object type involved in this operation.
|
int | |
The number of otypes derived from the given otype. Use tt_int_error(), which returns Tt_status, to determine if the integer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_OTYPE
|
|
tt_otype_is_derived()
tt_otype_base()
tt_otype_derived()
tt_spec_type()
tt_message_otype()
|
Tt_mode | | tt_otype_hsig_arg_mode(const char *otype,
int sig, int arg)
|
Returns the Tt_mode of the arg'th argument of the sig'th request signature of the given otype.
const char *otype | |
Object type involved in this operation.
|
int sig | |
Zero-based index into the request signatures of the specified otype.
|
int arg | |
Zero-based index into the arguments of the specified signature.
|
Tt_mode | |
The Tt_mode of the specified argument, which determines who (sender or handler) writes and reads a message argument. Possible modes are:
Use tt_int_error(), which returns Tt_status, to determine if the integer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_NUM
TT_ERR_OTYPE
|
|
tt_otype_hsig_arg_type()
tt_otype_hsig_count()
tt_otype_hsig_args_count()
tt_otype_hsig_op()
|
char | | *tt_otype_hsig_arg_type(const char *otype,
int sig, int arg)
|
Returns the data type of the arg'th argument of the sig'th request signature of the given otype.
const char *otype | |
Object type involved in this operation.
|
int sig | |
Zero-based index into the request signatures of the specified otype.
|
int arg | |
Zero-based index into the arguments of the specified signature.
|
char * | |
Data type of the specified argument. Use tt_ptr_error(), which returns Tt_status, to determine if the pointer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_NUM
TT_ERR_OTYPE
|
|
tt_otype_hsig_arg_mode()
tt_otype_hsig_count()
tt_otype_hsig_args_count()
tt_otype_hsig_op()
|
int | | tt_otype_hsig_args_count(const char *otype,
int sig)
|
Returns the number of arguments of the sig'th request signature of the given otype.
const char *otype | |
Object type involved in this operation.
|
int sig | |
Zero-based index into the request signatures of the specified otype.
|
int | |
The number of arguments of the sig'th request signature of the given otype. Use tt_int_error(), which returns Tt_status, to determine if the integer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_NUM
TT_ERR_OTYPE
|
|
tt_otype_hsig_arg_type()
tt_otype_hsig_arg_mode()
tt_otype_hsig_count()
tt_otype_hsig_op()
|
int | | tt_otype_hsig_count(const char *otype)
|
Returns the number of request signatures for the given otype.
const char *otype | |
Object type involved in this operation.
|
int | |
The number of request signatures for the given otype. Use tt_int_error(), which returns Tt_status, to determine if the integer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_OTYPE
|
|
tt_otype_hsig_arg_type()
tt_otype_hsig_arg_mode()
tt_otype_hsig_args_count()
tt_otype_hsig_op()
|
char | | *tt_otype_hsig_op(const char *otype, int sig)
|
Returns the op name of the sig'th request signature of the give otype.
const char *otype | |
Object type involved in this operation.
|
int sig | |
Zero-based index into the request signatures of the given otype.
|
char * | |
Operation attribute of the specified request signature. Use tt_ptr_error(), which returns Tt_status, to determine if the pointer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_NUM
TT_ERR_OTYPE
|
|
tt_otype_hsig_arg_type()
tt_otype_hsig_arg_mode()
tt_otype_hsig_args_count()
tt_otype_hsig_count()
|
int | | tt_otype_is_derived(const char *derivedotype,
const char *baseotype)
|
Returns 1 if and only if derivedotype is derived directly or indirectly from baseotype.
const char *derivedotype | |
The purportedly derived otype.
|
const char *baseotype | |
Candidate base otype.
|
int | |
Returns 1 if and only if derivedotype is derived directly or indirectly from baseotype. Use tt_int_error(), which returns Tt_status, to determine if the integer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_OTYPE
|
|
tt_otype_deriveds_count()
tt_otype_base()
tt_otype_derived()
tt_spec_type()
tt_message_otype()
|
Tt_mode | | tt_otype_osig_arg_mode(const char *otype, int sig, int arg)
|
Returns the Tt_mode of the arg'th argument of the sig'th notice signature of the given otype.
const char *otype | |
Object type involved in this operation.
|
int sig | |
Zero-based index into the notice signatures of the specified otype.
|
int arg | |
Zero-based index into the arguments of the specified signature.
|
Tt_mode | |
The Tt_mode of the specified argument, which determines who (sender or handler) writes and reads a message argument. Possible modes are:
Use tt_int_error(), which returns Tt_status, to determine if the Tt_mode value is valid. Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_NUM
TT_ERR_OTYPE
|
|
tt_otype_osig_arg_type()
tt_otype_osig_count()
tt_otype_osig_args_count()
tt_otype_osig_op()
|
char | | *tt_otype_osig_arg_type(const char *otype, int sig, int arg)
|
Returns the data type of the arg'th argument of the sig'th notice signature of the given otype.
const char *otype | |
Object type involved in this operation.
|
int sig | |
Zero-based index into the notice signatures of the specified otype.
|
int arg | |
Zero-based index into the arguments of the specified signature.
|
char * | |
Data type of the specified argument. Use tt_ptr_error(), which returns Tt_status, to determine if the pointer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_NUM
TT_ERR_OTYPE
|
|
tt_otype_osig_arg_mode()
tt_otype_osig_count()
tt_otype_osig_args_count()
tt_otype_osig_op()
|
int | | tt_otype_osig_args_count(const char *otype,
int sig)
|
Returns the number of arguments of the sig'th notice signature of the given otype.
const char *otype | |
Object type involved in this operation.
|
int sig | |
Zero-based index into the notice signatures of the specified otype.
|
int | |
The number of arguments of the sig'th notice signature of the given otype. Use tt_int_error(), which returns Tt_status, to determine if the integer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_NUM
TT_ERR_OTYPE
|
|
tt_otype_osig_arg_type()
tt_otype_osig_arg_mode()
tt_otype_osig_count()
tt_otype_osig_op()
|
int | | tt_otype_osig_count(const char *otype)
|
Returns the number of notice signatures for the given otype.
const char *otype | |
Object type involved in this operation.
|
int | |
The number of notice signatures for the given otype. Use tt_int_error(), which returns Tt_status, to determine if the integer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_OTYPE
|
|
tt_otype_osig_arg_type()
tt_otype_osig_arg_mode()
tt_otype_osig_args_count()
tt_otype_osig_op()
|
char | | *tt_otype_osig_op(const char *otype, int sig)
|
Returns the op name of the sig'th notice signature of the give otype.
const char *otype | |
Object type involved in this operation.
|
int sig | |
Zero-based index into the notice signatures of the given otype.
|
char * | |
Operation attribute of the specified notice signature.
Use tt_ptr_error(), which returns Tt_status, to determine if pointer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_NUM
TT_ERR_OTYPE
|
|
tt_otype_osig_arg_type()
tt_otype_osig_arg_mode()
tt_otype_osig_args_count()
tt_otype_osig_count()
|
Tt_status | | tt_pattern_address_add(Tt_pattern p,
Tt_address d)
|
Adds a value to the address field for the specified pattern.
Tt_pattern p | |
A unique handle for a message pattern. You receive this handle after you issue tt_pattern_create().
|
Tt_address d | |
Specifies which pattern attributes form the address that messages will be matched against. Possible values are:
TT_PROCEDURE
TT_OBJECT
TT_HANDLER
TT_OTYPE
|
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
Tt_status | | tt_pattern_arg_add(Tt_pattern p, Tt_mode n,
const char *vtype, const char *value)
|
Adds an argument to a pattern. Add pattern arguments before registering your pattern with the ToolTalk service.
Tt_pattern p | |
Opaque handle for the pattern involved in this operation.
|
Tt_mode n | |
Specifies who (sender, handler, observers) writes and reads a message argument. Possible modes are:
|
const char *vtype | |
Describes the type of argument data being added. The vtype name is used by the message recipient to interpret data. Use `ALL' to match without regard to argument value type.
|
const char *value | |
Value to fill in (must be an unsigned character string.) Use NULL to indicate that any value matches.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
tt_pattern_register()
tt_pattern_barg_add()
tt_pattern_iarg_add()
|
Tt_status | | tt_pattern_barg_add(Tt_pattern m, Tt_mode n,
const char *vtype, const unsigned
char *value, int len)
|
Adds an argument with a value containing imbedded nulls to a pattern.
Tt_pattern m | |
Opaque handle for the pattern involved in this operation.
|
Tt_mode n | |
Specifies who (sender, handler, observers) writes and reads a message argument. Possible modes are:
|
const char *vtype | |
Describes the type of argument data being added. The vtype name is used by the message recipient to interpret data. The ToolTalk service treats the value as an opaque byte string. To pass structured data, your application and the receiving application must encode and decode these unique values. The most common way of doing this is to use XDR.
|
const unsigned char *value | |
Value to be filled in. Use NULL to specify that any value matches.
|
int len | |
Length of the value in bytes.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
tt_pattern_register()
tt_pattern_arg_add()
tt_pattern_iarg_add()
|
Tt_status | | tt_pattern_callback_add(Tt_pattern m,
Tt_message_callback f)
|
Registers a callback function that will be automatically invoked by tt_message_receive() whenever a message matches the pattern.
Tt_callback_action is an enum containing the values TT_CALLBACK_CONTINUE and TT_CALLBACK_PROCESSED. If the callback returns TT_CALLBACK_PROCESSED, no further callbacks will be invoked for this event, and the message will not be returned by tt_message_receive(); if the callback returns TT_CALLBACK_CONTINUE, other callbacks will be run, and if no callback returns TT_CALLBACK_PROCESSED, tt_message_receive() will return the message.
Tt_pattern m | |
Opaque handle for the pattern involved in this operation.
|
Tt_message_callback f | |
Tt_message_callback is a type definition for a pointer to a function declared like: Tt_callback_action func(Tt_message m,Tt_pattern p). The callback is passed the message in question and the pattern that matched it.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
Tt_category | | tt_pattern_category(Tt_pattern p)
|
Returns the category value of the specified pattern.
Tt_pattern p | |
Opaque handle for a message pattern.
|
Tt_category | |
Indicates the receiver's intent. Possible values are:
Use tt_int_error(), which returns Tt_status, to determine if the Tt_category integer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
tt_pattern_category_set()
|
Tt_status | | tt_pattern_category_set(Tt_pattern p,
Tt_category c)
|
Fills in the category field for the specified pattern.
Tt_pattern p | |
A unique handle for a message pattern. You receive this handle after you issue tt_pattern_create().
|
Tt_category c | |
Indicates the receiver's intent. Possible values are:
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_CATEGORY
TT_ERR_NOMP
TT_ERR_POINTER
|
|
Tt_status | | t_pattern_class_add(Tt_pattern p,
Tt_class c)
|
Adds a value to the class information for the specified pattern. If the class is TT_REQUEST, the sender expects a reply to the message. If the class is TT_NOTICE, the sender will not expect a reply.
Tt_pattern p | |
A unique handle for a message pattern. You receive this handle after you issue tt_pattern_create().
|
Tt_class c | |
Indicates whether or not the sender wants the receiver to take action after the message is received. Possible values are:
|
Tt_pattern p | |
A unique handle for a message pattern. You receive this handle after you issue tt_pattern_create().
|
Tt_class c | |
Indicates whether or not the sender wants the receiver to take action after the message is received. Possible values are:
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
Tt_pattern | | tt_pattern_create(void)
|
Requests a new pattern object. After receiving the pattern object, fill in the message pattern fields to indicate what type of messages you want to receive and register it with the ToolTalk service.
 | Note: You can supply multiple values for each attribute you add to a pattern (some attributes are set and only have one value). The pattern attribute matches a message attribute if any of the values in the pattern match the value in the message. If no value is specified for an attribute, the ToolTalk service assumes that you want any value to match.
|
Tt_pattern | |
Opaque handle for a message pattern. Use this handle in future calls to identify the pattern object. Use tt_ptr_error(), which returns Tt_status, to determine if the pointer is valid. Possible Tt_status values are:
|
Tt_status | | tt_pattern_destroy(Tt_pattern p)
|
Destroys a pattern object. Destroying a pattern object automatically unregisters the pattern with the ToolTalk service.
Tt_pattern p | |
A unique handle for a message pattern. You receive this handle after you issue tt_pattern_create().
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
tt_pattern_disposition_add
Tt_status | | tt_pattern_disposition_add(Tt_pattern p,
tt_disposition r)
|
Adds a value to the disposition field for the specified pattern.
Tt_pattern p | |
A unique handle for a message pattern. You receive this handle after you issue tt_pattern_create().
|
Tt_disposition r | |
Indicates whether the receiver should be started to receive the message or if the message should be queued until the receiving process is started at a later time. The message can also be thrown away if the receiver is not started. Possible values are:
TT_DISCARD
TT_QUEUE
TT_START
TT_QUEUE+TT_START
|
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
Tt_status | | tt_pattern_file_add(Tt_pattern p,
const char *file)
|
Adds a value to the file field of the specified pattern.
 | Note: When you join a file, the ToolTalk service updates the file field of your registered patterns.
|
Tt_pattern p | |
A unique handle for a message pattern. You receive this handle after you issue tt_pattern_create().
|
const char *file | |
Name of the file in which you are interested.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
Tt_status | | tt_pattern_iarg_add(Tt_pattern m, Tt_mode n,
const char *vtype, int value)
|
Adds a new argument to a pattern and sets the value to a given integer. Add all arguments before the pattern is registered.
Tt_pattern m | |
Opaque handle for the pattern involved in this operation.
|
Tt_mode n | |
Specifies who (sender, handler, observers) writes and reads a message argument. Possible modes are:
|
const char *vtype | |
Describes the type of argument data being added. The vtype name is used by the message recipient to interpret data.
|
int value | |
Value to fill in.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_MODE
TT_ERR_NOMP
TT_ERR_POINTER
TT_ERR_VTYPE
|
|
Tt_status | | tt_pattern_object_add(Tt_pattern p,
const char *objid)
|
Adds a value to the object field of the specified pattern.
Tt_pattern p | |
A unique handle for a message pattern. You receive this handle after you issue tt_pattern_create().
|
const char *objid | |
Identifier for the specified object. Objid's are returned from tt_spec_create() or tt_spec_move().
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
Tt_status | | tt_pattern_op_add(Tt_pattern p,
const char *opname)
|
Adds a value to the operation field of the specified pattern.
Tt_pattern p | |
A unique handle for a message pattern. You receive this handle after you issue tt_pattern_create().
|
const char *opname | |
The name of the operation (op) your process can perform.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
Tt_status | | tt_pattern_otype_add(Tt_pattern p,
const char *otype)
|
Adds a value to the object type (otype) field for the specified pattern.
Tt_pattern p | |
A unique handle for a message pattern. You receive this handle after you issue tt_pattern_create().
|
const char *otype | |
The name of the object type your application manages.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_OTYPE
TT_ERR_POINTER
|
|
Tt_status | | tt_pattern_register(Tt_pattern p)
|
Registers your pattern with ToolTalk, so that your process will start receiving messages that match the pattern. Once a pattern is registered, no further changes can be made in the pattern.
 | Note: When you join a session or file, the ToolTalk service updates the file and session field of your registered patterns.
|
Tt_pattern p | |
A unique handle for a message pattern. You receive this handle after you issue tt_pattern_create().
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
TT_ERR_PROCID
|
|
Tt_status | | tt_pattern_scope_add(Tt_pattern p,
Tt_scope s)
|
Adds a value to the scope field for the specified pattern.
Tt_pattern p | |
A unique handle for a message pattern. You receive this handle after you issue tt_pattern_create().
|
Tt_scope s | |
Specifies what process are eligible to receive the message. Possible values are:
TT_SESSION
TT_FILE
TT_BOTH
TT_FILE_IN_SESSION
|
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
Tt_status | | tt_pattern_sender_add(Tt_pattern p,
const char *procid)
|
Adds a value to the sender field for the specified pattern.
Tt_pattern p | |
A unique handle for a message pattern. You receive this handle after you issue tt_pattern_create().
|
const char *procid | |
Character value that uniquely identifies the process in which you are interested.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
tt_pattern_sender_ptype_add
Tt_status | | tt_pattern_sender_ptype_add(Tt_pattern p,
const char *ptid)
|
Adds a value to the sender's process type (ptype) field for the specified pattern.
Tt_pattern p | |
A unique handle for a message pattern. You receive this handle after you issue tt_pattern_create().
|
const char *ptid | |
Use the character string that uniquely identifies the type of process in which you are interested.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
Tt_status | | tt_pattern_session_add(Tt_pattern p,
const char *sessid)
|
Adds a value to the session field for the specified pattern.
 | Note: When you join a session, the ToolTalk service updates the session field of your registered patterns.
|
Tt_pattern p | |
A unique handle for a message pattern. You receive this handle after you issue tt_pattern_create().
|
const char *sessid | |
Session in which you are interested.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
Tt_status | | tt_pattern_state_add(Tt_pattern p, Tt_state s)
|
Adds a value to the state field for the specified pattern.
Tt_pattern p | |
A unique handle for a message pattern. You receive this handle after you issue tt_pattern_create()
TT_CREATED
TT_SENT
TT_HANDLED
TT_FAILED
TT_QUEUED
TT_STARTED
TT_REJECTED
|
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
Tt_status | | tt_pattern_unregister(Tt_pattern p)
|
Unregisters the specified pattern from the ToolTalk service. Your process will stop receiving messages that match this pattern.
Tt_pattern p | |
A unique handle for a message pattern. You receive this handle after you issue tt_pattern_create().
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
void | | *tt_pattern_user(Tt_pattern p, int key)
|
Returns the value in the indicated user data cell for the specified pattern object.
Every pattern object allows an arbitrary number of user data cells, each one word (a void *) in size. The user data cells are identified by integer keys. Your tool can use these in any way you see fit, to associate arbitrary data with a pattern object. Note that the user data is part of the pattern object (the storage buffer in your application), not the actual pattern. The content of user cells has no effect on pattern matching.
Tt_pattern p | |
A unique handle for a message pattern. You receive this handle after you issue tt_pattern_create().
|
int key | |
User data cell in which you are interested. Your application assigns the keys to the user data cells which are part of the pattern object with tt_pattern_user_set(). Values must be unique over all data cells for this pattern.
|
void * | |
A piece of arbitrary user data that is one word in size. Use tt_ptr_error(), which returns Tt_status, to determine if the pointer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
Tt_status | | tt_pattern_user_set(Tt_pattern p, int key,
void *v)
|
Stores information in the user data cells associated with the specified pattern object.
Tt_pattern p | |
A unique handle for a message pattern. You receive this handle after you issue tt_pattern_create().
|
int key | |
User data cell in which you are interested. Values must be unique over all data cells for this pattern.
|
void *v | |
A piece of arbitrary user data that is one word in size.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
Tt_message | | tt_pnotice_create(Tt_scope scope,
const char *op)
|
Creates a message with: | |
Tt_address = TT_PROCEDURE
Tt_class = TT_NOTICE
|
The handle for the created message is returned so you can add arguments, other attributes, and send the message.
Tt_scope scope | |
A portion of the message that helps determine which processes are eligible to receive the message. A potential recipient could be joined to:
TT_SESSION
TT_FILE
TT_BOTH
TT_FILE_IN_SESSION
|
If the scope is TT_SESSION, the session is set to the current default session. If the scope is TT_FILE, the file is set to the current default file. If the scope is BOTH or FILE_IN_SESSION, both file and session are set to the defaults.
|
const char *op | |
The operation to be performed by the receiver.
|
Tt_message | |
The unique handle that identifies your message. If ToolTalk is unable to create a message when requested, an invalid handle will be returned to you. When you attempt to use this handle, the ToolTalk service will report an error. Use tt_ptr_error(), which returns Tt_status, to determine if the pointer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_PROCID
|
|
Tt_status | | tt_pointer_error(void *pointer)
|
Given an opaque pointer (Tt_message or Tt_pattern), or character pointer (char *), returns TT_OK if the pointer is valid or the encoded Tt_status value if the pointer is an error object.
To avoid the annoyance of having to cast the opaque or character pointer to void * in every call, a macro tt_ptr_error(p) is provided that expands to tt_pointer_error((void *)(p)).
void *pointer | |
Opaque pointer or character pointer to be checked.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
Tt_message | | tt_prequest_create(Tt_scope scope,
const char *op)
|
Creates a message with: | |
Tt_address = TT_PROCEDURE
Tt_class = TT_REQUEST
|
The handle for the created message is returned so you can add arguments, other attributes, and send the message.
Tt_scope scope | |
A portion of the message that helps determine which processes are eligible to receive the message. A potential recipient could be joined to:
TT_SESSION
TT_FILE
TT_BOTH
TT_FILE_IN_SESSION
|
If the scope is TT_SESSION, the session is set to the current default session. If the scope is TT_FILE, the file is set to the current default file. If the scope is BOTH or FILE_IN_SESSION, both file and session are set to the defaults.
|
const char *op | |
The operation to be performed by the receiver.
|
Tt_message | |
The unique handle that identifies your message. If ToolTalk is unable to create a message when requested, an invalid handle will be returned to you. When you attempt to use this handle, the ToolTalk service will report an error. Use tt_ptr_error(), which returns Tt_status, to determine if the pointer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_NOMP
TT_ERR_PROCID
|
|
Tt_status | | tt_ptr_error(pointer)
|
A macro that expands to tt_pointer_error ((void *)(p)). tt_ptr_error() helps you avoid the annoyance of having to cast the opaque or character pointer to void * in every call.
pointer | |
Opaque pointer or character pointer to be checked.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_POINTER
|
|
Tt_status | | tt_ptype_declare(const char *ptid)
|
Registers your process type (ptype) with the ToolTalk service.
const char *ptid | |
Use the character string specified in your ptype that uniquely identifies your process.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_PTYPE
|
|
void | | tt_release(int mark)
|
Frees all storage allocated on the ToolTalk API allocation stack since your tt_mark() call.
Your application typically calls this at the end of a procedure to release all storage allocated within the procedure.
int mark | |
Integer that marks your application`s storage position in the ToolTalk API allocation stack.
|
Tt_status | | tt_session_bprop(const char *sessid,
const char *propname, int i,
unsigned char **value, int *length)
|
Obtains the i-th value (first value is number 0) of the named property of the session identified by sessid. If there are i values or fewer, both returned value and returned length are zeroed.
const char *sessid | |
The session you have joined. Use the sessid value the ToolTalk service returns after you issue tt_default_session().
|
const char *propname | |
The name of the property from which you want to obtain values.
|
int i | |
The number of the item in the property list for which you want to obtain the value. The list numbering begins with 0.
|
unsigned char **value | |
Address of a character pointer that the ToolTalk service should aim to a string containing the contents of the property.
|
int *len | |
Address of an integer that the ToolTalk service should set to the length of the value in bytes.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_DBAVAIL
TT_ERR_DBEXIST
TT_ERR_NOMP
TT_ERR_NUM
TT_ERR_PROPNAME
TT_ERR_SESSION
|
|
unsigned char **value | |
Address of a character pointer that the ToolTalk service aimed at a string containing the contents of the property.
|
int *len | |
Address of an integer that the ToolTalk service set to the length of the value in bytes.
|
Tt_status | | tt_session_bprop_add(const char *sessid,
const char *propname,
const unsigned char *value, int length)
|
Adds a new byte-string value to the end of the list of values for the named property of the session identified by sessid.
const char *sessid | |
Name of the session you have joined. Use the sessid value the ToolTalk service returns after you issue tt_default_session().
|
const char *propname | |
The name of the property to which you want to add values.
|
const unsigned char *value | |
The value to add to the session property.
|
int length | |
The size of the value in bytes.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_DBAVAIL
TT_ERR_DBEXIST
TT_ERR_NOMP
TT_ERR_PROPLEN
TT_ERR_PROPNAME
TT_ERR_SESSION
|
|
Tt_status | | tt_session_bprop_set(const char *sessid,
const char *propname,
const unsigned char *value, int length)
|
Replaces any current values stored under the named property of the session identified by sessid with the given byte-string value.
const char *sessid | |
Name of the session you have joined. Use the sessid value the ToolTalk service returns after you issue tt_default_session().
|
const char *propname | |
The name of the property whose value you want to replace.
|
const unsigned char *value | |
The value to which the session property is set. If value is NULL, the property is removed entirely.
|
int length | |
The size of the value in bytes.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_DBAVAIL
TT_ERR_DBEXIST
TT_ERR_NOMP
TT_ERR_PROPLEN
TT_ERR_PROPNAME
TT_ERR_SESSION
|
|
Tt_status | | tt_session_join(const char *sessid)
|
Joins the session named by the provided string and makes it the default session for your process.
const char *sessid | |
Name of the session you wish to join. Use the sessid value the ToolTalk service returns after you issue tt_default_session(), tt_X_session(), or tt_initial_session().
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_DBAVAIL
TT_ERR_DBEXIST
TT_ERR_NOMP
TT_ERR_PATH
|
|
char | | *tt_session_prop(const char *sessid,
const char *propname, int i)
|
Returns the i-th value (first value is number 0) of the specified session property.
 | Note: If this value has embedded nulls, you have no way to determine how long it is. Use tt_session_bprop() for values with embedded nulls.
|
const char *sessid | |
Name of the session you have joined. Use the sessid value the ToolTalk service returns after you issue tt_default_session().
|
const char *propname | |
The name of the property from which you want to retrieve a value. The name must be less than 64 characters.
|
int i | |
The number of the item in the property name list for which you want to obtain the value. The list numbering begins with 0.
|
char * | |
The value of the requested property. NULL is returned if there are i values or fewer. Use tt_ptr_error(), which returns Tt_status, to determine if the pointer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_DBAVAIL
TT_ERR_DBEXIST
TT_ERR_NOMP
TT_ERR_NUM
TT_ERR_PROPNAME
TT_ERR_SESSION
|
|
Tt_status | | tt_session_prop_add(const char *sessid,
const char *propname, const char *value)
|
Adds a new character-string value to the end of the list of values for the property of the specified session.
const char *sessid | |
Name of the session you have joined. Use the sessid value the ToolTalk service returns after you issue tt_default_session().
|
const char *propname | |
The name of the property to which you want to add a value. The name must be less than 64 characters.
|
const char *value | |
The character string you want to add to the property name list.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_DBAVAIL
TT_ERR_DBEXIST
TT_ERR_NOMP
TT_ERR_PROPLEN
TT_ERR_PROPNAME
TT_ERR_SESSION
|
|
int | | tt_session_prop_count(const char *sessid,
const char *propname)
|
Returns the number of values stored under the named property of the session identified by sessid.
const char *sessid | |
Name of the session you have joined. Use the sessid value the ToolTalk service returns after you issue tt_default_session().
|
const char *propname | |
The name of the property you want to examine.
|
int | |
The number of values in the specified property list. Use tt_int_error(), which returns Tt_status, to determine if the integer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_DBAVAIL
TT_ERR_DBEXIST
TT_ERR_NOMP
TT_ERR_PROPNAME
TT_ERR_SESSION
|
|
Tt_status | | tt_session_prop_set(const char *sessid,
const char *propname, const char *value)
|
Replaces all current values stored under the named property of the session identified by sessid with the given character-string value.
const char *sessid | |
Name of the session you have joined. Use the sessid value the ToolTalk service returns after you issue tt_default_session().
|
const char *propname | |
The name of the property you want to examine.
|
const char *value | |
The new value you want to insert. If you want to remove a value from the property list, specify the value as NULL.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_DBAVAIL
TT_ERR_DBEXIST
TT_ERR_NOMP
TT_ERR_PROPLEN
TT_ERR_PROPNAME
TT_ERR_SESSION
|
|
char | | *tt_session_propname(const char *sessid,
int n)
|
Return the n-th element of the list of currently-defined property names for the session identified by sessid.
const char *sessid | |
Name of the session you have joined. Use the sessid value the ToolTalk service returns after you issue tt_default_session().
|
int n | |
The number of the item in the property name list for which you want to obtain the name. The list numbering begins with 0.
|
char * | |
The name of the desired property from the session property list. NULL is returned if there are n properties or fewer. Use tt_ptr_error(), which returns Tt_status, to determine if the pointer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_DBAVAIL
TT_ERR_DBEXIST
TT_ERR_NOMP
TT_ERR_NUM
TT_ERR_SESSION
|
|
tt_session_propnames_count
int | | tt_session_propnames_count(
const char *sessid)
|
Return the number of currently-defined property names for the session.
const char *sessid | |
Name of the session you have joined. Use the sessid value the ToolTalk service returns after you issue tt_default_session().
|
int | |
The number of property names for the session. Use tt_int_error(), which returns Tt_status, to determine if the integer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_DBAVAIL
TT_ERR_DBEXIST
TT_ERR_NOMP
TT_ERR_SESSION
|
|
Tt_status | | tt_session_quit(const char *sessid)
|
Informs the ToolTalk service that your application is no longer interested in this ToolTalk session. The ToolTalk service will stop delivering messages scoped to this session.
const char *sessid | |
Name of the session you want to quit.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_NOMP
TT_ERR_SESSION
TT_WRN_NOTFOUND
|
|
Tt_status | | tt_spec_bprop(const char *objid,
const char *propname, int i,
unsigned char **value, int *length)
|
Retrieves the i-th value (first value is number 0) of this property.
const char *objid | |
Identifier of the object involved in this operation.
|
const char *propname | |
Name of the property in which you are interested. The name must be less than 64 characters.
|
int i | |
Item of the list in which you are interested. The list numbering begins with 0.
|
unsigned char **value | |
Address of a character pointer that the ToolTalk service should aim to a string containing the contents of the spec's property. If there are i values or fewer, the pointer will be set to 0.
|
int *len | |
Address of an integer that the ToolTalk service should set to the length of the value in bytes.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_DBAVAIL
TT_ERR_DBEXIST
TT_ERR_NOMP
TT_ERR_NUM
TT_ERR_OBJID
TT_ERR_PROPNAME
|
|
unsigned char **value | |
Address of a character pointer that the ToolTalk service aimed at a string containing the contents of the property. If there are i values or fewer, the pointer will be set to 0.
|
int *len | |
Address of an integer that the ToolTalk service set to the length of the value in bytes. If there are i values or fewer, the length will be 0.
|
Tt_status | | tt_spec_bprop_add(const char *objid,
const char *propname,
const unsigned char *value, int length)
|
Adds a new byte-string to the end of the values list for this spec property.
const char *objid | |
Identifier of the object involved in this operation.
|
const char *propname | |
Name of the property in which you are interested.
|
const unsigned char *value | |
Byte string you want to add to the property value list.
|
int length | |
Length of the value in bytes.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_DBAVAIL
TT_ERR_DBEXIST
TT_ERR_NOMP
TT_ERR_OBJID
TT_ERR_PROPLEN
TT_ERR_PROPNAME
|
|
Tt_status | | tt_spec_bprop_set(const char *objid,
const char *propname,
const unsigned char *value, int length)
|
Replaces any current values stored under this spec property with a new byte-string.
const char *objid | |
Identifier of the object involved in this operation.
|
const char *propname | |
Name of the property in which you are interested.
|
const unsigned char *value | |
Byte string you want to add to the property value list.
|
 | Note: If the value is NULL, the property is removed entirely.
|
int length | |
Length of the value in bytes.
|
Tt_statue | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_DBAVAIL
TT_ERR_DBEXIST
TT_ERR_NOMP
TT_ERR_OBJID
TT_ERR_PROPLEN
TT_ERR_PROPNAME
|
|
char | | *tt_spec_create(const char *filepath)
|
Creates a spec (in memory) for an object. Use the objid that the ToolTalk service returns in future calls to manipulate the object.
 | Note: The object will not be a permanent ToolTalk item or visible to other processes until the creating process does a tt_spec_write().
|
const char *filepath | |
File name.
|
char * | |
Identifier for this object. Use tt_ptr_error(), which returns Tt_status, to determine if the pointer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_DBAVAIL
TT_ERR_DBEXIST
TT_ERR_NOMP
TT_ERR_OTYPE
TT_ERR_PATH
|
|
tt_spec_type_set()
tt_spec_write()
|
Tt_status | | tt_spec_destroy(const char *objid)
|
Immediately destroys an object's spec.
const char *objid | |
Identififier of the object involved in this operationn.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_DBAVAIL
TT_ERR_DBEXIST
TT_ERR_NOMP
TT_ERR_OBJID
|
|
char | | *tt_spec_file(const char *objid)
|
Retrieves the name of the file containing the object described by the spec.
const char *objid | |
Identifier of the object involved in this operation.
|
char * | |
The file's absolute pathname. Use tt_ptr_error(), which returns Tt_status, to determine if the pointer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_DBAVAIL
TT_ERR_DBEXIST
TT_ERR_NOMP
TT_ERR_OBJID
|
|
char | | *tt_spec_move(const char *objid,
const char *newfilepath)
|
Notifies the ToolTalk service that this object has moved to a different file. The ToolTalk service returns a new objid for the object and a forwarding pointer is left from the old objid to the new one.
 | Note: If a new objid is not required (because the new and old files are in the same file system), TT_WRN_SAME_OBJID is returned.
|
For efficiency and reliability, your application should replace any references it has to the old objid with references to the new one.
const char *objid | |
Identifier of the object involved in this operation.
|
const char *newfilepath | |
New file name.
|
char * | |
New unique identifier of the object involved in this operation. Use tt_ptr_error(), which returns Tt_status, to determine if the pointer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_DBAVAIL
TT_ERR_DBEXIST
TT_ERR_NOMP
TT_ERR_OBJID
TT_ERR_PATH
TT_WRN_SAME_OBJID
|
|
char | | *tt_spec_prop(const char *objid,
const char *propname, int i)
|
Retrieves the i-th value (first value is number 0) of the property associated with this object spec.
 | Note: If this value has embedded nulls, you have no way to determine its length.
|
const char *objid | |
Identifier of the object involved in this operation.
|
const char *propname | |
Name of the property in which you are interested.
|
int i | |
Item of the list in which you are interested. The list numbering begins with 0.
|
char * | |
Contents of the property value. A NULL value is returned if there are i values or less. Use tt_ptr_error(), which returns Tt_status, to determine if the pointer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_DBAVAIL
TT_ERR_DBEXIST
TT_ERR_NOMP
TT_ERR_NUM
TT_ERR_OBJID
TT_ERR_PROPNAME
|
|
Tt_status | | tt_spec_prop_add(const char *objid,
const char *propname, const char *value)
|
Adds a new item to the end of the list of values associated with this spec property.
const char *objid | |
Identifier of the object involved in this operation.
|
const char *propname | |
Property in which you are interested.
|
const char *value | |
New character-string to be added to the property value list.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_DBAVAIL
TT_ERR_DBEXIST
TT_ERR_NOMP
TT_ERR_OBJID
TT_ERR_PROPNAME
TT_ERR_PROPLEN
|
|
int | | tt_spec_prop_count(const char *objid,
const char *propname)
|
Returns the number of values listed in this spec property.
const char *objid | |
Identifier of the object involved in this operation.
|
const char *propname | |
Name of the property in which you are interested.
|
int | |
Number of values listed in the spec property. Use tt_int_error(), which returns Tt_status, to determine if the integer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_DBAVAIL
TT_ERR_DBEXIST
TT_ERR_NOMP
TT_ERR_OBJID
TT_ERR_PROPNAME
|
|
Tt_status | | tt_spec_prop_set(const char *objid,
const char *propname, const char *value)
|
Replaces any values currently stored under this property of the object spec with a new value.
const char *objid | |
Identifier of the object involved in this operation.
|
const char *propname | |
Name of the property in which you are interested.
|
const char *value | |
Value you want to put in the property value list. If value is NULL, the property is removed entirely.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_DBAVAIL
TT_ERR_DBEXIST
TT_ERR_NOMP
TT_ERR_OBJID
TT_ERR_PROPNAME
TT_ERR_PROPLEN
|
|
char | | *tt_spec_propname(const char *objid, int n)
|
Returns the n-th element of the property name list for this object spec.
const char *objid | |
Identifier of the object involved in this operation.
|
int n | |
Item of the list in which you are interested. The list numbering begins with 0.
|
char * | |
Property name. NULL is returned if there are n properties or less.Use tt_ptr_error(), which returns Tt_status, to determine if the pointer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_DBAVAIL
TT_ERR_DBEXIST
TT_ERR_NOMP
TT_ERR_NUM
TT_ERR_OBJID
|
|
int | | tt_spec_propnames_count(const char *objid)
|
Returns the number of property names for this object.
const char *objid | |
Identifier of the object involved in this operation.
|
int | |
Number of values listed in the spec property. Use tt_int_error(), which returns Tt_status, to determine if the integer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_DBAVAIL
TT_ERR_DBEXIST
TT_ERR_NOMP
TT_ERR_OBJID
|
|
char | | *tt_spec_type(const char *objid)
|
Returns the name (otid) of the object type.
const char *objid | |
Identifier of the object involved in this operation.
|
char * | |
Type of this object. Use tt_ptr_error(), which returns Tt_status, to determine if the pointer is valid. Possible Tt_status values are:
TT_OK
TT_ERR_DBAVAIL
TT_ERR_DBEXIST
TT_ERR_NOMP
TT_ERR_OBJID
|
|
Tt_status | | tt_spec_type_set(const char *objid,
const char *otid)
|
Assigns an object type (otype) value to the object spec. The type must be set before the spec is written for the first time, and cannot be changed thereafter.
const char *objid | |
Identifier of the object involved in this operation.
|
const char *otid | |
Otype you want to assign to the spec.
|
Tt_status
| |
|
| | The status of the operation. Possible values are:
TT_OK
TT_ERR_DBAVAIL
TT_ERR_DBEXIST
TT_ERR_NOMP
TT_ERR_OBJID
TT_ERR_READONLY
|
|
tt_spec_create()
tt_spec_write()
|
Tt_status | | tt_spec_write(const char *objid)
|
Writes the spec and any associated properties to the ToolTalk database. It is not necessary to do a write after a destroy.
 | Note: Several changes can be “batched” between write calls; for example, you might create an object spec, set some properties, and then write all the changes at once with one write call.
|
const char *objid | |
Identifier of the object involved in this operation.
|
Tt_status | |
The status of the operation. Possible values are:
TT_OK
TT_ERR_DBAVAIL
TT_ERR_DBEXIST
TT_ERR_NOMP
TT_ERR_OBJID
|
|
tt_spec_create()
tt_spec_type_set()
|
char | | *tt_status_message(Tt_status ttrc)
|
Returns a pointer to a message describing the problem indicated by this Tt_status code.
Tt_status ttrc | |
Tt_status code you received during an operation.
|
char * | |
Pointer to character string describing Tt_status code. Use tt_ptr_error(), which returns Tt_status, to determine if the pointer is valid. Possible Tt_status values are:
|
char | | tt_X_session(const char *xdisplaystring)
|
Returns the session associated with the named X Window System display.
const char *xdisplaystring | |
Name of an X11 display server, e.g. somehost:0, :0, etc.
|
char * | |
Identifier for the current ToolTalk session.
Use tt_ptr_error(), which returns Tt_status, to determine if the pointer is valid. Possible Tt_status values are:
|