xpacmdadd(3)
π xpacmdadd(3) β the SAORD Documentation glow-up π
okay bestie, welcome to the manual page for xpacmdadd, straight out of the SAORD Documentation fam. this is a C library thing, it lives in section 3, and it's about to make your XPA command access point β¨populatedβ¨. let's get into it π«Ά
πΈ NAME πΈ
XPACmdAdd β add a command to an XPA command public access point. that's it, that's the whole vibe. one job, does it well π
π¦ SYNOPSIS π¦
#include <xpa.h>
XPACmd XPACmdAdd(XPA xpa, char *name, char *help,
int (*send_callback)(),
void *send_data, char *send_mode,
int (*rec_callback)(),
void *rec_data, char *rec_mode);
like. look at all those args. nine of them. she's thorough π but every single one matters, so let's go.
β¨ DESCRIPTION β¨
so the whole point of XPACmdAdd is literally right there in the name: you're adding a command to an XPA command access point. think of it like adding a new item to the menu at your fave cafe π the cafe exists already, you're just giving it one more thing it can make.
the XPA argument? that's the XPA struct you already got back from a call to XPANewCmd(). yes, you gotta have the access point first. no skipping steps, bestie.
the name argument is β shocker β the name of the command. cute, simple, iconic.
now the rest of the arguments? they work identically to the arguments in the XPANew() command. like, truly identical. the send_callback and rec_callback routines have the exact same calling sequences as their XPANew() counterparts β with the exceptions noted below, because of course there are exceptions, it's C π
π how the help works π
when help gets requested for a command access point using:
xpaget -h class:name
you get all of the command help strings listed. the whole squad. every command's help, all at once, no cap π
but if you want help for just one specific command? you gotta be more specific, girl:
xpaget -h class:name cmd
there we go. targeted. focused. main character energy for that one command π
π§ the acl thing (read this part, fr fr) π§
okay this is the important tea β so listen up:
the acl keyword in the send_mode and receive_mode strings is global to the access point β it is not local to the command. like, it belongs to the whole party, not to one guest.
so that means the value for the acl mode should be the same in all send_mode (or receive_mode) strings for each command in a command access point. keep it consistent, bestie, don't be out here setting different acls per command, that's not the move.
tiny plot twist though: theaclforsend_modedoes not need to be the same as theaclforreceive_mode. those two can be different! so like, consistent within each one, but the send side and the receive side are allowed to disagree. iykyk π
π SEE ALSO π
- See
xpa(n)for a list of XPA help pages β go read those too, they're the rest of the lore π
and that's the whole page, bestie!! no crumbs left, we ate π½οΈβ¨
version 2.1.15 Β· July 23, 2013 β yeah she's an older queen but she still slays π mwah, go add some commands ππ¦πΈ
π¦ where this page comes from
- debian bookworm: libxpa-dev 2.1.20-1 Β· MIT
- debian trixie: libxpa-dev 2.1.20-3 Β· MIT
- ubuntu jammy: libxpa-dev 2.1.20-1 Β· MIT
- ubuntu noble: libxpa-dev 2.1.20-1build1 Β· MIT
- ubuntu questing: libxpa-dev 2.1.20-3
- ubuntu resolute: libxpa-dev 2.1.20-3build1 Β· MIT
- ubuntu stonking: libxpa-dev 2.1.20-3build1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms