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
Callbacks for Messages Addressed to Handlers
Attaching Callbacks to Static Patterns
Rejecting or Failing a Request
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
When a message arrives for your process, the ToolTalk-supplied file descriptor becomes active. When notified of the active state of the file descriptor, your process must call tt_message_receive to get a handle for the incoming message.
illustrates how to receive a message.
Example 11-1 Receiving a Message
|
Handles for messages remain constant. For example, when a process sends a message, both the message and any replies to the message have the same handle as the sent message. is an example of how you can check the message state for TT_HANDLED.
Example 11-2 Code Checking the Message State
|
To easily identify and process messages received by you:
Add a callback to a dynamic pattern with tt_pattern_callback_add. When you retrieve the message, the ToolTalk service will invoke any message or pattern callbacks. See for more information on placing callbacks on patterns.
Retrieve the message's opnum if you are receiving messages that match your ptype message patterns.
To easily recognize and handle replies to messages sent by you: