mp_s_session.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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 libraries 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. class _Tt_s_session : public _Tt_session {
  43. public:
  44. _Tt_s_session();
  45. virtual ~_Tt_s_session();
  46. Tt_status s_addprop(_Tt_string prop, _Tt_string val);
  47. Tt_status s_getprop(_Tt_string prop, int i,
  48. _Tt_string &value);
  49. Tt_status s_init();
  50. Tt_status s_join(_Tt_s_procid_ptr &procid);
  51. Tt_status s_propcount(_Tt_string prop, int &cnt);
  52. Tt_status s_propname(int i, _Tt_string &prop);
  53. Tt_status s_propnames_count(int &cnt);
  54. Tt_status s_quit(_Tt_s_procid_ptr &procid);
  55. Tt_status s_setprop(_Tt_string prop, _Tt_string val);
  56. void queue_message(_Tt_message_ptr &m);
  57. void pattern_added();
  58. Tt_status check_for_live_session();
  59. private:
  60. Tt_status advertise_address();
  61. void mod_session_id_in_patterns(_Tt_pattern_list_ptr
  62. &patterns,
  63. int add);
  64. void u_rpc_init();
  65. _Tt_message_list_ptr &queued_messages();
  66. _Tt_rpc_server_ptr _rpc_server;
  67. friend class _Tt_s_mp;
  68. };
  69. #endif /* MP_S_SESSION_H */