ToolTalk User's Guide

Observing Offers

When your process receives an offer (class = TT_OFFER) in state TT_SENT, it must eventually do one of five things:

  1. Accept the offer by calling tt_message_accept() on the message. This will tell the sending procid that the receiving procid has accepted the offer.

  2. Reject the offer by calling tt_message_reject() on the message. This will tell the sending procid that the receiving procid has rejected the offer.

  3. Abstain from the offer by calling tt_message_destroy() on the message without accepting or rejecting it first. This will tell the sending procid that the receiving procid has abstained from the offer.

  4. Abstain from the offer by calling tt_message_receive() again without accepting or rejecting the offer first. This also will tell the sending procid that the receiving procid has abstained from the offer.

  5. Disconnect from the ToolTalk service by calling tt_close(), or by exiting (normally or abnormally). In this case the ttsession process to which the client process is connected will mark the client process as abstaining from the offer.

When the handler (if any) and all the observers have accepted, rejected, or abstained from the message, the message state (Tt_state) will be set to TT_RETURNED. Intermediate states on an offer that will not be seen on other message classes are defined as:

  1. TT_ACCEPTED--an Offer will enter this state whenever a receiver does a tt_message_accept() on it.

  2. TT_REJECTED--an Offer will enter this state whenever a receiver does a tt_message_reject() on it.

  3. TT_ABSTAINED--an Offer will enter this state whenever a receiver does choice 3, 4, or 5 above on it.