TT_SESSION_BPROP(3)

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

🌸 NAME 🌸

tt_session_bprop β€” grab the ith value of a named property on a session, bestie πŸ’…

(this one lives in the library call section of the manual, fyi 🫢)


✨ SYNOPSIS ✨

#include <Tt/tt_c.h>
Tt_status tt_session_bprop(
const char *sessid,
const char *propname,
int i,
unsigned char **value,
int *length);

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so tt_session_bprop fetches the ith value of the property you named, from the session you specified. That's literally the whole vibe πŸ’–

Heads up tho: if there are i values or fewer, then both the returned value and the returned length get set to zero. Not one, not the other β€” both. Zero. Periodt ✨

Now let's break down the args, because iykyk:

  • sessid β€” the session you joined, hun. You can totally use the sessid value that came back when tt_default_session was called πŸŽ€
  • propname β€” the name of the property you're pulling values out of 🌸
  • i β€” which item in the property list you want. And listen β€” the list numbering starts at zero. Classic. πŸ™ˆ
  • value β€” the address of a character pointer that the ToolTalk service points at a string holding the contents of the property ✨
  • length β€” the address of an integer where the ToolTalk service sets the length of the value, in bytes πŸ’œ (the description below calls this one len, just so you're not confused when you see it πŸ‘€)

πŸ”₯ RETURN VALUE πŸ”₯

When it's a slay and everything works, tt_session_bprop returns the status of the operation as one of these Tt_status values:

  • TT_OK β€” the operation completed successfully, we love to see it πŸ‘‘
  • TT_ERR_NOMEM β€” not enough memory available to actually do the function 😭
  • TT_ERR_NOMP β€” the ttsession(1) process isn't running and the ToolTalk service can't restart it πŸ’€
  • TT_ERR_NUM β€” the integer value you passed was invalid (out of range) 🚩
  • TT_ERR_PROPNAME β€” that property name is syntactically invalid, bestie πŸ™ˆ
  • TT_ERR_SESSION β€” the ToolTalk session you specified is out of date or just plain invalid 🌧️

πŸ’« SEE ALSO πŸ’«

  • Tt/tt_c.h β€” and also Tttt_c(5), go read it 🧚

and that's the whole page, bestie β€” filed under library calls, no date stamp on this one, so consider this your cute little sign-off πŸŽ€πŸ’–βœ¨

πŸ“¦ where this page comes from