Add GNU LGPL headers to all .c .C and .h files
[oweals/cde.git] / cde / lib / tt / slib / mp_s_session.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 /*%%  (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_s_session.h /main/3 1995/10/23 11:59:47 rswiston $                                                        */
28 /* 
29  * mp_s_session.h
30  * 
31  * Copyright (c) 1990 by Sun Microsystems, Inc.
32  * 
33  * This file contains the implementation of the server side of
34  * the _Tt_session object.
35  */
36 #ifndef MP_S_SESSION_H
37 #define MP_S_SESSION_H
38 #include "mp/mp_session.h"
39 #include "mp_s_session_utils.h"
40 #include "mp_s_procid_utils.h"
41 #include "mp_rpc_server_utils.h"
42
43 class _Tt_s_session : public _Tt_session {
44       public:
45         _Tt_s_session();
46         virtual ~_Tt_s_session();
47
48         Tt_status               s_addprop(_Tt_string prop, _Tt_string val);
49         Tt_status               s_getprop(_Tt_string prop, int i,
50                                           _Tt_string &value);
51         Tt_status               s_init();
52         Tt_status               s_join(_Tt_s_procid_ptr &procid);
53         Tt_status               s_propcount(_Tt_string prop, int &cnt);
54         Tt_status               s_propname(int i, _Tt_string &prop);
55         Tt_status               s_propnames_count(int &cnt);
56         Tt_status               s_quit(_Tt_s_procid_ptr &procid);
57         Tt_status               s_setprop(_Tt_string prop, _Tt_string val);
58         void                    queue_message(_Tt_message_ptr &m);
59         void                    pattern_added();
60         Tt_status               check_for_live_session();
61
62       private:
63         Tt_status               advertise_address();
64         void                    mod_session_id_in_patterns(_Tt_pattern_list_ptr
65                                                            &patterns,
66                                                            int add);
67         void                    u_rpc_init();
68         _Tt_message_list_ptr    &queued_messages();
69
70         _Tt_rpc_server_ptr      _rpc_server;
71
72         friend class _Tt_s_mp;
73 };
74
75 #endif                          /*  MP_S_SESSION_H */