1xpaserver(3)                  SAORD Documentation                 xpaserver(3)
2
3
4

NAME

6       XPAServer: The XPA Server-side Programming Interface
7

SYNOPSIS

9       A description of the XPA server-side programming interface.
10

DESCRIPTION

12       Introduction to XPA Server Programming
13
14       Creating an XPA server is easy: you generally only need to call the
15       XPANew() subroutine to define a named XPA access point and set up the
16       send and receive callback routines.  You then enter an event loop such
17       as XPAMainLoop() to field XPA requests.
18
19         #include <xpa.h>
20
21         XPA XPANew(char *class, char *name, char *help,
22             int (*send_callback)(), void *send_data, char *send_mode,
23             int (*rec_callback)(),  void *rec_data,  char *rec_mode);
24
25         XPA XPACmdNew(char *class, char *name);
26
27         XPACmd XPACmdAdd(XPA xpa,
28                char *name, char *help,
29                int (*send_callback)(), void *send_data, char *send_mode,
30                int (*rec_callback)(),  void *rec_data,  char *rec_mode);
31
32         void XPACmdDel(XPA xpa, XPACmd cmd);
33
34         XPA XPAInfoNew(char *class, char *name,
35             int (*info_callback)(), void *info_data, char *info_mode);
36
37         int XPAFree(XPA xpa);
38
39         void XPAMainLoop(void);
40
41         int XPAPoll(int msec, int maxreq);
42
43         void XPACleanup(void);
44
45       Introduction
46
47       To use the XPA application programming interface, a software developer
48       generally will include the xpa.h definitions file:
49
50         #include <xpa.h>
51
52       in the software module that defines or accesses an XPA access point,
53       and then will link against the libxpa.a library:
54
55         gcc -o foo foo.c libxpa.a
56
57       XPA has been compiled using both C and C++ compilers.
58
59       A server program generally defines an XPA access point by calling the
60       XPANew() routine and specifies "send" and/or "receive" callback proce‐
61       dures to be executed by the program when an external process either
62       sends data or commands to this access point or requests data or infor‐
63       mation from this access point. A program also can define several sub-
64       commands for a single access point by calling XPACmdNew() and XPACm‐
65       dAdd() instead.  Having defined one or more public access points in
66       this way, an XPA server program enters its usual event loop (or uses
67       the standard XPA event loop).
68

SEE ALSO

70       See xpa(n) for a list of XPA help pages
71
72
73
74version 2.1.12                 January 26, 2010                   xpaserver(3)
Impressum