TT_SPEC_PROP_SET(3)

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

πŸ’… tt_spec_prop_set β€” like, the library call version, bestie

okay so picture this: it's a C library call, it lives in the ToolTalk world, and its whole entire job is replacing property values. that's it. that's the vibe. let's get into it ✨


✨ SYNOPSIS ✨

#include &<Tt/tt_c.h>
Tt_status tt_spec_prop_set(
const char *objid,
const char *propname,
const char *value);

like, that's the whole thing. three args, one status back. slay.


πŸŽ€ DESCRIPTION πŸŽ€

so tt_spec_prop_set replaces any values that are currently chilling under this property of the object spec with a brand new value. not adds. not merges. replaces. the old values are gone gone, periodt. πŸ’€

here's the cast of characters:

  • objid β€” the identifier of the object involved in this operation. like, which object are we even talking about, bestie.
  • propname β€” the name of the property that stores the values. the lil label on the box πŸ“¦
  • value β€” the value to be placed in the property value list. and here's the plot twist: if value is NULL, the property gets removed entirely. gone. deleted. no cap. 🫢

🌈 RETURN VALUE 🌈

when it goes off without a hitch, tt_spec_prop_set returns the status of the operation as one of these following Tt_status values. iykyk, read them carefully:

  • TT_OK β€” the operation completed successfully. we love to see it πŸ‘‘
  • TT_ERR_DBAVAIL β€” the ToolTalk service could not access the ToolTalk database needed for this operation. 😭
  • TT_ERR_DBEXIST β€” the ToolTalk service could not access the specified ToolTalk database in the expected place. like it went looking and nobody was home 🏚️
  • TT_ERR_NOMP β€” the ttsession(1) process is not running and the ToolTalk service cannot restart it. rip πŸ’€
  • TT_ERR_OBJID β€” the objid passed to the ToolTalk service does not reference an existing object spec. that object said "who?" πŸ™ˆ
  • TT_ERR_PROPLEN β€” the specified property value is too long. (the maximum size is implementation specific, but is at least 2048.) okay so important detail here, don't skip it: at least 2048, but the real max is up to whoever implemented it. so like, don't go assuming 2048 is the ceiling, bestie 🚨
  • TT_ERR_PROPNAME β€” the specified property name is syntactically invalid. it's giving "you typed it wrong" ✨

πŸ¦‹ SEE ALSO πŸ¦‹


and that's the whole page, bestie!! this lil beauty comes to you straight from the tt_spec_prop_set(library call) manual β€” the library call section, no date on this one, that's just how it is πŸ’– go forth and set those properties 🌸

πŸ“¦ where this page comes from