TT_OREQUEST_CREATE(3)

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

πŸ’… tt_orequest_create β€” bestie, let's make a request message ✨

okay so this one lives in the ToolTalk crew, and it's giving "library call" energy β€” like, this is a function you call, not a command you type at your shell. The header up top says tt_orequest_create(library call) and that's literally the whole vibe πŸŽ€


🌸 NAME 🌸

tt_orequest_create β€” create a request message. that's it, that's the whole job, and she does it iconically πŸ’…


✨ SYNOPSIS ✨

#include <Tt/tt_c.h>
Tt_message tt_orequest_create(
const char *objid,
const char *op);

like, include the header first bestie, we don't do undeclared functions in this house 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

so tt_orequest_create creates a message. no cap, that's literally what it does 😭 and the message she hands you back comes pre-loaded with these two attributes:

  • Tt_address = TT_OBJECT
  • Tt_class = TT_REQUEST

once you've got that handle, the application can use it to add arguments and other attributes, and to send the message. like, the handle is your main character pass β€” you build the message out with it, then you send it off into the world 🌈

about the arguments, periodt:

  • the objid argument is the identifier of the specified object. that's which thing you're talking to.
  • the op argument is the operation to be performed by the receiving process. that's what you want them to do about it.

πŸ’– RETURN VALUE πŸ’–

upon successful completion, tt_orequest_create returns the unique handle that identifies the message. obsessed. 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. like, the session server ghosted you 😭
  • TT_ERR_PROCID β€” the specified process identifier is out of date or invalid. expired, stale, no longer it, throw it out πŸ—‘οΈ
ngl, those last two are the ones you'll actually see in the wild β€” if you get TT_ERR_NOMP, check that ttsession(1) is even alive before you spiral, bestie.

🧚 APPLICATION USAGE 🧚

the application should use tt_free(3) to free any data stored in the address returned by the ToolTalk API. yes, this includes you β€” clean up after yourself, we do not leave leaks in this group chat 🫢✨


πŸ“ SEE ALSO πŸ“

iykyk, that's the whole friend group πŸ”₯


little reminder before you go: copy the option names, the file names, and the statuses exactly as written. no renaming, no "fixing," no merging. the facts stay facts, the vibe stays cute. πŸ’œ

and that's the page, bestie!! πŸŽ€ source/version + date wrap-up, cute sign-off style: this was the tt_orequest_create(library call) page β€” go forth and create those request messages, you absolute icon πŸ‘‘πŸ’–

πŸ“¦ where this page comes from