dtcm: Resolve CID 87822
[oweals/cde.git] / cde / programs / dtcm / server / rpcextras.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
6  * These libraries and programs are free software; you can
7  * redistribute them and/or modify them under the terms of the GNU
8  * Lesser General Public License as published by the Free Software
9  * Foundation; either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * These libraries and programs are distributed in the hope that
13  * they will be useful, but WITHOUT ANY WARRANTY; without even the
14  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  * PURPOSE. See the GNU Lesser General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these librararies and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  */
23 /* $XConsortium: rpcextras.h /main/4 1995/11/09 12:51:20 rswiston $ */
24 /*
25  *  (c) Copyright 1993, 1994 Hewlett-Packard Company
26  *  (c) Copyright 1993, 1994 International Business Machines Corp.
27  *  (c) Copyright 1993, 1994 Novell, Inc.
28  *  (c) Copyright 1993, 1994 Sun Microsystems, Inc.
29  */
30
31 #ifndef _RPCEXTRAS_H
32 #define _RPCEXTRAS_H
33
34 #include "ansi_c.h"
35
36 #define RPCGEN_ACTION(routine) routine
37
38 struct rpcgen_table {
39     char        *(*proc)();
40     xdrproc_t   xdr_arg;
41     unsigned    len_arg;
42     xdrproc_t   xdr_res;
43     unsigned    len_res;
44 };
45
46 /* you might want to consider a program list rather than a table */
47 /* a list would be cleaner, a table easier.  it's a table here for clarity */
48 typedef struct prog_table {
49         struct rpcgen_table *vers;
50         u_long nproc;
51         } program_table;
52
53 typedef struct prog_object {
54         program_table *prog;
55         u_long nvers;
56         u_long program_num;
57         } program_object;
58
59 typedef program_object *program_handle;
60
61 extern program_handle newph     P(());
62 extern program_handle getph     P(());
63
64 #endif