1xpaserver(3) SAORD Documentation xpaserver(3)
2
3
4
6 XPAServer: The XPA Server-side Programming Interface
7
9 A description of the XPA server-side programming interface.
10
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 Introduction
42
43 To use the XPA application programming interface, a software developer
44 generally will include the xpa.h definitions file:
45
46 #include <xpa.h>
47
48 in the software module that defines or accesses an XPA access point,
49 and then will link against the libxpa.a library:
50
51 gcc -o foo foo.c libxpa.a
52
53 XPA has been compiled using both C and C++ compilers.
54
55 A server program generally defines an XPA access point by calling the
56 XPANew() routine and specifies "send" and/or "receive" callback proce‐
57 dures to be executed by the program when an external process either
58 sends data or commands to this access point or requests data or infor‐
59 mation from this access point. A program also can define several sub-
60 commands for a single access point by calling XPACmdNew() and XPACm‐
61 dAdd() instead. Having defined one or more public access points in
62 this way, an XPA server program enters its usual event loop (or uses
63 the standard XPA event loop).
64
66 See xpa(n) for a list of XPA help pages
67
68
69
70version 2.1.8 November 1, 2007 xpaserver(3)