1. Introducing the ToolTalk Service
2. An Overview of the ToolTalk Service
4. Setting Up and Maintaining the ToolTalk Processes
5. Maintaining Application Information
6. Maintaining Files and Objects Referenced in ToolTalk Messages
7. Participating in ToolTalk Sessions
Determining Object Specification Properties
Managing Object and File Information
Managing Files that Contain Object Data
Managing Files that Contain ToolTalk Information
An Example of Object-Oriented Messaging
13. Managing Information Storage
A. Migrating from the Classing Engine to the ToolTalk Types Database
B. A Simple Demonstration of How the ToolTalk Service Works
The ToolTalk service provides the functions to examine, compare, query, and move object specs. lists the ToolTalk functions you use to maintain object specs.
Table 12-2 Functions to Maintain Object Specifications
|
You can examine the following spec information with the specified ToolTalk functions:
Path name of the file that contains the object: tt_spec_file
Properties stored on the spec: tt_spec_prop or tt_spec_bprop
To compare two objids, use tt_objid_equal. tt_objid_equal returns a value of 1 even in the case where one objid is a forwarding pointer for the other.
Create a filter function to query for specific specs in a file and obtain the specs in which you are interested.
Use tt_file_objects_query to find all the objects in the named file. As the ToolTalk service finds each object, it calls your filter function, and passes it the objid of the object and the two application-supplied pointers. Your filter function does some computation and returns a Tt_filter_action value (TT_FILTER_CONTINUE or TT_FILTER_STOP) to either continue the query, or to quit the search and return immediately.
illustrates how to obtain a list of specs.
Example 12-1 Obtaining a List of Specifications
|
Within the tt_file_objects_query function, the application calls cntl_gather_specs, a filter function that inserts objects into a scrolling list. illustrates how to insert the objid.
Example 12-2 Inserting the objid
|
The objid contains a pointer to a particular file system where the spec information is stored. To keep spec information as available as the object described by the spec, the ToolTalk service stores the spec information on the same file system as the object. Therefore, if the object moves, the spec must move, too.
Use tt_spec_move to notify the ToolTalk service when an object moves from one file to another (for example, through a cut and paste operation).
If a new objid is not required (because both the new and old files are in the same file system), the ToolTalk service returns TT_WRN_SAME_OBJID.
If the object moved to another file system, the ToolTalk service returns a new objid for the object and leaves a forwarding pointer in the ToolTalk database from the old objid to the new one.
When your process sends a message to an out-of-date objid (that is, one with a forwarding pointer), tt_message_send returns a special status code, TT_WRN_STALE_OBJID, and replaces the object attribute in the message with a new objid that points to the same object in the new location.
Note - Update any internal data structures that reference the object with the new objid.