TT_PATTERN_ARG_ADD(3)

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

🌸 NAME 🌸

tt_pattern_arg_add β€” add an argument to a pattern. You're on the tt_pattern_arg_add(library call) page, and this is literally her whole job, bestie πŸ’…βœ¨


✨ SYNOPSIS ✨

#include &<Tt/tt_c.h>
Tt_status tt_pattern_arg_add(
Tt_pattern p,
Tt_mode n,
const char *vtype,
const char *value);

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so tt_pattern_arg_add adds an argument to a pattern. Real talk: the application must add pattern arguments before it registers the pattern with the ToolTalk service β€” that's the order, no skipping, periodt. πŸŽ€

The p argument is the opaque handle for the pattern involved in this operation. 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 type ALL matches any argument value type. The value argument is the value to fill in. This value must be an unsigned character string. A NULL matches any value. 🫢


πŸ”₯ RETURN VALUE πŸ”₯

Upon successful completion, the tt_pattern_arg_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_NOMP β€” the ttsession(1) process is not running and the ToolTalk service cannot restart it. 😭
  • TT_ERR_POINTER β€” the pointer passed does not point to an object of the correct type for this operation. πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘


And that's the page, bestie β€” cute little sign-off with the footer text tt_pattern_arg_add(library call), no extra date/version line in the original, just that manual-call energy πŸ«ΆπŸ’–

πŸ“¦ where this page comes from