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 /*%% $XConsortium: mp_ptype.h /main/3 1995/10/23 11:52:31 rswiston $ */
29 * Tool Talk Message Passer (MP) - mp_ptype.h
31 * Copyright (c) 1990 by Sun Microsystems, Inc.
33 * Declaration of the _Tt_ptype class representing an in-memory process type
40 #include "mp/mp_global.h"
41 #include "mp/mp_trace.h"
42 #include "mp_s_message_utils.h"
43 #include "mp_s_procid_utils.h"
44 #include "mp_signature_utils.h"
45 #include "util/tt_table.h"
49 * _Tt_ptype is an in-memory representation of a process type
50 * definition in a ptype database.
53 declare_list_of(_Tt_ptype_prop)
55 class _Tt_ptype_prop : public _Tt_object {
58 _Tt_ptype_prop(_Tt_string name, _Tt_string value);
59 virtual ~_Tt_ptype_prop();
62 void print(const _Tt_ostream &os) const;
63 void pretty_print(const _Tt_ostream &os) const;
64 bool_t xdr(XDR *xdrs);
71 class _Tt_ptype : public _Tt_object {
75 _Tt_signature_list_ptr &osigs();
76 _Tt_signature_list_ptr &hsigs();
78 void proc_started(const _Tt_s_procid_ptr &pr);
79 const _Tt_string & ptid() const {return _ptid;};
80 int getprop(_Tt_string propname,
82 Tt_status start(_Tt_s_message_ptr &m,
83 const _Tt_msg_trace &trace);
84 void set_ptid(_Tt_string ptid);
85 void append_osigs(_Tt_signature_list_ptr &sigs);
86 void append_hsigs(_Tt_signature_list_ptr &sigs,
87 Tt_category category);
88 void append_osig(_Tt_signature_ptr sig);
89 void append_hsig(_Tt_signature_ptr sig,
90 Tt_category category);
91 void appendprop(_Tt_string name, _Tt_string value);
92 void print(const _Tt_ostream &os) const;
93 void pretty_print(const _Tt_ostream &os) const;
94 int check_semantics();
95 bool_t xdr(XDR *xdrs);
96 pid_t start_pid() const;
97 int launching() const;
99 void merge_with(_Tt_ptype_ptr &pt);
101 int xdr_version_required() const;
103 friend class _Tt_typedb;
104 Tt_status launch(_Tt_s_message_ptr &m,
105 const _Tt_msg_trace &trace);
109 _Tt_ptype_prop_list_ptr _props;
110 _Tt_s_message_list_ptr _queued_messages;
111 _Tt_s_message_ptr _startmsg;
112 _Tt_signature_list_ptr _osigs;
113 _Tt_signature_list_ptr _hsigs;
115 friend int operator==(_Tt_ptype&,_Tt_ptype&);
116 friend int operator!=(_Tt_ptype&,_Tt_ptype&);
119 _Tt_string _tt_ptype_ptid(_Tt_object_ptr &o);
120 void _tt_otype_print(const _Tt_ostream &os, const _Tt_object *obj);
121 #endif /* _MP_PTYPE_H */