1
/* $Xorg: Rx.h,v 1.4 2001/02/09 02:05:58 xorgcvs Exp $ */
4
Copyright 1996, 1998 The Open Group
6
Permission to use, copy, modify, distribute, and sell this software and its
7
documentation for any purpose is hereby granted without fee, provided that
8
the above copyright notice appear in all copies and that both that
9
copyright notice and this permission notice appear in supporting
12
The above copyright notice and this permission notice shall be included
13
in all copies or substantial portions of the Software.
15
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
16
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
17
ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
18
SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABIL-
19
ITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
23
Except as contained in this notice, the name of The Open Group shall
24
not be used in advertising or otherwise to promote the sale, use or
25
other dealings in this Software without prior written authorization from
33
/* a fancy Boolean type */
34
typedef enum { RxUndef=-1, RxFalse=0, RxTrue=1 } RxBool;
37
/* various enums, starting from index 1,
38
with a dummy last value allowing to easily get the size,
39
new values must be inserted before the last one */
40
typedef enum { UI=1, Print, LASTService } RxService;
41
typedef enum { XUI=1, LASTUIProtocol } RxUIProtocol;
42
typedef enum { XPrint=1, LASTPrintProtocol } RxPrintProtocol;
44
typedef enum { MitMagicCookie1=1, LASTXAuthentication } RxXAuthentication;
46
/* for each of the above enum define the corresponding max array size,
47
counting 1 for NULL terminating */
48
#define MAX_SERVICES LASTService
49
#define MAX_UIPROTOS LASTUIProtocol
50
#define MAX_PRINTPROTOS LASTPrintProtocol
52
#define MAX_XAUTHENTICATIONS LASTXAuthentication
54
/* RxParams structure,
55
designed so it can handle whatever parameter is defined in an RX document */
57
short version; /* document version number */
58
short revision; /* document revision number */
60
char *action; /* URL */
65
char *app_group; /* application group name */
67
/* NULL terminated "lists" */
68
RxService required_services[MAX_SERVICES];
69
RxUIProtocol ui[MAX_UIPROTOS];
70
RxPrintProtocol print[MAX_PRINTPROTOS];
73
RxBool x_ui_input_method;
74
char *x_ui_input_method_url;
79
RxXAuthentication x_auth[MAX_XAUTHENTICATIONS];
80
char *x_auth_data[MAX_XAUTHENTICATIONS];
82
RxXAuthentication x_ui_auth[MAX_XAUTHENTICATIONS];
83
char *x_ui_auth_data[MAX_XAUTHENTICATIONS];
85
RxXAuthentication x_print_auth[MAX_XAUTHENTICATIONS];
86
char *x_print_auth_data[MAX_XAUTHENTICATIONS];
88
RxXAuthentication x_ui_lbx_auth[MAX_XAUTHENTICATIONS];
89
char *x_ui_lbx_auth_data[MAX_XAUTHENTICATIONS];
91
RxXAuthentication x_print_lbx_auth[MAX_XAUTHENTICATIONS];
92
char *x_print_lbx_auth_data[MAX_XAUTHENTICATIONS];
103
char *print; /* URL */
109
char *x_print_lbx_auth;
115
RxReadParams(char *stream,
116
char **argn_ret[], char **argv_ret[], int *argc_ret);
118
extern void RxInitializeParams(RxParams *params);
121
RxParseParams(char *argn[], char *argv[], int argc, RxParams *params,
122
int debug); /* (1/0) */
124
extern char *RxBuildRequest(RxReturnParams *params);
126
extern int RxFreeParams(RxParams *params);
127
extern int RxFreeReturnParams(RxReturnParams *params);