/[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.4 - (hide annotations)
Tue Mar 16 16:56:54 2004 UTC (10 years, 1 month ago) by ihatchondo
Branch: MAIN
Changes since 1.3: +8 -2 lines
lib
 - some cosmetic change
 - doc added for each request class.
 - All the macros for declaring request displaced in a file name ICE-macros.lisp for simplicity.
 - some array8s slots type turned into list of string since the xsmp explain that they should be readen as string but the encoding is array8.
 - translator functions added: string(s)<->array8(s)

sm-init in eclipse.lisp use the above translators.
1 ihatchondo 1.1 ;;; -*- Mode: Lisp; Syntax: Common-Lisp; Package: COMMON-LISP; -*-
2 ihatchondo 1.4 ;;; $Id: package.lisp,v 1.4 2004/03/16 16:56:54 ihatchondo Exp $
3 ihatchondo 1.1 ;;; ---------------------------------------------------------------------------
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     <ftp://ftp.xfree86.org/X.Org/pub/R6.6/xc/doc/hardcopy/SM/xsmp.PS.gz>")
81     (:import-from :ice-lib
82 ihatchondo 1.3 #: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
88 ihatchondo 1.1 )
89     (:shadow
90 ihatchondo 1.4 #:string-length #:strings-length
91     #:buffer-read-string #:buffer-write-string
92 ihatchondo 1.3 #:buffer-read-strings #:buffer-write-strings)
93 ihatchondo 1.1 (:size 90)
94     (:export
95     ;; classes. minor opcode
96 ihatchondo 1.3 #:register-client ; 1
97     #:register-client-reply ; 2
98     #:save-yourself ; 3
99     #:save-yourself-request ; 4
100     #:interact-request ; 5
101     #:interact ; 6
102     #:interact-done ; 7
103     #:save-yourself-done ; 8
104     #:die ; 9
105     #:shutdown-cancelled ; 10
106     #:connection-closed ; 11
107     #:set-properties ; 12
108     #:delete-properties ; 13
109     #:get-properties ; 14
110     #:get-properties-reply ; 15
111     #:save-yourself-phase2-request ; 16
112     #:save-yourself-phase2 ; 17
113     #:save-complete ; 18
114 ihatchondo 1.1
115     ;; structures.
116 ihatchondo 1.3 #:property
117 ihatchondo 1.1
118     ;; condition
119 ihatchondo 1.3 #:session-manager-unavailable
120 ihatchondo 1.1
121     ;; sm lib classes
122 ihatchondo 1.3 #:sm-connection
123 ihatchondo 1.1
124     ;; types
125 ihatchondo 1.3 #:interact-style
126     #:dialog-type
127     #:save-type
128     #:array8
129     #:array8s
130     #:properties
131 ihatchondo 1.1
132     ;; constants & vars
133 ihatchondo 1.3 #:+sm-proto-major+
134     #:+sm-proto-minor+
135 ihatchondo 1.1
136     ;; macros.
137 ihatchondo 1.3 #:buffer-read-array8
138     #:buffer-read-array8s
139     #:buffer-read-client-id
140     #:buffer-read-dialog-type
141     #:buffer-read-interact-style
142     #:buffer-read-properties
143     #:buffer-read-property
144     #:buffer-read-save-type
145     #:buffer-write-array8
146     #:buffer-write-array8s
147     #:buffer-write-client-id
148     #:buffer-write-dialog-type
149     #:buffer-write-interact-style
150     #:buffer-write-properties
151     #:buffer-write-property
152     #:buffer-write-save-type
153     #:signal-sm-error
154 ihatchondo 1.1
155     ;; functions
156 ihatchondo 1.3 #:connection-closed-p
157     #:delete-properties-p
158     #:die-p
159     #:get-properties-p
160     #:get-properties-reply-p
161     #:interact-done-p
162     #:interact-p
163     #:interact-request-p
164     #:property-p
165     #:register-client-p
166     #:register-client-reply-p
167     #:register-xsmp-protocol
168     #:save-complete-p
169     #:save-yourself-done-p
170     #:save-yourself-p
171     #:save-yourself-request-p
172     #:save-yourself-phase2-p
173     #:save-yourself-phase2-request-p
174     #:set-properties-p
175     #:shutdown-cancelled-p
176    
177     #:array8-length
178     #:array8s-length
179     #:client-id-length
180     #:dialog-type-length
181     #:interact-style-length
182     #:properties-length
183     #:property-length
184     #:save-type-length
185 ihatchondo 1.4
186     #:array8->string
187     #:array8s->strings
188     #:string->array8
189     #:strings->array8s
190 ihatchondo 1.1
191 ihatchondo 1.3 #:copy-property
192     #:make-property
193     #:property-name
194     #:property-type
195     #:property-values
196     #:make-array8
197    
198     #:close-sm-connection
199     #:connection-closed-reason
200     #:open-sm-connection
201     #:session-manager-unavailable-reason
202 ihatchondo 1.1
203     ;; methods
204 ihatchondo 1.3 #:delete-properties-properties
205     #:get-properties-reply-properties
206     #:interact-done-cancel-shutdown-p
207     #:interact-request-dialog-type
208     #:register-client-previous-id
209     #:register-client-reply-client-id
210     #:save-yourself-done-success-p
211     #:save-yourself-fast-p
212     #:save-yourself-interact-style
213     #:save-yourself-request-fast-p
214     #:save-yourself-request-global-p
215     #:save-yourself-request-interact-style
216     #:save-yourself-request-shutdown-p
217     #:save-yourself-request-type
218     #:save-yourself-shutdown-p
219     #:save-yourself-type
220     #:set-properties-properties
221     #:sm-client-id
222     #:sm-protocol-revision
223     #:sm-protocol-version
224     #:sm-release
225     #:sm-vendor
226 ihatchondo 1.1 ))

  ViewVC Help
Powered by ViewVC 1.1.5