TT_MESSAGE_XARG_ADD(3)

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

🌸 NAME 🌸

okay so tt_message_xarg_add is a library call manual page, bestie β€” it adds an argument with an XDR-interpreted value to a message object. ✨


✨ SYNOPSIS ✨

#include &<Tt/tt_c.h>
Tt_status tt_message_xarg_add(
Tt_message m,
Tt_mode n,
const char *vtype,
xdrproc_t xdr_proc,
void *value);

πŸ’– DESCRIPTION πŸ’–

The tt_message_xarg_add function adds an argument with an XDR-interpreted value to a message object. That's the whole main-character move: argument goes in, XDR interprets the value, message object gets updated. πŸ’…

🚨 To change existing argument values, the application must use only modes TT_OUT or TT_INOUT. No other mode for that, periodt.
πŸ’€ Adding arguments when replying to a message produces undefined results. Not sketchy in a fun way β€” sketchy in a β€œplease don't” way.

The m argument is the opaque handle for the message involved in this operation. It's giving β€œyou don't need to know what's inside, just hold the handle.” 🫢

The n argument specifies who (sender, handler, observers) writes and reads a message argument. The following modes are defined:

  • 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.

The vtype argument describes the type of argument data being added. The xdr_proc argument points to the XDR procedure to be used to serialize the data pointed to by value. The value argument is the data to be serialized. Literally the payload, bestie. πŸŽ€


πŸ”₯ RETURN VALUE πŸ”₯

Upon successful completion, the tt_message_xarg_add function returns the status of the operation as one of the following Tt_status values:

  • TT_OK β€” The operation completed successfully. slay. βœ…
  • TT_ERR_MODE β€” The specified Tt_mode is invalid. mode vibe check failed. 😭
  • TT_ERR_NOMP β€” The ttsession(1) process is not running and the ToolTalk service cannot restart it. the session said β€œnot today.” πŸ’€
  • TT_ERR_POINTER β€” The pointer passed does not point to an object of the correct type for this operation. wrong pointer energy, fr fr.
  • TT_ERR_XDR β€” The XDR procedure failed on the given data, or evaluated to a zero-length expression. XDR said nope. πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘

Tt/tt_c.h - Tttt_c(5)


sign-off: tt_message_xarg_add(library call) β€” that's the footer label, source/version/date tea included as shown, and no extra numbers beyond it, periodt πŸ’…

πŸ“¦ where this page comes from