TT_MESSAGE_CREATE(3)

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

πŸ’– tt_message_create β€” library call πŸ’–

okay so this is the page for tt_message_create, from the library call manual, and it's literally about creating a new message object. bestie, it's a whole vibe: you call it, ToolTalk hands you an opaque handle, and you go live your main-character life. ✨


✨ NAME ✨

tt_message_create β€” create a new message object 🫢


🌸 SYNOPSIS 🌸

#include &<Tt/tt_c.h>
Tt_message tt_message_create(void)

yes, that include line has an & in it, and I am not touching it. we respect the manpage in this house. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

The tt_message_create function creates a new message object. that's the whole assignment, and it ate. πŸ’–

The ToolTalk service returns a message handle that is an opaque pointer to a ToolTalk structure. so like… it's a handle bestie, not a scavenger hunt. do not go poking at it like it's a normal pointer. πŸ™ˆ


πŸ’… RETURN VALUE πŸ’…

Upon successful completion, the tt_message_create function returns the unique opaque handle that identifies the message object. iconic. πŸ‘‘

The application can use tt_ptr_error(3) to extract one of the following Tt_status values from the returned handle:

  • TT_OK β€” the operation completed successfully. slay. βœ…
  • TT_ERR_NOMP β€” the ttsession(1) process is not running and the ToolTalk service cannot restart it. not the session ghosting us 😭
  • TT_ERR_PROCID β€” the process identification is not valid. identity crisis, but make it ToolTalk. πŸ’€

πŸŽ€ APPLICATION USAGE πŸŽ€

A return value of TT_ERR_PROCID implies that tt_open(3) was not issued before tt_message_create. so if you see that one, check yourself before you wreck yourself: did you open first? πŸ‘€

If the ToolTalk service is unable to create a message when requested, tt_message_create returns an invalid handle. When the application attempts to use this handle with another ToolTalk function, the ToolTalk service will return TT_ERR_POINTER. so do not keep passing around a cursed handle and acting surprised. it's giving "why is everything on fire" and the answer is the invalid handle. πŸ”₯

bestie warning: an invalid handle is not a cute little mystery box. using it elsewhere gets you TT_ERR_POINTER, periodt. 🫢

🌈 SEE ALSO 🌈

go read those too, iykyk. πŸ“šβœ¨


and that's the page, bestie. the footer/source-version line is literally tt_message_create(library call) β€” no date listed in the original footer, so don't come for me πŸ’€. mwah. πŸ’‹πŸŽ€

πŸ“¦ where this page comes from