gsasl_callback_hook_set(3)

πŸ’… gsasl_callback_hook_set β€” the lil' function that holds ur stuff ✨

okay bestie, so this is a page from the gsasl manual β€” yes, THAT gsasl. Buckle up, it's short but it's iconic. πŸŽ€


🌸 NAME 🌸

gsasl_callback_hook_set β€” it's an API function, babes. An API function. Periodt.


✨ SYNOPSIS ✨

#include <gsasl.h>

void gsasl_callback_hook_set(Gsasl * ctx, void * hook);

no cap, that's the whole vibe. πŸ’–


πŸ¦‹ ARGUMENTS πŸ¦‹

  • Gsasl * ctx β€” this is ur libgsasl handle. the main character, honestly. πŸ‘‘
  • void * hook β€” an opaque pointer to application specific data. "opaque" meaning we're not looking inside it, we're just holding it for you. it's giving mysterious. πŸ•ΆοΈ

πŸ’« DESCRIPTION πŸ’«

So here's the tea: this function stores application specific data in the libgsasl handle. That's it. That's the job. And it slays at it.

Then later β€” say, inside a callback β€” you can get that data back by calling gsasl_callback_hook_get(). 🫢 It's literally the matching pair, the bestie duo, the set-and-get situation.

What's it for? It's normally used by the application to maintain a global state between the main program and callbacks. So like, when ur callback needs to remember what the main program was up to, this is how you do it. Global state, but make it ✨deliberate✨.


⏰ SINCE ⏰

0.2.0 β€” she's been here since 0.2.0, an OG, a legend, a pioneer. πŸ’€ (affectionate)


πŸ› REPORTING BUGS πŸ›

Found a bug? Not the vibe. Tell the gsasl girlies:


Copyright Β© 2002-2026 Simon Josefsson.

Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. (yes bestie, you can share it, no royalties, just keep the notice β€” we love a permissive license πŸ’–)


πŸ‘€ SEE ALSO πŸ‘€

The full documentation for gsasl is maintained as a Texinfo manual. If the info and gsasl programs are properly installed at your site, the command

info gsasl

should give you access to the complete manual. As an alternative you may obtain the manual from:

https://www.gnu.org/software/libidn/gsasl/manual/

like, go read the whole thing, I promise it's worth it. 🧚


quick reminder bestie: this one's just a setter. it doesn't do the thing, it just holds ur data so the thing can find it later. small function, big responsibility, main character energy fr fr. πŸ’…

and that's the whole page!! 🌈 sign-off time: this was from gsasl version 2.2.4, and the manual section is gsasl_callback_hook_set(3). mwah, go forth and store ur application specific data. πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from