TT_MESSAGE_ARG_ADD(3)
π tt_message_arg_add β the library call page, bestie edition
okay so picture this: it's a library call, the header literally says tt_message_arg_add(library call) twice because the manpage template is dramatic like that, and we're about to learn how to add a new argument to a message object. sit down, hydrate, let's go π
β¨ NAME β¨
tt_message_arg_add β add a new argument to a message object. that's it, that's the whole vibe. adding. arguments. to. messages. π«Ά
β¨ SYNOPSIS β¨
like, the shape of it:
#include <Tt/tt_c.h>
Tt_status tt_message_arg_add(
Tt_message m,
Tt_mode n,
const char *vtype,
const char *value);
she takes four things and gives you back a Tt_status, no cap.
β¨ DESCRIPTION β¨
so tt_message_arg_add adds a brand new argument to a message object. iconic behaviour. π
big rule #1: the application must add all arguments before the message is sent. like, before. not after. before. and if you want to change existing argument values? the application must use only modes TT_OUT or TT_INOUT. no sneaky other modes, bestie, i'm watching π
π¨ and listen β adding arguments when replying to a message produces undefined results. undefined. not "kinda weird", not "probably fine" β undefined. don't do it, i'm begging π
okay now the arguments themselves:
mβ the opaque handle for the message involved in this operation. it's giving mystery. it's giving "don't look inside". just pass the handle πnβ this one specifies who (sender, handler, observers) writes and reads a message argument. main character energy, honestly.
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. everybody gets a turn, we love to see it πvtypeβ describes the type of argument data being added. it's the label on the box, basically πvalueβ the contents for the message argument attribute. the actual stuff inside the box.
and here's the fun part: the application can use NULL either for values of mode TT_OUT, or if the value is to be filled in later with one of these:
tt_message_arg_val_set
tt_message_iarg_val_set
so like, you can leave the seat empty and let someone fill it in later. lowkey efficient π
β¨ RETURN VALUE β¨
upon successful completion, tt_message_arg_add returns the status of the operation as one of the following Tt_status values. vibe check time:
TT_OKβ the operation completed successfully. slay!! πTT_ERR_MODEβ the specifiedTt_modeis invalid. wrong mode, wrong energy, sorry babe πTT_ERR_NOMPβ thettsession(1)process is not running and the ToolTalk service cannot restart it. she's not home and she's not picking up the phone πTT_ERR_POINTERβ the pointer passed does not point to an object of the correct type for this operation. you handed me the wrong thing bestie, that's not it π
β¨ SEE ALSO β¨
go read these too, i promise they're worth it:
okay that's the whole page!! this was tt_message_arg_add(library call), the library call page β and if you were looking for a date and a version stamp at the bottom, there genuinely isn't one here, so consider this your cute little sign-off instead: go add those arguments before you send the message, use only TT_OUT or TT_INOUT to change values, and never ever add arguments while replying π«Άπ mwah, see u in the next manpage β¨
π¦ where this page comes from
- nixos 26.05: cde 2.5.3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms