/[eclipse]/eclipse/lib/sm/package.lisp
ViewVC logotype

Contents of /eclipse/lib/sm/package.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (show annotations)
Tue Dec 6 13:52:49 2005 UTC (8 years, 4 months ago) by ihatchondo
Branch: MAIN
Changes since 1.8: +2 -2 lines
Fix 'unix' type handling in the SESSION_MANAGER scheme in ICE-lib.lisp
Documentation update and file format changes for the rest.
1 ;;; -*- Mode: Lisp; Syntax: Common-Lisp; Package: COMMON-LISP; -*-
2 ;;; $Id: package.lisp,v 1.9 2005/12/06 13:52:49 ihatchondo Exp $
3 ;;; ---------------------------------------------------------------------------
4 ;;; Title: SM Library
5 ;;; Created: 2004 01 15 15:28
6 ;;; Author: Iban Hatchondo <hatchond@labri.fr>
7 ;;; ---------------------------------------------------------------------------
8 ;;; (c) copyright 2004 by Iban Hatchondo
9
10 ;;;
11 ;;; Permission is granted to any individual or institution to use,
12 ;;; copy, modify, and distribute this software, provided that this
13 ;;; complete copyright and permission notice is maintained, intact, in
14 ;;; all copies and supporting documentation.
15 ;;;
16 ;;; This program is distributed in the hope that it will be useful,
17 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19
20 ;;; NOTE: All comments below are from the original, modified only for
21 ;;; readability. (added for package doc).
22 ;;;
23 ;;; Permission is hereby granted, free of charge, to any person obtaining a
24 ;;; copy of this software and associated documentation files (the ``Software'')
25 ;;; to deal in the Software without restriction, including without limitation
26 ;;; the rights to use, copy, modify, merge, publish, distribute, sublicense,
27 ;;; and/or sell copies of the Software, and to permit persons to whom the
28 ;;; Software is furnished to do so, subject to the following conditions:
29 ;;;
30 ;;; The above copyright notice and this permission notice shall be included in
31 ;;; all copies or substantial portions of the Software.
32 ;;;
33 ;;; THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
34 ;;; OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
35 ;;; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
36 ;;; THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
37 ;;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
38 ;;; OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
39 ;;; SOFTWARE.
40 ;;; Except as contained in this notice, the name of the X Consortium shall not
41 ;;; be used in advertising or otherwise to promote the sale, use or other
42 ;;; dealings in this Software without prior written authorization from the X
43 ;;; Consortium.
44 ;;; (X Window System is a trademark of X Consortium, Inc.)
45
46 (common-lisp:in-package :common-lisp-user)
47
48 (defpackage "SM-LIB"
49 (:use common-lisp ice-lib)
50 (:documentation
51 "The purpose of the X Session Management Protocol (XSMP) is to provide a
52 uniform mechanism for users to save and restore their sessions. A
53 session is a group of clients, each of which has a particular state.
54 The session is controlled by a network service called the session manager.
55 The session manager issues commands to its clients on behalf of the user.
56 These commands may cause clients to save their state or to terminate. It is
57 expected that the client will save its state in such a way that the client
58 can be restarted at a later time and resume its operation as if it had
59 never been terminated. A client's state might include information about
60 the file currently being edited, the current position of the insertion
61 point within the file, or the start of an uncommitted transaction. The
62 means by which clients are restarted is unspecified by this protocol.
63
64 For purposes of this protocol, a \fIclient\fP of the session manager is
65 defined as a connection to the session manager. A client is typically,
66 though not necessarily, a process running an application program connected
67 to an X Window System display. However, a client may be connected to more
68 than one X display or not be connected to any X displays at all.
69
70 This protocol is layered on top of the X Consortium's ICE protocol and
71 relies on the ICE protocol to handle connection management and
72 authentication.
73
74 This a small implementation of the protocol specification that contains
75 only the functions that are used on the client side. If you want to build a
76 SM server you'll need to implement some functionalities describe in the
77 specification.
78
79 protocol specification can be found at:
80 {http://www.xfree86.org/current/xsmp.pdf}")
81 (:import-from :ice-lib
82 #:make-default-versions
83 #:authentication-protocol-index
84 #:protocol-major-opcode
85 #:major-opcode #:offending-minor-opcode
86 #:version-index #:vendor-name #:release-name
87 #:sintern #:index+
88 )
89 (:shadow
90 #:get-properties
91 #:string-length #:strings-length #:strings
92 #:buffer-read-string #:buffer-write-string
93 #:buffer-read-strings #:buffer-write-strings)
94 (:size 90)
95 (:export
96 ;; classes. minor opcode
97 #:register-client ; 1
98 #:register-client-reply ; 2
99 #:save-yourself ; 3
100 #:save-yourself-request ; 4
101 #:interact-request ; 5
102 #:interact ; 6
103 #:interact-done ; 7
104 #:save-yourself-done ; 8
105 #:die ; 9
106 #:shutdown-cancelled ; 10
107 #:connection-closed ; 11
108 #:set-properties ; 12
109 #:delete-properties ; 13
110 #:get-properties ; 14
111 #:get-properties-reply ; 15
112 #:save-yourself-phase2-request ; 16
113 #:save-yourself-phase2 ; 17
114 #:save-complete ; 18
115
116 ;; structures.
117 #:property
118
119 ;; condition
120 #:session-manager-unavailable
121
122 ;; sm lib classes
123 #:sm-connection
124
125 ;; types
126 #:interact-style
127 #:dialog-type
128 #:save-type
129 #:array8
130 #:array8s
131 #:properties
132
133 ;; constants & vars
134 #:+sm-proto-major+
135 #:+sm-proto-minor+
136
137 ;; macros.
138 #:buffer-read-array8
139 #:buffer-read-array8s
140 #:buffer-read-client-id
141 #:buffer-read-dialog-type
142 #:buffer-read-interact-style
143 #:buffer-read-properties
144 #:buffer-read-property
145 #:buffer-read-save-type
146 #:buffer-write-array8
147 #:buffer-write-array8s
148 #:buffer-write-client-id
149 #:buffer-write-dialog-type
150 #:buffer-write-interact-style
151 #:buffer-write-properties
152 #:buffer-write-property
153 #:buffer-write-save-type
154 #:signal-sm-error
155
156 ;; functions
157 #:connection-closed-p
158 #:delete-properties-p
159 #:die-p
160 #:get-properties-p
161 #:get-properties-reply-p
162 #:interact-done-p
163 #:interact-p
164 #:interact-request-p
165 #:property-p
166 #:register-client-p
167 #:register-client-reply-p
168 #:register-xsmp-protocol
169 #:save-complete-p
170 #:save-yourself-done-p
171 #:save-yourself-p
172 #:save-yourself-request-p
173 #:save-yourself-phase2-p
174 #:save-yourself-phase2-request-p
175 #:set-properties-p
176 #:shutdown-cancelled-p
177
178 #:array8-length
179 #:array8s-length
180 #:client-id-length
181 #:dialog-type-length
182 #:interact-style-length
183 #:properties-length
184 #:property-length
185 #:save-type-length
186
187 #:array8->string
188 #:array8s->strings
189 #:string->array8
190 #:strings->array8s
191
192 #:copy-property
193 #:make-property
194 #:property-name
195 #:property-type
196 #:property-values
197 #:make-array8
198
199 #:close-sm-connection
200 #:connection-closed-reason
201 #:open-sm-connection
202 #:session-manager-unavailable-reason
203
204 ;; methods
205 #:delete-properties-properties
206 #:get-properties-reply-properties
207 #:interact-done-cancel-shutdown-p
208 #:interact-request-dialog-type
209 #:register-client-previous-id
210 #:register-client-reply-client-id
211 #:save-yourself-done-success-p
212 #:save-yourself-fast-p
213 #:save-yourself-interact-style
214 #:save-yourself-request-fast-p
215 #:save-yourself-request-global-p
216 #:save-yourself-request-interact-style
217 #:save-yourself-request-shutdown-p
218 #:save-yourself-request-type
219 #:save-yourself-shutdown-p
220 #:save-yourself-type
221 #:set-properties-properties
222 #:sm-client-id
223 #:sm-protocol-revision
224 #:sm-protocol-version
225 #:sm-release
226 #:sm-vendor
227 ))

  ViewVC Help
Powered by ViewVC 1.1.5