The \s-1xpa\s0 client-side programming interface
A description of the \s-1XPA\s0 client-side programming interface.
Introduction to \s-1XPA\s0 Client Programming
Sending/receiving data to/from an \s-1XPA\s0 access point is easy: you generally only need to call the XPAGet() or XPASet() subroutines.
#include <xpa.h> int XPAGet(XPA xpa, char *template, char *paramlist, char *mode, char **bufs, size_t *lens, char **names, char **messages, int n); int XPASet(XPA xpa, char *template, char *paramlist, char *mode, char *buf, size_t len, char **names, char **messages, int n); int XPAInfo(XPA xpa, char *template, char *paramlist, char *mode, char **names, char **messages, int n); int XPAAccess(XPA xpa, char *template, char *paramlist, char *mode, char **names, char **messages, int n); int XPAGetFd(XPA xpa, char *template, char *paramlist, char *mode, int *fds, char **names, char **messages, int n); int XPASetFd(XPA xpa, char *template, char *paramlist, char *mode, int fd, char **names, char **messages, int n); XPA XPAOpen(char *mode); void XPAClose(XPA xpa); int XPANSLookup(XPA xpa, char *template, char *type, char ***classes, char ***names, char ***methods, char ***infos);
Introduction
To use the \s-1XPA\s0 application programming interface, a software developer generally will include the xpa.h definitions file:
#include <xpa.h>
in the software module that defines or accesses an \s-1XPA\s0 access point and then will link against the libxpa.a library:
gcc \-o foo foo.c libxpa.a
\s-1XPA\s0 has been compiled using both C and \*(C+ compilers.
Client communication with \s-1XPA\s0 public access points generally is accomplished using XPAGet() or XPASet() within a program (or xpaget and xpaset at the command line). Both routines require specification of the name of the access point. If a template is used to specify the access point name (e.g., \*(L"ds9*\*(R"), then communication will take place with all servers matching that template.
See xpa(7) for a list of \s-1XPA\s0 help pages