xpainfonew(3)
π XPAInfoNew π
okay bestie, so this one's from the SAORD Documentation crew β it's xpainfonew(3), and it's literally the whole "hey everyone, look at this" of the XPA world. let's get into it π«Ά
β¨ NAME β¨
XPAInfoNew β define an XPA info public access point πΈ
π SYNOPSIS π
#include <xpa.h>
XPA XPAInfoNew(char *class, char *name,
int (*info_callback)(),
void *info_data, char *info_mode);
π¦ DESCRIPTION π¦
NB: this is an experimental interface, new to XPA 2.0, and its value and best use are still evolving. so like, it's giving "we're figuring it out as we go" energy π
so here's the vibe: a program can register interest in receiving a short message about a particular topic from any other process that feels like sending one. and the best part? neither of them has to be an XPA server. iconic behavior honestly.
for example, say a user starts working with a new image file called new.fits β she might wanna alert all the interested programs about this new file by sending a short message using xpainfo:
xpainfo IMAGEFILE /data/new.fits
in this example, every single process that used the XPAInfoNew() call to register interest in messages tied to the identifier IMAGEFILE will get its info_callback() executed with this exact calling sequence:
int info_cb(void *info_data, void *call_data, char *paramlist)
{
XPA xpa = (XPA)call_data;
}
the arguments passed to this routine are equivalent to the ones sent in the send_callback() routine. the main difference is that there's no buf sent to the info callback β this mechanism is meant for short announcements of messages of interest to many clients. no long paragraphs, just a lil group-chat ping π£
the mode string is formatted like this: "key1=value1,key2=value2,..." and these keywords are recognized:
aclβ valuetrue/false, defaulttrue, explanation: enable access control π
and because no buf is passed to this callback, the usual buf-related keywords just don't apply here. not applicable, not invited to the function, blocked π
the information sent in the parameter list is arbitrary β do whatever, bestie. that said, the docs envision sending stuff like file names or XPA access points from which to collect more data. π«
heads up: thexpainfoprogram and theXPAInfo()routine that cause theinfo_callbackto execute do not wait for the callback to complete before returning. so don't be out here expecting it to hold the door open for you π
π SEE ALSO π
See xpa(n) for a list of XPA help pages
and that's a wrap, bestie π this was xpainfonew(3) from version 2.1.15, dated July 23, 2013, brought to you by SAORD Documentation. go forth and announce things π β¨
π¦ 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