xpacmdadd(3)

πŸ“¦
version 2.1.20 Β· 2 versions
  • 2.1.20 Β· debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 2.1.20 Β· fedora 43, fedora 44
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– 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: the acl for send_mode does not need to be the same as the acl for receive_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 πŸŽ€πŸ¦‹πŸŒΈ