TT_MESSAGE_ARG_MODE(3)

πŸ“¦
version 2.5.3 Β· 2 versions
, in nixos 26.05

πŸ’… tt_message_arg_mode β€” the library call era, bestie

okay so this page is tt_message_arg_mode(library call) and honestly? she's a little legend. picture this: you've got a message, you've got arguments, and you wanna know which direction the tea flows β€” who writes it, who reads it. that's her whole job. slay.


✨ NAME ✨

tt_message_arg_mode β€” return the mode of a message argument πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <Tt/tt_c.h>
Tt_mode tt_message_arg_mode(
Tt_message m,
int n);

🌸 DESCRIPTION 🌸

so like, tt_message_arg_mode returns the mode of the *n*th message argument. that's it. that's the vibe check.

okay now the details, because details are literally everything:

  • the m argument is the opaque handle for the message involved in this operation.
  • the n argument is the number of the argument to be returned.
  • and the first argument is numbered zero. yes bestie, zero-indexed. as is tradition. πŸ™ˆ

πŸ‘‘ RETURN VALUE πŸ‘‘

upon successful completion, tt_message_arg_mode returns a value that specifies who (sender, handler, observers) writes and reads a message argument. iykyk β€” the modes are giving very specific energy:

  • TT_IN β€” the argument is written by the sender and read by the handler and any observers.
  • TT_OUT β€” the argument is written by the handler and read by the sender and any reply observers.
  • TT_INOUT β€” the argument is written by the sender and the handler and read by all. πŸ”₯ everyone gets a turn, no gatekeeping.

and here's the part where you gotta stay sharp: the application can use tt_int_error(3) to extract one of the following Tt_status values from the Tt_mode integer return value:

  • TT_OK β€” the operation completed successfully. we love a win πŸ’–
  • TT_ERR_NOMP β€” the ttsession(1) process is not running and the ToolTalk service cannot restart it. 😭 the whole service is just... not home.
  • TT_ERR_NUM β€” the integer value passed was invalid (out of range). you asked for argument number what now πŸ’€
  • TT_ERR_POINTER β€” the pointer passed does not point to an object of the correct type for this operation. wrong object, wrong vibe, hard pass 🫢

🌈 SEE ALSO 🌈


and that's the whole page, bestie β€” no cap. this little icon was living in the tt_message_arg_mode(library call) section, and the footer said the exact same thing: tt_message_arg_mode(library call). no fancy date stamp, no version drama, just that. periods, quietly iconic. πŸ§šπŸ’œ

πŸ“¦ where this page comes from