JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
ToolTalk User's Guide
search filter icon
search icon

Document Information

Preface

1.  Introducing the ToolTalk Service

2.  An Overview of the ToolTalk Service

3.  Message Patterns

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

Including the ToolTalk API Header File

Registering with the ToolTalk Service

Registering in the Initial Session

Registering in a Specified Session

Registering in Multiple Sessions

Setting Up to Receive Messages

Sending and Receiving Messages in the Same Process

Sending and Receiving Messages in a Networked Environment

Unregistering from the ToolTalk Service

Using ToolTalk in a Multi-Threaded Environment

Initialization

ToolTalk procids and sessions

ToolTalk storage

Common Problems

8.  Sending Messages

9.  Dynamic Message Patterns

10.  Static Message Patterns

11.  Receiving Messages

12.  Objects

13.  Managing Information Storage

14.  Handling Errors

A.  Migrating from the Classing Engine to the ToolTalk Types Database

B.  A Simple Demonstration of How the ToolTalk Service Works

C.  The ToolTalk Standard Message Sets

D.  Frequently Asked Questions

Glossary

Index

Setting Up to Receive Messages

Before your application can receive messages from other applications, you must set up your process to watch for arriving messages. When a message arrives for your application, the file descriptor becomes active. The code you use to alert your application that the file descriptor is active depends on how your application is structured.

For example, a program that uses the XView notifier, through the xv_main_loop or notify_start calls, can have a callback function invoked when the file descriptor becomes active. The following code sample invokes notify_set_input_func with the handle for the message object as a parameter.

    /*
     * Arrange for XView to call receive_tt_message when the
     * ToolTalk file descriptor becomes active.
     */
    notify_set_input_func(base_frame,
                                (Notify_func)receive_tt_message,
                            ttfd);

describes various window toolkits and the call used to watch for arriving messages.

Table 7-2 Code Used to Watch for Arriving Messages

Window Toolkits
Code Used
XView
notify_set_input_func()
X Window System Xt (Intrinsics)
XtAddInput() or XtAddAppInput()
Other toolkits including Xlib structured around select(2) or poll(2) system calls
The file descriptor returned by tt_fd()

Note: Once the file descriptor is active and the select call exits, use tt_message_receive() to obtain a handle for the incoming message.