xpainfonew(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

πŸ’– 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 β€” value true/false, default true, 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: the xpainfo program and the XPAInfo() routine that cause the info_callback to 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 πŸ’…βœ¨