2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
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)
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
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
23 /*%% (c) Copyright 1993, 1994 Hewlett-Packard Company */
24 /*%% (c) Copyright 1993, 1994 International Business Machines Corp. */
25 /*%% (c) Copyright 1993, 1994 Sun Microsystems, Inc. */
26 /*%% (c) Copyright 1993, 1994 Novell, Inc. */
27 /*%% $TOG: mp_rpc_interface.h /main/4 1999/08/30 10:57:58 mgreess $ */
30 * @(#)mp_rpc_interface.h 1.9 93/07/30
34 * Constants that must be known by both client and server in the
35 * ttsession RPC interface.
37 * Copyright (c) 1992 by Sun Microsystems, Inc.
40 #if !defined(_MP_RPC_INTERFACE_H)
41 #define _MP_RPC_INTERFACE_H
44 * Current ToolTalk RPC protocol version
47 * 2 1.0.1 Asynchronous (i.e. faster) RPCs
48 * 3 1.2 TT_OFFER, TT_HANDLE_PUSH, TT_HANDLE_ROTATE, affecting
49 * any RPC that can send ttsession a new message or pattern:
52 * TT_RPC_DISPATCH_WITH_CONTEXT
53 * TT_RPC_DISPATCH_2_WITH_CONTEXT
55 * TT_RPC_ADD_PATTERN_WITH_CONTEXT
57 const int TT_RPC_VERSION = 4;
58 const int TT_OFFER_RPC_VERSION = 4;
60 * Current ToolTalk XDR protocol version. See tt_xdr_version.h
62 * 1 1.0 Classic; used by default for all on-disk data structures
63 * 2 1.0.1 new _Tt_string::xdr(); more efficient _Tt_message::xdr(); etc?
64 * 3 1.1 contexts in _Tt_pattern::xdr(), _Tt_signature::xdr();
65 * used in any types database with contextful signatures.
66 * 4 1.2 PUSH, ROTATE in _Tt_pattern::xdr(), _Tt_signature::xdr();
67 * _Tt_arg::_matched_type in _Tt_arg::xdr();
68 * used in any types database with push/rotate signatures.
69 * However, we still use version 3 for the wire, because
70 * PUSH/ROTATE only make a difference in the types database.
72 const int TT_XDR_VERSION = 3;
73 const int TT_TYPESDB_DEFAULT_XDR_VERSION = 1;
74 const int TT_CONTEXTS_XDR_VERSION = 3;
75 const int TT_PUSH_ROTATE_XDR_VERSION = 4;
78 * Default timeout for RPC requests (in seconds).
79 * Use a very large value to indicate almost infinity.
80 * In addition to accommodating a loaded ttsession, it will also
81 * facilitate debugging.
82 * ONE HUNDRED MILLION IS THE MAXIMUM PERMITTED VALUE
83 * ON SunOS 4.1. Use ONE MILLION to leave room for possible weird system
84 * dependencies. That will still allow the sender to wait a patient 11.6 days.
86 #define TT_RPC_TMOUT 1000000
89 * RPC procedure numbers
92 * Note that each rpc procedure number cannot be re-used. Adding a new
93 * rpc procedure thus means allocating a new number below (and then
94 * bumping up TT_RPC_LAST) and adding the dispatch function to the
95 * _tt_rpc_dispatch_table in mp_rpc_implement.cc. The only exception
96 * to this is TT_RPC_VRFY_SESSION which has an out-of-sequence rpc
97 * number (it is chosen to minimize the likelyhood of being implemented
98 * by another program since the purpose of it is to identify a tooltalk
104 TT_RPC_UPDATE_MSG = 2,
105 TT_RPC_JOIN_FILE = 3,
106 TT_RPC_QUIT_FILE = 4,
107 TT_RPC_JOIN_SESSION = 5,
108 TT_RPC_QUIT_SESSION = 6,
109 TT_RPC_NEXT_MESSAGE = 7,
110 TT_RPC_ADD_PATTERN = 8,
111 TT_RPC_DEL_PATTERN = 9,
112 TT_RPC_DECLARE_PTYPE = 10,
113 TT_RPC_SET_FD_CHANNEL = 11,
114 TT_RPC_SET_PROP = 12,
115 TT_RPC_ADD_PROP = 13,
116 TT_RPC_GET_PROP = 14,
117 TT_RPC_PROP_COUNT = 15,
118 TT_RPC_PROP_NAME = 16,
119 TT_RPC_PROP_NAMES_COUNT = 17,
120 TT_RPC_ALLOC_PROCID_KEY = 18,
121 TT_RPC_CLOSE_PROCID = 19,
122 TT_RPC_OTYPE_DERIVEDS_COUNT = 20,
123 TT_RPC_OTYPE_DERIVED = 21,
124 TT_RPC_OTYPE_BASE = 22,
125 TT_RPC_OTYPE_IS_DERIVED = 23,
126 TT_RPC_OTYPE_OSIG_COUNT = 24,
127 TT_RPC_OTYPE_HSIG_COUNT = 25,
128 TT_RPC_OTYPE_OSIG_OP = 26,
129 TT_RPC_OTYPE_HSIG_OP = 27,
130 TT_RPC_OTYPE_OSIG_ARGS_COUNT = 28,
131 TT_RPC_OTYPE_HSIG_ARGS_COUNT = 29,
132 TT_RPC_OTYPE_OSIG_ARG_MODE = 30,
133 TT_RPC_OTYPE_HSIG_ARG_MODE = 31,
134 TT_RPC_OTYPE_OSIG_ARG_TYPE = 32,
135 TT_RPC_OTYPE_HSIG_ARG_TYPE = 33,
136 TT_RPC_HDISPATCH = 34,
137 TT_RPC_HUPDATE_MSG = 35,
139 /* version 2 numbers */
141 TT_RPC_DISPATCH_2 = 36,
142 TT_RPC_UPDATE_MSG_2 = 37,
143 TT_RPC_MSGREAD_2 = 38,
147 TT_RPC_DISPATCH_ON_EXIT = 39,
148 TT_RPC_UNDECLARE_PTYPE = 40,
149 TT_RPC_EXISTS_PTYPE = 41,
150 TT_RPC_UNBLOCK_PTYPE = 42,
151 TT_RPC_JOIN_CONTEXT = 43,
152 TT_RPC_QUIT_CONTEXT = 44,
153 TT_RPC_DISPATCH_WITH_CONTEXT = 45,
154 TT_RPC_DISPATCH_2_WITH_CONTEXT = 46,
155 TT_RPC_ADD_PATTERN_WITH_CONTEXT = 47,
159 TT_RPC_LOAD_TYPES = 48,
161 /* Add new RPC numbers before here and bump TT_RPC_LAST */
164 /* This high number is treated specially */
165 TT_RPC_VRFY_SESSION = 400
166 } _Tt_rpc_procedure_number;
168 #endif /* _MP_RPC_INTERFACE_H */